Closed Bug 1727477 Opened 24 days ago Closed 16 days ago

Split up the baseline compiler and refactor it lightly

Categories

(Core :: Javascript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: lth, Assigned: lth)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Yak shaving for memory64 (part 3): The baseline compiler needs to be split up and refactored a little so as to keep complexity under control when we're adding 64-bit pointers. I think this has two major parts: splitting into multiple files, and then moving some code around to centralize logic in specific files.

Every file name starts with the prefix WasmBaseline, for easy
identification. After that we have headers:

Defs -- basic configuration and a few shared definitions
Frame -- stack frame and stack map abstractions
Memory -- a few shared definitions pertaining to heap access
Object -- the compiler object itself
RegDefs -- register and register allocation abstractions
Stk -- the Stk value type

Then inline files:

Object-inl -- some inline defs for the compiler (tentative)
RegMgmt-inl -- ditto for register management
StkMgmg-inl -- almost anything that pushes or pops

Then cpp files:

Frame -- anything to do with stack frame or stack map
Memory -- virtually all code for heap access

A lot of things are still left in WasmBaselineCompile.cpp but are
slowly being moved, there will be more new files.

I'm not in love with the name "Object" for the compiler proper, but I
will not have both "Compile" and "Compiler" and the former is reserved
for the API.

Blocks: 1727084
Attachment #9237961 - Attachment description: WIP: Bug 1727477 - Split baseline compiler into multiple files (WIP) → WIP: Bug 1727477 - Split baseline compiler into multiple files.
Attachment #9237961 - Attachment description: WIP: Bug 1727477 - Split baseline compiler into multiple files. → Bug 1727477 - Split baseline compiler into multiple files. r?jseward
Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a91a8befbad
Split baseline compiler into multiple files.  r=jseward
Blocks: 1728549
Status: ASSIGNED → RESOLVED
Closed: 16 days ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
Regressions: 1729124
No longer regressions: 1729124
Regressions: 1729124
You need to log in before you can comment on or make changes to this bug.