| 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/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2905 intptr_t checked_argument_count() const { return checked_argument_count_; } | 2905 intptr_t checked_argument_count() const { return checked_argument_count_; } |
| 2906 const Function& interface_target() const { return interface_target_; } | 2906 const Function& interface_target() const { return interface_target_; } |
| 2907 | 2907 |
| 2908 bool has_unique_selector() const { return has_unique_selector_; } | 2908 bool has_unique_selector() const { return has_unique_selector_; } |
| 2909 void set_has_unique_selector(bool b) { has_unique_selector_ = b; } | 2909 void set_has_unique_selector(bool b) { has_unique_selector_ = b; } |
| 2910 | 2910 |
| 2911 virtual intptr_t CallCount() const { | 2911 virtual intptr_t CallCount() const { |
| 2912 return ic_data() == NULL ? 0 : ic_data()->AggregateCount(); | 2912 return ic_data() == NULL ? 0 : ic_data()->AggregateCount(); |
| 2913 } | 2913 } |
| 2914 | 2914 |
| 2915 virtual CompileType ComputeType() const; |
| 2916 |
| 2915 virtual bool ComputeCanDeoptimize() const { return true; } | 2917 virtual bool ComputeCanDeoptimize() const { return true; } |
| 2916 | 2918 |
| 2917 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 2919 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 2918 | 2920 |
| 2919 virtual bool CanBecomeDeoptimizationTarget() const { | 2921 virtual bool CanBecomeDeoptimizationTarget() const { |
| 2920 // Instance calls that are specialized by the optimizer need a | 2922 // Instance calls that are specialized by the optimizer need a |
| 2921 // deoptimization descriptor before the call. | 2923 // deoptimization descriptor before the call. |
| 2922 return true; | 2924 return true; |
| 2923 } | 2925 } |
| 2924 | 2926 |
| (...skipping 3819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6744 SetInputAt(1, right); | 6746 SetInputAt(1, right); |
| 6745 } | 6747 } |
| 6746 | 6748 |
| 6747 InstanceCallInstr* call() const { return call_; } | 6749 InstanceCallInstr* call() const { return call_; } |
| 6748 Token::Kind op_kind() const { return op_kind_; } | 6750 Token::Kind op_kind() const { return op_kind_; } |
| 6749 Value* left() const { return inputs_[0]; } | 6751 Value* left() const { return inputs_[0]; } |
| 6750 Value* right() const { return inputs_[1]; } | 6752 Value* right() const { return inputs_[1]; } |
| 6751 | 6753 |
| 6752 virtual bool ComputeCanDeoptimize() const { return false; } | 6754 virtual bool ComputeCanDeoptimize() const { return false; } |
| 6753 | 6755 |
| 6756 virtual CompileType ComputeType() const; |
| 6757 |
| 6754 virtual bool HasUnknownSideEffects() const { return true; } | 6758 virtual bool HasUnknownSideEffects() const { return true; } |
| 6755 | 6759 |
| 6756 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 6760 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 6757 | 6761 |
| 6758 PRINT_OPERANDS_TO_SUPPORT | 6762 PRINT_OPERANDS_TO_SUPPORT |
| 6759 | 6763 |
| 6760 DECLARE_INSTRUCTION(CheckedSmiOp) | 6764 DECLARE_INSTRUCTION(CheckedSmiOp) |
| 6761 | 6765 |
| 6762 private: | 6766 private: |
| 6763 InstanceCallInstr* call_; | 6767 InstanceCallInstr* call_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 6776 is_negated_(false) { | 6780 is_negated_(false) { |
| 6777 ASSERT(call->type_args_len() == 0); | 6781 ASSERT(call->type_args_len() == 0); |
| 6778 SetInputAt(0, left); | 6782 SetInputAt(0, left); |
| 6779 SetInputAt(1, right); | 6783 SetInputAt(1, right); |
| 6780 } | 6784 } |
| 6781 | 6785 |
| 6782 InstanceCallInstr* call() const { return call_; } | 6786 InstanceCallInstr* call() const { return call_; } |
| 6783 | 6787 |
| 6784 virtual bool ComputeCanDeoptimize() const { return false; } | 6788 virtual bool ComputeCanDeoptimize() const { return false; } |
| 6785 | 6789 |
| 6790 virtual CompileType ComputeType() const; |
| 6791 |
| 6786 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 6792 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 6787 | 6793 |
| 6788 virtual void NegateComparison() { | 6794 virtual void NegateComparison() { |
| 6789 ComparisonInstr::NegateComparison(); | 6795 ComparisonInstr::NegateComparison(); |
| 6790 is_negated_ = !is_negated_; | 6796 is_negated_ = !is_negated_; |
| 6791 } | 6797 } |
| 6792 | 6798 |
| 6793 bool is_negated() const { return is_negated_; } | 6799 bool is_negated() const { return is_negated_; } |
| 6794 | 6800 |
| 6795 virtual bool HasUnknownSideEffects() const { return true; } | 6801 virtual bool HasUnknownSideEffects() const { return true; } |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8103 #define DEFINE_UNIMPLEMENTED_INSTRUCTION(Name) \ | 8109 #define DEFINE_UNIMPLEMENTED_INSTRUCTION(Name) \ |
| 8104 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8110 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8105 UNIMPLEMENTED(); \ | 8111 UNIMPLEMENTED(); \ |
| 8106 return NULL; \ | 8112 return NULL; \ |
| 8107 } \ | 8113 } \ |
| 8108 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8114 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8109 | 8115 |
| 8110 } // namespace dart | 8116 } // namespace dart |
| 8111 | 8117 |
| 8112 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8118 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |