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 2696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2707 DISALLOW_COPY_AND_ASSIGN(CurrentContextInstr); | 2707 DISALLOW_COPY_AND_ASSIGN(CurrentContextInstr); |
| 2708 }; | 2708 }; |
| 2709 | 2709 |
| 2710 | 2710 |
| 2711 class ClosureCallInstr : public TemplateDefinition<1, Throws> { | 2711 class ClosureCallInstr : public TemplateDefinition<1, Throws> { |
| 2712 public: | 2712 public: |
| 2713 ClosureCallInstr(Value* function, | 2713 ClosureCallInstr(Value* function, |
| 2714 ClosureCallNode* node, | 2714 ClosureCallNode* node, |
| 2715 ZoneGrowableArray<PushArgumentInstr*>* arguments) | 2715 ZoneGrowableArray<PushArgumentInstr*>* arguments) |
| 2716 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), | 2716 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
| 2717 type_args_len_(node->arguments()->type_args_len()), | |
| 2717 argument_names_(node->arguments()->names()), | 2718 argument_names_(node->arguments()->names()), |
| 2718 token_pos_(node->token_pos()), | 2719 token_pos_(node->token_pos()), |
| 2719 arguments_(arguments) { | 2720 arguments_(arguments) { |
| 2720 SetInputAt(0, function); | 2721 SetInputAt(0, function); |
| 2721 } | 2722 } |
| 2722 | 2723 |
| 2723 ClosureCallInstr(Value* function, | 2724 ClosureCallInstr(Value* function, |
| 2724 ZoneGrowableArray<PushArgumentInstr*>* arguments, | 2725 ZoneGrowableArray<PushArgumentInstr*>* arguments, |
| 2726 intptr_t type_args_len, | |
| 2725 const Array& argument_names, | 2727 const Array& argument_names, |
| 2726 TokenPosition token_pos) | 2728 TokenPosition token_pos) |
| 2727 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), | 2729 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
| 2730 type_args_len_(type_args_len), | |
| 2728 argument_names_(argument_names), | 2731 argument_names_(argument_names), |
| 2729 token_pos_(token_pos), | 2732 token_pos_(token_pos), |
| 2730 arguments_(arguments) { | 2733 arguments_(arguments) { |
| 2731 SetInputAt(0, function); | 2734 SetInputAt(0, function); |
| 2732 } | 2735 } |
| 2733 | 2736 |
| 2734 DECLARE_INSTRUCTION(ClosureCall) | 2737 DECLARE_INSTRUCTION(ClosureCall) |
| 2735 | 2738 |
| 2739 intptr_t type_args_len() const { return type_args_len_; } | |
| 2736 const Array& argument_names() const { return argument_names_; } | 2740 const Array& argument_names() const { return argument_names_; } |
| 2737 virtual TokenPosition token_pos() const { return token_pos_; } | 2741 virtual TokenPosition token_pos() const { return token_pos_; } |
| 2738 | 2742 |
| 2743 // ArgumentCount() includes the type argument vector if any. | |
| 2739 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 2744 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
| 2740 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 2745 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
| 2741 return (*arguments_)[index]; | 2746 return (*arguments_)[index]; |
| 2742 } | 2747 } |
| 2743 | 2748 |
| 2744 // TODO(kmillikin): implement exact call counts for closure calls. | 2749 // TODO(kmillikin): implement exact call counts for closure calls. |
| 2745 virtual intptr_t CallCount() const { return 1; } | 2750 virtual intptr_t CallCount() const { return 1; } |
| 2746 | 2751 |
| 2747 virtual bool ComputeCanDeoptimize() const { return true; } | 2752 virtual bool ComputeCanDeoptimize() const { return true; } |
| 2748 | 2753 |
| 2749 virtual EffectSet Effects() const { return EffectSet::All(); } | 2754 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 2750 | 2755 |
| 2751 PRINT_OPERANDS_TO_SUPPORT | 2756 PRINT_OPERANDS_TO_SUPPORT |
| 2752 | 2757 |
| 2753 private: | 2758 private: |
| 2759 intptr_t type_args_len_; | |
|
Vyacheslav Egorov (Google)
2017/05/04 12:12:23
I suggest the following refactoring of call instru
regis
2017/05/09 18:31:23
Done.
| |
| 2754 const Array& argument_names_; | 2760 const Array& argument_names_; |
| 2755 TokenPosition token_pos_; | 2761 TokenPosition token_pos_; |
| 2756 ZoneGrowableArray<PushArgumentInstr*>* arguments_; | 2762 ZoneGrowableArray<PushArgumentInstr*>* arguments_; |
| 2757 | 2763 |
| 2758 DISALLOW_COPY_AND_ASSIGN(ClosureCallInstr); | 2764 DISALLOW_COPY_AND_ASSIGN(ClosureCallInstr); |
| 2759 }; | 2765 }; |
| 2760 | 2766 |
| 2761 | 2767 |
| 2762 class InstanceCallInstr : public TemplateDefinition<0, Throws> { | 2768 class InstanceCallInstr : public TemplateDefinition<0, Throws> { |
| 2763 public: | 2769 public: |
| 2764 InstanceCallInstr(TokenPosition token_pos, | 2770 InstanceCallInstr(TokenPosition token_pos, |
| 2765 const String& function_name, | 2771 const String& function_name, |
| 2766 Token::Kind token_kind, | 2772 Token::Kind token_kind, |
| 2767 ZoneGrowableArray<PushArgumentInstr*>* arguments, | 2773 ZoneGrowableArray<PushArgumentInstr*>* arguments, |
| 2774 intptr_t type_args_len, | |
| 2768 const Array& argument_names, | 2775 const Array& argument_names, |
| 2769 intptr_t checked_argument_count, | 2776 intptr_t checked_argument_count, |
| 2770 const ZoneGrowableArray<const ICData*>& ic_data_array) | 2777 const ZoneGrowableArray<const ICData*>& ic_data_array) |
| 2771 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), | 2778 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
| 2772 ic_data_(NULL), | 2779 ic_data_(NULL), |
| 2773 token_pos_(token_pos), | 2780 token_pos_(token_pos), |
| 2774 function_name_(function_name), | 2781 function_name_(function_name), |
| 2775 token_kind_(token_kind), | 2782 token_kind_(token_kind), |
| 2776 arguments_(arguments), | 2783 arguments_(arguments), |
| 2784 type_args_len_(type_args_len), | |
| 2777 argument_names_(argument_names), | 2785 argument_names_(argument_names), |
| 2778 checked_argument_count_(checked_argument_count), | 2786 checked_argument_count_(checked_argument_count), |
| 2779 has_unique_selector_(false) { | 2787 has_unique_selector_(false) { |
| 2780 ic_data_ = GetICData(ic_data_array); | 2788 ic_data_ = GetICData(ic_data_array); |
| 2781 ASSERT(function_name.IsNotTemporaryScopedHandle()); | 2789 ASSERT(function_name.IsNotTemporaryScopedHandle()); |
| 2782 ASSERT(!arguments->is_empty()); | 2790 ASSERT(!arguments->is_empty()); |
| 2783 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap()); | 2791 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap()); |
| 2784 ASSERT(Token::IsBinaryOperator(token_kind) || | 2792 ASSERT(Token::IsBinaryOperator(token_kind) || |
| 2785 Token::IsEqualityOperator(token_kind) || | 2793 Token::IsEqualityOperator(token_kind) || |
| 2786 Token::IsRelationalOperator(token_kind) || | 2794 Token::IsRelationalOperator(token_kind) || |
| 2787 Token::IsUnaryOperator(token_kind) || | 2795 Token::IsUnaryOperator(token_kind) || |
| 2788 Token::IsIndexOperator(token_kind) || | 2796 Token::IsIndexOperator(token_kind) || |
| 2789 Token::IsTypeTestOperator(token_kind) || | 2797 Token::IsTypeTestOperator(token_kind) || |
| 2790 Token::IsTypeCastOperator(token_kind) || token_kind == Token::kGET || | 2798 Token::IsTypeCastOperator(token_kind) || token_kind == Token::kGET || |
| 2791 token_kind == Token::kSET || token_kind == Token::kILLEGAL); | 2799 token_kind == Token::kSET || token_kind == Token::kILLEGAL); |
| 2792 } | 2800 } |
| 2793 | 2801 |
| 2794 DECLARE_INSTRUCTION(InstanceCall) | 2802 DECLARE_INSTRUCTION(InstanceCall) |
| 2795 | 2803 |
| 2796 const ICData* ic_data() const { return ic_data_; } | 2804 const ICData* ic_data() const { return ic_data_; } |
| 2797 bool HasICData() const { return (ic_data() != NULL) && !ic_data()->IsNull(); } | 2805 bool HasICData() const { return (ic_data() != NULL) && !ic_data()->IsNull(); } |
| 2798 | 2806 |
| 2799 // ICData can be replaced by optimizer. | 2807 // ICData can be replaced by optimizer. |
| 2800 void set_ic_data(const ICData* value) { ic_data_ = value; } | 2808 void set_ic_data(const ICData* value) { ic_data_ = value; } |
| 2801 | 2809 |
| 2802 virtual TokenPosition token_pos() const { return token_pos_; } | 2810 virtual TokenPosition token_pos() const { return token_pos_; } |
| 2803 const String& function_name() const { return function_name_; } | 2811 const String& function_name() const { return function_name_; } |
| 2804 Token::Kind token_kind() const { return token_kind_; } | 2812 Token::Kind token_kind() const { return token_kind_; } |
| 2813 // ArgumentCount() includes the type argument vector if any. | |
| 2805 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 2814 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
| 2806 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 2815 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
| 2807 return (*arguments_)[index]; | 2816 return (*arguments_)[index]; |
| 2808 } | 2817 } |
| 2818 intptr_t type_args_len() const { return type_args_len_; } | |
| 2809 const Array& argument_names() const { return argument_names_; } | 2819 const Array& argument_names() const { return argument_names_; } |
| 2810 intptr_t checked_argument_count() const { return checked_argument_count_; } | 2820 intptr_t checked_argument_count() const { return checked_argument_count_; } |
| 2811 | 2821 |
| 2812 bool has_unique_selector() const { return has_unique_selector_; } | 2822 bool has_unique_selector() const { return has_unique_selector_; } |
| 2813 void set_has_unique_selector(bool b) { has_unique_selector_ = b; } | 2823 void set_has_unique_selector(bool b) { has_unique_selector_ = b; } |
| 2814 | 2824 |
| 2815 virtual bool ComputeCanDeoptimize() const { return true; } | 2825 virtual bool ComputeCanDeoptimize() const { return true; } |
| 2816 | 2826 |
| 2817 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 2827 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 2818 | 2828 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 2831 protected: | 2841 protected: |
| 2832 friend class JitOptimizer; | 2842 friend class JitOptimizer; |
| 2833 void set_ic_data(ICData* value) { ic_data_ = value; } | 2843 void set_ic_data(ICData* value) { ic_data_ = value; } |
| 2834 | 2844 |
| 2835 private: | 2845 private: |
| 2836 const ICData* ic_data_; | 2846 const ICData* ic_data_; |
| 2837 const TokenPosition token_pos_; | 2847 const TokenPosition token_pos_; |
| 2838 const String& function_name_; | 2848 const String& function_name_; |
| 2839 const Token::Kind token_kind_; // Binary op, unary op, kGET or kILLEGAL. | 2849 const Token::Kind token_kind_; // Binary op, unary op, kGET or kILLEGAL. |
| 2840 ZoneGrowableArray<PushArgumentInstr*>* const arguments_; | 2850 ZoneGrowableArray<PushArgumentInstr*>* const arguments_; |
| 2851 intptr_t type_args_len_; | |
| 2841 const Array& argument_names_; | 2852 const Array& argument_names_; |
| 2842 const intptr_t checked_argument_count_; | 2853 const intptr_t checked_argument_count_; |
| 2843 bool has_unique_selector_; | 2854 bool has_unique_selector_; |
| 2844 | 2855 |
| 2845 DISALLOW_COPY_AND_ASSIGN(InstanceCallInstr); | 2856 DISALLOW_COPY_AND_ASSIGN(InstanceCallInstr); |
| 2846 }; | 2857 }; |
| 2847 | 2858 |
| 2848 | 2859 |
| 2849 class PolymorphicInstanceCallInstr : public TemplateDefinition<0, Throws> { | 2860 class PolymorphicInstanceCallInstr : public TemplateDefinition<0, Throws> { |
| 2850 public: | 2861 public: |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2882 bool HasOnlyDispatcherOrImplicitAccessorTargets() const; | 2893 bool HasOnlyDispatcherOrImplicitAccessorTargets() const; |
| 2883 | 2894 |
| 2884 const CallTargets& targets() const { return targets_; } | 2895 const CallTargets& targets() const { return targets_; } |
| 2885 intptr_t NumberOfChecks() const { return targets_.length(); } | 2896 intptr_t NumberOfChecks() const { return targets_.length(); } |
| 2886 | 2897 |
| 2887 bool IsSureToCallSingleRecognizedTarget() const; | 2898 bool IsSureToCallSingleRecognizedTarget() const; |
| 2888 | 2899 |
| 2889 virtual intptr_t CallCount() const; | 2900 virtual intptr_t CallCount() const; |
| 2890 | 2901 |
| 2891 // If this polymophic call site was created to cover the remaining cids after | 2902 // If this polymophic call site was created to cover the remaining cids after |
| 2892 // inlinng then we need to keep track of the total number of calls including | 2903 // inlining then we need to keep track of the total number of calls including |
| 2893 // the ones that wer inlined. This is different from the CallCount above: Eg | 2904 // the ones that we inlined. This is different from the CallCount above: Eg |
| 2894 // if there were 100 calls originally, distributed across three class-ids in | 2905 // if there were 100 calls originally, distributed across three class-ids in |
| 2895 // the ratio 50, 40, 7, 3. The first two were inlined, so now we have only | 2906 // the ratio 50, 40, 7, 3. The first two were inlined, so now we have only |
| 2896 // 10 calls in the CallCount above, but the heuristics need to know that the | 2907 // 10 calls in the CallCount above, but the heuristics need to know that the |
| 2897 // last two cids cover 7% and 3% of the calls, not 70% and 30%. | 2908 // last two cids cover 7% and 3% of the calls, not 70% and 30%. |
| 2898 intptr_t total_call_count() { return total_call_count_; } | 2909 intptr_t total_call_count() { return total_call_count_; } |
| 2899 | 2910 |
| 2900 void set_total_call_count(intptr_t count) { total_call_count_ = count; } | 2911 void set_total_call_count(intptr_t count) { total_call_count_ = count; } |
| 2901 | 2912 |
| 2902 DECLARE_INSTRUCTION(PolymorphicInstanceCall) | 2913 DECLARE_INSTRUCTION(PolymorphicInstanceCall) |
| 2903 | 2914 |
| 2904 virtual bool ComputeCanDeoptimize() const { return true; } | 2915 virtual bool ComputeCanDeoptimize() const { return true; } |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3215 const intptr_t if_false_; | 3226 const intptr_t if_false_; |
| 3216 | 3227 |
| 3217 DISALLOW_COPY_AND_ASSIGN(IfThenElseInstr); | 3228 DISALLOW_COPY_AND_ASSIGN(IfThenElseInstr); |
| 3218 }; | 3229 }; |
| 3219 | 3230 |
| 3220 | 3231 |
| 3221 class StaticCallInstr : public TemplateDefinition<0, Throws> { | 3232 class StaticCallInstr : public TemplateDefinition<0, Throws> { |
| 3222 public: | 3233 public: |
| 3223 StaticCallInstr(TokenPosition token_pos, | 3234 StaticCallInstr(TokenPosition token_pos, |
| 3224 const Function& function, | 3235 const Function& function, |
| 3236 intptr_t type_args_len, | |
| 3225 const Array& argument_names, | 3237 const Array& argument_names, |
| 3226 ZoneGrowableArray<PushArgumentInstr*>* arguments, | 3238 ZoneGrowableArray<PushArgumentInstr*>* arguments, |
| 3227 const ZoneGrowableArray<const ICData*>& ic_data_array) | 3239 const ZoneGrowableArray<const ICData*>& ic_data_array) |
| 3228 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), | 3240 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
| 3229 ic_data_(NULL), | 3241 ic_data_(NULL), |
| 3230 token_pos_(token_pos), | 3242 token_pos_(token_pos), |
| 3231 function_(function), | 3243 function_(function), |
| 3244 type_args_len_(type_args_len), | |
| 3232 argument_names_(argument_names), | 3245 argument_names_(argument_names), |
| 3233 arguments_(arguments), | 3246 arguments_(arguments), |
| 3234 result_cid_(kDynamicCid), | 3247 result_cid_(kDynamicCid), |
| 3235 is_known_list_constructor_(false), | 3248 is_known_list_constructor_(false), |
| 3236 identity_(AliasIdentity::Unknown()) { | 3249 identity_(AliasIdentity::Unknown()) { |
| 3237 ic_data_ = GetICData(ic_data_array); | 3250 ic_data_ = GetICData(ic_data_array); |
| 3238 ASSERT(function.IsZoneHandle()); | 3251 ASSERT(function.IsZoneHandle()); |
| 3239 ASSERT(!function.IsNull()); | 3252 ASSERT(!function.IsNull()); |
| 3240 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap()); | 3253 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap()); |
| 3241 } | 3254 } |
| 3242 | 3255 |
| 3243 StaticCallInstr(TokenPosition token_pos, | 3256 StaticCallInstr(TokenPosition token_pos, |
| 3244 const Function& function, | 3257 const Function& function, |
| 3258 intptr_t type_args_len, | |
| 3245 const Array& argument_names, | 3259 const Array& argument_names, |
| 3246 ZoneGrowableArray<PushArgumentInstr*>* arguments, | 3260 ZoneGrowableArray<PushArgumentInstr*>* arguments, |
| 3247 intptr_t deopt_id) | 3261 intptr_t deopt_id) |
| 3248 : TemplateDefinition(deopt_id), | 3262 : TemplateDefinition(deopt_id), |
| 3249 ic_data_(NULL), | 3263 ic_data_(NULL), |
| 3250 token_pos_(token_pos), | 3264 token_pos_(token_pos), |
| 3251 function_(function), | 3265 function_(function), |
| 3266 type_args_len_(type_args_len), | |
| 3252 argument_names_(argument_names), | 3267 argument_names_(argument_names), |
| 3253 arguments_(arguments), | 3268 arguments_(arguments), |
| 3254 result_cid_(kDynamicCid), | 3269 result_cid_(kDynamicCid), |
| 3255 is_known_list_constructor_(false), | 3270 is_known_list_constructor_(false), |
| 3256 identity_(AliasIdentity::Unknown()) { | 3271 identity_(AliasIdentity::Unknown()) { |
| 3257 ASSERT(function.IsZoneHandle()); | 3272 ASSERT(function.IsZoneHandle()); |
| 3258 ASSERT(!function.IsNull()); | 3273 ASSERT(!function.IsNull()); |
| 3259 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap()); | 3274 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap()); |
| 3260 } | 3275 } |
| 3261 | 3276 |
| 3262 // ICData for static calls carries call count. | 3277 // ICData for static calls carries call count. |
| 3263 const ICData* ic_data() const { return ic_data_; } | 3278 const ICData* ic_data() const { return ic_data_; } |
| 3264 bool HasICData() const { return (ic_data() != NULL) && !ic_data()->IsNull(); } | 3279 bool HasICData() const { return (ic_data() != NULL) && !ic_data()->IsNull(); } |
| 3265 | 3280 |
| 3266 void set_ic_data(const ICData* value) { ic_data_ = value; } | 3281 void set_ic_data(const ICData* value) { ic_data_ = value; } |
| 3267 | 3282 |
| 3268 DECLARE_INSTRUCTION(StaticCall) | 3283 DECLARE_INSTRUCTION(StaticCall) |
| 3269 virtual CompileType ComputeType() const; | 3284 virtual CompileType ComputeType() const; |
| 3270 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 3285 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 3271 | 3286 |
| 3272 // Accessors forwarded to the AST node. | 3287 // Accessors forwarded to the AST node. |
| 3273 const Function& function() const { return function_; } | 3288 const Function& function() const { return function_; } |
| 3289 intptr_t type_args_len() const { return type_args_len_; } | |
| 3274 const Array& argument_names() const { return argument_names_; } | 3290 const Array& argument_names() const { return argument_names_; } |
| 3275 virtual TokenPosition token_pos() const { return token_pos_; } | 3291 virtual TokenPosition token_pos() const { return token_pos_; } |
| 3276 | 3292 |
| 3293 // ArgumentCount() includes the type argument vector if any. | |
| 3277 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 3294 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
| 3278 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 3295 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
| 3279 return (*arguments_)[index]; | 3296 return (*arguments_)[index]; |
| 3280 } | 3297 } |
| 3281 | 3298 |
| 3282 virtual intptr_t CallCount() const { | 3299 virtual intptr_t CallCount() const { |
| 3283 return ic_data() == NULL ? 0 : ic_data()->AggregateCount(); | 3300 return ic_data() == NULL ? 0 : ic_data()->AggregateCount(); |
| 3284 } | 3301 } |
| 3285 | 3302 |
| 3286 virtual bool ComputeCanDeoptimize() const { return true; } | 3303 virtual bool ComputeCanDeoptimize() const { return true; } |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 3304 | 3321 |
| 3305 virtual AliasIdentity Identity() const { return identity_; } | 3322 virtual AliasIdentity Identity() const { return identity_; } |
| 3306 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } | 3323 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } |
| 3307 | 3324 |
| 3308 PRINT_OPERANDS_TO_SUPPORT | 3325 PRINT_OPERANDS_TO_SUPPORT |
| 3309 | 3326 |
| 3310 private: | 3327 private: |
| 3311 const ICData* ic_data_; | 3328 const ICData* ic_data_; |
| 3312 const TokenPosition token_pos_; | 3329 const TokenPosition token_pos_; |
| 3313 const Function& function_; | 3330 const Function& function_; |
| 3331 intptr_t type_args_len_; | |
| 3314 const Array& argument_names_; | 3332 const Array& argument_names_; |
| 3315 ZoneGrowableArray<PushArgumentInstr*>* arguments_; | 3333 ZoneGrowableArray<PushArgumentInstr*>* arguments_; |
| 3316 intptr_t result_cid_; // For some library functions we know the result. | 3334 intptr_t result_cid_; // For some library functions we know the result. |
| 3317 | 3335 |
| 3318 // 'True' for recognized list constructors. | 3336 // 'True' for recognized list constructors. |
| 3319 bool is_known_list_constructor_; | 3337 bool is_known_list_constructor_; |
| 3320 | 3338 |
| 3321 AliasIdentity identity_; | 3339 AliasIdentity identity_; |
| 3322 | 3340 |
| 3323 DISALLOW_COPY_AND_ASSIGN(StaticCallInstr); | 3341 DISALLOW_COPY_AND_ASSIGN(StaticCallInstr); |
| (...skipping 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6728 }; | 6746 }; |
| 6729 | 6747 |
| 6730 | 6748 |
| 6731 class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> { | 6749 class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> { |
| 6732 public: | 6750 public: |
| 6733 CheckedSmiOpInstr(Token::Kind op_kind, | 6751 CheckedSmiOpInstr(Token::Kind op_kind, |
| 6734 Value* left, | 6752 Value* left, |
| 6735 Value* right, | 6753 Value* right, |
| 6736 InstanceCallInstr* call) | 6754 InstanceCallInstr* call) |
| 6737 : TemplateDefinition(call->deopt_id()), call_(call), op_kind_(op_kind) { | 6755 : TemplateDefinition(call->deopt_id()), call_(call), op_kind_(op_kind) { |
| 6756 ASSERT(call->type_args_len() == 0); | |
| 6738 SetInputAt(0, left); | 6757 SetInputAt(0, left); |
| 6739 SetInputAt(1, right); | 6758 SetInputAt(1, right); |
| 6740 } | 6759 } |
| 6741 | 6760 |
| 6742 InstanceCallInstr* call() const { return call_; } | 6761 InstanceCallInstr* call() const { return call_; } |
| 6743 Token::Kind op_kind() const { return op_kind_; } | 6762 Token::Kind op_kind() const { return op_kind_; } |
| 6744 Value* left() const { return inputs_[0]; } | 6763 Value* left() const { return inputs_[0]; } |
| 6745 Value* right() const { return inputs_[1]; } | 6764 Value* right() const { return inputs_[1]; } |
| 6746 | 6765 |
| 6747 virtual bool ComputeCanDeoptimize() const { return false; } | 6766 virtual bool ComputeCanDeoptimize() const { return false; } |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 6763 | 6782 |
| 6764 class CheckedSmiComparisonInstr : public TemplateComparison<2, Throws> { | 6783 class CheckedSmiComparisonInstr : public TemplateComparison<2, Throws> { |
| 6765 public: | 6784 public: |
| 6766 CheckedSmiComparisonInstr(Token::Kind op_kind, | 6785 CheckedSmiComparisonInstr(Token::Kind op_kind, |
| 6767 Value* left, | 6786 Value* left, |
| 6768 Value* right, | 6787 Value* right, |
| 6769 InstanceCallInstr* call) | 6788 InstanceCallInstr* call) |
| 6770 : TemplateComparison(call->token_pos(), op_kind, call->deopt_id()), | 6789 : TemplateComparison(call->token_pos(), op_kind, call->deopt_id()), |
| 6771 call_(call), | 6790 call_(call), |
| 6772 is_negated_(false) { | 6791 is_negated_(false) { |
| 6792 ASSERT(call->type_args_len() == 0); | |
| 6773 SetInputAt(0, left); | 6793 SetInputAt(0, left); |
| 6774 SetInputAt(1, right); | 6794 SetInputAt(1, right); |
| 6775 } | 6795 } |
| 6776 | 6796 |
| 6777 InstanceCallInstr* call() const { return call_; } | 6797 InstanceCallInstr* call() const { return call_; } |
| 6778 | 6798 |
| 6779 virtual bool ComputeCanDeoptimize() const { return false; } | 6799 virtual bool ComputeCanDeoptimize() const { return false; } |
| 6780 | 6800 |
| 6781 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 6801 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 6782 | 6802 |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8114 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8134 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8115 UNIMPLEMENTED(); \ | 8135 UNIMPLEMENTED(); \ |
| 8116 return NULL; \ | 8136 return NULL; \ |
| 8117 } \ | 8137 } \ |
| 8118 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8138 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8119 | 8139 |
| 8120 | 8140 |
| 8121 } // namespace dart | 8141 } // namespace dart |
| 8122 | 8142 |
| 8123 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8143 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |