Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: runtime/vm/flow_graph_compiler_x64.h

Issue 9471010: Expand the instruction visitor to visit computations and values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small cleanup of comments and identifier naming. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..e41769c908c0e551c91696cd604b3029714eca4c 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,
@@ -35,11 +35,19 @@ class FlowGraphCompiler : public InstructionVisitor {
// Bail out of the flow graph compiler. Does not return to the caller.
void Bailout(const char* reason);
+ // Emit code to perform a computation.
+#define DECLARE_VISIT_COMPUTATION(ShortName, ClassName) \
+ virtual void Visit##ShortName(ClassName* comp) { UNREACHABLE(); }
+
// 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);

Powered by Google App Engine
This is Rietveld 408576698