diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
commit | 79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 (patch) | |
tree | 0287b1a69d84492c901e8bc820e635e7133809a0 /Source/JavaScriptCore/dfg/DFGOperations.cpp | |
parent | 682ab87480e7757346802ce7f54cfdbdfeb2339e (diff) | |
download | qtwebkit-79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4.tar.gz |
Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147)
New snapshot that includes Win32 debug build fix (use SVGAllInOne)
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGOperations.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGOperations.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp index 06a1cf883..b056a3c6d 100644 --- a/Source/JavaScriptCore/dfg/DFGOperations.cpp +++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp @@ -32,14 +32,15 @@ #include "DFGRepatch.h" #include "HostCallReturnValue.h" #include "GetterSetter.h" -#include <wtf/InlineASM.h> #include "Interpreter.h" +#include "JIT.h" #include "JITExceptions.h" #include "JSActivation.h" #include "JSGlobalData.h" #include "JSStaticScopeObject.h" #include "NameInstance.h" #include "Operations.h" +#include <wtf/InlineASM.h> #if ENABLE(DFG_JIT) @@ -968,13 +969,11 @@ EncodedJSValue DFG_OPERATION operationResolveBaseStrictPut(ExecState* exec, Iden return JSValue::encode(base); } -EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState* exec, GlobalResolveInfo* resolveInfo, Identifier* propertyName) +EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState* exec, GlobalResolveInfo* resolveInfo, JSGlobalObject* globalObject, Identifier* propertyName) { JSGlobalData* globalData = &exec->globalData(); NativeCallFrameTracer tracer(globalData, exec); - JSGlobalObject* globalObject = exec->lexicalGlobalObject(); - PropertySlot slot(globalObject); if (globalObject->getPropertySlot(exec, *propertyName, slot)) { JSValue result = slot.getValue(exec, *propertyName); @@ -1253,6 +1252,27 @@ void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* } #endif +extern "C" void DFG_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock) +{ +#if ENABLE(JIT_VERBOSE_OSR) + dataLog("%p: Entered reoptimize\n", codeBlock); +#endif + // We must be called with the baseline code block. + ASSERT(JITCode::isBaselineCode(codeBlock->getJITType())); + + // If I am my own replacement, then reoptimization has already been triggered. + // This can happen in recursive functions. + if (codeBlock->replacement() == codeBlock) + return; + + // Otherwise, the replacement must be optimized code. Use this as an opportunity + // to check our logic. + ASSERT(codeBlock->hasOptimizedReplacement()); + ASSERT(codeBlock->replacement()->getJITType() == JITCode::DFGJIT); + + codeBlock->reoptimize(); +} + } // extern "C" } } // namespace JSC::DFG |