Ignore:
Timestamp:
Sep 22, 2017, 7:08:04 PM (8 years ago)
Author:
[email protected]
Message:

Speculatively change iteration protocall to use the same next function
https://bugs.webkit.org/show_bug.cgi?id=175653

Reviewed by Saam Barati.

JSTests:

Change test to match the new iteration behavior.

  • stress/spread-optimized-properly.js:

Source/JavaScriptCore:

This patch speculatively makes a change to the iteration protocall to fetch the next
property immediately after calling the Symbol.iterator function. This is, in theory,
a breaking change, so we will see if this breaks things (most likely it won't as this
is a relatively subtle point).

See: https://github.com/tc39/ecma262/issues/976

  • builtins/IteratorHelpers.js:

(performIteration):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::emitIteratorNext):
(JSC::BytecodeGenerator::emitIteratorNextWithValue):
(JSC::BytecodeGenerator::emitDelegateYield):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ArrayPatternNode::bindValue const):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::iteratorEntries):

  • runtime/IteratorOperations.cpp:

(JSC::iteratorNext):
(JSC::iteratorStep):
(JSC::iteratorClose):
(JSC::iteratorForIterable):

  • runtime/IteratorOperations.h:

(JSC::forEachInIterable):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewFromIterator):
(JSC::constructGenericTypedArrayViewWithArguments):

LayoutTests:

Change test to match the new iteration behavior.

  • js/sequence-iterator-protocol-2-expected.txt:
  • js/sequence-iterator-protocol-2.html:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r222417 r222421  
     12017-09-22  Keith Miller  <[email protected]>
     2
     3        Speculatively change iteration protocall to use the same next function
     4        https://bugs.webkit.org/show_bug.cgi?id=175653
     5
     6        Reviewed by Saam Barati.
     7
     8        This patch speculatively makes a change to the iteration protocall to fetch the next
     9        property immediately after calling the Symbol.iterator function. This is, in theory,
     10        a breaking change, so we will see if this breaks things (most likely it won't as this
     11        is a relatively subtle point).
     12
     13        See: https://github.com/tc39/ecma262/issues/976
     14
     15        * builtins/IteratorHelpers.js:
     16        (performIteration):
     17        * bytecompiler/BytecodeGenerator.cpp:
     18        (JSC::BytecodeGenerator::emitEnumeration):
     19        (JSC::BytecodeGenerator::emitIteratorNext):
     20        (JSC::BytecodeGenerator::emitIteratorNextWithValue):
     21        (JSC::BytecodeGenerator::emitDelegateYield):
     22        * bytecompiler/BytecodeGenerator.h:
     23        * bytecompiler/NodesCodegen.cpp:
     24        (JSC::ArrayPatternNode::bindValue const):
     25        * inspector/JSInjectedScriptHost.cpp:
     26        (Inspector::JSInjectedScriptHost::iteratorEntries):
     27        * runtime/IteratorOperations.cpp:
     28        (JSC::iteratorNext):
     29        (JSC::iteratorStep):
     30        (JSC::iteratorClose):
     31        (JSC::iteratorForIterable):
     32        * runtime/IteratorOperations.h:
     33        (JSC::forEachInIterable):
     34        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
     35        (JSC::constructGenericTypedArrayViewFromIterator):
     36        (JSC::constructGenericTypedArrayViewWithArguments):
     37
    1382017-09-22  Fujii Hironori  <[email protected]>
    239
Note: See TracChangeset for help on using the changeset viewer.