diff options
| author | 2026-10-14 19:36:30 +0330 | |
|---|---|---|
| committer | 2026-10-14 19:36:30 +0330 | |
| commit | 7e9abb014169b77cba5174ae92ddc3d1eca4d667 (patch) | |
| tree | b7a9b0dd17c1c9fea7b94f9ba7ad115bf2f7470b /src/compiler/expr.zc | |
| parent | merge work/bench: make bench, bench-check, bench-selftest; baseline at 89f35bd (diff) | |
| parent | rt: exact-size heap bounds; n, the words new asked for, lives in bits 32..62 ... (diff) | |
merge work/exactsize: exact-size heap bounds
Diffstat (limited to 'src/compiler/expr.zc')
| -rw-r--r-- | src/compiler/expr.zc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/expr.zc b/src/compiler/expr.zc index e449508..a548f8d 100644 --- a/src/compiler/expr.zc +++ b/src/compiler/expr.zc @@ -171,7 +171,7 @@ int newtyped() { lit(tsz(t)); lit(t); newsz = tsz(t); newleaf = 0; if (isleaf(t)) newleaf = t; - if (!o3on && !dry && lookup(s_new_k) >= 0) { lit(szclass(newsz)); fast = 1; } + if (newsz <= 0x7FFFFFFF - rt.HDR && !o3on && !dry && lookup(s_new_k) >= 0) { lit(szclass(newsz)); fast = 1; } } expect(s_rp); stamp_site(); @@ -450,7 +450,7 @@ int call(int s) { xaf = af_new(newsz, 2, cp); if (lsp > 0) newloop(cp); // a constant size: the class is known now, so use the allocator's direct path - if (newsz >= 0 && !o3on && !dry && lookup(s_new_k) >= 0) { + if (newsz >= 0 && newsz <= 0x7FFFFFFF - rt.HDR && !o3on && !dry && lookup(s_new_k) >= 0) { // (a bigger size has no class: new_t stops it) lit(0); lit(szclass(newsz)); s = lookup(s_new_k); |
