Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler_x64.h |
| diff --git a/runtime/vm/flow_graph_compiler_x64.h b/runtime/vm/flow_graph_compiler_x64.h |
| index 95127c63112272260bf5cf0692c376e55f8b37cc..6e090fff53300da1ecb09600e9268a5effc0de9b 100644 |
| --- a/runtime/vm/flow_graph_compiler_x64.h |
| +++ b/runtime/vm/flow_graph_compiler_x64.h |
| @@ -23,12 +23,7 @@ class FlowGraphCompiler : public FlowGraphVisitor { |
| public: |
|
srdjan
2012/03/07 22:23:06
Maybe write (again) that blocks are in reversed or
|
| FlowGraphCompiler(Assembler* assembler, |
| const ParsedFunction& parsed_function, |
| - const GrowableArray<BlockEntryInstr*>* blocks) |
| - : assembler_(assembler), |
| - parsed_function_(parsed_function), |
| - blocks_(blocks), |
| - pc_descriptors_list_(new CodeGenerator::DescriptorList()), |
| - stack_local_count_(0) { } |
| + const GrowableArray<BlockEntryInstr*>* blocks); |
| virtual ~FlowGraphCompiler() { } |
| @@ -40,12 +35,22 @@ class FlowGraphCompiler : public FlowGraphVisitor { |
| void FinalizeExceptionHandlers(const Code& code); |
| private: |
| + struct BlockInfo : public ZoneAllocated { |
| + public: |
| + BlockInfo() : label() { } |
| + |
| + Label label; |
| + }; |
|
srdjan
2012/03/07 22:23:06
ZoneAllocated objects have their destructor never
Kevin Millikin (Google)
2012/03/08 09:59:53
I know, and I'm not certain this is best. Label h
|
| + |
| int stack_local_count() const { return stack_local_count_; } |
| void set_stack_local_count(int count) { stack_local_count_ = count; } |
| + BlockEntryInstr* current_block() const { return current_block_; } |
| // Bail out of the flow graph compiler. Does not return to the caller. |
| void Bailout(const char* reason); |
| + virtual void VisitBlocks(const GrowableArray<BlockEntryInstr*>& blocks); |
| + |
| // Emit code to perform a computation, leaving its value in RAX. |
| #define DECLARE_VISIT_COMPUTATION(ShortName, ClassName) \ |
| virtual void Visit##ShortName(ClassName* comp); |
| @@ -91,6 +96,12 @@ class FlowGraphCompiler : public FlowGraphVisitor { |
| const ParsedFunction& parsed_function_; |
| const GrowableArray<BlockEntryInstr*>* blocks_; |
| + // Compiler specific per-block state. Indexed by block number, so not |
| + // necessarily the same order as the array of blocks. |
| + GrowableArray<BlockInfo*> block_info_; |
| + |
| + BlockEntryInstr* current_block_; |
| + |
| CodeGenerator::DescriptorList* pc_descriptors_list_; |
| int stack_local_count_; |