perf(javascript): reduce analysis and source-map work (#955)

* perf(javascript): reduce semantic traversal overhead

* perf(source-maps): reuse validated regular map rows
This commit is contained in:
morluto
2026-10-07 20:33:35 +08:00
committed by GitHub
parent dda8e6a728
commit c7530f9a81
6 changed files with 59 additions and 10 deletions
@@ -151,6 +151,9 @@ describe("source-map layout admission", () => {
expect(() => trace({ ...leaf, mappings })).toThrow();
},
);
it("validates regular-map source indexes after reusing its decoded rows", () => {
expect(() => trace({ ...leaf, mappings: "ACAA" })).toThrow(/index/u);
});
it("rejects huge indexed offsets before upstream row allocation", () => {
expect(() =>
trace({