Sebastian Herrlinger
7927b7fc9b
Merge remote-tracking branch 'origin/dev' into codemode-rust
...
# Conflicts:
# packages/codemode/src/language/vm.ts
# packages/codemode/test/test262/skipped.txt
2026-11-19 22:11:20 +01:00
Aiden Cline
10e5856f05
fix(codemode): define Uint8Array BYTES_PER_ELEMENT ( #64930 )
2026-11-19 12:45:52 -06:00
Sebastian Herrlinger
4023cfa913
Merge remote-tracking branch 'origin/dev' into codemode-rust
...
# Conflicts:
# packages/codemode/src/language/generators.ts
# packages/codemode/src/language/internal-prelude.ts
# packages/codemode/src/language/prelude/bytecode.json
# packages/codemode/src/language/runtime/errors.ts
# packages/codemode/src/language/vm.ts
# packages/codemode/test/test262/skipped.txt
2026-11-19 19:01:08 +01:00
James Long
d3f6559d93
feat(codemode): getters and setters ( #64908 )
2026-11-19 17:12:53 +00:00
kommander
3dbee2a738
fix(codemode): convert Array arguments, lengths and sort elements through ToPrimitive
...
The integer arguments of the Array methods, length = object, and the elements a default sort compares call the program's own valueOf/toString, as do String.fromCharCode/fromCodePoint, JSON.parse, and the string iterator's receiver. repeat(NaN) is "", as ToIntegerOrInfinity makes NaN 0.
2026-11-18 18:56:08 +01:00
kommander
0c5a6a6c2b
fix(codemode): let in find an array hole's inherited index
...
The fast path for an integer in an array answered false for a hole; it now answers only for a present element and leaves the rest to the prototype walk, so forEach, some, and reduce visit an index inherited from Array.prototype.
2026-11-18 18:56:01 +01:00
kommander
58579fc70e
fix(codemode): match JS in built-in object details
...
Resolving functions are anonymous, Set.prototype.keys is values, built-in iterators report their kind (Array Iterator, Map Iterator, ...), AggregateError has no own message unless given one, and generator and async functions inherit from their own non-callable function prototypes.
2026-11-18 18:56:01 +01:00
kommander
d4bb17439f
fix(codemode): delete on a primitive base is true unless the wrapper owns the key
...
delete "abc"[5] and delete (1).x are true, as they delete from the wrapper; a string's own index or length still throws in strict mode.
2026-11-18 18:56:01 +01:00
kommander
e70845f198
fix(codemode): evaluate the right side of o.x = v before checking o
...
PutValue checks the base, so null.x = f() calls f before it throws, and (1).x = f() surfaces f's throw.
2026-11-18 18:55:49 +01:00
kommander
3afec0de63
fix(codemode): evaluate new arguments before checking the constructor
...
EvaluateNew evaluates the callee and its arguments before IsConstructor, so an argument's side effects and throws come first. Bumps the compiler version, since NEW no longer emits a separate check.
2026-11-18 18:55:49 +01:00
kommander
2a932f1331
fix(codemode): convert functions, generators and iterators through ToPrimitive
...
Operators and built-in arguments now call their valueOf/toString like any other object, as JS does: fn + 1 is "[object Function]1" and -fn is NaN. Promises and tool references still reject, so a missing await cannot hide.
2026-11-18 18:55:16 +01:00
James Long
b9029e64a0
refactor(codemode): split the language layer from Code Mode ( #64487 )
2026-11-17 15:21:51 -05:00
Aiden Cline
eaa6075572
feat(codemode): add Node's Buffer ( #64365 )
2026-11-16 23:55:30 -06:00
Aiden Cline
042badd23f
feat(codemode): let a synchronous global block on an Effect ( #64363 )
2026-11-16 23:54:45 -06:00
Aiden Cline
a8dde001d3
feat(codemode): stream fetch response bodies ( #63436 )
2026-11-12 17:50:06 -06:00
Aiden Cline
a3d6e54b3d
fix(codemode): decode UTF-8 across chunk boundaries ( #63600 )
2026-11-12 20:30:06 +00:00
Aiden Cline
adcfc83d19
feat(codemode): let programs import globals by Node module name ( #61151 )
2026-11-01 21:52:57 -06:00
Aiden Cline
ecc075a043
fix(codemode): visit inherited enumerable keys in for...in ( #59933 )
2026-10-28 23:44:28 -05:00
Aiden Cline
711802c3a3
fix(codemode): let search be awaited or chained like a Promise ( #59981 )
2026-10-28 15:31:19 -05:00
Rhys Sullivan
3b593dd5d2
fix(codemode): run each job to completion ( #54276 )
...
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-10-20 13:19:00 -05:00
Aiden Cline
db45c950a9
fix(codemode): honor Uint8Array.from mappers, compare byte searches without coercion, skip flatMap holes, and truncate fractional radixes ( #57285 )
...
Co-authored-by: r266-tech <r266-tech@users.noreply.github.com>
Co-authored-by: sdivyanshu90 <divyanshu74.80@gmail.com>
Co-authored-by: icearia0219 <133481415+icearia0219@users.noreply.github.com>
2026-10-20 00:16:55 -05:00
Aiden Cline
4d3d8fd769
docs: trim agent instructions ( #54678 )
2026-10-11 22:32:18 -05:00
Aiden Cline
5335347e80
feat(codemode): add WeakMap and WeakSet ( #51257 )
2026-09-25 00:15:19 -05:00
Aiden Cline
962c14a49c
fix(codemode): honor thisArg, program toString in computed keys, and ToPrimitive in String and Number arguments ( #51264 )
2026-09-24 23:46:15 -05:00
Aiden Cline
e23d89c9a9
fix(codemode): destructure object patterns from primitives and convert Date components through ToPrimitive ( #51239 )
2026-09-24 19:32:19 -05:00
Aiden Cline
5256f30957
feat(codemode): honor program valueOf and toString in operators and conversions ( #50837 )
2026-09-24 18:45:48 -05:00
Aiden Cline
56262121ee
feat(codemode): bind this and arguments in functions, add Function.prototype.call, apply, and bind ( #50831 )
2026-09-24 16:34:46 -05:00
Aiden Cline
a16eedfed7
fix(codemode): make derived error constructors inherit from Error ( #51045 )
2026-09-24 14:03:10 -05:00
Aiden Cline
318a8c1aba
feat(codemode): add Object.freeze/seal/create/getPrototypeOf and structuredClone ( #50834 )
2026-09-24 00:50:54 -05:00
Aiden Cline
dc48655743
fix(codemode): compare with == by IsLooselyEqual and stop deep-walking operands for opaque references ( #50830 )
2026-09-24 00:36:41 -05:00
Aiden Cline
14a3311a61
feat(codemode): add Uint8Array callback methods and coerce indexOf start indexes ( #50829 )
2026-09-23 10:27:40 -05:00
Aiden Cline
68b28bdb98
fix(codemode): coerce match/search patterns, allow any for...in target, bind the last duplicate parameter ( #50802 )
2026-09-22 23:32:27 -05:00
Aiden Cline
17abc5906b
feat(codemode): add tagged templates and String.raw ( #50791 )
2026-09-22 21:25:21 -05:00
Aiden Cline
bab26d63ea
docs(codemode): correct the interpreter support matrix ( #50789 )
2026-09-22 20:49:54 -05:00
Aiden Cline
9fdcb8da41
fix(codemode): coerce built-in arguments as in JS instead of requiring numbers and strings ( #50492 )
2026-09-21 23:04:04 -05:00
Aiden Cline
6f8c5ae0aa
fix(codemode): bind generator parameters at the call, not the first next() ( #50489 )
2026-09-21 22:42:10 -05:00
Aiden Cline
651529d64e
fix(codemode): coerce any value to a property key ( #50479 )
2026-09-21 21:35:20 -05:00
Aiden Cline
02566f6219
fix(codemode): live Map/Set forEach, generator prototypes, repeated function declarations, delete on non-references ( #50450 )
2026-09-21 18:09:45 -05:00
Aiden Cline
4cc9b90f27
fix(codemode): add Promise.try and surface a failing iterator close on generator return ( #50419 )
2026-09-21 15:35:11 -05:00
Aiden Cline
97e833a297
feat(codemode): add Iterator helpers and Iterator.from ( #50410 )
2026-09-21 14:14:24 -05:00
Aiden Cline
3f0118022b
feat(codemode): add Promise.withResolvers, print errors in console, name values in iterable errors ( #50389 )
2026-09-21 11:56:15 -05:00
Aiden Cline
1316576720
refactor(codemode): type program values and let built-ins answer for themselves ( #50191 )
2026-09-21 11:03:16 -05:00
Aiden Cline
cbdd1f66da
fix(codemode): locate failures in the submitted source ( #50197 )
2026-09-20 20:47:54 -05:00
Aiden Cline
62dc1f7696
feat(codemode): add toLocaleString, Error.isError, and Map.getOrInsert ( #50098 )
2026-09-20 10:23:23 -05:00
Aiden Cline
eb0e26b974
feat(codemode): return live iterators from keys, values, and entries ( #50061 )
2026-09-19 18:46:35 -05:00
Aiden Cline
cc3ce20ab4
feat(codemode): add the Headers built-in ( #49280 )
2026-09-19 12:35:14 -05:00
opencode-agent[bot]
004583d598
refactor(codemode): remove TypeScript stripping ( #49870 )
...
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-09-18 21:24:11 -05:00
Aiden Cline
d797722187
feat(codemode): carry cause and own data across the error boundary ( #49390 )
2026-09-16 15:58:05 -05:00
Aiden Cline
c57733a647
refactor(codemode): before/after hooks for tool and extension calls ( #49242 )
2026-09-15 23:05:06 -05:00
Aiden Cline
4cd6093e31
fix(codemode): keep one RegExp lastIndex ( #49220 )
2026-09-15 15:01:08 -05:00