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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.h

Issue 10356051: First steps toward a two stages new compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_IA32_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_IA32_H_
6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_ 6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_
7 7
8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_
9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h. 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h.
10 #endif 10 #endif
11 11
12 #include "vm/intermediate_language.h" 12 #include "vm/intermediate_language.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 class Assembler; 16 class Assembler;
17 class Code; 17 class Code;
18 template <typename T> class GrowableArray; 18 template <typename T> class GrowableArray;
19 class ParsedFunction; 19 class ParsedFunction;
20 20
21 // Stubbed out implementation of graph compiler, bails out immediately if 21 // Stubbed out implementation of graph compiler, bails out immediately if
22 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED. 22 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED.
23 class FlowGraphCompiler : public FlowGraphVisitor { 23 class FlowGraphCompiler : public FlowGraphVisitor {
24 public: 24 public:
25 FlowGraphCompiler(Assembler* assembler, 25 FlowGraphCompiler(Assembler* assembler,
26 const ParsedFunction& parsed_function, 26 const ParsedFunction& parsed_function,
27 const GrowableArray<BlockEntryInstr*>& blocks) 27 const GrowableArray<BlockEntryInstr*>& blocks,
28 : FlowGraphVisitor(blocks), parsed_function_(parsed_function) { 28 bool is_optimizing)
29 : FlowGraphVisitor(blocks),
30 parsed_function_(parsed_function),
31 is_optimizing_(is_optimizing) {
29 } 32 }
30 33
31 virtual ~FlowGraphCompiler() { } 34 virtual ~FlowGraphCompiler() { }
32 35
33 void CompileGraph(); 36 void CompileGraph();
34 37
35 // Infrastructure copied from class CodeGenerator or stubbed out. 38 // Infrastructure copied from class CodeGenerator or stubbed out.
36 void FinalizePcDescriptors(const Code& code); 39 void FinalizePcDescriptors(const Code& code);
37 void FinalizeStackmaps(const Code& code); 40 void FinalizeStackmaps(const Code& code);
38 void FinalizeVarDescriptors(const Code& code); 41 void FinalizeVarDescriptors(const Code& code);
39 void FinalizeExceptionHandlers(const Code& code); 42 void FinalizeExceptionHandlers(const Code& code);
40 43
41 private: 44 private:
42 // Bail out of the flow graph compiler. Does not return to the caller. 45 // Bail out of the flow graph compiler. Does not return to the caller.
43 void Bailout(const char* reason); 46 void Bailout(const char* reason);
44 47
45 const ParsedFunction& parsed_function_; 48 const ParsedFunction& parsed_function_;
49 const bool is_optimizing_;
46 50
47 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 51 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
48 }; 52 };
49 53
50 } // namespace dart 54 } // namespace dart
51 55
52 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_ 56 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698