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

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

Issue 1892533004: Change calling convention of CallApiGetterStub to accept the AccessorInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 8 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
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/ic/handler-compiler.h" 5 #include "src/ic/handler-compiler.h"
6 6
7 #include "src/field-type.h" 7 #include "src/field-type.h"
8 #include "src/ic/call-optimization.h" 8 #include "src/ic/call-optimization.h"
9 #include "src/ic/ic-inl.h" 9 #include "src/ic/ic-inl.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 if (inline_followup) { 351 if (inline_followup) {
352 // TODO(368): Compile in the whole chain: all the interceptors in 352 // TODO(368): Compile in the whole chain: all the interceptors in
353 // prototypes and ultimate answer. 353 // prototypes and ultimate answer.
354 GenerateLoadInterceptorWithFollowup(it, reg); 354 GenerateLoadInterceptorWithFollowup(it, reg);
355 } else { 355 } else {
356 GenerateLoadInterceptor(reg); 356 GenerateLoadInterceptor(reg);
357 } 357 }
358 return GetCode(kind(), it->name()); 358 return GetCode(kind(), it->name());
359 } 359 }
360 360
361 void NamedLoadHandlerCompiler::GenerateLoadCallback(
362 Register reg, Handle<AccessorInfo> callback) {
363 DCHECK(receiver().is(ApiGetterDescriptor::ReceiverRegister()));
364 if (!reg.is(ApiGetterDescriptor::HolderRegister())) {
Jakob Kummerow 2016/04/18 13:22:35 You can drop this line; MacroAssembler::Move conta
365 __ Move(ApiGetterDescriptor::HolderRegister(), reg);
366 }
367 // The callback is alive if this instruction is executed,
368 // so the weak cell is not cleared and points to data.
369 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback);
370 __ GetWeakValue(ApiGetterDescriptor::CallbackRegister(), cell);
371
372 CallApiGetterStub stub(isolate());
373 __ TailCallStub(&stub);
374 }
361 375
362 void NamedLoadHandlerCompiler::GenerateLoadPostInterceptor( 376 void NamedLoadHandlerCompiler::GenerateLoadPostInterceptor(
363 LookupIterator* it, Register interceptor_reg) { 377 LookupIterator* it, Register interceptor_reg) {
364 Handle<JSObject> real_named_property_holder(it->GetHolder<JSObject>()); 378 Handle<JSObject> real_named_property_holder(it->GetHolder<JSObject>());
365 379
366 Handle<Map> holder_map(holder()->map()); 380 Handle<Map> holder_map(holder()->map());
367 set_map(holder_map); 381 set_map(holder_map);
368 set_holder(real_named_property_holder); 382 set_holder(real_named_property_holder);
369 383
370 Label miss; 384 Label miss;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 LoadICState state = LoadICState(kNoExtraICState); 608 LoadICState state = LoadICState(kNoExtraICState);
595 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); 609 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
596 } 610 }
597 } 611 }
598 612
599 handlers->Add(cached_stub); 613 handlers->Add(cached_stub);
600 } 614 }
601 } 615 }
602 } // namespace internal 616 } // namespace internal
603 } // namespace v8 617 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698