diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-22 15:40:17 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-22 15:40:17 +0200 |
commit | 43a42f108af6bcbd91f2672731c3047c26213af1 (patch) | |
tree | 7fa092e5f5d873c72f2486a70e26be26f7a38bec /Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp | |
parent | d9cf437c840c6eb7417bdd97e6c40979255d3158 (diff) | |
download | qtwebkit-43a42f108af6bcbd91f2672731c3047c26213af1.tar.gz |
Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067)
New snapshot that fixes build without QtWidgets
Diffstat (limited to 'Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp')
-rw-r--r-- | Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp index c9fd7dca2..7814f8c99 100644 --- a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp +++ b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp @@ -32,13 +32,11 @@ namespace JSC { -#if ENABLE(LLINT) || (ENABLE(JIT) && ENABLE(VALUE_PROFILER)) static ResolveGlobalStatus computeForStructure(CodeBlock* codeBlock, Structure* structure, Identifier& identifier) { unsigned attributesIgnored; JSCell* specificValue; - PropertyOffset offset = structure->get( - *codeBlock->globalData(), identifier, attributesIgnored, specificValue); + PropertyOffset offset = structure->get(*codeBlock->globalData(), identifier, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; if (!isValidOffset(offset)) @@ -46,46 +44,14 @@ static ResolveGlobalStatus computeForStructure(CodeBlock* codeBlock, Structure* return ResolveGlobalStatus(ResolveGlobalStatus::Simple, structure, offset, specificValue); } -#endif // ENABLE(LLINT) || ENABLE(JIT) -static ResolveGlobalStatus computeForLLInt(CodeBlock* codeBlock, unsigned bytecodeIndex, Identifier& identifier) +ResolveGlobalStatus ResolveGlobalStatus::computeFor(CodeBlock* codeBlock, int, ResolveOperation* operation, Identifier& identifier) { -#if ENABLE(LLINT) - Instruction* instruction = codeBlock->instructions().begin() + bytecodeIndex; - - ASSERT(instruction[0].u.opcode == LLInt::getOpcode(op_resolve_global)); - - Structure* structure = instruction[3].u.structure.get(); - if (!structure) + ASSERT(operation->m_operation == ResolveOperation::GetAndReturnGlobalProperty); + if (!operation->m_structure) return ResolveGlobalStatus(); - return computeForStructure(codeBlock, structure, identifier); -#else - UNUSED_PARAM(codeBlock); - UNUSED_PARAM(bytecodeIndex); - UNUSED_PARAM(identifier); - return ResolveGlobalStatus(); -#endif -} - -ResolveGlobalStatus ResolveGlobalStatus::computeFor(CodeBlock* codeBlock, unsigned bytecodeIndex, Identifier& identifier) -{ -#if ENABLE(JIT) && ENABLE(VALUE_PROFILER) - if (!codeBlock->numberOfGlobalResolveInfos()) - return computeForLLInt(codeBlock, bytecodeIndex, identifier); - - if (codeBlock->likelyToTakeSlowCase(bytecodeIndex)) - return ResolveGlobalStatus(TakesSlowPath); - - GlobalResolveInfo& globalResolveInfo = codeBlock->globalResolveInfoForBytecodeOffset(bytecodeIndex); - - if (!globalResolveInfo.structure) - return computeForLLInt(codeBlock, bytecodeIndex, identifier); - - return computeForStructure(codeBlock, globalResolveInfo.structure.get(), identifier); -#else - return computeForLLInt(codeBlock, bytecodeIndex, identifier); -#endif + return computeForStructure(codeBlock, operation->m_structure.get(), identifier); } } // namespace JSC |