Remove the bytecode main/prologue split
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: shu, Assigned: jandem)
References
Details
(Keywords: triage-deferred)
Attachments
(2 files)
Reporter | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
Reporter | ||
Comment 4•9 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
Hah, I was just filing a bug for this. I prototyped some patches for this that are green so far, the main issue is DEFFUN ops in global/eval scripts need to be emitted upfront. My patches store these functions in a Vector in {Global,Eval}SharedContext.
https://hg.mozilla.org/try/rev/5f5e70e89ebcec97b77c7055bc20659321d3cd4e
https://hg.mozilla.org/try/rev/b35443b316ecee7535b9cec7e3ccc462df16a23b
Emitting everything linearly will simplify some IC work I want to do later.
arai, what do you think?
Comment 6•6 years ago
|
||
Looks great :)
I don't see any issue so far,
but I want to make sure how it affects source notes for prologue bytecodes, will look into the details shortly.
(it's related to bug 1519005 patch)
Comment 7•6 years ago
|
||
so, in the patch, hoisted/top-level functions' bytecode are emitted in the different place than where the source notes are emitted (emitHoistedFunctionsInList
)
now I think we really don't need the source notes for them.
also, hoisted/top-level function's JSFunction
/FunctionBox
are still modified inside BytecodeEmitter::emitFunction
.
- https://searchfox.org/mozilla-central/rev/dac799c9f4e9f5f05c1071cba94f2522aa31f7eb/js/src/frontend/BytecodeEmitter.cpp#5510
- https://searchfox.org/mozilla-central/rev/dac799c9f4e9f5f05c1071cba94f2522aa31f7eb/js/src/frontend/BytecodeEmitter.cpp#5516
I wonder if we can factor out that part into the different function and use it both from both BytecodeEmitter::{emitFunction,defineTopLevelFunctions}
, and completely skip hoisted/top-level functions in emitFunction
.
but maybe it's for other bug (part of bug 1473796 maybe?).
anyway, the patch looks good to me :D
Assignee | ||
Comment 8•6 years ago
|
||
Thanks arai.
I didn't see emitHoistedFunctionsInList yesterday, I think we can use that for this too. I'll try this today.
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Depends on D16947
Assignee | ||
Updated•6 years ago
|
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1d260750a87e
https://hg.mozilla.org/mozilla-central/rev/83d6478d2611
Description
•