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/bytecode/CodeBlock.cpp

    r128219 r128534  
    10061006            break;
    10071007        }
     1008        case op_init_global_const: {
     1009            WriteBarrier<Unknown>* registerPointer = (++it)->u.registerPointer;
     1010            int r0 = (++it)->u.operand;
     1011            dataLog("[%4d] init_global_const\t g%d(%p), %s", location, m_globalObject->findRegisterIndex(registerPointer), registerPointer, registerName(exec, r0).data());
     1012            dumpBytecodeCommentAndNewLine(location);
     1013            break;
     1014        }
     1015        case op_init_global_const_check: {
     1016            WriteBarrier<Unknown>* registerPointer = (++it)->u.registerPointer;
     1017            int r0 = (++it)->u.operand;
     1018            dataLog("[%4d] init_global_const_check\t g%d(%p), %s", location, m_globalObject->findRegisterIndex(registerPointer), registerPointer, registerName(exec, r0).data());
     1019            dumpBytecodeCommentAndNewLine(location);
     1020            it++;
     1021            it++;
     1022            break;
     1023        }
    10081024        case op_resolve_base: {
    10091025            int r0 = (++it)->u.operand;
Note: See TracChangeset for help on using the changeset viewer.