Created
July 23, 2026 17:43
-
-
Save JustinMeimar/cb635caffa5356c511bea993c2d73339 to your computer and use it in GitHub Desktop.
AOT_code_discussion_07_23_2026.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Notes from code discussion: | |
| - Make AOT loading infallible. | |
| - Baseline interpreter must always be present. Other artifacts | |
| (ICs/ Baseline functions) can still fail to load since corpus is | |
| finite. More MOZ_ASSERTS. | |
| - Remove aot blob YAML field for "kind", becomes internally generated. | |
| - ImmGCPtr overloads are a misnomer, we only need them for 5 AtomsZone | |
| pointers. Change from slot list traversal to whitelist. | |
| - AOT preamble trampoline sets the AOT table base into a pass register | |
| for every transition point into baseline. Explore a "C++ way". Can | |
| we use C++ calling convention to setup the transition for us somehow? | |
| - Recall the issue here is that AOT artifacts are all position | |
| independent and can not embed _any_ runtime pointers. The AOT | |
| indirection table is filled at JitRuntime init. For any AOT | |
| blob, it is the key to attain all other pointers via the | |
| AOT_SLOTS contract. | |
| We need some way to get the AOT table base into BaselineFrame | |
| and StubFrame. Currently the frame builders _expect_ a specifc | |
| register to contain the table base, which the preamble trampoline | |
| is required to setup. | |
| The other way we tried was TLS (recall from maybe 2 months ago or | |
| so). TLS in AOT does not work, offsets are sensitive to dynamic | |
| library loading order and are brittle in offline settings. The | |
| preamble trampoline works for now, but is not overly elegant. | |
| - YAML descriptions of Baseline artifact meta-data causes duplicate | |
| source of truth with corresponding C++ classes. If someone adds a | |
| new blinterp offset field for example, AOT serde breaks. Explore | |
| some options. | |
| 1. Generate the C++ class describing baseline metadata from YAML. | |
| This consolidates definitions, but is relatively invasive. | |
| Definitely makes sense for this fork, but for upstream, maybe not. | |
| 2. Other (TODO) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment