656 {
657 ASSERT(!flow_graph.is_licm_allowed());
658
659 Write<intptr_t>(flow_graph.current_ssa_temp_index());
660 Write<intptr_t>(flow_graph.max_block_id());
661 Write<intptr_t>(flow_graph.inlining_id());
662 Write<const Array&>(flow_graph.coverage_array());
663
664 PrologueInfo prologue_info = flow_graph.prologue_info();
665 Write<intptr_t>(prologue_info.min_block_id);
666 Write<intptr_t>(prologue_info.max_block_id);
667
668
669 for (auto block : flow_graph.reverse_postorder()) {
670 Write<Instruction*>(block);
671 for (auto current : block->instructions()) {
672 Write<Instruction*>(current);
673 }
674 }
675 Write<Instruction*>(nullptr);
676 Write<const ZoneGrowableArray<Definition*>&>(detached_defs);
677 can_write_refs_ = true;
678
679
680
681 for (auto block : flow_graph.reverse_postorder()) {
682 block->WriteExtra(this);
683 for (auto current : block->instructions()) {
684 current->WriteExtra(this);
685 }
686 }
687 for (auto* instr : detached_defs) {
688 instr->WriteExtra(this);
689 }
690
691 const auto& optimized_block_order = flow_graph.optimized_block_order();
692 Write<intptr_t>(optimized_block_order.length());
693 for (intptr_t
i = 0, n = optimized_block_order.length();
i < n; ++
i) {
694 WriteRef<BlockEntryInstr*>(optimized_block_order[
i]);
695 }
696
697 const auto* captured_parameters = flow_graph.captured_parameters();
698 if (captured_parameters->IsEmpty()) {
699 Write<bool>(false);
700 } else {
701 Write<bool>(true);
702
703
704 GrowableArray<intptr_t> indices(
Z, 0);
705 for (intptr_t
i = 0, n = captured_parameters->length();
i < n; ++
i) {
706 if (captured_parameters->Contains(
i)) {
708 }
709 }
710 Write<GrowableArray<intptr_t>>(indices);
711 }
712}