| 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 return context->symbol_function()->instance_prototype(); | 1021 return context->symbol_function()->instance_prototype(); |
| 1022 } | 1022 } |
| 1023 if (heap_object->IsBoolean()) { | 1023 if (heap_object->IsBoolean()) { |
| 1024 return context->boolean_function()->instance_prototype(); | 1024 return context->boolean_function()->instance_prototype(); |
| 1025 } else { | 1025 } else { |
| 1026 return isolate->heap()->null_value(); | 1026 return isolate->heap()->null_value(); |
| 1027 } | 1027 } |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 | 1030 |
| 1031 Map* Object::GetMarkerMap(Isolate* isolate) { |
| 1032 if (IsSmi()) return isolate->heap()->heap_number_map(); |
| 1033 return HeapObject::cast(this)->map(); |
| 1034 } |
| 1035 |
| 1036 |
| 1031 Object* Object::GetHash() { | 1037 Object* Object::GetHash() { |
| 1032 // The object is either a number, a name, an odd-ball, | 1038 // The object is either a number, a name, an odd-ball, |
| 1033 // a real JS object, or a Harmony proxy. | 1039 // a real JS object, or a Harmony proxy. |
| 1034 if (IsNumber()) { | 1040 if (IsNumber()) { |
| 1035 uint32_t hash = ComputeLongHash(double_to_uint64(Number())); | 1041 uint32_t hash = ComputeLongHash(double_to_uint64(Number())); |
| 1036 return Smi::FromInt(hash & Smi::kMaxValue); | 1042 return Smi::FromInt(hash & Smi::kMaxValue); |
| 1037 } | 1043 } |
| 1038 if (IsName()) { | 1044 if (IsName()) { |
| 1039 uint32_t hash = Name::cast(this)->Hash(); | 1045 uint32_t hash = Name::cast(this)->Hash(); |
| 1040 return Smi::FromInt(hash); | 1046 return Smi::FromInt(hash); |
| (...skipping 15516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16557 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16563 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16558 static const char* error_messages_[] = { | 16564 static const char* error_messages_[] = { |
| 16559 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16565 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16560 }; | 16566 }; |
| 16561 #undef ERROR_MESSAGES_TEXTS | 16567 #undef ERROR_MESSAGES_TEXTS |
| 16562 return error_messages_[reason]; | 16568 return error_messages_[reason]; |
| 16563 } | 16569 } |
| 16564 | 16570 |
| 16565 | 16571 |
| 16566 } } // namespace v8::internal | 16572 } } // namespace v8::internal |
| OLD | NEW |