Changeset 154814 in webkit for trunk/Source/JavaScriptCore/jit/JITStubs.cpp
- Timestamp:
- Aug 29, 2013, 9:41:07 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r154804 r154814 52 52 #include "JIT.h" 53 53 #include "JITExceptions.h" 54 #include "JITToDFGDeferredCompilationCallback.h"55 54 #include "JSActivation.h" 56 55 #include "JSArray.h" … … 1000 999 dataLog("Considering OSR ", *codeBlock, " -> ", *codeBlock->replacement(), ".\n"); 1001 1000 // If we have an optimized replacement, then it must be the case that we entered 1002 // cti_optimize from a loop. That's because i fthere's an optimized replacement,1001 // cti_optimize from a loop. That's because is there's an optimized replacement, 1003 1002 // then all calls to this function will be relinked to the replacement and so 1004 1003 // the prologue OSR will never fire. … … 1034 1033 dataLog("Triggering optimized compilation of ", *codeBlock, "\n"); 1035 1034 1036 RefPtr<DeferredCompilationCallback> callback = 1037 JITToDFGDeferredCompilationCallback::create(); 1038 RefPtr<CodeBlock> newCodeBlock = codeBlock->newReplacement(); 1039 CompilationResult result = newCodeBlock->prepareForExecutionAsynchronously( 1040 callFrame, JITCode::DFGJIT, callback, JITCompilationCanFail, bytecodeIndex); 1035 JSScope* scope = callFrame->scope(); 1036 CompilationResult result; 1037 JSObject* error = codeBlock->compileOptimized(callFrame, scope, result, bytecodeIndex); 1038 if (Options::verboseOSR()) { 1039 dataLog("Optimizing compilation of ", *codeBlock, " result: ", result, "\n"); 1040 if (error) 1041 dataLog("WARNING: optimized compilation failed with a JS error.\n"); 1042 } 1041 1043 1044 codeBlock->setOptimizationThresholdBasedOnCompilationResult(result); 1042 1045 if (result != CompilationSuccessful) 1043 1046 return; … … 1166 1169 FunctionExecutable* executable = function->jsExecutable(); 1167 1170 JSScope* callDataScopeChain = function->scope(); 1168 JSObject* error = executable-> prepareForExecution(callFrame, callDataScopeChain, kind);1171 JSObject* error = executable->compileFor(callFrame, callDataScopeChain, kind); 1169 1172 if (!error) 1170 1173 return function; … … 1265 1268 else { 1266 1269 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 1267 if (JSObject* error = functionExecutable-> prepareForExecution(callFrame, callee->scope(), kind)) {1270 if (JSObject* error = functionExecutable->compileFor(callFrame, callee->scope(), kind)) { 1268 1271 callFrame->vm().throwException(callFrame, error); 1269 1272 return 0; … … 1342 1345 FunctionExecutable* functionExecutable = jsCast<FunctionExecutable*>(executable); 1343 1346 JSScope* scopeChain = callee->scope(); 1344 JSObject* error = functionExecutable-> prepareForExecution(callFrame, scopeChain, CodeForCall);1347 JSObject* error = functionExecutable->compileFor(callFrame, scopeChain, CodeForCall); 1345 1348 if (error) { 1346 1349 callFrame->vm().throwException(callFrame, error);
Note:
See TracChangeset
for help on using the changeset viewer.