diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-26 07:06:59 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-26 07:06:59 (GMT) |
commit | 9a1ee410d24321e7eedaea6bb4f1b21fcc6fb427 (patch) | |
tree | 37ae0ceb0eb9d4f74683b02bf3187cfd7f694c6c /src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h | |
parent | 2c0921b667ec74df6ad3d749b30bb9b7c5843343 (diff) | |
parent | 35c8033ff51ab6d0567e786b790b8cc49852803b (diff) | |
download | Qt-9a1ee410d24321e7eedaea6bb4f1b21fcc6fb427.zip Qt-9a1ee410d24321e7eedaea6bb4f1b21fcc6fb427.tar.gz Qt-9a1ee410d24321e7eedaea6bb4f1b21fcc6fb427.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h index 0b3d038..8cab1db 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h @@ -51,19 +51,17 @@ namespace JSC { m_location = location; unsigned size = m_unresolvedJumps.size(); - for (unsigned i = 0; i < size; ++i) { - unsigned j = m_unresolvedJumps[i]; - m_codeBlock->instructions()[j].u.operand = m_location - j; - } + for (unsigned i = 0; i < size; ++i) + m_codeBlock->instructions()[m_unresolvedJumps[i].second].u.operand = m_location - m_unresolvedJumps[i].first; } - int offsetFrom(int location) const + int bind(int opcode, int offset) const { if (m_location == invalidLocation) { - m_unresolvedJumps.append(location); + m_unresolvedJumps.append(std::make_pair(opcode, offset)); return 0; } - return m_location - location; + return m_location - opcode; } void ref() { ++m_refCount; } @@ -77,7 +75,7 @@ namespace JSC { bool isForward() const { return m_location == invalidLocation; } private: - typedef Vector<int, 8> JumpVector; + typedef Vector<std::pair<int, int>, 8> JumpVector; static const unsigned invalidLocation = UINT_MAX; |