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

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

Issue 262883005: Simplify flow graph building for instantiator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: more small simplfications Created 6 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
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PARSER_H_ 5 #ifndef VM_PARSER_H_
6 #define VM_PARSER_H_ 6 #define VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 num_stack_locals_(0) { 54 num_stack_locals_(0) {
55 ASSERT(function.IsZoneHandle()); 55 ASSERT(function.IsZoneHandle());
56 } 56 }
57 57
58 const Function& function() const { return function_; } 58 const Function& function() const { return function_; }
59 RawCode* code() const { return code_.raw(); } 59 RawCode* code() const { return code_.raw(); }
60 60
61 SequenceNode* node_sequence() const { return node_sequence_; } 61 SequenceNode* node_sequence() const { return node_sequence_; }
62 void SetNodeSequence(SequenceNode* node_sequence); 62 void SetNodeSequence(SequenceNode* node_sequence);
63 63
64 AstNode* instantiator() const { return instantiator_; } 64 LocalVariable* instantiator() const { return instantiator_; }
65 void set_instantiator(AstNode* instantiator) { 65 void set_instantiator(LocalVariable* instantiator) {
66 // May be NULL. 66 // May be NULL.
67 instantiator_ = instantiator; 67 instantiator_ = instantiator;
68 } 68 }
69 69
70 const Array& default_parameter_values() const { 70 const Array& default_parameter_values() const {
71 return default_parameter_values_; 71 return default_parameter_values_;
72 } 72 }
73 void set_default_parameter_values(const Array& default_parameter_values) { 73 void set_default_parameter_values(const Array& default_parameter_values) {
74 ASSERT(default_parameter_values.IsZoneHandle() || 74 ASSERT(default_parameter_values.IsZoneHandle() ||
75 default_parameter_values.InVMHeap()); 75 default_parameter_values.InVMHeap());
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 int first_stack_local_index() const { return first_stack_local_index_; } 117 int first_stack_local_index() const { return first_stack_local_index_; }
118 int num_copied_params() const { return num_copied_params_; } 118 int num_copied_params() const { return num_copied_params_; }
119 int num_stack_locals() const { return num_stack_locals_; } 119 int num_stack_locals() const { return num_stack_locals_; }
120 120
121 void AllocateVariables(); 121 void AllocateVariables();
122 122
123 private: 123 private:
124 const Function& function_; 124 const Function& function_;
125 Code& code_; 125 Code& code_;
126 SequenceNode* node_sequence_; 126 SequenceNode* node_sequence_;
127 AstNode* instantiator_; 127 LocalVariable* instantiator_;
128 Array& default_parameter_values_; 128 Array& default_parameter_values_;
129 LocalVariable* saved_current_context_var_; 129 LocalVariable* saved_current_context_var_;
130 LocalVariable* saved_entry_context_var_; 130 LocalVariable* saved_entry_context_var_;
131 LocalVariable* expression_temp_var_; 131 LocalVariable* expression_temp_var_;
132 GrowableObjectArray* deferred_prefixes_; 132 GrowableObjectArray* deferred_prefixes_;
133 133
134 int first_parameter_index_; 134 int first_parameter_index_;
135 int first_stack_local_index_; 135 int first_stack_local_index_;
136 int num_copied_params_; 136 int num_copied_params_;
137 int num_stack_locals_; 137 int num_stack_locals_;
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 intptr_t last_used_try_index_; 720 intptr_t last_used_try_index_;
721 721
722 bool unregister_pending_function_; 722 bool unregister_pending_function_;
723 723
724 DISALLOW_COPY_AND_ASSIGN(Parser); 724 DISALLOW_COPY_AND_ASSIGN(Parser);
725 }; 725 };
726 726
727 } // namespace dart 727 } // namespace dart
728 728
729 #endif // VM_PARSER_H_ 729 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698