Ignore:
Timestamp:
Oct 12, 2020, 4:02:40 PM (5 years ago)
Author:
[email protected]
Message:

OpToPropertyKey only accepts temporary for destination
https://bugs.webkit.org/show_bug.cgi?id=217471

Reviewed by Saam Barati.

JSTests:

  • stress/spread-to-property-key-constant.js: Added.

Source/JavaScriptCore:

propertyName register can be constant. We should create temporary register if it is necessary for the destination.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ObjectPatternNode::bindValue const):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r267440 r268374  
    52355235                if (m_containsComputedProperty) {
    52365236                    if (target.propertyExpression)
    5237                         generator.emitToPropertyKey(propertyName.get(), propertyName.get());
     5237                        propertyName = generator.emitToPropertyKey(generator.tempDestination(propertyName.get()), propertyName.get());
    52385238                    else
    52395239                        propertyName = generator.emitLoad(nullptr, target.propertyName);
Note: See TracChangeset for help on using the changeset viewer.