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/cpu-profiler.h" | 7 #include "src/cpu-profiler.h" |
8 #include "src/ic/call-optimization.h" | 8 #include "src/ic/call-optimization.h" |
9 #include "src/ic/handler-compiler.h" | 9 #include "src/ic/handler-compiler.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 last = JSObject::cast(iter.GetCurrent()); | 325 last = JSObject::cast(iter.GetCurrent()); |
326 iter.Advance(); | 326 iter.Advance(); |
327 } | 327 } |
328 auto last_handle = handle(last); | 328 auto last_handle = handle(last); |
329 set_holder(last_handle); | 329 set_holder(last_handle); |
330 } | 330 } |
331 Register reg = FrontendHeader(receiver(), it->name(), &miss); | 331 Register reg = FrontendHeader(receiver(), it->name(), &miss); |
332 // Reset the holder so further calculations are correct. | 332 // Reset the holder so further calculations are correct. |
333 set_holder(holder_orig); | 333 set_holder(holder_orig); |
334 if (lost_holder_register) { | 334 if (lost_holder_register) { |
335 // Reload lost holder register. | 335 if (*it->GetReceiver() == *holder()) { |
336 auto cell = isolate()->factory()->NewWeakCell(holder()); | 336 reg = receiver(); |
337 __ LoadWeakValue(reg, cell, &miss); | 337 } else { |
| 338 // Reload lost holder register. |
| 339 auto cell = isolate()->factory()->NewWeakCell(holder()); |
| 340 __ LoadWeakValue(reg, cell, &miss); |
| 341 } |
338 } | 342 } |
339 FrontendFooter(it->name(), &miss); | 343 FrontendFooter(it->name(), &miss); |
340 InterceptorVectorSlotPop(reg); | 344 InterceptorVectorSlotPop(reg); |
341 if (inline_followup) { | 345 if (inline_followup) { |
342 // TODO(368): Compile in the whole chain: all the interceptors in | 346 // TODO(368): Compile in the whole chain: all the interceptors in |
343 // prototypes and ultimate answer. | 347 // prototypes and ultimate answer. |
344 GenerateLoadInterceptorWithFollowup(it, reg); | 348 GenerateLoadInterceptorWithFollowup(it, reg); |
345 } else { | 349 } else { |
346 GenerateLoadInterceptor(reg); | 350 GenerateLoadInterceptor(reg); |
347 } | 351 } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 541 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
538 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 542 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
539 } | 543 } |
540 } | 544 } |
541 | 545 |
542 handlers->Add(cached_stub); | 546 handlers->Add(cached_stub); |
543 } | 547 } |
544 } | 548 } |
545 } | 549 } |
546 } // namespace v8::internal | 550 } // namespace v8::internal |
OLD | NEW |