[webkit-changes] [WebKit/WebKit] 6d98a9: [JSC] add support for `Iterator.prototype.chunks` ...

Devin Rousso noreply at github.com
Tue Oct 15 20:33:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6d98a9cf99d4e000702b64ca31e9f5eefd413e0f
      https://github.com/WebKit/WebKit/commit/6d98a9cf99d4e000702b64ca31e9f5eefd413e0f
  Author: Devin Rousso <hi at devinrousso.com>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    A JSTests/stress/iterator-prototype-chunks.js
    A JSTests/stress/iterator-prototype-windows.js
    M Source/JavaScriptCore/builtins/JSIteratorPrototype.js
    M Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp
    M Source/JavaScriptCore/runtime/OptionsList.h

  Log Message:
  -----------
  [JSC] add support for `Iterator.prototype.chunks` and `Iterator.prototype.windows`
https://bugs.webkit.org/show_bug.cgi?id=281112

Reviewed by Alexey Shvayka.

These will allow for alternative consumptions of iterators (e.g. batched processing, something like C++ `std::adjacent_difference`, etc.) instead of having to manually create a generator wrapper.

Proposal: <https://github.com/tc39/proposal-iterator-chunking>
Spec: <https://tc39.es/proposal-iterator-chunking/>

* Source/JavaScriptCore/builtins/JSIteratorPrototype.js:
(chunks): Added.
(windows): Added.
* Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp:
(JSC::JSIteratorPrototype::finishCreation):
* Source/JavaScriptCore/runtime/OptionsList.h:

* JSTests/stress/iterator-prototype-chunks.js: Added.
* JSTests/stress/iterator-prototype-windows.js: Added.

Canonical link: https://commits.webkit.org/285240@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