OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 21 matching lines...) Expand all Loading... | |
32 | 32 |
33 #include "allocation.h" | 33 #include "allocation.h" |
34 #include "code-stubs.h" | 34 #include "code-stubs.h" |
35 #include "data-flow.h" | 35 #include "data-flow.h" |
36 #include "small-pointer-list.h" | 36 #include "small-pointer-list.h" |
37 #include "string-stream.h" | 37 #include "string-stream.h" |
38 #include "v8conversions.h" | 38 #include "v8conversions.h" |
39 #include "v8utils.h" | 39 #include "v8utils.h" |
40 #include "zone.h" | 40 #include "zone.h" |
41 | 41 |
42 | |
42 namespace v8 { | 43 namespace v8 { |
43 namespace internal { | 44 namespace internal { |
44 | 45 |
45 // Forward declarations. | 46 // Forward declarations. |
46 class HBasicBlock; | 47 class HBasicBlock; |
47 class HEnvironment; | 48 class HEnvironment; |
48 class HInferRepresentation; | 49 class HInferRepresentation; |
49 class HInstruction; | 50 class HInstruction; |
50 class HLoopInformation; | 51 class HLoopInformation; |
51 class HValue; | 52 class HValue; |
(...skipping 2991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3043 | 3044 |
3044 private: | 3045 private: |
3045 ZoneList<Handle<JSObject> > prototypes_; | 3046 ZoneList<Handle<JSObject> > prototypes_; |
3046 ZoneList<Handle<Map> > maps_; | 3047 ZoneList<Handle<Map> > maps_; |
3047 UniqueValueId first_prototype_unique_id_; | 3048 UniqueValueId first_prototype_unique_id_; |
3048 UniqueValueId last_prototype_unique_id_; | 3049 UniqueValueId last_prototype_unique_id_; |
3049 bool can_omit_prototype_maps_; | 3050 bool can_omit_prototype_maps_; |
3050 }; | 3051 }; |
3051 | 3052 |
3052 | 3053 |
3054 class InductionVariableData; | |
titzer
2013/06/24 14:03:30
It seems like the only reason that all this code l
Massi
2013/07/01 13:10:49
As discussed off line with danno, we can keep the
| |
3055 | |
3056 | |
3057 struct InductionVariableLimitUpdate { | |
3058 InductionVariableData* updated_variable; | |
3059 HValue* limit; | |
3060 bool limit_is_upper; | |
3061 bool limit_is_included; | |
3062 | |
3063 InductionVariableLimitUpdate() | |
3064 : updated_variable(NULL), limit(NULL), | |
3065 limit_is_upper(false), limit_is_included(false) {} | |
3066 }; | |
3067 | |
3068 | |
3069 class HBoundsCheck; | |
3070 class HPhi; | |
3071 class HConstant; | |
3072 class HBitwise; | |
3073 | |
3074 | |
3075 class InductionVariableData : public ZoneObject { | |
3076 public: | |
3077 class InductionVariableCheck : public ZoneObject { | |
3078 public: | |
3079 HBoundsCheck* check() { return check_; } | |
3080 InductionVariableCheck* next() { return next_; } | |
3081 bool HasUpperLimit() { return upper_limit_ >= 0; } | |
3082 int32_t upper_limit() { | |
3083 ASSERT(HasUpperLimit()); | |
3084 return upper_limit_; | |
3085 } | |
3086 void set_upper_limit(int32_t upper_limit) { | |
3087 upper_limit_ = upper_limit; | |
3088 } | |
3089 | |
3090 bool processed() { return processed_; } | |
3091 void set_processed() { processed_ = true; } | |
3092 | |
3093 InductionVariableCheck(HBoundsCheck* check, | |
3094 InductionVariableCheck* next, | |
3095 int32_t upper_limit = kNoLimit) | |
3096 : check_(check), next_(next), upper_limit_(upper_limit), | |
3097 processed_(false) {} | |
3098 | |
3099 private: | |
3100 HBoundsCheck* check_; | |
3101 InductionVariableCheck* next_; | |
3102 int32_t upper_limit_; | |
3103 bool processed_; | |
3104 }; | |
3105 | |
3106 class ChecksRelatedToLength : public ZoneObject { | |
3107 public: | |
3108 HValue* length() { return length_; } | |
3109 ChecksRelatedToLength* next() { return next_; } | |
3110 InductionVariableCheck* checks() { return checks_; } | |
3111 | |
3112 void AddCheck(HBoundsCheck* check, int32_t upper_limit = kNoLimit); | |
3113 void CloseCurrentBlock(); | |
3114 | |
3115 ChecksRelatedToLength(HValue* length, ChecksRelatedToLength* next) | |
3116 : length_(length), next_(next), checks_(NULL), | |
3117 first_check_in_block_(NULL), | |
3118 added_index_(NULL), | |
3119 added_constant_(NULL), | |
3120 current_and_mask_in_block_(0), | |
3121 current_or_mask_in_block_(0) {} | |
3122 | |
3123 private: | |
3124 void UseNewIndexInCurrentBlock(Token::Value token, | |
3125 int32_t mask, | |
3126 HValue* index_base, | |
3127 HValue* context); | |
3128 | |
3129 HBoundsCheck* first_check_in_block() { return first_check_in_block_; } | |
3130 HBitwise* added_index() { return added_index_; } | |
3131 HConstant* added_constant() { return added_constant_; } | |
3132 int32_t current_and_mask_in_block() { return current_and_mask_in_block_; } | |
3133 int32_t current_or_mask_in_block() { return current_or_mask_in_block_; } | |
3134 int32_t current_upper_limit() { return current_upper_limit_; } | |
3135 | |
3136 HValue* length_; | |
3137 ChecksRelatedToLength* next_; | |
3138 InductionVariableCheck* checks_; | |
3139 | |
3140 HBoundsCheck* first_check_in_block_; | |
3141 HBitwise* added_index_; | |
3142 HConstant* added_constant_; | |
3143 int32_t current_and_mask_in_block_; | |
3144 int32_t current_or_mask_in_block_; | |
3145 int32_t current_upper_limit_; | |
3146 }; | |
3147 | |
3148 static const int32_t kNoLimit = -1; | |
3149 | |
3150 static InductionVariableData* New(HPhi* phi); | |
3151 static bool ComputeInductionVariableLimit( | |
3152 HBasicBlock* block, | |
3153 InductionVariableLimitUpdate* additional_limit); | |
3154 | |
3155 static HValue* DecomposeBitwise(HValue* value, | |
3156 int32_t* and_mask, | |
3157 int32_t* or_mask, | |
3158 HValue** context); | |
3159 | |
3160 void AddCheck(HBoundsCheck* check, int32_t upper_limit = kNoLimit); | |
3161 | |
3162 bool CheckIfBranchIsLoopGuard(HBasicBlock* in_branch, | |
3163 HBasicBlock* out_branch); | |
3164 | |
3165 void UpdateAdditionalLimit(InductionVariableLimitUpdate* update) { | |
3166 ASSERT(update->updated_variable == this); | |
3167 if (update->limit_is_upper) { | |
3168 swap(&additional_upper_limit_, &update->limit); | |
3169 swap(&additional_upper_limit_is_included_, &update->limit_is_included); | |
3170 } else { | |
3171 swap(&additional_lower_limit_, &update->limit); | |
3172 swap(&additional_lower_limit_is_included_, &update->limit_is_included); | |
3173 } | |
3174 } | |
3175 | |
3176 HPhi* phi() { return phi_; } | |
3177 HValue* base() { return base_; } | |
3178 int32_t increment() { return increment_; } | |
3179 HValue* limit() { return limit_; } | |
3180 bool limit_included() { return limit_included_; } | |
3181 HBasicBlock* limit_validity() { return limit_validity_; } | |
3182 HBasicBlock* induction_exit_block() { return induction_exit_block_; } | |
3183 HBasicBlock* induction_exit_target() { return induction_exit_target_; } | |
3184 ChecksRelatedToLength* checks() { return checks_; } | |
3185 HValue* additional_upper_limit() { return additional_upper_limit_; } | |
3186 bool additional_upper_limit_is_included() { | |
3187 return additional_upper_limit_is_included_; | |
3188 } | |
3189 HValue* additional_lower_limit() { return additional_lower_limit_; } | |
3190 bool additional_lower_limit_is_included() { | |
3191 return additional_lower_limit_is_included_; | |
3192 } | |
3193 | |
3194 bool lower_limit_is_non_negative_constant() { | |
3195 if (base()->IsInteger32Constant() && base()->GetInteger32Constant() >= 0) { | |
3196 return true; | |
3197 } | |
3198 if (additional_lower_limit() != NULL && | |
3199 additional_lower_limit()->IsInteger32Constant() && | |
3200 additional_lower_limit()->GetInteger32Constant() >= 0) { | |
3201 // Ignoring the corner case of !additional_lower_limit_is_included() | |
3202 // is safe, handling it adds unneeded complexity. | |
3203 return true; | |
3204 } | |
3205 return false; | |
3206 } | |
3207 | |
3208 int32_t ComputeUpperLimit(int32_t and_mask, int32_t or_mask) { | |
3209 // Should be Smi::kMaxValue but it must fit 32 bits; lower is safe anyway. | |
3210 const int32_t MAX_LIMIT = 1 << 30; | |
3211 | |
3212 int32_t result = MAX_LIMIT; | |
3213 | |
3214 if (limit() != NULL && | |
3215 limit()->IsInteger32Constant()) { | |
3216 int32_t limit_value = limit()->GetInteger32Constant(); | |
3217 if (!limit_included()) { | |
3218 limit_value--; | |
3219 } | |
3220 if (limit_value < result) result = limit_value; | |
3221 } | |
3222 | |
3223 if (additional_upper_limit() != NULL && | |
3224 additional_upper_limit()->IsInteger32Constant()) { | |
3225 int32_t limit_value = additional_upper_limit()->GetInteger32Constant(); | |
3226 if (!additional_upper_limit_is_included()) { | |
3227 limit_value--; | |
3228 } | |
3229 if (limit_value < result) result = limit_value; | |
3230 } | |
3231 | |
3232 if (and_mask > 0 && and_mask < MAX_LIMIT) { | |
3233 if (and_mask < result) result = and_mask; | |
3234 return result; | |
3235 } | |
3236 | |
3237 // Add the effect of the or_mask. | |
3238 result |= or_mask; | |
3239 | |
3240 if (result >= MAX_LIMIT) { | |
3241 result = kNoLimit; | |
3242 } | |
3243 return result; | |
3244 } | |
3245 | |
3246 private: | |
3247 template <class T> void swap(T* a, T* b) { | |
3248 T c(*a); | |
3249 *a = *b; | |
3250 *b = c; | |
3251 } | |
3252 | |
3253 InductionVariableData(HPhi* phi, HValue* base, int32_t increment) | |
3254 : phi_(phi), base_(DiscardOsrValue(base)), increment_(increment), | |
3255 limit_(NULL), limit_included_(false), limit_validity_(NULL), | |
3256 induction_exit_block_(NULL), induction_exit_target_(NULL), | |
3257 checks_(NULL), | |
3258 additional_upper_limit_(NULL), | |
3259 additional_upper_limit_is_included_(false), | |
3260 additional_lower_limit_(NULL), | |
3261 additional_lower_limit_is_included_(false) {} | |
3262 | |
3263 static int32_t ComputeIncrement(HPhi* phi, HValue* phi_operand); | |
3264 | |
3265 static HValue* DiscardOsrValue(HValue* v); | |
3266 static InductionVariableData* GetInductionVariableData(HValue* v); | |
3267 bool ValidateToken(Token::Value token); | |
3268 | |
3269 HPhi* phi_; | |
3270 HValue* base_; | |
3271 int32_t increment_; | |
3272 HValue* limit_; | |
3273 bool limit_included_; | |
3274 HBasicBlock* limit_validity_; | |
3275 HBasicBlock* induction_exit_block_; | |
3276 HBasicBlock* induction_exit_target_; | |
3277 ChecksRelatedToLength* checks_; | |
3278 HValue* additional_upper_limit_; | |
3279 bool additional_upper_limit_is_included_; | |
3280 HValue* additional_lower_limit_; | |
3281 bool additional_lower_limit_is_included_; | |
3282 }; | |
3283 | |
3284 | |
3053 class HPhi: public HValue { | 3285 class HPhi: public HValue { |
3054 public: | 3286 public: |
3055 HPhi(int merged_index, Zone* zone) | 3287 HPhi(int merged_index, Zone* zone) |
3056 : inputs_(2, zone), | 3288 : inputs_(2, zone), |
3057 merged_index_(merged_index), | 3289 merged_index_(merged_index), |
3058 phi_id_(-1) { | 3290 phi_id_(-1), |
3291 induction_variable_data_(NULL) { | |
3059 for (int i = 0; i < Representation::kNumRepresentations; i++) { | 3292 for (int i = 0; i < Representation::kNumRepresentations; i++) { |
3060 non_phi_uses_[i] = 0; | 3293 non_phi_uses_[i] = 0; |
3061 indirect_uses_[i] = 0; | 3294 indirect_uses_[i] = 0; |
3062 } | 3295 } |
3063 ASSERT(merged_index >= 0); | 3296 ASSERT(merged_index >= 0); |
3064 SetFlag(kFlexibleRepresentation); | 3297 SetFlag(kFlexibleRepresentation); |
3065 SetFlag(kAllowUndefinedAsNaN); | 3298 SetFlag(kAllowUndefinedAsNaN); |
3066 } | 3299 } |
3067 | 3300 |
3068 virtual Representation RepresentationFromInputs(); | 3301 virtual Representation RepresentationFromInputs(); |
(...skipping 10 matching lines...) Expand all Loading... | |
3079 virtual int OperandCount() { return inputs_.length(); } | 3312 virtual int OperandCount() { return inputs_.length(); } |
3080 virtual HValue* OperandAt(int index) const { return inputs_[index]; } | 3313 virtual HValue* OperandAt(int index) const { return inputs_[index]; } |
3081 HValue* GetRedundantReplacement(); | 3314 HValue* GetRedundantReplacement(); |
3082 void AddInput(HValue* value); | 3315 void AddInput(HValue* value); |
3083 bool HasRealUses(); | 3316 bool HasRealUses(); |
3084 | 3317 |
3085 bool IsReceiver() const { return merged_index_ == 0; } | 3318 bool IsReceiver() const { return merged_index_ == 0; } |
3086 | 3319 |
3087 int merged_index() const { return merged_index_; } | 3320 int merged_index() const { return merged_index_; } |
3088 | 3321 |
3322 InductionVariableData* induction_variable_data() { | |
3323 return induction_variable_data_; | |
3324 } | |
3325 bool IsInductionVariable() { | |
3326 return induction_variable_data_ != NULL; | |
3327 } | |
3328 bool IsLimitedInductionVariable() { | |
3329 return IsInductionVariable() && | |
3330 induction_variable_data_->limit() != NULL; | |
3331 } | |
3332 void DetectInductionVariable() { | |
3333 ASSERT(induction_variable_data_ == NULL); | |
3334 induction_variable_data_ = InductionVariableData::New(this); | |
3335 } | |
3336 | |
3089 virtual void AddInformativeDefinitions(); | 3337 virtual void AddInformativeDefinitions(); |
3090 | 3338 |
3091 virtual void PrintTo(StringStream* stream); | 3339 virtual void PrintTo(StringStream* stream); |
3092 | 3340 |
3093 #ifdef DEBUG | 3341 #ifdef DEBUG |
3094 virtual void Verify(); | 3342 virtual void Verify(); |
3095 #endif | 3343 #endif |
3096 | 3344 |
3097 void InitRealUses(int id); | 3345 void InitRealUses(int id); |
3098 void AddNonPhiUsesFrom(HPhi* other); | 3346 void AddNonPhiUsesFrom(HPhi* other); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3146 int offset = 0, | 3394 int offset = 0, |
3147 int scale = 0); | 3395 int scale = 0); |
3148 | 3396 |
3149 private: | 3397 private: |
3150 ZoneList<HValue*> inputs_; | 3398 ZoneList<HValue*> inputs_; |
3151 int merged_index_; | 3399 int merged_index_; |
3152 | 3400 |
3153 int non_phi_uses_[Representation::kNumRepresentations]; | 3401 int non_phi_uses_[Representation::kNumRepresentations]; |
3154 int indirect_uses_[Representation::kNumRepresentations]; | 3402 int indirect_uses_[Representation::kNumRepresentations]; |
3155 int phi_id_; | 3403 int phi_id_; |
3404 InductionVariableData* induction_variable_data_; | |
3156 }; | 3405 }; |
3157 | 3406 |
3158 | 3407 |
3159 class HInductionVariableAnnotation : public HUnaryOperation { | 3408 class HInductionVariableAnnotation : public HUnaryOperation { |
3160 public: | 3409 public: |
3161 static HInductionVariableAnnotation* AddToGraph(HPhi* phi, | 3410 static HInductionVariableAnnotation* AddToGraph(HPhi* phi, |
3162 NumericRelation relation, | 3411 NumericRelation relation, |
3163 int operand_index); | 3412 int operand_index); |
3164 | 3413 |
3165 NumericRelation relation() { return relation_; } | 3414 NumericRelation relation() { return relation_; } |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3653 | 3902 |
3654 class HBoundsCheck: public HTemplateInstruction<2> { | 3903 class HBoundsCheck: public HTemplateInstruction<2> { |
3655 public: | 3904 public: |
3656 // Normally HBoundsCheck should be created using the | 3905 // Normally HBoundsCheck should be created using the |
3657 // HGraphBuilder::AddBoundsCheck() helper. | 3906 // HGraphBuilder::AddBoundsCheck() helper. |
3658 // However when building stubs, where we know that the arguments are Int32, | 3907 // However when building stubs, where we know that the arguments are Int32, |
3659 // it makes sense to invoke this constructor directly. | 3908 // it makes sense to invoke this constructor directly. |
3660 HBoundsCheck(HValue* index, HValue* length) | 3909 HBoundsCheck(HValue* index, HValue* length) |
3661 : skip_check_(false), | 3910 : skip_check_(false), |
3662 base_(NULL), offset_(0), scale_(0), | 3911 base_(NULL), offset_(0), scale_(0), |
3663 responsibility_direction_(DIRECTION_NONE) { | 3912 responsibility_direction_(DIRECTION_NONE), |
3913 allow_equality_(false) { | |
3664 SetOperandAt(0, index); | 3914 SetOperandAt(0, index); |
3665 SetOperandAt(1, length); | 3915 SetOperandAt(1, length); |
3666 SetFlag(kFlexibleRepresentation); | 3916 SetFlag(kFlexibleRepresentation); |
3667 SetFlag(kUseGVN); | 3917 SetFlag(kUseGVN); |
3668 } | 3918 } |
3669 | 3919 |
3670 bool skip_check() { return skip_check_; } | 3920 bool skip_check() const { return skip_check_; } |
3671 void set_skip_check(bool skip_check) { skip_check_ = skip_check; } | 3921 void set_skip_check() { skip_check_ = true; } |
3672 HValue* base() { return base_; } | 3922 HValue* base() { return base_; } |
3673 int offset() { return offset_; } | 3923 int offset() { return offset_; } |
3674 int scale() { return scale_; } | 3924 int scale() { return scale_; } |
3675 bool index_can_increase() { | 3925 bool index_can_increase() { |
3676 return (responsibility_direction_ & DIRECTION_LOWER) == 0; | 3926 return (responsibility_direction_ & DIRECTION_LOWER) == 0; |
3677 } | 3927 } |
3678 bool index_can_decrease() { | 3928 bool index_can_decrease() { |
3679 return (responsibility_direction_ & DIRECTION_UPPER) == 0; | 3929 return (responsibility_direction_ & DIRECTION_UPPER) == 0; |
3680 } | 3930 } |
3681 | 3931 |
(...skipping 11 matching lines...) Expand all Loading... | |
3693 base_ = index(); | 3943 base_ = index(); |
3694 offset_ = 0; | 3944 offset_ = 0; |
3695 scale_ = 0; | 3945 scale_ = 0; |
3696 return false; | 3946 return false; |
3697 } | 3947 } |
3698 } | 3948 } |
3699 | 3949 |
3700 virtual Representation RequiredInputRepresentation(int arg_index) { | 3950 virtual Representation RequiredInputRepresentation(int arg_index) { |
3701 return representation(); | 3951 return representation(); |
3702 } | 3952 } |
3953 virtual bool IsDeletable() const { | |
3954 return skip_check() && !FLAG_debug_code; | |
3955 } | |
3703 | 3956 |
3704 virtual bool IsRelationTrueInternal(NumericRelation relation, | 3957 virtual bool IsRelationTrueInternal(NumericRelation relation, |
3705 HValue* related_value, | 3958 HValue* related_value, |
3706 int offset = 0, | 3959 int offset = 0, |
3707 int scale = 0); | 3960 int scale = 0); |
3708 | 3961 |
3709 virtual void PrintDataTo(StringStream* stream); | 3962 virtual void PrintDataTo(StringStream* stream); |
3710 virtual void InferRepresentation(HInferRepresentation* h_infer); | 3963 virtual void InferRepresentation(HInferRepresentation* h_infer); |
3711 | 3964 |
3712 HValue* index() { return OperandAt(0); } | 3965 HValue* index() { return OperandAt(0); } |
3713 HValue* length() { return OperandAt(1); } | 3966 HValue* length() { return OperandAt(1); } |
3967 bool allow_equality() { return allow_equality_; } | |
3968 void set_allow_equality(bool v) { allow_equality_ = v; } | |
3714 | 3969 |
3715 virtual int RedefinedOperandIndex() { return 0; } | 3970 virtual int RedefinedOperandIndex() { return 0; } |
3716 virtual bool IsPurelyInformativeDefinition() { return skip_check(); } | 3971 virtual bool IsPurelyInformativeDefinition() { return skip_check(); } |
3717 virtual void AddInformativeDefinitions(); | 3972 virtual void AddInformativeDefinitions(); |
3718 | 3973 |
3719 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck) | 3974 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck) |
3720 | 3975 |
3721 protected: | 3976 protected: |
3722 friend class HBoundsCheckBaseIndexInformation; | 3977 friend class HBoundsCheckBaseIndexInformation; |
3723 | 3978 |
3724 virtual void SetResponsibilityForRange(RangeGuaranteeDirection direction) { | 3979 virtual void SetResponsibilityForRange(RangeGuaranteeDirection direction) { |
3725 responsibility_direction_ = static_cast<RangeGuaranteeDirection>( | 3980 responsibility_direction_ = static_cast<RangeGuaranteeDirection>( |
3726 responsibility_direction_ | direction); | 3981 responsibility_direction_ | direction); |
3727 } | 3982 } |
3728 | 3983 |
3729 virtual bool DataEquals(HValue* other) { return true; } | 3984 virtual bool DataEquals(HValue* other) { return true; } |
3730 virtual void TryGuaranteeRangeChanging(RangeEvaluationContext* context); | 3985 virtual void TryGuaranteeRangeChanging(RangeEvaluationContext* context); |
3731 bool skip_check_; | 3986 bool skip_check_; |
3732 HValue* base_; | 3987 HValue* base_; |
3733 int offset_; | 3988 int offset_; |
3734 int scale_; | 3989 int scale_; |
3735 RangeGuaranteeDirection responsibility_direction_; | 3990 RangeGuaranteeDirection responsibility_direction_; |
3991 bool allow_equality_; | |
3736 }; | 3992 }; |
3737 | 3993 |
3738 | 3994 |
3739 class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> { | 3995 class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> { |
3740 public: | 3996 public: |
3741 explicit HBoundsCheckBaseIndexInformation(HBoundsCheck* check) { | 3997 explicit HBoundsCheckBaseIndexInformation(HBoundsCheck* check) { |
3742 DecompositionResult decomposition; | 3998 DecompositionResult decomposition; |
3743 if (check->index()->TryDecompose(&decomposition)) { | 3999 if (check->index()->TryDecompose(&decomposition)) { |
3744 SetOperandAt(0, decomposition.base()); | 4000 SetOperandAt(0, decomposition.base()); |
3745 SetOperandAt(1, check); | 4001 SetOperandAt(1, check); |
(...skipping 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6601 virtual HType CalculateInferredType() { | 6857 virtual HType CalculateInferredType() { |
6602 return HType::Tagged(); | 6858 return HType::Tagged(); |
6603 } | 6859 } |
6604 | 6860 |
6605 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 6861 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
6606 | 6862 |
6607 private: | 6863 private: |
6608 virtual bool IsDeletable() const { return true; } | 6864 virtual bool IsDeletable() const { return true; } |
6609 }; | 6865 }; |
6610 | 6866 |
6611 | |
6612 #undef DECLARE_INSTRUCTION | 6867 #undef DECLARE_INSTRUCTION |
6613 #undef DECLARE_CONCRETE_INSTRUCTION | 6868 #undef DECLARE_CONCRETE_INSTRUCTION |
6614 | 6869 |
6615 } } // namespace v8::internal | 6870 } } // namespace v8::internal |
6616 | 6871 |
6617 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6872 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |