Changeset 172665 in webkit for trunk/Source/JavaScriptCore/bytecode
- Timestamp:
- Aug 15, 2014, 6:45:40 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore/bytecode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/BytecodeList.json
r172614 r172665 140 140 { "name" : "getHostCallReturnValue" }, 141 141 { "name" : "llint_return_to_host" }, 142 { "name" : "llint_ call_to_javascript" },143 { "name" : "llint_ call_to_native_function" },142 { "name" : "llint_vm_entry_to_javascript" }, 143 { "name" : "llint_vm_entry_to_native" }, 144 144 { "name" : "llint_cloop_did_return_from_js_1" }, 145 145 { "name" : "llint_cloop_did_return_from_js_2" }, -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r172614 r172665 60 60 #include "RepatchBuffer.h" 61 61 #include "SlotVisitorInlines.h" 62 #include "StackVisitor.h" 62 63 #include "UnlinkedInstructionStream.h" 63 64 #include <wtf/BagToHashMap.h> … … 3160 3161 } 3161 3162 3163 class RecursionCheckFunctor { 3164 public: 3165 RecursionCheckFunctor(CallFrame* startCallFrame, CodeBlock* codeBlock, unsigned depthToCheck) 3166 : m_startCallFrame(startCallFrame) 3167 , m_codeBlock(codeBlock) 3168 , m_depthToCheck(depthToCheck) 3169 , m_foundStartCallFrame(false) 3170 , m_didRecurse(false) 3171 { } 3172 3173 StackVisitor::Status operator()(StackVisitor& visitor) 3174 { 3175 CallFrame* currentCallFrame = visitor->callFrame(); 3176 3177 if (currentCallFrame == m_startCallFrame) 3178 m_foundStartCallFrame = true; 3179 3180 if (m_foundStartCallFrame) { 3181 if (visitor->callFrame()->codeBlock() == m_codeBlock) { 3182 m_didRecurse = true; 3183 return StackVisitor::Done; 3184 } 3185 3186 if (!m_depthToCheck--) 3187 return StackVisitor::Done; 3188 } 3189 3190 return StackVisitor::Continue; 3191 } 3192 3193 bool didRecurse() const { return m_didRecurse; } 3194 3195 private: 3196 CallFrame* m_startCallFrame; 3197 CodeBlock* m_codeBlock; 3198 unsigned m_depthToCheck; 3199 bool m_foundStartCallFrame; 3200 bool m_didRecurse; 3201 }; 3202 3162 3203 void CodeBlock::noticeIncomingCall(ExecState* callerFrame) 3163 3204 { … … 3207 3248 return; 3208 3249 } 3209 3210 ExecState* frame = callerFrame; 3211 for (unsigned i = Options::maximumInliningDepth(); i--; frame = frame->callerFrame()) { 3212 if (frame->isVMEntrySentinel()) 3213 break; 3214 if (frame->codeBlock() == this) { 3215 // Recursive calls won't be inlined. 3216 if (Options::verboseCallLink()) 3217 dataLog(" Clearing SABI because recursion was detected.\n"); 3218 m_shouldAlwaysBeInlined = false; 3219 return; 3220 } 3221 } 3222 3250 3251 // Recursive calls won't be inlined. 3252 RecursionCheckFunctor functor(callerFrame, this, Options::maximumInliningDepth()); 3253 vm()->topCallFrame->iterate(functor); 3254 3255 if (functor.didRecurse()) { 3256 if (Options::verboseCallLink()) 3257 dataLog(" Clearing SABI because recursion was detected.\n"); 3258 m_shouldAlwaysBeInlined = false; 3259 return; 3260 } 3261 3223 3262 RELEASE_ASSERT(callerCodeBlock->m_capabilityLevelState != DFG::CapabilityLevelNotSet); 3224 3263
Note:
See TracChangeset
for help on using the changeset viewer.