OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 Convert<OtherType>(OtherType::UnionGet(unioned, i), region)); | 561 Convert<OtherType>(OtherType::UnionGet(unioned, i), region)); |
562 } | 562 } |
563 return Config::from_union(new_unioned); | 563 return Config::from_union(new_unioned); |
564 } | 564 } |
565 } | 565 } |
566 | 566 |
567 | 567 |
568 // TODO(rossberg): this does not belong here. | 568 // TODO(rossberg): this does not belong here. |
569 Representation Representation::FromType(Type* type) { | 569 Representation Representation::FromType(Type* type) { |
570 if (type->Is(Type::None())) return Representation::None(); | 570 if (type->Is(Type::None())) return Representation::None(); |
571 if (type->Is(Type::Smi())) return Representation::Smi(); | 571 if (type->Is(Type::Smi())) return SmiValuesAre31Bits() |
| 572 ? Representation::Smi() : Representation::Integer32(); |
572 if (type->Is(Type::Signed32())) return Representation::Integer32(); | 573 if (type->Is(Type::Signed32())) return Representation::Integer32(); |
573 if (type->Is(Type::Number())) return Representation::Double(); | 574 if (type->Is(Type::Number())) return Representation::Double(); |
574 return Representation::Tagged(); | 575 return Representation::Tagged(); |
575 } | 576 } |
576 | 577 |
577 | 578 |
578 #ifdef OBJECT_PRINT | 579 #ifdef OBJECT_PRINT |
579 template<class Config> | 580 template<class Config> |
580 void TypeImpl<Config>::TypePrint() { | 581 void TypeImpl<Config>::TypePrint() { |
581 TypePrint(stdout); | 582 TypePrint(stdout); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 | 648 |
648 template TypeImpl<ZoneTypeConfig>::TypeHandle | 649 template TypeImpl<ZoneTypeConfig>::TypeHandle |
649 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( | 650 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( |
650 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); | 651 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); |
651 template TypeImpl<HeapTypeConfig>::TypeHandle | 652 template TypeImpl<HeapTypeConfig>::TypeHandle |
652 TypeImpl<HeapTypeConfig>::Convert<Type>( | 653 TypeImpl<HeapTypeConfig>::Convert<Type>( |
653 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); | 654 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); |
654 | 655 |
655 | 656 |
656 } } // namespace v8::internal | 657 } } // namespace v8::internal |
OLD | NEW |