| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1872 Object* obj = cache->Put(receiver_map, key, offset); | 1872 Object* obj = cache->Put(receiver_map, key, offset); |
| 1873 if (obj->IsFailure()) return obj; | 1873 if (obj->IsFailure()) return obj; |
| 1874 Heap::SetKeyedLookupCache(LookupCache::cast(obj)); | 1874 Heap::SetKeyedLookupCache(LookupCache::cast(obj)); |
| 1875 Object* value = receiver->FastPropertyAt(offset); | 1875 Object* value = receiver->FastPropertyAt(offset); |
| 1876 return value->IsTheHole() ? Heap::undefined_value() : value; | 1876 return value->IsTheHole() ? Heap::undefined_value() : value; |
| 1877 } | 1877 } |
| 1878 } else { | 1878 } else { |
| 1879 // Attempt dictionary lookup. | 1879 // Attempt dictionary lookup. |
| 1880 Dictionary* dictionary = receiver->property_dictionary(); | 1880 Dictionary* dictionary = receiver->property_dictionary(); |
| 1881 int entry = dictionary->FindStringEntry(key); | 1881 int entry = dictionary->FindStringEntry(key); |
| 1882 if ((entry != DescriptorArray::kNotFound) && | 1882 if ((entry != Dictionary::kNotFound) && |
| 1883 (dictionary->DetailsAt(entry).type() == NORMAL)) { | 1883 (dictionary->DetailsAt(entry).type() == NORMAL)) { |
| 1884 Object* value = dictionary->ValueAt(entry); | 1884 Object* value = dictionary->ValueAt(entry); |
| 1885 if (receiver->IsJSGlobalObject()) { | 1885 if (receiver->IsJSGlobalObject()) { |
| 1886 value = JSGlobalPropertyCell::cast(value)->value(); | 1886 value = JSGlobalPropertyCell::cast(value)->value(); |
| 1887 } | 1887 } |
| 1888 return value; | 1888 return value; |
| 1889 } | 1889 } |
| 1890 } | 1890 } |
| 1891 } | 1891 } |
| 1892 | 1892 |
| (...skipping 4238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6131 } else { | 6131 } else { |
| 6132 // Handle last resort GC and make sure to allow future allocations | 6132 // Handle last resort GC and make sure to allow future allocations |
| 6133 // to grow the heap without causing GCs (if possible). | 6133 // to grow the heap without causing GCs (if possible). |
| 6134 Counters::gc_last_resort_from_js.Increment(); | 6134 Counters::gc_last_resort_from_js.Increment(); |
| 6135 Heap::CollectAllGarbage(); | 6135 Heap::CollectAllGarbage(); |
| 6136 } | 6136 } |
| 6137 } | 6137 } |
| 6138 | 6138 |
| 6139 | 6139 |
| 6140 } } // namespace v8::internal | 6140 } } // namespace v8::internal |
| OLD | NEW |