Update tests for the record-ops store hook and the untyped-writes benchmark

- forin-keys.test.ts matches the record-ops table with its eighth field, the
  store hook, which is null for a record no untyped code writes.
- bench/record-untyped-writes writes typed records through `unknown` and
  `Object.assign` views, so it links dynamic-tier symbols; DYNAMIC_WORKLOADS
  lists it.
- The sanitized self-hosting emission test gets a 600 s timeout. It takes
  about half of the default 300 s on an idle 16-core host, with or without
  these changes, and exceeded the default on a loaded CI shard.
This commit is contained in:
Chris Tate
2026-10-26 21:04:31 -05:00
parent 73335a5130
commit e58def0299
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ console.log(count(row), count(JSON.parse('{"b":1}')));
expect(llvm).not.toContain("@scr_dyn_for_in_keys(");
// Fully required record shapes are marked fixed for the stable walk.
expect(llvm).toMatch(
/_rops = internal global \{ i64, ptr, ptr, ptr, i8, ptr, ptr \} \{[^}]*i8 1, ptr null, ptr null \}/,
/_rops = internal global \{ i64, ptr, ptr, ptr, i8, ptr, ptr, ptr \} \{[^}]*i8 1, ptr null, ptr null, ptr null \}/,
);
});
+4 -1
View File
@@ -401,7 +401,9 @@ export function dynamicTierSymbols(names) {
* bench/dynamic-properties are untyped JavaScript. bench/regex-replacers,
* also added later, passes checked-dynamic values to replace callbacks
* whose parameters the lib types `any`: captures a match can leave unset
* and results the checker types `any`. Every other bench workload is fully typed and must link none. The gate and
* and results the checker types `any`. bench/record-untyped-writes, also
* added later, writes typed records through `unknown` and `Object.assign`
* views. Every other bench workload is fully typed and must link none. The gate and
* tests/harness/bench-dynamic-tier.test.ts enforce that, and the test also
* fails when a listed workload stops linking them, so remove a workload here
* when a leak fix makes its binary clean. */
@@ -425,6 +427,7 @@ export const DYNAMIC_WORKLOADS = new Set([
"bench/json-unions",
"bench/throw-chains",
"bench/regex-replacers",
"bench/record-untyped-writes",
]);
/** Names of the functions (text and weak symbols) in `nm` output. Mach-O
+3 -1
View File
@@ -59,6 +59,8 @@ test("the production layout and metadata stage lowers statically", async () => {
});
for (const backend of ["llvm"] as const) {
// A sanitized build of the fixture and its emission cases take about half
// the default 300 s budget on an idle 16-core host.
test(`native LLVM layout and metadata emission (${backend})`, async () => {
const dir = mkdtempSync(
join(process.platform === "win32" ? tmpdir() : "/tmp", "scriptc-native-emission-"),
@@ -268,5 +270,5 @@ for (const backend of ["llvm"] as const) {
} finally {
rmSync(dir, { recursive: true, force: true });
}
});
}, 600_000);
}