Changeset 49409 in webkit for trunk/JavaScriptCore/bytecompiler/Label.h
- Timestamp:
- Oct 9, 2009, 5:30:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecompiler/Label.h
r39070 r49409 52 52 53 53 unsigned size = m_unresolvedJumps.size(); 54 for (unsigned i = 0; i < size; ++i) { 55 unsigned j = m_unresolvedJumps[i]; 56 m_codeBlock->instructions()[j].u.operand = m_location - j; 57 } 54 for (unsigned i = 0; i < size; ++i) 55 m_codeBlock->instructions()[m_unresolvedJumps[i].second].u.operand = m_location - m_unresolvedJumps[i].first; 58 56 } 59 57 60 int offsetFrom(int location) const58 int bind(int opcode, int offset) const 61 59 { 62 60 if (m_location == invalidLocation) { 63 m_unresolvedJumps.append( location);61 m_unresolvedJumps.append(std::make_pair(opcode, offset)); 64 62 return 0; 65 63 } 66 return m_location - location;64 return m_location - opcode; 67 65 } 68 66 … … 78 76 79 77 private: 80 typedef Vector< int, 8> JumpVector;78 typedef Vector<std::pair<int, int>, 8> JumpVector; 81 79 82 80 static const unsigned invalidLocation = UINT_MAX;
Note:
See TracChangeset
for help on using the changeset viewer.