(self)
| 614 | self.later_mem_blocks.clear() |
| 615 | |
| 616 | def finalize(self): |
| 617 | # optimize the tapes |
| 618 | for tape in self.tapes: |
| 619 | tape.optimize(self.options) |
| 620 | |
| 621 | if self.tapes: |
| 622 | self.update_req(self.curr_tape) |
| 623 | |
| 624 | # finalize the memory |
| 625 | self.finalize_memory() |
| 626 | |
| 627 | # communicate protocol compability |
| 628 | Compiler.instructions.active(self._always_active) |
| 629 | |
| 630 | # communicate mulm usage to VM |
| 631 | if self.use_mulm != 1: |
| 632 | self.relevant_opts.add("no_mulm") |
| 633 | |
| 634 | self.write_bytes() |
| 635 | |
| 636 | if self.options.asmoutfile: |
| 637 | for tape in self.tapes: |
| 638 | tape.write_str(self.options.asmoutfile + "-" + tape.name) |
| 639 | |
| 640 | # Making sure that the public_input_file has been properly closed |
| 641 | if self.public_input_file is not None: |
| 642 | self.public_input_file.close() |
| 643 | |
| 644 | def finalize_memory(self): |
| 645 | self.curr_tape.start_new_basicblock(None, "memory-usage", |
no test coverage detected