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 4643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4654 | 4654 |
4655 class HTransitionElementsKind: public HTemplateInstruction<1> { | 4655 class HTransitionElementsKind: public HTemplateInstruction<1> { |
4656 public: | 4656 public: |
4657 HTransitionElementsKind(HValue* object, | 4657 HTransitionElementsKind(HValue* object, |
4658 Handle<Map> original_map, | 4658 Handle<Map> original_map, |
4659 Handle<Map> transitioned_map) | 4659 Handle<Map> transitioned_map) |
4660 : original_map_(original_map), | 4660 : original_map_(original_map), |
4661 transitioned_map_(transitioned_map) { | 4661 transitioned_map_(transitioned_map) { |
4662 SetOperandAt(0, object); | 4662 SetOperandAt(0, object); |
4663 SetFlag(kUseGVN); | 4663 SetFlag(kUseGVN); |
4664 // Don't set GVN DependOn flags here. That would defeat GVN's detection of | |
4665 // congruent HTransitionElementsKind instructions. Instruction hoisting | |
4666 // handles HTransitionElementsKind instruction specially, explicitly adding | |
4667 // DependsOn flags during its dependency calculations. | |
4668 SetGVNFlag(kChangesElementsKind); | 4664 SetGVNFlag(kChangesElementsKind); |
4669 if (original_map->has_fast_double_elements()) { | 4665 SetGVNFlag(kChangesElementsPointer); |
4670 SetGVNFlag(kChangesElementsPointer); | 4666 SetGVNFlag(kChangesNewSpacePromotion); |
Michael Starzinger
2012/10/01 13:13:48
The kChangesNewSpacePromotion is mainly used for w
danno
2012/10/01 14:08:47
Please restore the original code with ifs, but sti
Toon Verwaest
2012/10/01 14:57:51
Done.
| |
4671 SetGVNFlag(kChangesNewSpacePromotion); | |
4672 } | |
4673 if (transitioned_map->has_fast_double_elements()) { | |
4674 SetGVNFlag(kChangesElementsPointer); | |
4675 SetGVNFlag(kChangesNewSpacePromotion); | |
4676 } | |
4677 set_representation(Representation::Tagged()); | 4667 set_representation(Representation::Tagged()); |
4678 } | 4668 } |
4679 | 4669 |
4680 virtual Representation RequiredInputRepresentation(int index) { | 4670 virtual Representation RequiredInputRepresentation(int index) { |
4681 return Representation::Tagged(); | 4671 return Representation::Tagged(); |
4682 } | 4672 } |
4683 | 4673 |
4684 HValue* object() { return OperandAt(0); } | 4674 HValue* object() { return OperandAt(0); } |
4685 Handle<Map> original_map() { return original_map_; } | 4675 Handle<Map> original_map() { return original_map_; } |
4686 Handle<Map> transitioned_map() { return transitioned_map_; } | 4676 Handle<Map> transitioned_map() { return transitioned_map_; } |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5282 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5272 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
5283 }; | 5273 }; |
5284 | 5274 |
5285 | 5275 |
5286 #undef DECLARE_INSTRUCTION | 5276 #undef DECLARE_INSTRUCTION |
5287 #undef DECLARE_CONCRETE_INSTRUCTION | 5277 #undef DECLARE_CONCRETE_INSTRUCTION |
5288 | 5278 |
5289 } } // namespace v8::internal | 5279 } } // namespace v8::internal |
5290 | 5280 |
5291 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5281 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |