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 5191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5202 int offset, HValue* typecheck = NULL) | 5202 int offset, HValue* typecheck = NULL) |
5203 : is_in_object_(is_in_object), | 5203 : is_in_object_(is_in_object), |
5204 field_representation_(field_representation), | 5204 field_representation_(field_representation), |
5205 offset_(offset) { | 5205 offset_(offset) { |
5206 ASSERT(object != NULL); | 5206 ASSERT(object != NULL); |
5207 SetOperandAt(0, object); | 5207 SetOperandAt(0, object); |
5208 SetOperandAt(1, typecheck != NULL ? typecheck : object); | 5208 SetOperandAt(1, typecheck != NULL ? typecheck : object); |
5209 | 5209 |
5210 if (FLAG_track_fields && field_representation.IsSmi()) { | 5210 if (FLAG_track_fields && field_representation.IsSmi()) { |
5211 set_type(HType::Smi()); | 5211 set_type(HType::Smi()); |
5212 set_representation(Representation::Tagged()); | 5212 set_representation(field_representation); |
5213 } else if (FLAG_track_double_fields && field_representation.IsDouble()) { | 5213 } else if (FLAG_track_double_fields && field_representation.IsDouble()) { |
5214 set_representation(field_representation); | 5214 set_representation(field_representation); |
5215 } else if (FLAG_track_heap_object_fields && | 5215 } else if (FLAG_track_heap_object_fields && |
5216 field_representation.IsHeapObject()) { | 5216 field_representation.IsHeapObject()) { |
5217 set_type(HType::NonPrimitive()); | 5217 set_type(HType::NonPrimitive()); |
5218 set_representation(Representation::Tagged()); | 5218 set_representation(Representation::Tagged()); |
5219 } else { | 5219 } else { |
5220 set_representation(Representation::Tagged()); | 5220 set_representation(Representation::Tagged()); |
5221 } | 5221 } |
5222 SetFlag(kUseGVN); | 5222 SetFlag(kUseGVN); |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5596 } | 5596 } |
5597 | 5597 |
5598 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField) | 5598 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField) |
5599 | 5599 |
5600 virtual Representation RequiredInputRepresentation(int index) { | 5600 virtual Representation RequiredInputRepresentation(int index) { |
5601 if (FLAG_track_double_fields && | 5601 if (FLAG_track_double_fields && |
5602 index == 1 && field_representation_.IsDouble()) { | 5602 index == 1 && field_representation_.IsDouble()) { |
5603 return field_representation_; | 5603 return field_representation_; |
5604 } else if (FLAG_track_fields && | 5604 } else if (FLAG_track_fields && |
5605 index == 1 && field_representation_.IsSmi()) { | 5605 index == 1 && field_representation_.IsSmi()) { |
5606 return Representation::Integer32(); | 5606 return field_representation_; |
5607 } | 5607 } |
5608 return Representation::Tagged(); | 5608 return Representation::Tagged(); |
5609 } | 5609 } |
5610 virtual void SetSideEffectDominator(GVNFlag side_effect, HValue* dominator) { | 5610 virtual void SetSideEffectDominator(GVNFlag side_effect, HValue* dominator) { |
5611 ASSERT(side_effect == kChangesNewSpacePromotion); | 5611 ASSERT(side_effect == kChangesNewSpacePromotion); |
5612 new_space_dominator_ = dominator; | 5612 new_space_dominator_ = dominator; |
5613 } | 5613 } |
5614 virtual void PrintDataTo(StringStream* stream); | 5614 virtual void PrintDataTo(StringStream* stream); |
5615 | 5615 |
5616 HValue* object() { return OperandAt(0); } | 5616 HValue* object() { return OperandAt(0); } |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6461 virtual bool IsDeletable() const { return true; } | 6461 virtual bool IsDeletable() const { return true; } |
6462 }; | 6462 }; |
6463 | 6463 |
6464 | 6464 |
6465 #undef DECLARE_INSTRUCTION | 6465 #undef DECLARE_INSTRUCTION |
6466 #undef DECLARE_CONCRETE_INSTRUCTION | 6466 #undef DECLARE_CONCRETE_INSTRUCTION |
6467 | 6467 |
6468 } } // namespace v8::internal | 6468 } } // namespace v8::internal |
6469 | 6469 |
6470 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6470 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |