Ignore:
Timestamp:
Aug 27, 2015, 10:59:44 PM (10 years ago)
Author:
[email protected]
Message:

Add noDFG() to jsc to prevent DFG compilation of a specified function.
https://bugs.webkit.org/show_bug.cgi?id=148559

Reviewed by Geoffrey Garen and Saam Barati.

  • API/JSCTestRunnerUtils.cpp:

(JSC::setNeverInline):
(JSC::setNeverOptimize):

  • API/JSCTestRunnerUtils.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpAssumingJITType):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
(JSC::DFG::mightInlineFunctionForCall):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionNoDFG):

  • runtime/Executable.h:

(JSC::ScriptExecutable::ecmaMode):
(JSC::ScriptExecutable::setNeverInline):
(JSC::ScriptExecutable::setNeverOptimize):
(JSC::ScriptExecutable::setDidTryToEnterInLoop):
(JSC::ScriptExecutable::neverInline):
(JSC::ScriptExecutable::neverOptimize):
(JSC::ScriptExecutable::didTryToEnterInLoop):
(JSC::ScriptExecutable::isInliningCandidate):
(JSC::ScriptExecutable::isOkToOptimize):
(JSC::ScriptExecutable::addressOfDidTryToEnterInLoop):

  • runtime/TestRunnerUtils.cpp:

(JSC::setNeverInline):
(JSC::setNeverOptimize):
(JSC::optimizeNextInvocation):

  • runtime/TestRunnerUtils.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r189071 r189086  
    474474static EncodedJSValue JSC_HOST_CALL functionPreciseTime(ExecState*);
    475475static EncodedJSValue JSC_HOST_CALL functionNeverInlineFunction(ExecState*);
     476static EncodedJSValue JSC_HOST_CALL functionNoDFG(ExecState*);
    476477static EncodedJSValue JSC_HOST_CALL functionOptimizeNextInvocation(ExecState*);
    477478static EncodedJSValue JSC_HOST_CALL functionNumberOfDFGCompiles(ExecState*);
     
    632633        addFunction(vm, "neverInlineFunction", functionNeverInlineFunction, 1);
    633634        addFunction(vm, "noInline", functionNeverInlineFunction, 1);
     635        addFunction(vm, "noDFG", functionNoDFG, 1);
    634636        addFunction(vm, "numberOfDFGCompiles", functionNumberOfDFGCompiles, 1);
    635637        addFunction(vm, "optimizeNextInvocation", functionOptimizeNextInvocation, 1);
     
    11781180{
    11791181    return JSValue::encode(setNeverInline(exec));
     1182}
     1183
     1184EncodedJSValue JSC_HOST_CALL functionNoDFG(ExecState* exec)
     1185{
     1186    return JSValue::encode(setNeverOptimize(exec));
    11801187}
    11811188
Note: See TracChangeset for help on using the changeset viewer.