Changeset 99898 in webkit for trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
- Timestamp:
- Nov 10, 2011, 1:59:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r99788 r99898 29 29 #if ENABLE(DFG_JIT) 30 30 31 #include "DFGByteCodeCache.h" 31 32 #include "DFGCapabilities.h" 32 33 #include "CodeBlock.h" … … 842 843 // Mapping between values and constant numbers. 843 844 JSValueMap m_jsValueMap; 845 846 // Cache of code blocks that we've generated bytecode for. 847 ByteCodeCache<canInlineFunctionFor> m_codeBlockCache; 844 848 }; 845 849 … … 957 961 // If we get here then it looks like we should definitely inline this code. Proceed 958 962 // with parsing the code to get bytecode, so that we can then parse the bytecode. 959 // Note that the code block we get here is intended to die after handleInlining() 960 // returns. 961 JSObject* exception; 962 OwnPtr<CodeBlock> codeBlock = executable->produceCodeBlockFor(expectedFunction->scope(), OptimizingCompilation, kind, exception); 963 CodeBlock* codeBlock = m_codeBlockCache.get(CodeBlockKey(executable, kind), expectedFunction->scope()); 963 964 if (!codeBlock) 964 965 return false; 965 ASSERT(!exception); 966 967 // Now that we have the bytecode, check if we really can inline it. This may fail 968 // if the code block contains some nasty opcodes. 969 if (!canInlineFunctionFor(codeBlock.get(), kind)) 970 return false; 966 967 ASSERT(canInlineFunctionFor(codeBlock, kind)); 971 968 972 969 #if DFG_ENABLE(DEBUG_VERBOSE) … … 999 996 } 1000 997 1001 InlineStackEntry inlineStackEntry(this, codeBlock .get(), profiledBlock, m_graph.m_blocks.size() - 1, (VirtualRegister)m_inlineStackTop->remapOperand(callTarget), expectedFunction, (VirtualRegister)m_inlineStackTop->remapOperand(usesResult ? resultOperand : InvalidVirtualRegister), (VirtualRegister)inlineCallFrameStart, kind);998 InlineStackEntry inlineStackEntry(this, codeBlock, profiledBlock, m_graph.m_blocks.size() - 1, (VirtualRegister)m_inlineStackTop->remapOperand(callTarget), expectedFunction, (VirtualRegister)m_inlineStackTop->remapOperand(usesResult ? resultOperand : InvalidVirtualRegister), (VirtualRegister)inlineCallFrameStart, kind); 1002 999 1003 1000 // This is where the actual inlining really happens.
Note:
See TracChangeset
for help on using the changeset viewer.