| 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 db83d44811953d6f48216bb67acd8227bfb2c9d5..2c080bff462ed295c2b154dfe11f64e6b23a7b43 100644
|
| --- a/runtime/vm/flow_graph_compiler_x64.h
|
| +++ b/runtime/vm/flow_graph_compiler_x64.h
|
| @@ -17,7 +17,7 @@ namespace dart {
|
|
|
| class ParsedFunction;
|
|
|
| -class FlowGraphCompiler : public InstructionVisitor {
|
| +class FlowGraphCompiler : public FlowGraphVisitor {
|
| public:
|
| FlowGraphCompiler(Assembler* assembler,
|
| const ParsedFunction& parsed_function,
|
| @@ -25,21 +25,33 @@ class FlowGraphCompiler : public InstructionVisitor {
|
| : assembler_(assembler),
|
| parsed_function_(parsed_function),
|
| blocks_(blocks),
|
| - pc_descriptors_list_(new CodeGenerator::DescriptorList()) { }
|
| + pc_descriptors_list_(new CodeGenerator::DescriptorList()),
|
| + stack_local_count_(0) { }
|
|
|
| virtual ~FlowGraphCompiler() { }
|
|
|
| void CompileGraph();
|
|
|
| private:
|
| + int stack_local_count() const { return stack_local_count_; }
|
| + void set_stack_local_count(int count) { stack_local_count_ = count; }
|
| +
|
| // Bail out of the flow graph compiler. Does not return to the caller.
|
| void Bailout(const char* reason);
|
|
|
| + // Emit code to perform a computation, leaving its value in RAX.
|
| +#define DECLARE_VISIT_COMPUTATION(ShortName, ClassName) \
|
| + virtual void Visit##ShortName(ClassName* comp);
|
| +
|
| // Each visit function compiles a type of instruction.
|
| -#define DECLARE_VISIT(type) \
|
| - virtual void Visit##type(type##Instr* instr);
|
| - FOR_EACH_INSTRUCTION(DECLARE_VISIT)
|
| -#undef DECLARE_VISIT
|
| +#define DECLARE_VISIT_INSTRUCTION(ShortName) \
|
| + virtual void Visit##ShortName(ShortName##Instr* instr);
|
| +
|
| + FOR_EACH_COMPUTATION(DECLARE_VISIT_COMPUTATION)
|
| + FOR_EACH_INSTRUCTION(DECLARE_VISIT_INSTRUCTION)
|
| +
|
| +#undef DECLARE_VISIT_COMPUTATION
|
| +#undef DECLARE_VISIT_INSTRUCTION
|
|
|
| // Emit code to load a Value into register RAX.
|
| void LoadValue(Value* value);
|
| @@ -57,6 +69,7 @@ class FlowGraphCompiler : public InstructionVisitor {
|
| const GrowableArray<BlockEntryInstr*>* blocks_;
|
|
|
| CodeGenerator::DescriptorList* pc_descriptors_list_;
|
| + int stack_local_count_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
|
| };
|
|
|