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

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: Cleanup Created 5 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
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 4836 matching lines...) Expand 10 before | Expand all | Expand 10 after
8041 intptr_t fixed_parameter_count, 8043 intptr_t fixed_parameter_count,
8042 intptr_t deopt_id, 8044 intptr_t deopt_id,
8043 const ParsedFunction& parsed_function, 8045 const ParsedFunction& parsed_function,
8044 Environment* outer) 8046 Environment* outer)
8045 : values_(length), 8047 : values_(length),
8046 locations_(NULL), 8048 locations_(NULL),
8047 fixed_parameter_count_(fixed_parameter_count), 8049 fixed_parameter_count_(fixed_parameter_count),
8048 deopt_id_(deopt_id), 8050 deopt_id_(deopt_id),
8049 parsed_function_(parsed_function), 8051 parsed_function_(parsed_function),
8050 outer_(outer) { 8052 outer_(outer) {
8051 ASSERT(!parsed_function_.code().IsNull());
8052 } 8053 }
8053 8054
8054 8055
8055 GrowableArray<Value*> values_; 8056 GrowableArray<Value*> values_;
8056 Location* locations_; 8057 Location* locations_;
8057 const intptr_t fixed_parameter_count_; 8058 const intptr_t fixed_parameter_count_;
8058 intptr_t deopt_id_; 8059 intptr_t deopt_id_;
8059 const ParsedFunction& parsed_function_; 8060 const ParsedFunction& parsed_function_;
8060 Environment* outer_; 8061 Environment* outer_;
8061 8062
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
8102 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8103 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8103 UNIMPLEMENTED(); \ 8104 UNIMPLEMENTED(); \
8104 return NULL; \ 8105 return NULL; \
8105 } \ 8106 } \
8106 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8107 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8107 8108
8108 8109
8109 } // namespace dart 8110 } // namespace dart
8110 8111
8111 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8112 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698