Ignore:
Timestamp:
Jan 2, 2022, 11:39:38 PM (3 years ago)
Author:
[email protected]
Message:

[JSC] Use emitPutProperty / emitGetPropertyValue consistently to handle private names in edge cases
https://bugs.webkit.org/show_bug.cgi?id=234794

Reviewed by Alexey Shvayka.

JSTests:

  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch consistently uses emitPutProperty / emitGetPropertyValue so that we handle private names
in edge cases.

  • bytecompiler/NodesCodegen.cpp:

(JSC::TaggedTemplateNode::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::AssignmentElementNode::bindValue const):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Nodes.h

    r283903 r287531  
    15621562    };
    15631563
    1564     class ShortCircuitReadModifyDotNode final : public ExpressionNode, public ThrowableSubExpressionData {
    1565     public:
    1566         ShortCircuitReadModifyDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, Operator, ExpressionNode* right, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
    1567 
    1568     private:
    1569         RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) final;
    1570 
    1571         ExpressionNode* m_base;
    1572         const Identifier& m_ident;
     1564    class ShortCircuitReadModifyDotNode final : public BaseDotNode, public ThrowableSubExpressionData {
     1565    public:
     1566        ShortCircuitReadModifyDotNode(const JSTokenLocation&, ExpressionNode* base, const Identifier&, DotType, Operator, ExpressionNode* right, bool rightHasAssignments, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd);
     1567
     1568    private:
     1569        RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = nullptr) final;
     1570
    15731571        ExpressionNode* m_right;
    15741572        Operator m_operator;
Note: See TracChangeset for help on using the changeset viewer.