Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: src/ic/handler-compiler.cc

Issue 1036843002: fix nonmasking interceptor ic with interceptor on receiver (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698