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/bytecompiler/BytecodeGenerator.h

    r68237 r68281  
    308308
    309309        RegisterID* emitNewFunction(RegisterID* dst, FunctionBodyNode* body);
     310        RegisterID* emitLazyNewFunction(RegisterID* dst, FunctionBodyNode* body);
     311        RegisterID* emitNewFunctionInternal(RegisterID* dst, unsigned index, bool shouldNullCheck);
    310312        RegisterID* emitNewFunctionExpression(RegisterID* dst, FuncExprNode* func);
    311313        RegisterID* emitNewRegExp(RegisterID* dst, RegExp* regExp);
     
    442444       
    443445        RegisterID* emitCall(OpcodeID, RegisterID* dst, RegisterID* func, CallArguments&, unsigned divot, unsigned startOffset, unsigned endOffset);
    444        
     446
    445447        RegisterID* newRegister();
    446448
     
    504506        }
    505507
     508        RegisterID* emitInitLazyRegister(RegisterID*);
     509
    506510        Vector<Instruction>& instructions() { return m_codeBlock->instructions(); }
    507511        SymbolTable& symbolTable() { return *m_symbolTable; }
     
    513517
    514518        void createArgumentsIfNecessary();
     519        RegisterID* createLazyRegisterIfNecessary(RegisterID*);
    515520
    516521        bool m_shouldEmitDebugHooks;
     
    552557        int m_globalVarStorageOffset;
    553558
     559        int m_firstLazyFunction;
     560        int m_lastLazyFunction;
     561        HashMap<unsigned int, FunctionBodyNode*, WTF::IntHash<unsigned int>, WTF::UnsignedWithZeroKeyHashTraits<unsigned int> > m_lazyFunctions;
     562        typedef HashMap<FunctionBodyNode*, unsigned> FunctionOffsetMap;
     563        FunctionOffsetMap m_functionOffsets;
     564       
    554565        // Constant pool
    555566        IdentifierMap m_identifierMap;
Note: See TracChangeset for help on using the changeset viewer.