Ignore:
Timestamp:
Sep 24, 2010, 12:06:29 PM (15 years ago)
Author:
[email protected]
Message:

REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=46448

Reviewed by Gavin Barraclough

Roll this back in, with additional logic to prevent us from delaying construction
of functions named "arguments"

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dump):

  • bytecode/Opcode.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitInitLazyRegister):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitLazyNewFunction):
(JSC::BytecodeGenerator::emitNewFunctionInternal):

  • bytecompiler/BytecodeGenerator.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_init_lazy_reg):
(JSC::JIT::emit_op_new_func):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_init_lazy_reg):

  • parser/Nodes.h:

(JSC::ScopeNode::needsActivationForMoreThanVariables):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r68237 r68281  
    36133613        int dst = vPC[1].u.operand;
    36143614        int func = vPC[2].u.operand;
    3615 
    3616         callFrame->r(dst) = JSValue(codeBlock->functionDecl(func)->make(callFrame, callFrame->scopeChain()));
     3615        int shouldCheck = vPC[3].u.operand;
     3616
     3617        if (!shouldCheck || !callFrame->r(dst).jsValue())
     3618            callFrame->r(dst) = JSValue(codeBlock->functionDecl(func)->make(callFrame, callFrame->scopeChain()));
    36173619
    36183620        vPC += OPCODE_LENGTH(op_new_func);
     
    41384140        NEXT_INSTRUCTION();
    41394141    }
    4140     DEFINE_OPCODE(op_init_arguments) {
    4141         /* create_arguments dst(r)
    4142 
    4143            Initialises 'arguments' to JSValue().
     4142    DEFINE_OPCODE(op_init_lazy_reg) {
     4143        /* init_lazy_reg dst(r)
     4144
     4145           Initialises dst(r) to JSValue().
    41444146
    41454147           This opcode appears only at the beginning of a code block.
     
    41484150
    41494151        callFrame->r(dst) = JSValue();
    4150         callFrame->r(unmodifiedArgumentsRegister(dst)) = JSValue();
    4151         vPC += OPCODE_LENGTH(op_init_arguments);
     4152        vPC += OPCODE_LENGTH(op_init_lazy_reg);
    41524153        NEXT_INSTRUCTION();
    41534154    }
Note: See TracChangeset for help on using the changeset viewer.