mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user