Closed
Bug 1467384
Opened 7 years ago
Closed 4 years ago
Split prologue into 2 sections (DEFVAR etc vs others) and compose them later
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
firefox62 | --- | affected |
People
(Reporter: arai, Assigned: arai)
References
Details
Currently prologue contains the following bytecode:
* JSOP_DEFVAR/JSOP_DEFLET/JSOP_DEFCONST
* JSOP_PUSHVARENV (eval in strict mode)
* JSOP_RUNONCE for run-once function
* JSOP_ARGUMENTS+JSOP_SETLOCAL+JSOP_POP for `arguments` in function
* JSOP_FUNCTIONTHIS+JSOP_SETLOCAL+JSOP_POP for `this` in function
* JSOP_LAMBDA+(|JSOP_TOASYNC|JSOP_TOASYNCGEN)+JSOP_DEFFUN for top-level functions
this is problematic for BinAST streaming compilation, because whether to emit JSOP_DEFVAR or JSOP_DEFFUN for "var" bindings is unknown at the point of parsing Asserted*Scope.
what we can do here is split prologue into 2 sections (JSOP_DEFVAR/JSOP_DEFLET/JSOP_DEFCONST, and others),
and emit JSOP_DEFVAR/JSOP_DEFLET/JSOP_DEFCONST section at the end of emitting whole script, instead of the beginning,
so that it's known which "var" binding is actually "function" at that point.
we can compose them once bug 1464311 gets fixed, to get the same prologue bytecode.
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 1•7 years ago
|
||
we might be able to handle it in JSScript::fullyInitFromEmitter instead of composition, if the bytecode is simple enough,
so that the number of copy can be reduced.
Assignee | ||
Comment 2•4 years ago
|
||
DefVar etc are removed by bug 1677580
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•