OLD | NEW |
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 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2929 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } | 2929 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } |
2930 | 2930 |
2931 DECLARE_INSTRUCTION(PolymorphicInstanceCall) | 2931 DECLARE_INSTRUCTION(PolymorphicInstanceCall) |
2932 | 2932 |
2933 const ICData& ic_data() const { return ic_data_; } | 2933 const ICData& ic_data() const { return ic_data_; } |
2934 | 2934 |
2935 virtual bool CanDeoptimize() const { return true; } | 2935 virtual bool CanDeoptimize() const { return true; } |
2936 | 2936 |
2937 virtual EffectSet Effects() const { return EffectSet::All(); } | 2937 virtual EffectSet Effects() const { return EffectSet::All(); } |
2938 | 2938 |
| 2939 virtual Definition* Canonicalize(FlowGraph* graph); |
| 2940 |
| 2941 static RawType* ComputeRuntimeType(const ICData& ic_data); |
| 2942 |
2939 PRINT_OPERANDS_TO_SUPPORT | 2943 PRINT_OPERANDS_TO_SUPPORT |
2940 | 2944 |
2941 private: | 2945 private: |
2942 InstanceCallInstr* instance_call_; | 2946 InstanceCallInstr* instance_call_; |
2943 const ICData& ic_data_; | 2947 const ICData& ic_data_; |
2944 const bool with_checks_; | 2948 const bool with_checks_; |
2945 const bool complete_; | 2949 const bool complete_; |
2946 | 2950 |
2947 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); | 2951 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); |
2948 }; | 2952 }; |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3286 } | 3290 } |
3287 | 3291 |
3288 // ICData for static calls carries call count. | 3292 // ICData for static calls carries call count. |
3289 const ICData* ic_data() const { return ic_data_; } | 3293 const ICData* ic_data() const { return ic_data_; } |
3290 bool HasICData() const { | 3294 bool HasICData() const { |
3291 return (ic_data() != NULL) && !ic_data()->IsNull(); | 3295 return (ic_data() != NULL) && !ic_data()->IsNull(); |
3292 } | 3296 } |
3293 | 3297 |
3294 DECLARE_INSTRUCTION(StaticCall) | 3298 DECLARE_INSTRUCTION(StaticCall) |
3295 virtual CompileType ComputeType() const; | 3299 virtual CompileType ComputeType() const; |
| 3300 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
3296 | 3301 |
3297 // Accessors forwarded to the AST node. | 3302 // Accessors forwarded to the AST node. |
3298 const Function& function() const { return function_; } | 3303 const Function& function() const { return function_; } |
3299 const Array& argument_names() const { return argument_names_; } | 3304 const Array& argument_names() const { return argument_names_; } |
3300 virtual TokenPosition token_pos() const { return token_pos_; } | 3305 virtual TokenPosition token_pos() const { return token_pos_; } |
3301 | 3306 |
3302 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 3307 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
3303 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 3308 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
3304 return (*arguments_)[index]; | 3309 return (*arguments_)[index]; |
3305 } | 3310 } |
(...skipping 4994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8300 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8305 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8301 UNIMPLEMENTED(); \ | 8306 UNIMPLEMENTED(); \ |
8302 return NULL; \ | 8307 return NULL; \ |
8303 } \ | 8308 } \ |
8304 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8309 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8305 | 8310 |
8306 | 8311 |
8307 } // namespace dart | 8312 } // namespace dart |
8308 | 8313 |
8309 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8314 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |