Ignore:
Timestamp:
Sep 13, 2012, 5:43:04 PM (13 years ago)
Author:
[email protected]
Message:

Make global const initialisation explicit in the bytecode
https://bugs.webkit.org/show_bug.cgi?id=96711

Reviewed by Gavin Barraclough.

Added op_init_global_const to make initialisation of global const
fields explicit. This will help us keep correct semantics in the
upcoming variable resolution refactoring.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dump):

  • bytecode/Opcode.h:

(JSC):
(JSC::padOpcodeName):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitInitGlobalConst):
(JSC):

  • bytecompiler/BytecodeGenerator.h:

(BytecodeGenerator):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ConstDeclNode::emitCodeSingle):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCapabilities.h:

(JSC::DFG::canCompileOpcode):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

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

Legend:

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

    r127958 r128534  
    13881388    RefPtr<RegisterID> value = m_init ? generator.emitNode(m_init) : generator.emitLoad(0, jsUndefined());
    13891389
    1390     if (resolveResult.isStatic())
     1390    if (resolveResult.isStatic()) {
     1391        if (generator.codeType() == GlobalCode)
     1392            return generator.emitInitGlobalConst(resolveResult, m_ident, value.get());
    13911393        return generator.emitPutStaticVar(resolveResult, m_ident, value.get());
    1392    
     1394    }
    13931395    if (generator.codeType() != EvalCode)
    13941396        return value.get();
Note: See TracChangeset for help on using the changeset viewer.