From 79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 25 Jun 2012 13:35:59 +0200 Subject: Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147) New snapshot that includes Win32 debug build fix (use SVGAllInOne) --- Source/JavaScriptCore/dfg/DFGOperations.cpp | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'Source/JavaScriptCore/dfg/DFGOperations.cpp') 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 #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 #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 -- cgit v1.2.1