| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 uint32_t u; | 157 uint32_t u; |
| 158 if (value->ToInt32(&i)) return Smi::IsValid(i) ? kSmi : kOtherSigned32; | 158 if (value->ToInt32(&i)) return Smi::IsValid(i) ? kSmi : kOtherSigned32; |
| 159 if (value->ToUint32(&u)) return kUnsigned32; | 159 if (value->ToUint32(&u)) return kUnsigned32; |
| 160 return kDouble; | 160 return kDouble; |
| 161 } | 161 } |
| 162 if (map->instance_type() == ODDBALL_TYPE) { | 162 if (map->instance_type() == ODDBALL_TYPE) { |
| 163 if (value->IsUndefined()) return kUndefined; | 163 if (value->IsUndefined()) return kUndefined; |
| 164 if (value->IsNull()) return kNull; | 164 if (value->IsNull()) return kNull; |
| 165 if (value->IsBoolean()) return kBoolean; | 165 if (value->IsBoolean()) return kBoolean; |
| 166 if (value->IsTheHole()) return kAny; // TODO(rossberg): kNone? | 166 if (value->IsTheHole()) return kAny; // TODO(rossberg): kNone? |
| 167 if (value->IsUninitialized()) return kNone; |
| 167 UNREACHABLE(); | 168 UNREACHABLE(); |
| 168 } | 169 } |
| 169 return LubBitset(map); | 170 return LubBitset(map); |
| 170 } | 171 } |
| 171 | 172 |
| 172 | 173 |
| 173 template<class Config> | 174 template<class Config> |
| 174 int TypeImpl<Config>::LubBitset(i::Map* map) { | 175 int TypeImpl<Config>::LubBitset(i::Map* map) { |
| 175 switch (map->instance_type()) { | 176 switch (map->instance_type()) { |
| 176 case STRING_TYPE: | 177 case STRING_TYPE: |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 | 647 |
| 647 template TypeImpl<ZoneTypeConfig>::TypeHandle | 648 template TypeImpl<ZoneTypeConfig>::TypeHandle |
| 648 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( | 649 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( |
| 649 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); | 650 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); |
| 650 template TypeImpl<HeapTypeConfig>::TypeHandle | 651 template TypeImpl<HeapTypeConfig>::TypeHandle |
| 651 TypeImpl<HeapTypeConfig>::Convert<Type>( | 652 TypeImpl<HeapTypeConfig>::Convert<Type>( |
| 652 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); | 653 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); |
| 653 | 654 |
| 654 | 655 |
| 655 } } // namespace v8::internal | 656 } } // namespace v8::internal |
| OLD | NEW |