OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" |
8 #include "src/ic/ic-inl.h" | 8 #include "src/ic/ic-inl.h" |
9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
10 | 10 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 CompareNilICStub* stub) { | 237 CompareNilICStub* stub) { |
238 Isolate* isolate = receiver_map->GetIsolate(); | 238 Isolate* isolate = receiver_map->GetIsolate(); |
239 Handle<String> name(isolate->heap()->empty_string()); | 239 Handle<String> name(isolate->heap()->empty_string()); |
240 if (!receiver_map->is_dictionary_map()) { | 240 if (!receiver_map->is_dictionary_map()) { |
241 Handle<Code> cached_ic = | 241 Handle<Code> cached_ic = |
242 Find(name, receiver_map, Code::COMPARE_NIL_IC, stub->GetExtraICState()); | 242 Find(name, receiver_map, Code::COMPARE_NIL_IC, stub->GetExtraICState()); |
243 if (!cached_ic.is_null()) return cached_ic; | 243 if (!cached_ic.is_null()) return cached_ic; |
244 } | 244 } |
245 | 245 |
246 Code::FindAndReplacePattern pattern; | 246 Code::FindAndReplacePattern pattern; |
247 pattern.Add(isolate->factory()->meta_map(), receiver_map); | 247 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); |
| 248 pattern.Add(isolate->factory()->meta_map(), cell); |
248 Handle<Code> ic = stub->GetCodeCopy(pattern); | 249 Handle<Code> ic = stub->GetCodeCopy(pattern); |
249 | 250 |
250 if (!receiver_map->is_dictionary_map()) { | 251 if (!receiver_map->is_dictionary_map()) { |
251 Map::UpdateCodeCache(receiver_map, name, ic); | 252 Map::UpdateCodeCache(receiver_map, name, ic); |
252 } | 253 } |
253 | 254 |
254 return ic; | 255 return ic; |
255 } | 256 } |
256 | 257 |
257 | 258 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 455 |
455 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); | 456 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); |
456 | 457 |
457 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); | 458 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); |
458 } | 459 } |
459 | 460 |
460 | 461 |
461 #undef __ | 462 #undef __ |
462 } | 463 } |
463 } // namespace v8::internal | 464 } // namespace v8::internal |
OLD | NEW |