diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/JavaScriptCore/bytecode/GetByIdStatus.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/bytecode/GetByIdStatus.cpp')
-rw-r--r-- | Source/JavaScriptCore/bytecode/GetByIdStatus.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp b/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp index d17c17325..db4aa9b99 100644 --- a/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp +++ b/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp @@ -30,6 +30,7 @@ #include "JSScope.h" #include "LLIntData.h" #include "LowLevelInterpreter.h" +#include "Operations.h" namespace JSC { @@ -51,7 +52,7 @@ GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned unsigned attributesIgnored; JSCell* specificValue; PropertyOffset offset = structure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; if (!isValidOffset(offset)) @@ -92,7 +93,7 @@ void GetByIdStatus::computeForChain(GetByIdStatus& result, CodeBlock* profiledBl JSCell* specificValue; result.m_offset = currentStructure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (currentStructure->isDictionary()) specificValue = 0; if (!isValidOffset(result.m_offset)) @@ -124,6 +125,9 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec if (!stubInfo.seen) return computeFromLLInt(profiledBlock, bytecodeIndex, ident); + if (stubInfo.resetByGC) + return GetByIdStatus(TakesSlowPath, true); + PolymorphicAccessStructureList* list; int listSize; switch (stubInfo.accessType) { @@ -161,7 +165,7 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec unsigned attributesIgnored; JSCell* specificValue; result.m_offset = structure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; @@ -186,7 +190,7 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec unsigned attributesIgnored; JSCell* specificValue; PropertyOffset myOffset = structure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; @@ -252,7 +256,7 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec #endif // ENABLE(JIT) } -GetByIdStatus GetByIdStatus::computeFor(JSGlobalData& globalData, Structure* structure, Identifier& ident) +GetByIdStatus GetByIdStatus::computeFor(VM& vm, Structure* structure, Identifier& ident) { // For now we only handle the super simple self access case. We could handle the // prototype case in the future. @@ -267,10 +271,10 @@ GetByIdStatus GetByIdStatus::computeFor(JSGlobalData& globalData, Structure* str return GetByIdStatus(TakesSlowPath); GetByIdStatus result; - result.m_wasSeenInJIT = false; // To my knowledge nobody that uses computeFor(JSGlobalData&, Structure*, Identifier&) reads this field, but I might as well be honest: no, it wasn't seen in the JIT, since I computed it statically. + result.m_wasSeenInJIT = false; // To my knowledge nobody that uses computeFor(VM&, Structure*, Identifier&) reads this field, but I might as well be honest: no, it wasn't seen in the JIT, since I computed it statically. unsigned attributes; JSCell* specificValue; - result.m_offset = structure->get(globalData, ident, attributes, specificValue); + result.m_offset = structure->get(vm, ident, attributes, specificValue); if (!isValidOffset(result.m_offset)) return GetByIdStatus(TakesSlowPath); // It's probably a prototype lookup. Give up on life for now, even though we could totally be way smarter about it. if (attributes & Accessor) |