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

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

Issue 1149713002: With --noopt run unoptimized code through optimizer, more optimizations can be done later. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: m Created 5 years, 6 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
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_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"
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 // Accessors forwarded to the AST node. 3184 // Accessors forwarded to the AST node.
3185 const Function& function() const { return function_; } 3185 const Function& function() const { return function_; }
3186 const Array& argument_names() const { return argument_names_; } 3186 const Array& argument_names() const { return argument_names_; }
3187 virtual intptr_t token_pos() const { return token_pos_; } 3187 virtual intptr_t token_pos() const { return token_pos_; }
3188 3188
3189 virtual intptr_t ArgumentCount() const { return arguments_->length(); } 3189 virtual intptr_t ArgumentCount() const { return arguments_->length(); }
3190 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { 3190 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const {
3191 return (*arguments_)[index]; 3191 return (*arguments_)[index];
3192 } 3192 }
3193 3193
3194 virtual intptr_t CallCount() const { return ic_data()->AggregateCount(); } 3194 virtual intptr_t CallCount() const {
3195 return ic_data() == NULL ? 0 : ic_data()->AggregateCount();
3196 }
3195 3197
3196 virtual void PrintOperandsTo(BufferFormatter* f) const; 3198 virtual void PrintOperandsTo(BufferFormatter* f) const;
3197 3199
3198 virtual bool CanDeoptimize() const { return true; } 3200 virtual bool CanDeoptimize() const { return true; }
3199 3201
3200 virtual bool CanBecomeDeoptimizationTarget() const { 3202 virtual bool CanBecomeDeoptimizationTarget() const {
3201 // Static calls that are specialized by the optimizer (e.g. sqrt) need a 3203 // Static calls that are specialized by the optimizer (e.g. sqrt) need a
3202 // deoptimization descriptor before the call. 3204 // deoptimization descriptor before the call.
3203 return true; 3205 return true;
3204 } 3206 }
(...skipping 4832 matching lines...) Expand 10 before | Expand all | Expand 10 after
8037 intptr_t fixed_parameter_count, 8039 intptr_t fixed_parameter_count,
8038 intptr_t deopt_id, 8040 intptr_t deopt_id,
8039 const ParsedFunction& parsed_function, 8041 const ParsedFunction& parsed_function,
8040 Environment* outer) 8042 Environment* outer)
8041 : values_(length), 8043 : values_(length),
8042 locations_(NULL), 8044 locations_(NULL),
8043 fixed_parameter_count_(fixed_parameter_count), 8045 fixed_parameter_count_(fixed_parameter_count),
8044 deopt_id_(deopt_id), 8046 deopt_id_(deopt_id),
8045 parsed_function_(parsed_function), 8047 parsed_function_(parsed_function),
8046 outer_(outer) { 8048 outer_(outer) {
8047 ASSERT(!parsed_function_.code().IsNull());
8048 } 8049 }
8049 8050
8050 8051
8051 GrowableArray<Value*> values_; 8052 GrowableArray<Value*> values_;
8052 Location* locations_; 8053 Location* locations_;
8053 const intptr_t fixed_parameter_count_; 8054 const intptr_t fixed_parameter_count_;
8054 intptr_t deopt_id_; 8055 intptr_t deopt_id_;
8055 const ParsedFunction& parsed_function_; 8056 const ParsedFunction& parsed_function_;
8056 Environment* outer_; 8057 Environment* outer_;
8057 8058
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
8098 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8099 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8099 UNIMPLEMENTED(); \ 8100 UNIMPLEMENTED(); \
8100 return NULL; \ 8101 return NULL; \
8101 } \ 8102 } \
8102 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8103 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8103 8104
8104 8105
8105 } // namespace dart 8106 } // namespace dart
8106 8107
8107 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8108 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698