Skip to content
  • oliver@apple.com's avatar
    Spread operator should be performing direct "puts" and not triggering setters · e050d642
    oliver@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=123047
    
    Reviewed by Geoffrey Garen.
    
    Source/JavaScriptCore:
    
    Add a new opcode -- op_put_by_val_directue -- and make use of it in the spread
    to array construct.  This required a new PutByValDirect node to be introduced to
    the DFG.  The current implementation simply changes the slow path function that
    is called, but in future this could be made faster as it does not need to check
    the prototype chain.
    
    * bytecode/CodeBlock.cpp:
    (JSC::CodeBlock::dumpBytecode):
    (JSC::CodeBlock::CodeBlock):
    * bytecode/Opcode.h:
    (JSC::padOpcodeName):
    * bytecompiler/BytecodeGenerator.cpp:
    (JSC::BytecodeGenerator::emitDirectPutByVal):
    * bytecompiler/BytecodeGenerator.h:
    * bytecompiler/NodesCodegen.cpp:
    (JSC::ArrayNode::emitBytecode):
    * dfg/DFGAbstractInterpreterInlines.h:
    (JSC::DFG::::executeEffects):
    * dfg/DFGBackwardsPropagationPhase.cpp:
    (JSC::DFG::BackwardsPropagationPhase::propagate):
    * dfg/DFGByteCodeParser.cp...
    e050d642