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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 Object* result = NULL; | 702 Object* result = NULL; |
703 // Dictionary has been allocated with sufficient size for all elements. | 703 // Dictionary has been allocated with sufficient size for all elements. |
704 ASSERT(maybe_result->ToObject(&result)); | 704 ASSERT(maybe_result->ToObject(&result)); |
705 ASSERT(*dictionary_ == result); | 705 ASSERT(*dictionary_ == result); |
706 #endif | 706 #endif |
707 } | 707 } |
708 | 708 |
709 | 709 |
710 Representation Representation::FromType(TypeInfo info) { | 710 Representation Representation::FromType(TypeInfo info) { |
711 if (info.IsUninitialized()) return Representation::None(); | 711 if (info.IsUninitialized()) return Representation::None(); |
712 // TODO(verwaest): Return Smi rather than Integer32. | 712 if (info.IsSmi()) return Representation::Smi(); |
713 if (info.IsSmi()) return Representation::Integer32(); | |
714 if (info.IsInteger32()) return Representation::Integer32(); | 713 if (info.IsInteger32()) return Representation::Integer32(); |
715 if (info.IsDouble()) return Representation::Double(); | 714 if (info.IsDouble()) return Representation::Double(); |
716 if (info.IsNumber()) return Representation::Double(); | 715 if (info.IsNumber()) return Representation::Double(); |
717 return Representation::Tagged(); | 716 return Representation::Tagged(); |
718 } | 717 } |
719 | 718 |
720 | 719 |
721 } } // namespace v8::internal | 720 } } // namespace v8::internal |
OLD | NEW |