Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_ | 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_ |
| 6 #define VM_FLOW_GRAPH_COMPILER_H_ | 6 #define VM_FLOW_GRAPH_COMPILER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 630 void CompactBlocks(); | 630 void CompactBlocks(); |
| 631 | 631 |
| 632 bool IsListClass(const Class& cls) const { | 632 bool IsListClass(const Class& cls) const { |
| 633 return cls.raw() == list_class_.raw(); | 633 return cls.raw() == list_class_.raw(); |
| 634 } | 634 } |
| 635 | 635 |
| 636 void EmitSourceLine(Instruction* instr); | 636 void EmitSourceLine(Instruction* instr); |
| 637 | 637 |
| 638 intptr_t GetOptimizationThreshold() const; | 638 intptr_t GetOptimizationThreshold() const; |
| 639 | 639 |
| 640 StackmapTableBuilder* stackmap_table_builder() { | |
| 641 if (stackmap_table_builder_ == NULL) { | |
| 642 stackmap_table_builder_ = new StackmapTableBuilder(); | |
|
koda
2015/03/03 17:57:48
Memory leak?
We should also assert in the destruc
Vyacheslav Egorov (Google)
2015/03/03 18:01:07
it's a ZoneAllocated object as most of the things
| |
| 643 } | |
| 644 return stackmap_table_builder_; | |
| 645 } | |
| 646 | |
| 640 Isolate* isolate_; | 647 Isolate* isolate_; |
| 641 Assembler* assembler_; | 648 Assembler* assembler_; |
| 642 const ParsedFunction& parsed_function_; | 649 const ParsedFunction& parsed_function_; |
| 643 const FlowGraph& flow_graph_; | 650 const FlowGraph& flow_graph_; |
| 644 const GrowableArray<BlockEntryInstr*>& block_order_; | 651 const GrowableArray<BlockEntryInstr*>& block_order_; |
| 645 | 652 |
| 646 // Compiler specific per-block state. Indexed by postorder block number | 653 // Compiler specific per-block state. Indexed by postorder block number |
| 647 // for convenience. This is not the block's index in the block order, | 654 // for convenience. This is not the block's index in the block order, |
| 648 // which is reverse postorder. | 655 // which is reverse postorder. |
| 649 BlockEntryInstr* current_block_; | 656 BlockEntryInstr* current_block_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 689 const Array* inlined_code_intervals_; | 696 const Array* inlined_code_intervals_; |
| 690 const GrowableArray<const Function*>& inline_id_to_function_; | 697 const GrowableArray<const Function*>& inline_id_to_function_; |
| 691 const GrowableArray<intptr_t>& caller_inline_id_; | 698 const GrowableArray<intptr_t>& caller_inline_id_; |
| 692 | 699 |
| 693 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 700 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 694 }; | 701 }; |
| 695 | 702 |
| 696 } // namespace dart | 703 } // namespace dart |
| 697 | 704 |
| 698 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 705 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |