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

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

Issue 1600353003: [runtime] remove left-over distinction between AccessorInfo and ExecutableAccessorInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « src/factory.cc ('k') | src/ic/arm64/handler-compiler-arm64.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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 587
588 588
589 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) { 589 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) {
590 // Return the constant value. 590 // Return the constant value.
591 __ Move(r0, value); 591 __ Move(r0, value);
592 __ Ret(); 592 __ Ret();
593 } 593 }
594 594
595 595
596 void NamedLoadHandlerCompiler::GenerateLoadCallback( 596 void NamedLoadHandlerCompiler::GenerateLoadCallback(
597 Register reg, Handle<ExecutableAccessorInfo> callback) { 597 Register reg, Handle<AccessorInfo> callback) {
598 // Build AccessorInfo::args_ list on the stack and push property name below 598 // Build AccessorInfo::args_ list on the stack and push property name below
599 // the exit frame to make GC aware of them and store pointers to them. 599 // the exit frame to make GC aware of them and store pointers to them.
600 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); 600 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0);
601 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); 601 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1);
602 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); 602 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2);
603 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); 603 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3);
604 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); 604 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4);
605 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); 605 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5);
606 STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); 606 STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6);
607 DCHECK(!scratch2().is(reg)); 607 DCHECK(!scratch2().is(reg));
608 DCHECK(!scratch3().is(reg)); 608 DCHECK(!scratch3().is(reg));
609 DCHECK(!scratch4().is(reg)); 609 DCHECK(!scratch4().is(reg));
610 __ push(receiver()); 610 __ push(receiver());
611 // Push data from ExecutableAccessorInfo. 611 // Push data from AccessorInfo.
612 Handle<Object> data(callback->data(), isolate()); 612 Handle<Object> data(callback->data(), isolate());
613 if (data->IsUndefined() || data->IsSmi()) { 613 if (data->IsUndefined() || data->IsSmi()) {
614 __ Move(scratch3(), data); 614 __ Move(scratch3(), data);
615 } else { 615 } else {
616 Handle<WeakCell> cell = 616 Handle<WeakCell> cell =
617 isolate()->factory()->NewWeakCell(Handle<HeapObject>::cast(data)); 617 isolate()->factory()->NewWeakCell(Handle<HeapObject>::cast(data));
618 // The callback is alive if this instruction is executed, 618 // The callback is alive if this instruction is executed,
619 // so the weak cell is not cleared and points to data. 619 // so the weak cell is not cleared and points to data.
620 __ GetWeakValue(scratch3(), cell); 620 __ GetWeakValue(scratch3(), cell);
621 } 621 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 DCHECK(holder()->HasNamedInterceptor()); 707 DCHECK(holder()->HasNamedInterceptor());
708 DCHECK(!holder()->GetNamedInterceptor()->getter()->IsUndefined()); 708 DCHECK(!holder()->GetNamedInterceptor()->getter()->IsUndefined());
709 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(), 709 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
710 holder()); 710 holder());
711 711
712 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor); 712 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
713 } 713 }
714 714
715 715
716 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( 716 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
717 Handle<JSObject> object, Handle<Name> name, 717 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback) {
718 Handle<ExecutableAccessorInfo> callback) {
719 Register holder_reg = Frontend(name); 718 Register holder_reg = Frontend(name);
720 719
721 __ push(receiver()); // receiver 720 __ push(receiver()); // receiver
722 __ push(holder_reg); 721 __ push(holder_reg);
723 722
724 // If the callback cannot leak, then push the callback directly, 723 // If the callback cannot leak, then push the callback directly,
725 // otherwise wrap it in a weak cell. 724 // otherwise wrap it in a weak cell.
726 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { 725 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) {
727 __ mov(ip, Operand(callback)); 726 __ mov(ip, Operand(callback));
728 } else { 727 } else {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // Return the generated code. 790 // Return the generated code.
792 return GetCode(kind(), Code::NORMAL, name); 791 return GetCode(kind(), Code::NORMAL, name);
793 } 792 }
794 793
795 794
796 #undef __ 795 #undef __
797 } // namespace internal 796 } // namespace internal
798 } // namespace v8 797 } // namespace v8
799 798
800 #endif // V8_TARGET_ARCH_ARM 799 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698