Chromium Code Reviews| 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 2759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2770 const ICData& ic_data, | 2770 const ICData& ic_data, |
| 2771 bool with_checks, | 2771 bool with_checks, |
| 2772 bool complete) | 2772 bool complete) |
| 2773 : TemplateDefinition(instance_call->deopt_id()), | 2773 : TemplateDefinition(instance_call->deopt_id()), |
| 2774 instance_call_(instance_call), | 2774 instance_call_(instance_call), |
| 2775 ic_data_(ic_data), | 2775 ic_data_(ic_data), |
| 2776 with_checks_(with_checks), | 2776 with_checks_(with_checks), |
| 2777 complete_(complete) { | 2777 complete_(complete) { |
| 2778 ASSERT(instance_call_ != NULL); | 2778 ASSERT(instance_call_ != NULL); |
| 2779 ASSERT(!ic_data.NumberOfChecksIs(0)); | 2779 ASSERT(!ic_data.NumberOfChecksIs(0)); |
| 2780 InitializeIcCount(); | |
| 2780 } | 2781 } |
| 2781 | 2782 |
| 2782 InstanceCallInstr* instance_call() const { return instance_call_; } | 2783 InstanceCallInstr* instance_call() const { return instance_call_; } |
| 2783 bool with_checks() const { return with_checks_; } | 2784 bool with_checks() const { return with_checks_; } |
| 2784 void set_with_checks(bool b) { with_checks_ = b; } | 2785 void set_with_checks(bool b) { with_checks_ = b; } |
| 2785 bool complete() const { return complete_; } | 2786 bool complete() const { return complete_; } |
| 2786 virtual TokenPosition token_pos() const { | 2787 virtual TokenPosition token_pos() const { |
| 2787 return instance_call_->token_pos(); | 2788 return instance_call_->token_pos(); |
| 2788 } | 2789 } |
| 2789 | 2790 |
| 2790 virtual CompileType ComputeType() const; | 2791 virtual CompileType ComputeType() const; |
| 2791 | 2792 |
| 2792 virtual intptr_t ArgumentCount() const { | 2793 virtual intptr_t ArgumentCount() const { |
| 2793 return instance_call()->ArgumentCount(); | 2794 return instance_call()->ArgumentCount(); |
| 2794 } | 2795 } |
| 2795 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 2796 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
| 2796 return instance_call()->PushArgumentAt(index); | 2797 return instance_call()->PushArgumentAt(index); |
| 2797 } | 2798 } |
| 2798 | 2799 |
| 2799 bool HasSingleRecognizedTarget() const; | 2800 bool HasSingleRecognizedTarget() const; |
| 2800 | 2801 |
| 2801 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } | 2802 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } |
| 2802 | 2803 |
| 2803 DECLARE_INSTRUCTION(PolymorphicInstanceCall) | 2804 DECLARE_INSTRUCTION(PolymorphicInstanceCall) |
| 2804 | 2805 |
| 2805 const ICData& ic_data() const { return ic_data_; } | 2806 const ICData& ic_data() const { return ic_data_; } |
| 2806 | 2807 |
| 2808 intptr_t total_ic_count() { return total_ic_count_; } | |
|
Vyacheslav Egorov (Google)
2017/03/10 10:31:30
This is an extremely confusing name. We need:
(a)
erikcorry
2017/03/10 13:30:01
Done.
| |
| 2809 | |
| 2810 void set_total_ic_count(intptr_t count) { total_ic_count_ = count; } | |
| 2811 | |
| 2807 virtual bool CanDeoptimize() const { return true; } | 2812 virtual bool CanDeoptimize() const { return true; } |
| 2808 | 2813 |
| 2809 virtual EffectSet Effects() const { return EffectSet::All(); } | 2814 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 2810 | 2815 |
| 2811 virtual Definition* Canonicalize(FlowGraph* graph); | 2816 virtual Definition* Canonicalize(FlowGraph* graph); |
| 2812 | 2817 |
| 2813 static RawType* ComputeRuntimeType(const ICData& ic_data); | 2818 static RawType* ComputeRuntimeType(const ICData& ic_data); |
| 2814 | 2819 |
| 2815 PRINT_OPERANDS_TO_SUPPORT | 2820 PRINT_OPERANDS_TO_SUPPORT |
| 2816 | 2821 |
| 2817 private: | 2822 private: |
| 2818 InstanceCallInstr* instance_call_; | 2823 InstanceCallInstr* instance_call_; |
| 2819 const ICData& ic_data_; | 2824 const ICData& ic_data_; |
| 2820 bool with_checks_; | 2825 bool with_checks_; |
| 2821 const bool complete_; | 2826 const bool complete_; |
| 2827 intptr_t total_ic_count_; | |
| 2828 | |
| 2829 void InitializeIcCount(); | |
| 2822 | 2830 |
| 2823 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); | 2831 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); |
| 2824 }; | 2832 }; |
| 2825 | 2833 |
| 2826 | 2834 |
| 2827 class StrictCompareInstr : public TemplateComparison<2, NoThrow, Pure> { | 2835 class StrictCompareInstr : public TemplateComparison<2, NoThrow, Pure> { |
| 2828 public: | 2836 public: |
| 2829 StrictCompareInstr(TokenPosition token_pos, | 2837 StrictCompareInstr(TokenPosition token_pos, |
| 2830 Token::Kind kind, | 2838 Token::Kind kind, |
| 2831 Value* left, | 2839 Value* left, |
| (...skipping 5194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8026 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8034 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8027 UNIMPLEMENTED(); \ | 8035 UNIMPLEMENTED(); \ |
| 8028 return NULL; \ | 8036 return NULL; \ |
| 8029 } \ | 8037 } \ |
| 8030 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8038 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8031 | 8039 |
| 8032 | 8040 |
| 8033 } // namespace dart | 8041 } // namespace dart |
| 8034 | 8042 |
| 8035 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8043 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |