Closed
Bug 1508962
Opened 6 years ago
Closed 6 years ago
Add a BaselineCodeGen<Handler> class to abstract opcode compilation
Categories
(Core :: JavaScript Engine: JIT, enhancement, P2)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(4 files)
For bug 1499324 we want to add a BaselineCodeGen<Handler> base class to BaselineCompiler, so we can share most of the implementation code between compiler and interpreter.
The first patch here will move all the emit_JSOP_* methods (and fields/methods they depend on) to BaselineCodeGen. Then we can incrementally start using template specialization and the Handler template to abstract them.
Assignee | ||
Comment 1•6 years ago
|
||
This is just the first step: the Handler classes are still empty and
BaselineCodeGen contains fields/methods that should eventually move out of
there. That will happen in follow-up patches.
Depends on D11746
Assignee | ||
Comment 2•6 years ago
|
||
Depends on D12522
Assignee | ||
Comment 3•6 years ago
|
||
I'm pretty happy with how part 2 turned out. We can use lambdas like this for other things as well, where the interpreter will call both of them + emit a branch and the compiler/JIT will call just one depending on static information.
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #3)
> We can use lambdas like this
> for other things as well, where the interpreter will call both of them +
> emit a branch and the compiler/JIT will call just one depending on static
> information.
And this (the code in emitDebugInstrumentation) can probably be abstracted more, if it becomes a common pattern. However that will be easier to do down the road when we know what the other uses are like.
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D12523
Assignee | ||
Comment 6•6 years ago
|
||
Depends on D12922
Updated•6 years ago
|
status-firefox65:
--- → fix-optional
Priority: -- → P2
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/77764799fba3
part 1 - Add a BaselineCodeGen<Handler> base class to BaselineCompiler and use it for JSOp compilation. r=djvj
https://hg.mozilla.org/integration/autoland/rev/e0b75c94bc06
part 2 - Implement emitDebugInstrumentation to abstract emitting debugging-specific code. r=djvj
https://hg.mozilla.org/integration/autoland/rev/c315f5473734
part 3 - Eliminate some *pc uses where we know the JSOp statically. r=djvj
https://hg.mozilla.org/integration/autoland/rev/863959eb64d1
part 4 - Abstract jump opcodes in BaselineCodeGen. r=djvj
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/77764799fba3
https://hg.mozilla.org/mozilla-central/rev/e0b75c94bc06
https://hg.mozilla.org/mozilla-central/rev/c315f5473734
https://hg.mozilla.org/mozilla-central/rev/863959eb64d1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•