Closed Bug 601986 Opened 14 years ago Closed 14 years ago

Make blockchain determination faster for with, flat closures

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: billm, Assigned: billm)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

In the fix for bug 535912, a few instructions still use a slow path to obtain the block chain. This can be fixed by emitting more BLOCKCHAIN instructions.
Attached patch fixSplinter Review
This patch emits the additional bytecodes and makes use of them to get the block chain.
Assignee: general → wmccloskey
Status: NEW → ASSIGNED
Attachment #480970 - Flags: review?
Attachment #480970 - Flags: review? → review?(igor)
Comment on attachment 480970 [details] [diff] [review]
fix

>diff --git a/js/src/jsemit.cpp b/js/src/jsemit.cpp
>--- a/js/src/jsemit.cpp
>+++ b/js/src/jsemit.cpp
>@@ -5271,16 +5271,19 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
>       case TOK_WITH:
...
>         if (js_Emit1(cx, cg, JSOP_ENTERWITH) < 0)
>             return JS_FALSE;
>+        /* Make blockChain determination quicker. */
>+        if (EmitBlockChain(cx, cg) < 0)
>+            return JS_FALSE;

Nit: blank line before the comment.

Non-nit: if [enterwith] and other-non-jump bytecodes need the block chain, then lets extend the bytecodes with an explicit index into the blockchain. But this can wait another bug.

>@@ -6420,16 +6423,19 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
>         if (EmitJump(cx, cg, JSOP_ENDFILTER, top - CG_OFFSET(cg)) < 0)
>             return JS_FALSE;
>+        /* Make blockChain determination quicker. */
>+        if (EmitBlockChain(cx, cg) < 0)
>+            return JS_FALSE;

Nit: blank line before the comment.
Attachment #480970 - Flags: review?(igor) → review+
http://hg.mozilla.org/mozilla-central/rev/d03cc1038c7a
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Depends on: 656555
You need to log in before you can comment on or make changes to this bug.