Changeset 120989 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Jun 21, 2012, 6:33:30 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r120974 r120989 1 2012-06-21 Filip Pizlo <[email protected]> 2 3 op_resolve_global should not prevent DFG inlining 4 https://bugs.webkit.org/show_bug.cgi?id=89726 5 6 Reviewed by Gavin Barraclough. 7 8 * bytecode/CodeBlock.cpp: 9 (JSC::CodeBlock::CodeBlock): 10 (JSC::CodeBlock::shrinkToFit): 11 * bytecode/GlobalResolveInfo.h: 12 (JSC::GlobalResolveInfo::GlobalResolveInfo): 13 (GlobalResolveInfo): 14 * dfg/DFGByteCodeParser.cpp: 15 (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): 16 * dfg/DFGCapabilities.h: 17 (JSC::DFG::canInlineOpcode): 18 * dfg/DFGOperations.cpp: 19 * dfg/DFGOperations.h: 20 * dfg/DFGSpeculativeJIT.h: 21 (JSC::DFG::SpeculativeJIT::callOperation): 22 * dfg/DFGSpeculativeJIT32_64.cpp: 23 (JSC::DFG::SpeculativeJIT::compile): 24 * dfg/DFGSpeculativeJIT64.cpp: 25 (JSC::DFG::SpeculativeJIT::compile): 26 1 27 2012-06-20 Filip Pizlo <[email protected]> 2 28 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r120897 r120989 1584 1584 , m_sourceOffset(other.m_sourceOffset) 1585 1585 #if ENABLE(JIT) 1586 , m_globalResolveInfos(other.m_globalResolveInfos )1586 , m_globalResolveInfos(other.m_globalResolveInfos.size()) 1587 1587 #endif 1588 1588 #if ENABLE(VALUE_PROFILER) … … 1609 1609 optimizeAfterWarmUp(); 1610 1610 jitAfterWarmUp(); 1611 1612 #if ENABLE(JIT) 1613 for (unsigned i = m_globalResolveInfos.size(); i--;) 1614 m_globalResolveInfos[i] = GlobalResolveInfo(other.m_globalResolveInfos[i].bytecodeOffset); 1615 #endif 1611 1616 1612 1617 if (other.m_rareData) { … … 2274 2279 #if ENABLE(JIT) 2275 2280 m_structureStubInfos.shrinkToFit(); 2276 m_globalResolveInfos.shrinkToFit(); 2281 if (shrinkMode == EarlyShrink) 2282 m_globalResolveInfos.shrinkToFit(); 2277 2283 m_callLinkInfos.shrinkToFit(); 2278 2284 m_methodCallLinkInfos.shrinkToFit(); -
trunk/Source/JavaScriptCore/bytecode/GlobalResolveInfo.h
r120897 r120989 32 32 33 33 struct GlobalResolveInfo { 34 GlobalResolveInfo() { } 35 34 36 GlobalResolveInfo(unsigned bytecodeOffset) 35 37 : offset(0) … … 40 42 WriteBarrier<Structure> structure; 41 43 unsigned offset; 42 unsigned bytecodeOffset; 44 unsigned bytecodeOffset; // Only valid in old JIT code. This means nothing in the DFG. 43 45 }; 44 46 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r120974 r120989 3173 3173 m_constantRemap[i] = result.iterator->second; 3174 3174 } 3175 for (unsigned i = 0; i < codeBlock->numberOfGlobalResolveInfos(); ++i) 3176 byteCodeParser->m_codeBlock->addGlobalResolveInfo(std::numeric_limits<unsigned>::max()); 3175 3177 3176 3178 m_callsiteBlockHeadNeedsLinking = true; -
trunk/Source/JavaScriptCore/dfg/DFGCapabilities.h
r120244 r120989 194 194 case op_resolve: 195 195 case op_resolve_base: 196 case op_resolve_global:197 196 198 197 // Constant buffers aren't copied correctly. This is easy to fix, but for -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r120244 r120989 969 969 } 970 970 971 EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState* exec, GlobalResolveInfo* resolveInfo, Identifier* propertyName) 972 { 973 JSGlobalData* globalData = &exec->globalData(); 974 NativeCallFrameTracer tracer(globalData, exec); 975 976 JSGlobalObject* globalObject = exec->lexicalGlobalObject(); 977 971 EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState* exec, GlobalResolveInfo* resolveInfo, JSGlobalObject* globalObject, Identifier* propertyName) 972 { 973 JSGlobalData* globalData = &exec->globalData(); 974 NativeCallFrameTracer tracer(globalData, exec); 975 978 976 PropertySlot slot(globalObject); 979 977 if (globalObject->getPropertySlot(exec, *propertyName, slot)) { -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r120244 r120989 66 66 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_ECI)(ExecState*, JSCell*, Identifier*); 67 67 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_ECJ)(ExecState*, JSCell*, EncodedJSValue); 68 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EG I)(ExecState*, GlobalResolveInfo*, Identifier*);68 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EGriJsgI)(ExecState*, GlobalResolveInfo*, JSGlobalObject*, Identifier*); 69 69 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EI)(ExecState*, Identifier*); 70 70 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJ)(ExecState*, EncodedJSValue); … … 122 122 EncodedJSValue DFG_OPERATION operationResolveBase(ExecState*, Identifier*) WTF_INTERNAL; 123 123 EncodedJSValue DFG_OPERATION operationResolveBaseStrictPut(ExecState*, Identifier*) WTF_INTERNAL; 124 EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState*, GlobalResolveInfo*, Identifier*) WTF_INTERNAL;124 EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState*, GlobalResolveInfo*, JSGlobalObject*, Identifier*) WTF_INTERNAL; 125 125 EncodedJSValue DFG_OPERATION operationToPrimitive(ExecState*, EncodedJSValue) WTF_INTERNAL; 126 126 EncodedJSValue DFG_OPERATION operationStrCat(ExecState*, void*, size_t) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r120834 r120989 1230 1230 return call; 1231 1231 } 1232 JITCompiler::Call callOperation(J_DFGOperation_EG I operation, GPRReg result, GPRReg arg1, Identifier* identifier)1233 { 1234 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(identifier));1232 JITCompiler::Call callOperation(J_DFGOperation_EGriJsgI operation, GPRReg result, GPRReg arg1, GPRReg arg2, Identifier* identifier) 1233 { 1234 m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(identifier)); 1235 1235 return appendCallWithExceptionCheckSetResult(operation, result); 1236 1236 } … … 1483 1483 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1484 1484 } 1485 JITCompiler::Call callOperation(J_DFGOperation_EG I operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, Identifier* identifier)1486 { 1487 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(identifier));1485 JITCompiler::Call callOperation(J_DFGOperation_EGriJsgI operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2, Identifier* identifier) 1486 { 1487 m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(identifier)); 1488 1488 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1489 1489 } -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r120500 r120989 3841 3841 slowPathCall( 3842 3842 structuresNotMatch, this, operationResolveGlobal, 3843 JSValueRegs(resultTagGPR, resultPayloadGPR), resolveInfoGPR, 3843 JSValueRegs(resultTagGPR, resultPayloadGPR), resolveInfoGPR, globalObjectGPR, 3844 3844 &m_jit.codeBlock()->identifier(data.identifierNumber))); 3845 3845 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r120499 r120989 3844 3844 m_jit.load32(JITCompiler::Address(resolveInfoGPR, OBJECT_OFFSETOF(GlobalResolveInfo, offset)), resolveInfoGPR); 3845 3845 m_jit.loadPtr(JITCompiler::BaseIndex(resultGPR, resolveInfoGPR, JITCompiler::ScalePtr), resultGPR); 3846 3846 3847 3847 addSlowPathGenerator( 3848 3848 slowPathCall( 3849 3849 structuresDontMatch, this, operationResolveGlobal, 3850 resultGPR, resolveInfoGPR, 3850 resultGPR, resolveInfoGPR, globalObjectGPR, 3851 3851 &m_jit.codeBlock()->identifier(data.identifierNumber))); 3852 3852
Note:
See TracChangeset
for help on using the changeset viewer.