Changeset 52231 in webkit for trunk/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- Dec 16, 2009, 7:50:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r51964 r52231 322 322 , m_reentryDepth(0) 323 323 { 324 #if HAVE(COMPUTED_GOTO) 324 325 privateExecute(InitializeAndReturn, 0, 0, 0); 326 327 for (int i = 0; i < numOpcodeIDs; ++i) 328 m_opcodeIDTable.add(m_opcodeTable[i], static_cast<OpcodeID>(i)); 329 #endif // HAVE(COMPUTED_GOTO) 330 325 331 #if ENABLE(OPCODE_SAMPLING) 326 332 enableSampler(); … … 1082 1088 // One-time initialization of our address tables. We have to put this code 1083 1089 // here because our labels are only in scope inside this function. 1084 if ( flag == InitializeAndReturn) {1090 if (UNLIKELY(flag == InitializeAndReturn)) { 1085 1091 #if HAVE(COMPUTED_GOTO) 1086 #define ADD_BYTECODE(id, length) m_opcodeTable[id] = &&id; 1087 FOR_EACH_OPCODE_ID(ADD_BYTECODE); 1088 #undef ADD_BYTECODE 1089 1090 #define ADD_OPCODE_ID(id, length) m_opcodeIDTable.add(&&id, id); 1091 FOR_EACH_OPCODE_ID(ADD_OPCODE_ID); 1092 #undef ADD_OPCODE_ID 1093 ASSERT(m_opcodeIDTable.size() == numOpcodeIDs); 1092 #define LIST_OPCODE_LABEL(id, length) &&id, 1093 static Opcode labels[] = { FOR_EACH_OPCODE_ID(LIST_OPCODE_LABEL) }; 1094 for (size_t i = 0; i < sizeof(labels) / sizeof(Opcode); ++i) 1095 m_opcodeTable[i] = labels[i]; 1096 #undef LIST_OPCODE_LABEL 1094 1097 #endif // HAVE(COMPUTED_GOTO) 1095 1098 return JSValue();
Note:
See TracChangeset
for help on using the changeset viewer.