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

Side by Side Diff: vm/flow_graph_builder.h

Issue 10407031: Add IR printing into a supplied buffer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
11 #include "vm/intermediate_language.h" 11 #include "vm/intermediate_language.h"
12 12
13 namespace dart { 13 namespace dart {
14 14
15 class Instruction; 15 class Instruction;
16 class ParsedFunction; 16 class ParsedFunction;
17 17
18 // Build a flow graph from a parsed function's AST. 18 // Build a flow graph from a parsed function's AST.
19 class FlowGraphBuilder: public ValueObject { 19 class FlowGraphBuilder: public ValueObject {
20 public: 20 public:
21 explicit FlowGraphBuilder(const ParsedFunction& parsed_function); 21 explicit FlowGraphBuilder(const ParsedFunction& parsed_function);
22 22
23 void BuildGraph(bool for_optimized); 23 void BuildGraph(bool for_optimized);
24 24
25 const ParsedFunction& parsed_function() const { return parsed_function_; } 25 const ParsedFunction& parsed_function() const { return parsed_function_; }
26 26
27 const GrowableArray<BlockEntryInstr*>& postorder_block_entries() const { 27 GrowableArray<BlockEntryInstr*>* postorder_block_entries() {
28 return postorder_block_entries_; 28 return &postorder_block_entries_;
srdjan 2012/05/17 22:59:22 Why not const reference result (and make the gette
Florian Schneider 2012/05/18 00:28:38 Done.
29 }
30
31 GrowableArray<BlockEntryInstr*>* preorder_block_entries() {
32 return &preorder_block_entries_;
29 } 33 }
30 34
31 void Bailout(const char* reason); 35 void Bailout(const char* reason);
32 36
33 void set_context_level(intptr_t value) { context_level_ = value; } 37 void set_context_level(intptr_t value) { context_level_ = value; }
34 intptr_t context_level() const { return context_level_; } 38 intptr_t context_level() const { return context_level_; }
35 39
36 // Each try in this function gets its own try index. 40 // Each try in this function gets its own try index.
37 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } 41 intptr_t AllocateTryIndex() { return ++last_used_try_index_; }
38 42
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // Output parameters. 294 // Output parameters.
291 TargetEntryInstr** true_successor_address_; 295 TargetEntryInstr** true_successor_address_;
292 TargetEntryInstr** false_successor_address_; 296 TargetEntryInstr** false_successor_address_;
293 297
294 intptr_t condition_token_index_; 298 intptr_t condition_token_index_;
295 }; 299 };
296 300
297 } // namespace dart 301 } // namespace dart
298 302
299 #endif // VM_FLOW_GRAPH_BUILDER_H_ 303 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « vm/compiler.cc ('k') | vm/flow_graph_builder.cc » ('j') | vm/il_printer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698