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 6402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6413 // I can detect the case between storing double (holey and fast) and | 6413 // I can detect the case between storing double (holey and fast) and |
6414 // smi/object by looking at elements_kind_. | 6414 // smi/object by looking at elements_kind_. |
6415 ASSERT(IsFastSmiOrObjectElementsKind(elements_kind) || | 6415 ASSERT(IsFastSmiOrObjectElementsKind(elements_kind) || |
6416 IsFastDoubleElementsKind(elements_kind)); | 6416 IsFastDoubleElementsKind(elements_kind)); |
6417 | 6417 |
6418 if (IsFastSmiOrObjectElementsKind(elements_kind)) { | 6418 if (IsFastSmiOrObjectElementsKind(elements_kind)) { |
6419 if (IsFastSmiElementsKind(elements_kind) && | 6419 if (IsFastSmiElementsKind(elements_kind) && |
6420 (!IsHoleyElementsKind(elements_kind) || | 6420 (!IsHoleyElementsKind(elements_kind) || |
6421 mode == NEVER_RETURN_HOLE)) { | 6421 mode == NEVER_RETURN_HOLE)) { |
6422 set_type(HType::Smi()); | 6422 set_type(HType::Smi()); |
6423 set_representation(Representation::Smi()); | 6423 if (SmiValuesAre32Bits() && !RequiresHoleCheck()) { |
| 6424 set_representation(Representation::Integer32()); |
| 6425 } else { |
| 6426 set_representation(Representation::Smi()); |
| 6427 } |
6424 } else { | 6428 } else { |
6425 set_representation(Representation::Tagged()); | 6429 set_representation(Representation::Tagged()); |
6426 } | 6430 } |
6427 | 6431 |
6428 SetGVNFlag(kDependsOnArrayElements); | 6432 SetGVNFlag(kDependsOnArrayElements); |
6429 } else { | 6433 } else { |
6430 set_representation(Representation::Double()); | 6434 set_representation(Representation::Double()); |
6431 SetGVNFlag(kDependsOnDoubleArrayElements); | 6435 SetGVNFlag(kDependsOnDoubleArrayElements); |
6432 } | 6436 } |
6433 } else { | 6437 } else { |
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7493 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7497 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7494 }; | 7498 }; |
7495 | 7499 |
7496 | 7500 |
7497 #undef DECLARE_INSTRUCTION | 7501 #undef DECLARE_INSTRUCTION |
7498 #undef DECLARE_CONCRETE_INSTRUCTION | 7502 #undef DECLARE_CONCRETE_INSTRUCTION |
7499 | 7503 |
7500 } } // namespace v8::internal | 7504 } } // namespace v8::internal |
7501 | 7505 |
7502 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7506 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |