Nice work! I haven't looked at this in too much detail yet, but here's one idea: To minimize the magic hopping when getting the values from the stack, it would be nice if all trampoline generators had a struct whose layout mirrors the trampoline's stack frame. The arm implementation has one: [`struct EnterJitStack`](https://searchfox.org/mozilla-central/rev/e84baf5c730abd453be5d50dcb0aba1e743bac47/js/src/jit/arm/Trampoline-arm.cpp#59), and the mips64 implementation also has a [`struct EnterJitRegs`](https://searchfox.org/mozilla-central/rev/e84baf5c730abd453be5d50dcb0aba1e743bac47/js/src/jit/mips64/Trampoline-mips64.cpp#38). Since we'll need to add the "magic" code next to all trampoline generators anyway, it might be nice to add these structs for all of them too, so that the magic code can look really simple.
Bug 1635987 Comment 14 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Nice work! I haven't looked at this in too much detail yet, but here's one idea: To minimize the magic hopping when getting the values from the stack, it would be nice if all trampoline generators had a struct whose layout mirrors the trampoline's stack frame layout. The arm implementation has one: [`struct EnterJitStack`](https://searchfox.org/mozilla-central/rev/e84baf5c730abd453be5d50dcb0aba1e743bac47/js/src/jit/arm/Trampoline-arm.cpp#59), and the mips64 implementation also has a [`struct EnterJitRegs`](https://searchfox.org/mozilla-central/rev/e84baf5c730abd453be5d50dcb0aba1e743bac47/js/src/jit/mips64/Trampoline-mips64.cpp#38). Since we'll need to add the "magic" code next to all trampoline generators anyway, it might be nice to add these structs for all of them too, so that the magic code can look really simple.