- dfg.m_fixpointState = FixpointNotConverged;
-
- performCSE(dfg);
- performArgumentsSimplification(dfg);
- performCPSRethreading(dfg); // This should usually be a no-op since CSE rarely dethreads, and arguments simplification rarely does anything.
- performCFA(dfg);
- performConstantFolding(dfg);
- performCFGSimplification(dfg);
-
- dfg.m_fixpointState = FixpointConverged;
-
- performStoreElimination(dfg);
- performCPSRethreading(dfg);
- performDCE(dfg);
- performVirtualRegisterAllocation(dfg);
-
- GraphDumpMode modeForFinalValidate = DumpGraph;
- if (verboseCompilationEnabled()) {
- dataLogF("Graph after optimization:\n");
- dfg.dump();
- modeForFinalValidate = DontDumpGraph;
- }
- if (validationEnabled())
- validate(dfg, modeForFinalValidate);
-
- JITCompiler dataFlowJIT(dfg);
- bool result;
- if (compileMode == CompileFunction) {
- ASSERT(jitCodeWithArityCheck);
-
- result = dataFlowJIT.compileFunction(jitCode, *jitCodeWithArityCheck);
- } else {
- ASSERT(compileMode == CompileOther);
- ASSERT(!jitCodeWithArityCheck);
-
- result = dataFlowJIT.compile(jitCode);
+ if (Options::enableConcurrentJIT()) {
+ Worklist* worklist = ensureGlobalWorklistFor(mode);
+ plan->callback = callback;
+ if (logCompilationChanges(mode))
+ dataLog("Deferring DFG compilation of ", *codeBlock, " with queue length ", worklist->queueLength(), ".\n");
+ worklist->enqueue(plan);
+ return CompilationDeferred;