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 RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define RUNTIME_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 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2958 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } | 2958 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } |
2959 | 2959 |
2960 DECLARE_INSTRUCTION(PolymorphicInstanceCall) | 2960 DECLARE_INSTRUCTION(PolymorphicInstanceCall) |
2961 | 2961 |
2962 const ICData& ic_data() const { return ic_data_; } | 2962 const ICData& ic_data() const { return ic_data_; } |
2963 | 2963 |
2964 virtual bool CanDeoptimize() const { return true; } | 2964 virtual bool CanDeoptimize() const { return true; } |
2965 | 2965 |
2966 virtual EffectSet Effects() const { return EffectSet::All(); } | 2966 virtual EffectSet Effects() const { return EffectSet::All(); } |
2967 | 2967 |
2968 virtual Definition* Canonicalize(FlowGraph* graph); | |
2969 | |
2970 static RawType* ComputeRuntimeType(const ICData& ic_data); | |
2971 | |
2972 PRINT_OPERANDS_TO_SUPPORT | 2968 PRINT_OPERANDS_TO_SUPPORT |
2973 | 2969 |
2974 private: | 2970 private: |
2975 InstanceCallInstr* instance_call_; | 2971 InstanceCallInstr* instance_call_; |
2976 const ICData& ic_data_; | 2972 const ICData& ic_data_; |
2977 bool with_checks_; | 2973 bool with_checks_; |
2978 const bool complete_; | 2974 const bool complete_; |
2979 | 2975 |
2980 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); | 2976 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); |
2981 }; | 2977 }; |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3321 } | 3317 } |
3322 | 3318 |
3323 // ICData for static calls carries call count. | 3319 // ICData for static calls carries call count. |
3324 const ICData* ic_data() const { return ic_data_; } | 3320 const ICData* ic_data() const { return ic_data_; } |
3325 bool HasICData() const { | 3321 bool HasICData() const { |
3326 return (ic_data() != NULL) && !ic_data()->IsNull(); | 3322 return (ic_data() != NULL) && !ic_data()->IsNull(); |
3327 } | 3323 } |
3328 | 3324 |
3329 DECLARE_INSTRUCTION(StaticCall) | 3325 DECLARE_INSTRUCTION(StaticCall) |
3330 virtual CompileType ComputeType() const; | 3326 virtual CompileType ComputeType() const; |
3331 virtual Definition* Canonicalize(FlowGraph* flow_graph); | |
3332 | 3327 |
3333 // Accessors forwarded to the AST node. | 3328 // Accessors forwarded to the AST node. |
3334 const Function& function() const { return function_; } | 3329 const Function& function() const { return function_; } |
3335 const Array& argument_names() const { return argument_names_; } | 3330 const Array& argument_names() const { return argument_names_; } |
3336 virtual TokenPosition token_pos() const { return token_pos_; } | 3331 virtual TokenPosition token_pos() const { return token_pos_; } |
3337 | 3332 |
3338 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 3333 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
3339 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 3334 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
3340 return (*arguments_)[index]; | 3335 return (*arguments_)[index]; |
3341 } | 3336 } |
(...skipping 5046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8388 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8383 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8389 UNIMPLEMENTED(); \ | 8384 UNIMPLEMENTED(); \ |
8390 return NULL; \ | 8385 return NULL; \ |
8391 } \ | 8386 } \ |
8392 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8387 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8393 | 8388 |
8394 | 8389 |
8395 } // namespace dart | 8390 } // namespace dart |
8396 | 8391 |
8397 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8392 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |