From 43a42f108af6bcbd91f2672731c3047c26213af1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 22 Oct 2012 15:40:17 +0200 Subject: Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067) New snapshot that fixes build without QtWidgets --- .../bytecode/ResolveGlobalStatus.cpp | 44 +++------------------- 1 file changed, 5 insertions(+), 39 deletions(-) (limited to 'Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp') 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 -- cgit v1.2.1