Changeset 39255 in webkit for trunk/JavaScriptCore/bytecode/CodeBlock.cpp
- Timestamp:
- Dec 12, 2008, 2:48:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r39252 r39255 1407 1407 } 1408 1408 1409 bool CodeBlock::getByIdExceptionInfoForBytecodeOffset(unsigned bytecodeOffset, OpcodeID& opcodeID) 1410 { 1411 ASSERT(bytecodeOffset < m_instructions.size()); 1412 1413 if (!m_getByIdExceptionInfo.size()) 1414 return false; 1415 1416 int low = 0; 1417 int high = m_getByIdExceptionInfo.size(); 1418 while (low < high) { 1419 int mid = low + (high - low) / 2; 1420 if (m_getByIdExceptionInfo[mid].bytecodeOffset <= bytecodeOffset) 1421 low = mid + 1; 1422 else 1423 high = mid; 1424 } 1425 1426 if (!low) 1427 return false; 1428 1429 opcodeID = m_getByIdExceptionInfo[low - 1].isOpConstruct ? op_construct : op_instanceof; 1430 return true; 1431 } 1432 1409 1433 void CodeBlock::shrinkToFit() 1410 1434 {
Note:
See TracChangeset
for help on using the changeset viewer.