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 5005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5016 // appropriate. | 5016 // appropriate. |
5017 LookupResult result(isolate); | 5017 LookupResult result(isolate); |
5018 receiver->LocalLookup(key, &result); | 5018 receiver->LocalLookup(key, &result); |
5019 if (result.IsField()) { | 5019 if (result.IsField()) { |
5020 int offset = result.GetFieldIndex().field_index(); | 5020 int offset = result.GetFieldIndex().field_index(); |
5021 // Do not track double fields in the keyed lookup cache. Reading | 5021 // Do not track double fields in the keyed lookup cache. Reading |
5022 // double values requires boxing. | 5022 // double values requires boxing. |
5023 if (!result.representation().IsDouble()) { | 5023 if (!result.representation().IsDouble()) { |
5024 keyed_lookup_cache->Update(receiver_map, key, offset); | 5024 keyed_lookup_cache->Update(receiver_map, key, offset); |
5025 } | 5025 } |
5026 return receiver->FastPropertyAt(result.representation(), offset); | 5026 HandleScope scope(isolate); |
| 5027 return *JSObject::FastPropertyAt( |
| 5028 handle(receiver, isolate), result.representation(), offset); |
5027 } | 5029 } |
5028 } else { | 5030 } else { |
5029 // Attempt dictionary lookup. | 5031 // Attempt dictionary lookup. |
5030 NameDictionary* dictionary = receiver->property_dictionary(); | 5032 NameDictionary* dictionary = receiver->property_dictionary(); |
5031 int entry = dictionary->FindEntry(key); | 5033 int entry = dictionary->FindEntry(key); |
5032 if ((entry != NameDictionary::kNotFound) && | 5034 if ((entry != NameDictionary::kNotFound) && |
5033 (dictionary->DetailsAt(entry).type() == NORMAL)) { | 5035 (dictionary->DetailsAt(entry).type() == NORMAL)) { |
5034 Object* value = dictionary->ValueAt(entry); | 5036 Object* value = dictionary->ValueAt(entry); |
5035 if (!receiver->IsGlobalObject()) return value; | 5037 if (!receiver->IsGlobalObject()) return value; |
5036 value = PropertyCell::cast(value)->value(); | 5038 value = PropertyCell::cast(value)->value(); |
(...skipping 10040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15077 } | 15079 } |
15078 } | 15080 } |
15079 | 15081 |
15080 | 15082 |
15081 void Runtime::OutOfMemory() { | 15083 void Runtime::OutOfMemory() { |
15082 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); | 15084 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); |
15083 UNREACHABLE(); | 15085 UNREACHABLE(); |
15084 } | 15086 } |
15085 | 15087 |
15086 } } // namespace v8::internal | 15088 } } // namespace v8::internal |
OLD | NEW |