OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 } | 971 } |
972 } | 972 } |
973 | 973 |
974 | 974 |
975 Handle<Object> Object::GetPrototype(Isolate* isolate, | 975 Handle<Object> Object::GetPrototype(Isolate* isolate, |
976 Handle<Object> object) { | 976 Handle<Object> object) { |
977 return handle(object->GetPrototype(isolate), isolate); | 977 return handle(object->GetPrototype(isolate), isolate); |
978 } | 978 } |
979 | 979 |
980 | 980 |
981 Map* Object::GetMarkerMap(Isolate* isolate) { | |
982 if (IsSmi()) return isolate->heap()->heap_number_map(); | |
983 return HeapObject::cast(this)->map(); | |
984 } | |
985 | |
986 | |
987 Object* Object::GetHash() { | 981 Object* Object::GetHash() { |
988 // The object is either a number, a name, an odd-ball, | 982 // The object is either a number, a name, an odd-ball, |
989 // a real JS object, or a Harmony proxy. | 983 // a real JS object, or a Harmony proxy. |
990 if (IsNumber()) { | 984 if (IsNumber()) { |
991 uint32_t hash = ComputeLongHash(double_to_uint64(Number())); | 985 uint32_t hash = ComputeLongHash(double_to_uint64(Number())); |
992 return Smi::FromInt(hash & Smi::kMaxValue); | 986 return Smi::FromInt(hash & Smi::kMaxValue); |
993 } | 987 } |
994 if (IsName()) { | 988 if (IsName()) { |
995 uint32_t hash = Name::cast(this)->Hash(); | 989 uint32_t hash = Name::cast(this)->Hash(); |
996 return Smi::FromInt(hash); | 990 return Smi::FromInt(hash); |
(...skipping 16199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17196 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17190 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17197 static const char* error_messages_[] = { | 17191 static const char* error_messages_[] = { |
17198 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17192 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17199 }; | 17193 }; |
17200 #undef ERROR_MESSAGES_TEXTS | 17194 #undef ERROR_MESSAGES_TEXTS |
17201 return error_messages_[reason]; | 17195 return error_messages_[reason]; |
17202 } | 17196 } |
17203 | 17197 |
17204 | 17198 |
17205 } } // namespace v8::internal | 17199 } } // namespace v8::internal |
OLD | NEW |