Commit Graph
3484 Commits
Author SHA1 Message Date
Chris Tate 4e80351f87 Merge main 2026-10-20 19:53:23 -05:00
Chris Tate 97e9a10a13 Destructure runtime computed keys from records and checked-dynamic values (#1552) 2026-10-20 19:40:42 -05:00
Chris Tate dffefb4120 Keep missing runtime-key entries undefined in parameter patterns
- The indexed-read prepass now scans parameter patterns with the parameter's type. A function that destructures a missing runtime-key entry of an index-signature record from a parameter (`function pick(k, { [k]: v }: Record<string, number>) { return v; }`) returns undefined instead of throwing a TypeError, nested patterns included.
- Corpus 6492 adds a function, an arrow and a nested parameter pattern; 6492 and 6493 get their per-program cost files.
2026-10-20 19:37:06 -05:00
Chris Tate 121a3ed8f6 Check the optional-record path test's cast at the cast (#1592) 2026-10-20 19:29:13 -05:00
Chris Tate 2230ffbb27 Check the optional-record path test's cast at the cast
The test from #1548 casts JSON.parse to Partial<Envelope> into a
block-local const, which continues as its parsed value since #1561, as
in Node. The path messages are now pinned with the cast passed to a
typed parameter, which is checked at the cast, and the block-local form
is pinned against Node.
2026-10-20 19:25:18 -05:00
Chris Tate c812518fb3 Merge main 2026-10-20 19:24:28 -05:00
Chris Tate 222ea51bd8 Keep missing runtime-key entries undefined in nested module-scope patterns
- The indexed-read prepass now visits nested object patterns with the nested element's own type. A module-scope binding from a missing runtime-key entry of a nested index-signature record (`const { limits: { [key]: limit } } = config`) holds undefined instead of throwing a TypeError, with or without a default for the nested source.
- Corpus 6492 adds both nested forms.
2026-10-20 19:09:12 -05:00
Chris Tate f7e8d7c490 Compile import cycles whose class is reached only after initialization (#1495) 2026-10-20 18:55:01 -05:00
Chris Tate e41f642a55 Compile literal-key 'in' over index-signature records, fresh array spread insertions, and any-annotated dictionaries (#1514) 2026-10-20 18:46:29 -05:00
Chris Tate 145268ed55 Inspect program-declared Error subclasses with Node's constructor-name header (#1520) 2026-10-20 18:43:16 -05:00
Chris Tate 71325b2a00 Keep exported const arrays out of fresh spread conversion
Another module can import an exported const (`export const` or an
`export { name }` specifier) and reach its elements, so a spread of it
is not their only reference. Those spreads keep the element-layout
refusal instead of copying the elements.
2026-10-20 18:40:37 -05:00
Chris Tate 3df33dc0ab Keep the process.versions scan flag on the lowerer (#1579) 2026-10-20 18:38:46 -05:00
Chris Tate 32630717ed Return the Set from add() when its result is used (#1523) 2026-10-20 18:36:59 -05:00
Chris Tate c5eb832ef1 Keep the process.versions scan flag on the lowerer 2026-10-20 18:36:38 -05:00
Chris Tate 9baa93b799 Keep missing runtime-key entries undefined at module scope, and check nullish sources before runtime keys
- The indexed-read prepass now treats a computed pattern key like the name it folds to, and a runtime key over a record with no declared fields as an index-signature read. A module-scope binding from a missing entry (`const { [name]: v } = table` over `Record<string, number>`) now holds undefined instead of throwing a TypeError.
- An object pattern over a checked-dynamic value whose first key is computed at run time checks the source first. A null or undefined source throws a TypeError before the key's expression runs, as in Node. In JavaScript declarations whose source V8 can spell, the message is Node's ("Cannot destructure 'f(...)' as it is null.").
- Corpus 6492 adds a module-scope missing entry; 6493 adds nullish sources in front of side-effecting keys, including a nested pattern and an element default.
- The retired-engine-2104 diagnostics snapshot drops the refusals of `const { [key]: got } = src` over an `any` source, which now compile. The remaining refusals are unchanged.
2026-10-20 18:34:42 -05:00
Chris Tate 710d203a97 Shrink the array header to 48 bytes (#1489) 2026-10-20 18:30:40 -05:00
Chris Tate f3da708774 Compile polyfill packages that are Node builtins as the builtins (#1458) 2026-10-20 18:28:42 -05:00
Chris Tate a24542e772 Keep inferred Promise.prototype bindings checked-dynamic in TypeScript
The checker types Promise.prototype as Promise<any>, so an inferred binding
of it, a module const or a local, inserted a promise check against the
ordinary object and threw a TypeError at initialization. Such bindings,
including promise.constructor.prototype, now stay checked-dynamic in
TypeScript as they already did in JavaScript, and corpus 6590 covers them.
2026-10-20 18:26:08 -05:00
Chris Tate 5b20bf1e77 Merge main 2026-10-20 18:25:49 -05:00
Chris Tate 7f777f36a3 Carry runtime-decided dns.lookup answers dynamically, dial Node-typed net lookups, and keep tsc enum exports undefined until assigned (#1528) 2026-10-20 18:25:22 -05:00
Chris Tate 90315ca7ea Bind builtin static functions and read Buffer.alloc, fs.realpathSync and String methods as values (#1553) 2026-10-20 18:21:56 -05:00
Chris Tate 74633db92f Merge main 2026-10-20 18:21:35 -05:00
Chris Tate 71a5f2c02c Compile SDK-declared data types, any-valued members and Pick views of classes (#1466) 2026-10-20 18:18:56 -05:00
Chris Tate 6ec7e4e4a0 Keep each runtime benchmark workload in its own file (#1570) 2026-10-20 18:18:31 -05:00
Chris Tate 18400d098d Sort the runtime feature lists (#1569) 2026-10-20 18:17:35 -05:00
Chris Tate 40ed0e3aff Merge main 2026-10-20 18:16:00 -05:00
Chris Tate 7bf257128c Format the ProcessVersions check (#1573) 2026-10-20 18:15:25 -05:00
Chris Tate 6bb2711c4b Continue a failed checked cast with its value in a dynamic tail (#1561) 2026-10-20 18:15:01 -05:00
Chris Tate 7cbc9c38c7 Merge main 2026-10-20 18:14:12 -05:00
Chris Tate cd833e68a4 Keep the class id of hierarchy instances in the rc word (#1486) 2026-10-20 18:12:51 -05:00
Chris Tate 826776a7e3 Format the ProcessVersions check 2026-10-20 18:12:21 -05:00
Chris Tate 3195f98401 Convert a const array spread only when it runs once per initializer
A const initialized by an array literal and spread once can still run
that spread more than once: in a loop body, loop test or update, a
function, or a class field initializer. Each run inserts the same
elements in JavaScript, so copying them into the destination's layout
would break identity. Those spreads keep the element-layout refusal.
2026-10-20 18:11:57 -05:00
Chris Tate 0635805927 Delete the docs compatibility metadata file again (#1566) 2026-10-20 18:11:28 -05:00
Chris Tate 691ee9841f Answer promises from thunked and dispatched untyped async methods (#1534) 2026-10-20 18:11:10 -05:00
Chris Tate 8441f452d7 Bound the tail copies of sequential checked casts
Each armed site lowers the code after it twice, and a cast inside another
site's tail is lowered in both copies, so n sequential casts produced 2^n
copies of the code after the last one. A site now arms only while fewer
than two splits enclose its tail or share its split point; later casts
keep the throwing cast.
2026-10-20 18:10:51 -05:00
Chris Tate 3f1cded4c3 Convert booleans with ToNumber in bitwise operators (#1547) 2026-10-20 18:10:03 -05:00
Chris Tate fa098689f1 Check for a class id before reading a stream's vtable word
The stream probes for untyped values (pipe destinations, pipeline
stages, readline input and output, and the checks against the stream
classes) read the vtable word of any boxed object. Instances with a
class id in the rc word have no vtable word, so a hierarchy instance
whose first field is a number crashed those probes. scr_stream_vt_of
answers NULL for them, and each probe treats that as no stream.
2026-10-20 18:09:22 -05:00
Chris Tate fd34d72e00 Keep each runtime benchmark workload in its own file
workloads.json listed every workload in one array, and its README table
listed them in one hand order, so changes that each added a workload
appended at the same place and conflicted. Each workload is now a JSON
file in benchmarks/runtime/workloads/ named after it, read through
benchmarks/runtime/workloads.mjs by the bench runner, the zero-cost
gate, the strace script and the dynamic-tier test, ordered by category
and then name. The loader still reads workloads.json in a checkout from
before this change, so the gate can compare against one. The README
table follows the same order.
2026-10-20 18:08:10 -05:00
Chris Tate d9df51594c Sort the runtime feature lists
The lib-fn sets and prefix lists in runtime-features.ts grew by
appending, so changes that added different entries to one list touched
the same last lines and conflicted. Each list's entries are now sorted
within its commented groups, and the all-off feature literal follows the
rules table's name order. Entry order is unobservable: the lists feed
membership maps and prefix tests that each set their own flag.
2026-10-20 18:06:49 -05:00
Chris Tate 762632b6b1 Give require declarators beside other declarators no storage (#1537) 2026-10-20 18:06:37 -05:00
Chris Tate be6ee5cb23 Merge main 2026-10-20 18:06:16 -05:00
Chris Tate c85f2380fc Merge main 2026-10-20 18:04:46 -05:00
Chris Tate b8fc0444ac Format the retired-file check 2026-10-20 18:04:24 -05:00
Chris Tate bb78ea2ce7 Run buffer-crc32's and yazl's capability probes as Node does (#1549) 2026-10-20 18:02:43 -05:00
Chris Tate 450c8ac2a5 Gate thenable adoption on then fields, keep Promise.prototype bindings checked, and cache the gate on the lowerer 2026-10-20 17:59:43 -05:00
Chris Tate c635475877 Read non-ASCII strings' units inline in worker executables and for longer texts (#1541) 2026-10-20 17:58:47 -05:00
Chris Tate 37834ed189 Merge main 2026-10-20 17:57:40 -05:00
Chris Tate b70cadb402 Merge main 2026-10-20 17:56:44 -05:00
Chris Tate 1c8349333a Read the ProcessVersions symbol's name with symbolName (#1565) 2026-10-20 17:55:43 -05:00
Chris Tate a1ef7950d0 Delete the docs compatibility metadata file again
#1360 moved the content hash and row count into next.config.mjs and
deleted node-v24-compatibility-meta.json, but a later merge kept a
branch's copy. Nothing reads it, and its hash line conflicts on every
compatibility change. The local compatibility check now fails while the
file exists, so a merge can't bring it back unnoticed.
2026-10-20 17:53:33 -05:00