mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
With runtime bitcode import, scr_throw_obj, scr_error_new and the other throw entry points were inlined into the error paths of small compiled functions. The inlined bodies needed callee-saved registers that every call then saved and restored, and they made the helpers too large to inline into their callers (1047 inlined throw bodies in tsc-ts). Mark the 25 functions that only run while raising a JS exception cold and noinline. The LLVM helper never imports noinline bodies, so the throw paths stay calls. tsc-ts Excalidraw: -0.44% instructions.