Closed
Bug 932276
Opened 11 years ago
Closed 11 years ago
Compute static scope extents at compile-time and store them in JSScript
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: wingo, Assigned: wingo)
References
Details
(Whiteboard: [qa-])
Attachments
(3 files, 1 obsolete file)
23.76 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
18.19 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
4.45 KB,
patch
|
wingo
:
review+
|
Details | Diff | Splinter Review |
The bytecode emitter should record the extent of block scopes at compile-time and store that in the script object.
This will allow computation of the block chain corresponding to a PC solely based on the PC, without abstract interpretation of the bytecode. In the case of lexical blocks with unaliased locals, this will remove the need for ENTERBLOCK / LEAVEBLOCK instructions. It also removes the need for SRC_HIDDEN annotations for nonlocal block exits -- the last use of SRC_HIDDEN after bug 932180.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → wingo
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #823984 -
Flags: review?(jorendorff)
Assignee | ||
Updated•11 years ago
|
Attachment #823986 -
Flags: review?(jorendorff)
Assignee | ||
Updated•11 years ago
|
Attachment #823987 -
Flags: review?(jorendorff)
Updated•11 years ago
|
Attachment #823984 -
Flags: review?(jorendorff) → review+
Comment 4•11 years ago
|
||
Comment on attachment 823986 [details] [diff] [review]
Bytecode emitter records static scope extents (2/3)
Review of attachment 823986 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/frontend/BytecodeEmitter.cpp
@@ +786,5 @@
>
> static bool
> +EmitInternedObjectOp(ExclusiveContext *cx, uint32_t index, JSOp op, BytecodeEmitter *bce)
> +{
> + JS_ASSERT(JOF_OPTYPE(op) == JOF_OBJECT);
Can this also assert that index is in range?
@@ +1087,5 @@
> + JS_ASSERT(stmt->isBlockScope);
> + JS_ASSERT(stmt->blockScopeIndex == bce->blockScopeList.length() - 1);
> + JS_ASSERT(bce->blockScopeList.list[stmt->blockScopeIndex].length == 0);
> + uint32_t scopeObjectIndex = bce->blockScopeList.list[stmt->blockScopeIndex].index;
> + JS_ASSERT(scopeObjectIndex == bce->objectList.length - 1);
These assertions seem to explain the timing of EmitEnterBlock relative to the initialization of all these other bits of the script, which is nice. Can we also assert that pn->pn_objbox and scopeObjectIndex refer to the same thing?
Attachment #823986 -
Flags: review?(jorendorff) → review+
Updated•11 years ago
|
Attachment #823987 -
Flags: review?(jorendorff) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #823987 -
Attachment is obsolete: true
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 830704 [details] [diff] [review]
Reimplement GetBlockChainAtPC using JSScript::blockScopes() (3/3) v2
Thanks for the review, nits addressed.
Attachment #830704 -
Attachment description: Reimplement GetBlockChainAtPC using JSScript::blockScopes() (3/3) → Reimplement GetBlockChainAtPC using JSScript::blockScopes() (3/3) v2
Attachment #830704 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8884e90aace
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4ba9af376f3
https://hg.mozilla.org/integration/mozilla-inbound/rev/d3091d10dd64
Keywords: checkin-needed
Comment 8•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a8884e90aace
https://hg.mozilla.org/mozilla-central/rev/a4ba9af376f3
https://hg.mozilla.org/mozilla-central/rev/d3091d10dd64
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•