@@ -344,9 +344,7 @@ class PrecompileParsedFunctionHelper : public ValueObject {
344344 ParsedFunction* parsed_function () const { return parsed_function_; }
345345 Thread* thread () const { return thread_; }
346346
347- bool GenerateCode (FlowGraph* flow_graph,
348- CompilerPassState* pass_state,
349- ZoneGrowableArray<const ICData*>* ic_data_array);
347+ bool GenerateCode (FlowGraph* flow_graph);
350348
351349 void FinalizeCompilation (compiler::Assembler* assembler,
352350 FlowGraphCompiler* graph_compiler,
@@ -3465,10 +3463,7 @@ static void GenerateNecessaryAllocationStubs(FlowGraph* flow_graph) {
34653463 }
34663464}
34673465
3468- bool PrecompileParsedFunctionHelper::GenerateCode (
3469- FlowGraph* flow_graph,
3470- CompilerPassState* pass_state,
3471- ZoneGrowableArray<const ICData*>* ic_data_array) {
3466+ bool PrecompileParsedFunctionHelper::GenerateCode (FlowGraph* flow_graph) {
34723467 // We may reattempt compilation if the function needs to be assembled using
34733468 // far branches on ARM. In the else branch of the setjmp call, done is set to
34743469 // false, and use_far_branches is set to true if there is a longjmp from the
@@ -3508,10 +3503,11 @@ bool PrecompileParsedFunctionHelper::GenerateCode(
35083503
35093504 FlowGraphCompiler graph_compiler (
35103505 &assembler, flow_graph, *parsed_function (), /* is_optimizing=*/ true ,
3511- pass_state->inline_id_to_function , pass_state->inline_id_to_token_pos ,
3512- pass_state->caller_inline_id , ic_data_array, function_stats);
3513- pass_state->graph_compiler = &graph_compiler;
3514- CompilerPass::GenerateCode (pass_state);
3506+ /* deopt_id_to_ic_data=*/ nullptr , function_stats);
3507+
3508+ CompilerPassState pass_state (thread (), flow_graph, precompiler_);
3509+ pass_state.graph_compiler = &graph_compiler;
3510+ CompilerPass::GenerateCode (&pass_state);
35153511 {
35163512 COMPILER_TIMINGS_TIMER_SCOPE (thread (), FinalizeCode);
35173513 TIMELINE_DURATION (thread (), CompilerVerbose, " FinalizeCompilation" );
@@ -3595,7 +3591,6 @@ bool PrecompileParsedFunctionHelper::Compile() {
35953591 HANDLESCOPE (thread ());
35963592
35973593 FlowGraph* flow_graph = nullptr ;
3598- ZoneGrowableArray<const ICData*>* ic_data_array = nullptr ;
35993594 const Function& function = parsed_function ()->function ();
36003595 ASSERT (!function.IsIrregexpFunction ());
36013596 ASSERT (function.IsOptimizable ());
@@ -3606,7 +3601,8 @@ bool PrecompileParsedFunctionHelper::Compile() {
36063601 compiler_state.set_function (function);
36073602
36083603 {
3609- ic_data_array = new (zone) ZoneGrowableArray<const ICData*>();
3604+ ZoneGrowableArray<const ICData*>* ic_data_array =
3605+ new (zone) ZoneGrowableArray<const ICData*>();
36103606
36113607 TIMELINE_DURATION (thread (), CompilerVerbose, " BuildFlowGraph" );
36123608 COMPILER_TIMINGS_TIMER_SCOPE (thread (), BuildGraph);
@@ -3621,20 +3617,16 @@ bool PrecompileParsedFunctionHelper::Compile() {
36213617
36223618 flow_graph->PopulateWithICData (function);
36233619
3624- CompilerPassState pass_state (thread (), flow_graph, precompiler_);
3625-
36263620 {
36273621 TIMELINE_DURATION (thread (), CompilerVerbose, " OptimizationPasses" );
36283622
36293623 AotCallSpecializer call_specializer (precompiler_, flow_graph);
3624+ CompilerPassState pass_state (thread (), flow_graph, precompiler_);
36303625 pass_state.call_specializer = &call_specializer;
36313626
36323627 flow_graph = CompilerPass::RunPipeline (CompilerPass::kAOT , &pass_state);
36333628 }
36343629
3635- ASSERT (pass_state.inline_id_to_function .length () ==
3636- pass_state.caller_inline_id .length ());
3637-
36383630 ASSERT (precompiler_ != nullptr );
36393631
36403632 // When generating code in bare instruction mode all code objects
@@ -3647,7 +3639,7 @@ bool PrecompileParsedFunctionHelper::Compile() {
36473639 // failure to commit object pool into the global object pool.
36483640 GenerateNecessaryAllocationStubs (flow_graph);
36493641
3650- return GenerateCode (flow_graph, &pass_state, ic_data_array );
3642+ return GenerateCode (flow_graph);
36513643}
36523644
36533645void Precompiler::CompileFunction (Precompiler* precompiler,
0 commit comments