| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 #ifndef VM_FLOW_GRAPH_COMPILER_ARM_H_ | |
| 6 #define VM_FLOW_GRAPH_COMPILER_ARM_H_ | |
| 7 | |
| 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ | |
| 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_arm.h. | |
| 10 #endif | |
| 11 | |
| 12 #include "vm/flow_graph.h" | |
| 13 #include "vm/intermediate_language.h" | |
| 14 | |
| 15 namespace dart { | |
| 16 | |
| 17 class Assembler; | |
| 18 class Code; | |
| 19 template <typename T> class GrowableArray; | |
| 20 class ParsedFunction; | |
| 21 | |
| 22 // Stubbed out implementation of graph compiler, bails out immediately if | |
| 23 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED. | |
| 24 class FlowGraphCompiler : public FlowGraphVisitor { | |
| 25 public: | |
| 26 FlowGraphCompiler(Assembler* assembler, | |
| 27 const FlowGraph& flow_graph, | |
| 28 bool is_optimizing) | |
| 29 : FlowGraphVisitor(flow_graph.reverse_postorder()), | |
| 30 parsed_function_(flow_graph.parsed_function()), | |
| 31 is_optimizing_(is_optimizing) { | |
| 32 } | |
| 33 | |
| 34 virtual ~FlowGraphCompiler() { } | |
| 35 | |
| 36 static bool CanOptimize(); | |
| 37 bool CanOptimizeFunction() const; | |
| 38 | |
| 39 void CompileGraph(); | |
| 40 | |
| 41 void FinalizePcDescriptors(const Code& code); | |
| 42 void FinalizeStackmaps(const Code& code); | |
| 43 void FinalizeVarDescriptors(const Code& code); | |
| 44 void FinalizeExceptionHandlers(const Code& code); | |
| 45 void FinalizeComments(const Code& code); | |
| 46 | |
| 47 private: | |
| 48 // Bail out of the flow graph compiler. Does not return to the caller. | |
| 49 void Bailout(const char* reason); | |
| 50 | |
| 51 const ParsedFunction& parsed_function_; | |
| 52 const bool is_optimizing_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | |
| 55 }; | |
| 56 | |
| 57 } // namespace dart | |
| 58 | |
| 59 #endif // VM_FLOW_GRAPH_COMPILER_ARM_H_ | |
| OLD | NEW |