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 4173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4184 | 4184 |
4185 class HTransitionElementsKind: public HTemplateInstruction<1> { | 4185 class HTransitionElementsKind: public HTemplateInstruction<1> { |
4186 public: | 4186 public: |
4187 HTransitionElementsKind(HValue* object, | 4187 HTransitionElementsKind(HValue* object, |
4188 Handle<Map> original_map, | 4188 Handle<Map> original_map, |
4189 Handle<Map> transitioned_map) | 4189 Handle<Map> transitioned_map) |
4190 : original_map_(original_map), | 4190 : original_map_(original_map), |
4191 transitioned_map_(transitioned_map) { | 4191 transitioned_map_(transitioned_map) { |
4192 SetOperandAt(0, object); | 4192 SetOperandAt(0, object); |
4193 SetFlag(kUseGVN); | 4193 SetFlag(kUseGVN); |
| 4194 // DependsOn flags for TransitionElementsKinds only effect instruction |
| 4195 // hoisting, which could change their location relative to instructions that |
| 4196 // have side-effects. GVN duplicate value elimination handles |
| 4197 // TransitionElementsKinds specially, ensuring the no-op transitions are |
| 4198 // always eliminated. |
4194 SetGVNFlag(kDependsOnMaps); | 4199 SetGVNFlag(kDependsOnMaps); |
4195 SetGVNFlag(kChangesElementsKind); | 4200 SetGVNFlag(kChangesElementsKind); |
4196 if (original_map->has_fast_double_elements()) { | 4201 if (original_map->has_fast_double_elements()) { |
4197 SetGVNFlag(kChangesElementsPointer); | 4202 SetGVNFlag(kChangesElementsPointer); |
4198 SetGVNFlag(kDependsOnElementsPointer); | |
4199 SetGVNFlag(kDependsOnDoubleArrayElements); | 4203 SetGVNFlag(kDependsOnDoubleArrayElements); |
4200 } else if (transitioned_map->has_fast_double_elements()) { | 4204 } else if (transitioned_map->has_fast_double_elements()) { |
4201 SetGVNFlag(kChangesElementsPointer); | 4205 SetGVNFlag(kChangesElementsPointer); |
4202 SetGVNFlag(kDependsOnElementsPointer); | |
4203 SetGVNFlag(kDependsOnArrayElements); | 4206 SetGVNFlag(kDependsOnArrayElements); |
4204 } | 4207 } |
4205 set_representation(Representation::Tagged()); | 4208 set_representation(Representation::Tagged()); |
4206 } | 4209 } |
4207 | 4210 |
4208 virtual Representation RequiredInputRepresentation(int index) { | 4211 virtual Representation RequiredInputRepresentation(int index) { |
4209 return Representation::Tagged(); | 4212 return Representation::Tagged(); |
4210 } | 4213 } |
4211 | 4214 |
4212 HValue* object() { return OperandAt(0); } | 4215 HValue* object() { return OperandAt(0); } |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4625 | 4628 |
4626 DECLARE_CONCRETE_INSTRUCTION(In) | 4629 DECLARE_CONCRETE_INSTRUCTION(In) |
4627 }; | 4630 }; |
4628 | 4631 |
4629 #undef DECLARE_INSTRUCTION | 4632 #undef DECLARE_INSTRUCTION |
4630 #undef DECLARE_CONCRETE_INSTRUCTION | 4633 #undef DECLARE_CONCRETE_INSTRUCTION |
4631 | 4634 |
4632 } } // namespace v8::internal | 4635 } } // namespace v8::internal |
4633 | 4636 |
4634 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4637 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |