Changeset 103292 in webkit for trunk/Source/JavaScriptCore/interpreter/Interpreter.h
- Timestamp:
- Dec 19, 2011, 6:42:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r102545 r103292 95 95 public: 96 96 Interpreter(); 97 98 void initialize(bool canUseJIT); 97 99 98 100 RegisterFile& registerFile() { return m_registerFile; } … … 100 102 Opcode getOpcode(OpcodeID id) 101 103 { 102 #if ENABLE(COMPUTED_GOTO_INTERPRETER) 103 return m_opcodeTable[id]; 104 #else 105 return id; 106 #endif 104 ASSERT(m_initialized); 105 #if ENABLE(COMPUTED_GOTO_INTERPRETER) 106 return m_opcodeTable[id]; 107 #else 108 return id; 109 #endif 107 110 } 108 111 109 112 OpcodeID getOpcodeID(Opcode opcode) 110 113 { 111 #if ENABLE(COMPUTED_GOTO_INTERPRETER) 112 ASSERT(isOpcode(opcode)); 113 return m_opcodeIDTable.get(opcode); 114 #else 115 return opcode; 116 #endif 114 ASSERT(m_initialized); 115 #if ENABLE(COMPUTED_GOTO_INTERPRETER) 116 ASSERT(isOpcode(opcode)); 117 if (!m_enabled) { 118 OpcodeID result = static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode)); 119 ASSERT(result == m_opcodeIDTable.get(opcode)); 120 return result; 121 } 122 return m_opcodeIDTable.get(opcode); 123 #else 124 return opcode; 125 #endif 117 126 } 118 127 … … 187 196 HashMap<Opcode, OpcodeID> m_opcodeIDTable; // Maps Opcode => OpcodeID for decompiling 188 197 #endif 198 199 #if !ASSERT_DISABLED 200 bool m_initialized; 201 #endif 202 bool m_enabled; 189 203 }; 190 204
Note:
See TracChangeset
for help on using the changeset viewer.