[webkit-changes] [WebKit/WebKit] 08374f: [JSC] Implement `some`/`every`/`find` from Iterato...
SUZUKI Sosuke
noreply at github.com
Sat Sep 14 23:22:19 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 08374f951b75d95ae15105d250c8ddbd23f2b50c
https://github.com/WebKit/WebKit/commit/08374f951b75d95ae15105d250c8ddbd23f2b50c
Author: Sosuke Suzuki <aosukeke at gmail.com>
Date: 2024-09-14 (Sat, 14 Sep 2024)
Changed paths:
A JSTests/stress/iterator-prototype-every.js
A JSTests/stress/iterator-prototype-find.js
A JSTests/stress/iterator-prototype-some.js
M JSTests/test262/expectations.yaml
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/DerivedSources.make
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
A Source/JavaScriptCore/builtins/JSIteratorPrototype.js
M Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp
Log Message:
-----------
[JSC] Implement `some`/`every`/`find` from Iterator Helpers Proposal
https://bugs.webkit.org/show_bug.cgi?id=279659
Reviewed by Alexey Shvayka.
This patch implements following methods from Iterator Helpers Proposal[1]:
- `Iterator.prototype.some`[2]
- `Iterator.prototype.every`[3]
- `Iterator.prototype.find`[4]
[1]: https://github.com/tc39/proposal-iterator-helpers
[2]: https://tc39.es/proposal-iterator-helpers/#sec-iteratorprototype.some
[3]: https://tc39.es/proposal-iterator-helpers/#sec-iteratorprototype.every
[4]: https://tc39.es/proposal-iterator-helpers/#sec-iteratorprototype.find
* JSTests/stress/iterator-prototype-every.js: Added.
(assert):
(shouldThrow):
(throw.new.Error.Iter.prototype.next):
(throw.new.Error.Iter):
(throw.new.Error):
(sameValue):
(sameValue.Iter.prototype.get next):
(sameValue.Iter):
(sameValue.gen):
(const.iter.next):
(Iterator.prototype.every.call.Iter.prototype.next):
(Iterator.prototype.every.call.Iter):
(Iterator.prototype.every.call):
(sameValue.Iter.prototype.next):
* JSTests/stress/iterator-prototype-find.js: Added.
(assert):
(shouldThrow):
(throw.new.Error.Iter.prototype.next):
(throw.new.Error.Iter):
(throw.new.Error):
(sameValue):
(sameValue.Iter.prototype.get next):
(sameValue.Iter):
(sameValue.gen):
(const.iter.next):
(Iterator.prototype.find.call.Iter.prototype.next):
(Iterator.prototype.find.call.Iter):
(Iterator.prototype.find.call):
* JSTests/stress/iterator-prototype-some.js: Added.
(assert):
(shouldThrow):
(throw.new.Error.Iter.prototype.next):
(throw.new.Error.Iter):
(throw.new.Error):
(sameValue):
(sameValue.Iter.prototype.get next):
(sameValue.Iter):
(sameValue.gen):
(const.iter.next):
(Iterator.prototype.some.call.Iter.prototype.next):
(Iterator.prototype.some.call.Iter):
(Iterator.prototype.some.call):
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/DerivedSources.make:
* Source/JavaScriptCore/builtins/JSIteratorPrototype.js: Added.
(some.wrapper.iterator):
(some):
(every.wrapper.iterator):
(every):
(find.wrapper.iterator):
(find):
* Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp:
(JSC::JSIteratorPrototype::finishCreation):
Canonical link: https://commits.webkit.org/283677@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list