| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 7337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7348 Unique<Map> original_map_; | 7348 Unique<Map> original_map_; |
| 7349 Unique<Map> transitioned_map_; | 7349 Unique<Map> transitioned_map_; |
| 7350 uint32_t bit_field_; | 7350 uint32_t bit_field_; |
| 7351 }; | 7351 }; |
| 7352 | 7352 |
| 7353 | 7353 |
| 7354 class HStringAdd final : public HBinaryOperation { | 7354 class HStringAdd final : public HBinaryOperation { |
| 7355 public: | 7355 public: |
| 7356 static HInstruction* New( | 7356 static HInstruction* New( |
| 7357 Isolate* isolate, Zone* zone, HValue* context, HValue* left, | 7357 Isolate* isolate, Zone* zone, HValue* context, HValue* left, |
| 7358 HValue* right, PretenureFlag pretenure_flag = NOT_TENURED, | 7358 HValue* right, Strength strength = Strength::WEAK, |
| 7359 PretenureFlag pretenure_flag = NOT_TENURED, |
| 7359 StringAddFlags flags = STRING_ADD_CHECK_BOTH, | 7360 StringAddFlags flags = STRING_ADD_CHECK_BOTH, |
| 7360 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); | 7361 Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null()); |
| 7361 | 7362 |
| 7362 StringAddFlags flags() const { return flags_; } | 7363 StringAddFlags flags() const { return flags_; } |
| 7363 PretenureFlag pretenure_flag() const { return pretenure_flag_; } | 7364 PretenureFlag pretenure_flag() const { return pretenure_flag_; } |
| 7364 | 7365 |
| 7365 Representation RequiredInputRepresentation(int index) override { | 7366 Representation RequiredInputRepresentation(int index) override { |
| 7366 return Representation::Tagged(); | 7367 return Representation::Tagged(); |
| 7367 } | 7368 } |
| 7368 | 7369 |
| 7369 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 7370 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 7370 | 7371 |
| 7371 DECLARE_CONCRETE_INSTRUCTION(StringAdd) | 7372 DECLARE_CONCRETE_INSTRUCTION(StringAdd) |
| 7372 | 7373 |
| 7373 protected: | 7374 protected: |
| 7374 bool DataEquals(HValue* other) override { | 7375 bool DataEquals(HValue* other) override { |
| 7375 return flags_ == HStringAdd::cast(other)->flags_ && | 7376 return flags_ == HStringAdd::cast(other)->flags_ && |
| 7376 pretenure_flag_ == HStringAdd::cast(other)->pretenure_flag_; | 7377 pretenure_flag_ == HStringAdd::cast(other)->pretenure_flag_; |
| 7377 } | 7378 } |
| 7378 | 7379 |
| 7379 private: | 7380 private: |
| 7380 HStringAdd(HValue* context, HValue* left, HValue* right, | 7381 HStringAdd(HValue* context, HValue* left, HValue* right, Strength strength, |
| 7381 PretenureFlag pretenure_flag, StringAddFlags flags, | 7382 PretenureFlag pretenure_flag, StringAddFlags flags, |
| 7382 Handle<AllocationSite> allocation_site) | 7383 Handle<AllocationSite> allocation_site) |
| 7383 : HBinaryOperation(context, left, right, Strength::WEAK, HType::String()), | 7384 : HBinaryOperation(context, left, right, strength, HType::String()), |
| 7384 flags_(flags), | 7385 flags_(flags), |
| 7385 pretenure_flag_(pretenure_flag) { | 7386 pretenure_flag_(pretenure_flag) { |
| 7386 set_representation(Representation::Tagged()); | 7387 set_representation(Representation::Tagged()); |
| 7387 SetFlag(kUseGVN); | 7388 SetFlag(kUseGVN); |
| 7388 SetDependsOnFlag(kMaps); | 7389 SetDependsOnFlag(kMaps); |
| 7389 SetChangesFlag(kNewSpacePromotion); | 7390 SetChangesFlag(kNewSpacePromotion); |
| 7390 if (FLAG_trace_pretenuring) { | 7391 if (FLAG_trace_pretenuring) { |
| 7391 PrintF("HStringAdd with AllocationSite %p %s\n", | 7392 PrintF("HStringAdd with AllocationSite %p %s\n", |
| 7392 allocation_site.is_null() | 7393 allocation_site.is_null() |
| 7393 ? static_cast<void*>(NULL) | 7394 ? static_cast<void*>(NULL) |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7975 }; | 7976 }; |
| 7976 | 7977 |
| 7977 | 7978 |
| 7978 | 7979 |
| 7979 #undef DECLARE_INSTRUCTION | 7980 #undef DECLARE_INSTRUCTION |
| 7980 #undef DECLARE_CONCRETE_INSTRUCTION | 7981 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7981 | 7982 |
| 7982 } } // namespace v8::internal | 7983 } } // namespace v8::internal |
| 7983 | 7984 |
| 7984 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7985 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |