Changeset 103292 in webkit for trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- Dec 19, 2011, 6:42:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r103083 r103292 541 541 : m_sampleEntryDepth(0) 542 542 , m_reentryDepth(0) 543 #if !ASSERT_DISABLED 544 , m_initialized(false) 545 #endif 546 , m_enabled(false) 547 { 548 } 549 550 void Interpreter::initialize(bool canUseJIT) 543 551 { 544 552 #if ENABLE(COMPUTED_GOTO_INTERPRETER) 545 privateExecute(InitializeAndReturn, 0, 0); 546 547 for (int i = 0; i < numOpcodeIDs; ++i) 548 m_opcodeIDTable.add(m_opcodeTable[i], static_cast<OpcodeID>(i)); 553 if (canUseJIT) { 554 // If the JIT is present, don't use jump destinations for opcodes. 555 556 for (int i = 0; i < numOpcodeIDs; ++i) { 557 Opcode opcode = bitwise_cast<void*>(static_cast<uintptr_t>(i)); 558 m_opcodeTable[i] = opcode; 559 m_opcodeIDTable.add(opcode, static_cast<OpcodeID>(i)); 560 } 561 } else { 562 privateExecute(InitializeAndReturn, 0, 0); 563 564 for (int i = 0; i < numOpcodeIDs; ++i) 565 m_opcodeIDTable.add(m_opcodeTable[i], static_cast<OpcodeID>(i)); 566 567 m_enabled = true; 568 } 569 #else 570 UNUSED_PARAM(canUseJIT); 571 #if ENABLE(INTERPRETER) 572 m_enabled = true; 573 #else 574 m_enabled = false; 575 #endif 549 576 #endif // ENABLE(COMPUTED_GOTO_INTERPRETER) 577 #if !ASSERT_DISABLED 578 m_initialized = true; 579 #endif 550 580 551 581 #if ENABLE(OPCODE_SAMPLING) … … 1654 1684 } 1655 1685 1686 ASSERT(m_initialized); 1687 ASSERT(m_enabled); 1688 1656 1689 #if ENABLE(JIT) 1657 1690 #if ENABLE(INTERPRETER)
Note:
See TracChangeset
for help on using the changeset viewer.