Changeset 59777 in webkit for trunk/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- May 19, 2010, 11:28:54 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r59339 r59777 79 79 , m_propertyAccessCompilationInfo(codeBlock ? codeBlock->numberOfStructureStubInfos() : 0) 80 80 , m_callStructureStubCompilationInfo(codeBlock ? codeBlock->numberOfCallLinkInfos() : 0) 81 , m_bytecode Index((unsigned)-1)81 , m_bytecodeOffset((unsigned)-1) 82 82 #if USE(JSVALUE32_64) 83 83 , m_jumpTargetIndex(0) 84 , m_mappedBytecode Index((unsigned)-1)84 , m_mappedBytecodeOffset((unsigned)-1) 85 85 , m_mappedVirtualRegisterIndex((unsigned)-1) 86 86 , m_mappedTag((RegisterID)-1) … … 115 115 116 116 #define NEXT_OPCODE(name) \ 117 m_bytecode Index+= OPCODE_LENGTH(name); \117 m_bytecodeOffset += OPCODE_LENGTH(name); \ 118 118 break; 119 119 … … 177 177 m_callLinkInfoIndex = 0; 178 178 179 for (m_bytecode Index = 0; m_bytecodeIndex< instructionCount; ) {180 Instruction* currentInstruction = instructionsBegin + m_bytecode Index;181 ASSERT_WITH_MESSAGE(m_interpreter->isOpcode(currentInstruction->u.opcode), "privateCompileMainPass gone bad @ %d", m_bytecode Index);179 for (m_bytecodeOffset = 0; m_bytecodeOffset < instructionCount; ) { 180 Instruction* currentInstruction = instructionsBegin + m_bytecodeOffset; 181 ASSERT_WITH_MESSAGE(m_interpreter->isOpcode(currentInstruction->u.opcode), "privateCompileMainPass gone bad @ %d", m_bytecodeOffset); 182 182 183 183 #if ENABLE(OPCODE_SAMPLING) 184 if (m_bytecode Index> 0) // Avoid the overhead of sampling op_enter twice.184 if (m_bytecodeOffset > 0) // Avoid the overhead of sampling op_enter twice. 185 185 sampleInstruction(currentInstruction); 186 186 #endif 187 187 188 188 #if !USE(JSVALUE32_64) 189 if (m_labels[m_bytecode Index].isUsed())189 if (m_labels[m_bytecodeOffset].isUsed()) 190 190 killLastResultRegister(); 191 191 #endif 192 192 193 m_labels[m_bytecode Index] = label();193 m_labels[m_bytecodeOffset] = label(); 194 194 195 195 switch (m_interpreter->getOpcodeID(currentInstruction->u.opcode)) { … … 348 348 #ifndef NDEBUG 349 349 // Reset this, in order to guard its use with ASSERTs. 350 m_bytecode Index= (unsigned)-1;350 m_bytecodeOffset = (unsigned)-1; 351 351 #endif 352 352 } … … 357 357 unsigned jmpTableCount = m_jmpTable.size(); 358 358 for (unsigned i = 0; i < jmpTableCount; ++i) 359 m_jmpTable[i].from.linkTo(m_labels[m_jmpTable[i].toBytecode Index], this);359 m_jmpTable[i].from.linkTo(m_labels[m_jmpTable[i].toBytecodeOffset], this); 360 360 m_jmpTable.clear(); 361 361 } … … 374 374 #endif 375 375 376 m_bytecode Index= iter->to;376 m_bytecodeOffset = iter->to; 377 377 #ifndef NDEBUG 378 unsigned firstTo = m_bytecode Index;379 #endif 380 Instruction* currentInstruction = instructionsBegin + m_bytecode Index;378 unsigned firstTo = m_bytecodeOffset; 379 #endif 380 Instruction* currentInstruction = instructionsBegin + m_bytecodeOffset; 381 381 382 382 switch (m_interpreter->getOpcodeID(currentInstruction->u.opcode)) { … … 451 451 #ifndef NDEBUG 452 452 // Reset this, in order to guard its use with ASSERTs. 453 m_bytecode Index= (unsigned)-1;453 m_bytecodeOffset = (unsigned)-1; 454 454 #endif 455 455 } … … 484 484 if (m_codeBlock->codeType() == FunctionCode) { 485 485 registerFileCheck.link(this); 486 m_bytecode Index= 0;486 m_bytecodeOffset = 0; 487 487 JITStubCall(this, cti_register_file_check).call(); 488 488 #ifndef NDEBUG 489 m_bytecode Index= (unsigned)-1; // Reset this, in order to guard its use with ASSERTs.489 m_bytecodeOffset = (unsigned)-1; // Reset this, in order to guard its use with ASSERTs. 490 490 #endif 491 491 jump(functionBody); … … 499 499 for (unsigned i = 0; i < m_switches.size(); ++i) { 500 500 SwitchRecord record = m_switches[i]; 501 unsigned bytecode Index = record.bytecodeIndex;501 unsigned bytecodeOffset = record.bytecodeOffset; 502 502 503 503 if (record.type != SwitchRecord::String) { … … 505 505 ASSERT(record.jumpTable.simpleJumpTable->branchOffsets.size() == record.jumpTable.simpleJumpTable->ctiOffsets.size()); 506 506 507 record.jumpTable.simpleJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecode Index+ record.defaultOffset]);507 record.jumpTable.simpleJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecodeOffset + record.defaultOffset]); 508 508 509 509 for (unsigned j = 0; j < record.jumpTable.simpleJumpTable->branchOffsets.size(); ++j) { 510 510 unsigned offset = record.jumpTable.simpleJumpTable->branchOffsets[j]; 511 record.jumpTable.simpleJumpTable->ctiOffsets[j] = offset ? patchBuffer.locationOf(m_labels[bytecode Index+ offset]) : record.jumpTable.simpleJumpTable->ctiDefault;511 record.jumpTable.simpleJumpTable->ctiOffsets[j] = offset ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset]) : record.jumpTable.simpleJumpTable->ctiDefault; 512 512 } 513 513 } else { 514 514 ASSERT(record.type == SwitchRecord::String); 515 515 516 record.jumpTable.stringJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecode Index+ record.defaultOffset]);516 record.jumpTable.stringJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecodeOffset + record.defaultOffset]); 517 517 518 518 StringJumpTable::StringOffsetTable::iterator end = record.jumpTable.stringJumpTable->offsetTable.end(); 519 519 for (StringJumpTable::StringOffsetTable::iterator it = record.jumpTable.stringJumpTable->offsetTable.begin(); it != end; ++it) { 520 520 unsigned offset = it->second.branchOffset; 521 it->second.ctiOffset = offset ? patchBuffer.locationOf(m_labels[bytecode Index+ offset]) : record.jumpTable.stringJumpTable->ctiDefault;521 it->second.ctiOffset = offset ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset]) : record.jumpTable.stringJumpTable->ctiDefault; 522 522 } 523 523 } … … 537 537 m_codeBlock->callReturnIndexVector().reserveCapacity(m_calls.size()); 538 538 for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) 539 m_codeBlock->callReturnIndexVector().append(CallReturnOffsetToBytecode Index(patchBuffer.returnAddressOffset(iter->from), iter->bytecodeIndex));539 m_codeBlock->callReturnIndexVector().append(CallReturnOffsetToBytecodeOffset(patchBuffer.returnAddressOffset(iter->from), iter->bytecodeOffset)); 540 540 } 541 541
Note:
See TracChangeset
for help on using the changeset viewer.