Ignore:
Timestamp:
Oct 3, 2014, 2:46:14 PM (11 years ago)
Author:
[email protected]
Message:

tearoff_arguments should always refer to the unmodified arguments register
https://bugs.webkit.org/show_bug.cgi?id=137406

Reviewed by Michael Saboff.

To simplify subsequent work, and remove unnecessary work from
actual execution this patch simply ensures that tear_off_arguments
refers to the actual unmodified arguments register.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitReturn):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_tear_off_arguments):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_tear_off_arguments):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
File:
1 edited

Legend:

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

    r174226 r174294  
    19141914    if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && !isStrictMode()) {
    19151915        emitOpcode(op_tear_off_arguments);
    1916         instructions().append(m_codeBlock->argumentsRegister().offset());
     1916        instructions().append(unmodifiedArgumentsRegister(m_codeBlock->argumentsRegister()).offset());
    19171917        instructions().append(m_lexicalEnvironmentRegister ? m_lexicalEnvironmentRegister->index() : emitLoad(0, JSValue())->index());
    19181918    }
Note: See TracChangeset for help on using the changeset viewer.