Changeset 64790 in webkit for trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
- Timestamp:
- Aug 5, 2010, 3:22:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r63515 r64790 217 217 , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) 218 218 , m_lastOpcodeID(op_end) 219 #ifndef NDEBUG 220 , m_lastOpcodePosition(0) 221 #endif 219 222 , m_emitNodeDepth(0) 220 223 , m_usesExceptions(false) … … 589 592 void BytecodeGenerator::emitOpcode(OpcodeID opcodeID) 590 593 { 594 #ifndef NDEBUG 595 size_t opcodePosition = instructions().size(); 596 ASSERT(opcodePosition - m_lastOpcodePosition == opcodeLength(m_lastOpcodeID) || m_lastOpcodeID == op_end); 597 m_lastOpcodePosition = opcodePosition; 598 #endif 591 599 instructions().append(globalData()->interpreter->getOpcode(opcodeID)); 592 600 m_lastOpcodeID = opcodeID; … … 614 622 ASSERT(instructions().size() >= 4); 615 623 instructions().shrink(instructions().size() - 4); 624 m_lastOpcodeID = op_end; 616 625 } 617 626 … … 620 629 ASSERT(instructions().size() >= 3); 621 630 instructions().shrink(instructions().size() - 3); 631 m_lastOpcodeID = op_end; 622 632 } 623 633 … … 1107 1117 emitOpcode(requiresDynamicChecks ? op_resolve_global_dynamic : op_resolve_global); 1108 1118 instructions().append(dst->index()); 1109 instructions().append(globalObject);1110 1119 instructions().append(addConstant(property)); 1111 1120 instructions().append(0); … … 1143 1152 emitOpcode(op_get_global_var); 1144 1153 instructions().append(dst->index()); 1145 instructions().append(asCell(globalObject));1146 1154 instructions().append(index); 1147 1155 return dst; … … 1159 1167 if (globalObject) { 1160 1168 emitOpcode(op_put_global_var); 1161 instructions().append(asCell(globalObject));1162 1169 instructions().append(index); 1163 1170 instructions().append(value->index()); … … 1230 1237 emitOpcode(requiresDynamicChecks ? op_resolve_global_dynamic : op_resolve_global); 1231 1238 instructions().append(propDst->index()); 1232 instructions().append(globalObject);1233 1239 instructions().append(addConstant(property)); 1234 1240 instructions().append(0);
Note:
See TracChangeset
for help on using the changeset viewer.