Preserve native numeric specialization bootstrap

- Keep validated parameter and local records explicit during specialization.
- Exercise scalar optimizations through the native emitter.
This commit is contained in:
Chris Tate
2026-10-07 15:12:44 -05:00
parent 1c2270a70c
commit cbac4fa2dd
2 changed files with 6 additions and 2 deletions
@@ -169,9 +169,9 @@ export function specializeNumericCalls(
...implementation,
name,
params: fn.params.map((param) =>
ids.has(param.localId) ? { ...param, type: F64 } : param,
ids.has(param.localId) ? { ...param!, type: F64 } : param,
),
locals: fn.locals.map((local) => (ids.has(local.id) ? { ...local, type: F64 } : local)),
locals: fn.locals.map((local) => (ids.has(local.id) ? { ...local!, type: F64 } : local)),
body: specializeBody(fn, slots),
};
variants.set(fn.name, variant);
@@ -112,6 +112,10 @@ const programs = [
"local-union-storage.ts",
"class-callback-storage.ts",
"byte-record-windows.ts",
"constant-callback-dispatch.ts",
"constant-number-remainders.ts",
"numeric-call-specialization.ts",
"scalar-string-slices.ts",
];
for (const backend of ["llvm"] as const) {