Compare commits

..

12 Commits

Author SHA1 Message Date
Rémy F.
39828c7847
Merge 9b4e07827474ac3a449271e90e0a04fbf9b5c5da into 2d99c323a27ca9013230cfd6fb56ab37f2a0f1d4 2025-09-21 00:57:16 +08:00
Fabrice Bellard
2d99c323a2 Iterator functions:
- removed memory leak
- don't close iterator when IteratorStepValue fails
- fixed  Iterator Wrap next() and return() arguments
- fixed Iterator.from()
2025-09-20 18:30:02 +02:00
Fabrice Bellard
cf0e179263 Iterator is an abstract class (bnoordhuis) 2025-09-20 17:05:13 +02:00
Fabrice Bellard
3dcca0d1d6 fix Iterator.prototype.constructor (initial patch by bnoordhuis) 2025-09-20 17:01:52 +02:00
Fabrice Bellard
b2ed2e91f5 added Iterator.prototype.[drop,filter,flatMap,map,take,every,find,forEach,some,reduce,[Symbol.toStringTag]] (saghul) 2025-09-20 16:47:43 +02:00
Fabrice Bellard
e924173c0f added Iterator.prototype.toArray and Iterator.from (bnoordhuis) 2025-09-20 16:27:45 +02:00
Fabrice Bellard
982b7aa14f added the Iterator object 2025-09-20 16:05:36 +02:00
Fabrice Bellard
0377dab4f2 removed uninitialized values - removed useless init 2025-09-20 14:31:14 +02:00
Fabrice Bellard
0cef7f0ddb set methods: removed memory leaks - fixed ordering of property access - fixed conversion to integer of 'size' in GetSetRecord() - added missing iterator close - factorized code 2025-09-20 14:21:39 +02:00
Fabrice Bellard
a1e073e444 added set methods (bnoordhuis) 2025-09-20 12:19:50 +02:00
Fabrice Bellard
de4d3927b8 removed memory leak (#441) 2025-09-18 10:42:13 +02:00
Fabrice Bellard
dc7af0ac42 updated release.sh 2025-09-18 10:28:33 +02:00
5 changed files with 1525 additions and 38 deletions

2
TODO
View File

@ -62,5 +62,5 @@ Optimization ideas:
Test262o: 0/11262 errors, 463 excluded Test262o: 0/11262 errors, 463 excluded
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch) Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
Result: 54/79414 errors, 1637 excluded, 6821 skipped Result: 54/80760 errors, 1631 excluded, 6064 skipped
Test262 commit: e7e136756cd67c1ffcf7c09d03aeb8ad5a6cec0c Test262 commit: e7e136756cd67c1ffcf7c09d03aeb8ad5a6cec0c

View File

@ -78,6 +78,8 @@ DEF(await, "await")
/* empty string */ /* empty string */
DEF(empty_string, "") DEF(empty_string, "")
/* identifiers */ /* identifiers */
DEF(keys, "keys")
DEF(size, "size")
DEF(length, "length") DEF(length, "length")
DEF(fileName, "fileName") DEF(fileName, "fileName")
DEF(lineNumber, "lineNumber") DEF(lineNumber, "lineNumber")
@ -228,6 +230,9 @@ DEF(Map, "Map")
DEF(Set, "Set") /* Map + 1 */ DEF(Set, "Set") /* Map + 1 */
DEF(WeakMap, "WeakMap") /* Map + 2 */ DEF(WeakMap, "WeakMap") /* Map + 2 */
DEF(WeakSet, "WeakSet") /* Map + 3 */ DEF(WeakSet, "WeakSet") /* Map + 3 */
DEF(Iterator, "Iterator")
DEF(IteratorHelper, "Iterator Helper")
DEF(IteratorWrap, "Iterator Wrap")
DEF(Map_Iterator, "Map Iterator") DEF(Map_Iterator, "Map Iterator")
DEF(Set_Iterator, "Set Iterator") DEF(Set_Iterator, "Set Iterator")
DEF(Array_Iterator, "Array Iterator") DEF(Array_Iterator, "Array Iterator")

1540
quickjs.c

File diff suppressed because it is too large Load Diff

View File

@ -174,7 +174,7 @@ cp Makefile VERSION TODO Changelog readme.txt LICENSE \
cp tests/*.js tests/*.patch tests/bjson.c $outdir/tests cp tests/*.js tests/*.patch tests/bjson.c $outdir/tests
cp examples/*.js examples/*.c $outdir/examples cp examples/*.js examples/*.c examples/*.json $outdir/examples
cp doc/quickjs.texi doc/quickjs.pdf doc/quickjs.html \ cp doc/quickjs.texi doc/quickjs.pdf doc/quickjs.html \
$outdir/doc $outdir/doc

View File

@ -140,7 +140,7 @@ Intl.NumberFormat-v3=skip
Intl.RelativeTimeFormat=skip Intl.RelativeTimeFormat=skip
Intl.Segmenter=skip Intl.Segmenter=skip
IsHTMLDDA IsHTMLDDA
iterator-helpers=skip iterator-helpers
iterator-sequencing=skip iterator-sequencing=skip
json-modules json-modules
json-parse-with-source=skip json-parse-with-source=skip
@ -183,7 +183,7 @@ RegExp.escape
resizable-arraybuffer=skip resizable-arraybuffer=skip
rest-parameters rest-parameters
Set Set
set-methods=skip set-methods
ShadowRealm=skip ShadowRealm=skip
SharedArrayBuffer SharedArrayBuffer
source-phase-imports-module-source=skip source-phase-imports-module-source=skip
@ -304,14 +304,10 @@ test262/test/built-ins/String/prototype/split/cstm-split-on-string-primitive.js
# spec updates it in this case) # spec updates it in this case)
test262/test/staging/sm/Array/frozen-dense-array.js test262/test/staging/sm/Array/frozen-dense-array.js
# does not match spec
test262/test/staging/sm/Iterator/from/wrap-next-not-object-throws.js
# not supported # not supported
test262/test/staging/sm/Set/difference.js
test262/test/staging/sm/Set/intersection.js
test262/test/staging/sm/Set/is-disjoint-from.js
test262/test/staging/sm/Set/is-subset-of.js
test262/test/staging/sm/Set/is-superset-of.js
test262/test/staging/sm/Set/symmetric-difference.js
test262/test/staging/sm/Set/union.js
test262/test/staging/sm/extensions/censor-strict-caller.js test262/test/staging/sm/extensions/censor-strict-caller.js
test262/test/staging/sm/JSON/parse-with-source.js test262/test/staging/sm/JSON/parse-with-source.js