Changeset 39354 in webkit for trunk/JavaScriptCore/bytecode/CodeBlock.cpp
- Timestamp:
- Dec 16, 2008, 10:30:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r39284 r39354 1428 1428 } 1429 1429 1430 #if ENABLE(JIT) 1431 bool CodeBlock::functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& functionRegisterIndex) 1432 { 1433 ASSERT(bytecodeOffset < m_instructions.size()); 1434 1435 if (!m_rareData || !m_rareData->m_functionRegisterInfos.size()) 1436 return false; 1437 1438 int low = 0; 1439 int high = m_rareData->m_functionRegisterInfos.size(); 1440 while (low < high) { 1441 int mid = low + (high - low) / 2; 1442 if (m_rareData->m_functionRegisterInfos[mid].bytecodeOffset <= bytecodeOffset) 1443 low = mid + 1; 1444 else 1445 high = mid; 1446 } 1447 1448 if (!low || m_rareData->m_functionRegisterInfos[low - 1].bytecodeOffset != bytecodeOffset) 1449 return false; 1450 1451 functionRegisterIndex = m_rareData->m_functionRegisterInfos[low - 1].functionRegisterIndex; 1452 return true; 1453 } 1454 #endif 1455 1430 1456 void CodeBlock::shrinkToFit() 1431 1457 { … … 1444 1470 m_expressionInfo.shrinkToFit(); 1445 1471 m_lineInfo.shrinkToFit(); 1472 m_getByIdExceptionInfo.shrinkToFit(); 1446 1473 1447 1474 m_identifiers.shrinkToFit(); … … 1457 1484 m_rareData->m_characterSwitchJumpTables.shrinkToFit(); 1458 1485 m_rareData->m_stringSwitchJumpTables.shrinkToFit(); 1486 #if ENABLE(JIT) 1487 m_rareData->m_functionRegisterInfos.shrinkToFit(); 1488 #endif 1459 1489 } 1460 1490 }
Note:
See TracChangeset
for help on using the changeset viewer.