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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 Handle<HeapType> type) { | 172 Handle<HeapType> type) { |
173 InlineCacheHolderFlag flag = IC::GetCodeCacheFlag(*type); | 173 InlineCacheHolderFlag flag = IC::GetCodeCacheFlag(*type); |
174 Handle<Map> stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate()); | 174 Handle<Map> stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate()); |
175 // If no dictionary mode objects are present in the prototype chain, the load | 175 // If no dictionary mode objects are present in the prototype chain, the load |
176 // nonexistent IC stub can be shared for all names for a given map and we use | 176 // nonexistent IC stub can be shared for all names for a given map and we use |
177 // the empty string for the map cache in that case. If there are dictionary | 177 // the empty string for the map cache in that case. If there are dictionary |
178 // mode objects involved, we need to do negative lookups in the stub and | 178 // mode objects involved, we need to do negative lookups in the stub and |
179 // therefore the stub will be specific to the name. | 179 // therefore the stub will be specific to the name. |
180 Handle<Map> current_map = stub_holder; | 180 Handle<Map> current_map = stub_holder; |
181 Handle<Name> cache_name = current_map->is_dictionary_map() | 181 Handle<Name> cache_name = current_map->is_dictionary_map() |
182 ? name : Handle<Name>::cast(isolate()->factory()->empty_string()); | 182 ? name : Handle<Name>::cast(isolate()->factory()->nonexistent_symbol()); |
183 Handle<Object> next(current_map->prototype(), isolate()); | 183 Handle<Object> next(current_map->prototype(), isolate()); |
184 Handle<JSObject> last = Handle<JSObject>::null(); | 184 Handle<JSObject> last = Handle<JSObject>::null(); |
185 while (!next->IsNull()) { | 185 while (!next->IsNull()) { |
186 last = Handle<JSObject>::cast(next); | 186 last = Handle<JSObject>::cast(next); |
187 next = handle(current_map->prototype(), isolate()); | 187 next = handle(current_map->prototype(), isolate()); |
188 current_map = handle(Handle<HeapObject>::cast(next)->map()); | 188 current_map = handle(Handle<HeapObject>::cast(next)->map()); |
189 if (current_map->is_dictionary_map()) cache_name = name; | 189 if (current_map->is_dictionary_map()) cache_name = name; |
190 } | 190 } |
191 | 191 |
192 // Compile the stub that is either shared for all names or | 192 // Compile the stub that is either shared for all names or |
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 Handle<FunctionTemplateInfo>( | 1462 Handle<FunctionTemplateInfo>( |
1463 FunctionTemplateInfo::cast(signature->receiver())); | 1463 FunctionTemplateInfo::cast(signature->receiver())); |
1464 } | 1464 } |
1465 } | 1465 } |
1466 | 1466 |
1467 is_simple_api_call_ = true; | 1467 is_simple_api_call_ = true; |
1468 } | 1468 } |
1469 | 1469 |
1470 | 1470 |
1471 } } // namespace v8::internal | 1471 } } // namespace v8::internal |
OLD | NEW |