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

Side by Side Diff: src/ic/x87/handler-compiler-x87.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/ic/x64/handler-compiler-x64.cc ('k') | src/log.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 5 #if V8_TARGET_ARCH_X87
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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 __ jmp(&success); 586 __ jmp(&success);
587 GenerateRestoreName(miss, name); 587 GenerateRestoreName(miss, name);
588 if (IC::ICUseVector(kind())) PopVectorAndSlot(); 588 if (IC::ICUseVector(kind())) PopVectorAndSlot();
589 TailCallBuiltin(masm(), MissBuiltin(kind())); 589 TailCallBuiltin(masm(), MissBuiltin(kind()));
590 __ bind(&success); 590 __ bind(&success);
591 } 591 }
592 } 592 }
593 593
594 594
595 void NamedLoadHandlerCompiler::GenerateLoadCallback( 595 void NamedLoadHandlerCompiler::GenerateLoadCallback(
596 Register reg, Handle<ExecutableAccessorInfo> callback) { 596 Register reg, Handle<AccessorInfo> callback) {
597 // Insert additional parameters into the stack frame above return address. 597 // Insert additional parameters into the stack frame above return address.
598 DCHECK(!scratch3().is(reg)); 598 DCHECK(!scratch3().is(reg));
599 __ pop(scratch3()); // Get return address to place it below. 599 __ pop(scratch3()); // Get return address to place it below.
600 600
601 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); 601 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0);
602 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); 602 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1);
603 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); 603 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2);
604 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); 604 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3);
605 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); 605 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4);
606 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); 606 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5);
607 __ push(receiver()); // receiver 607 __ push(receiver()); // receiver
608 // Push data from ExecutableAccessorInfo. 608 // Push data from AccessorInfo.
609 Handle<Object> data(callback->data(), isolate()); 609 Handle<Object> data(callback->data(), isolate());
610 if (data->IsUndefined() || data->IsSmi()) { 610 if (data->IsUndefined() || data->IsSmi()) {
611 __ push(Immediate(data)); 611 __ push(Immediate(data));
612 } else { 612 } else {
613 DCHECK(!scratch2().is(reg)); 613 DCHECK(!scratch2().is(reg));
614 Handle<WeakCell> cell = 614 Handle<WeakCell> cell =
615 isolate()->factory()->NewWeakCell(Handle<HeapObject>::cast(data)); 615 isolate()->factory()->NewWeakCell(Handle<HeapObject>::cast(data));
616 // The callback is alive if this instruction is executed, 616 // The callback is alive if this instruction is executed,
617 // so the weak cell is not cleared and points to data. 617 // so the weak cell is not cleared and points to data.
618 __ GetWeakValue(scratch2(), cell); 618 __ GetWeakValue(scratch2(), cell);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 __ pop(scratch2()); // save old return address 724 __ pop(scratch2()); // save old return address
725 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(), 725 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
726 holder()); 726 holder());
727 __ push(scratch2()); // restore old return address 727 __ push(scratch2()); // restore old return address
728 728
729 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor); 729 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
730 } 730 }
731 731
732 732
733 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( 733 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
734 Handle<JSObject> object, Handle<Name> name, 734 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback) {
735 Handle<ExecutableAccessorInfo> callback) {
736 Register holder_reg = Frontend(name); 735 Register holder_reg = Frontend(name);
737 736
738 __ pop(scratch1()); // remove the return address 737 __ pop(scratch1()); // remove the return address
739 __ push(receiver()); 738 __ push(receiver());
740 __ push(holder_reg); 739 __ push(holder_reg);
741 // If the callback cannot leak, then push the callback directly, 740 // If the callback cannot leak, then push the callback directly,
742 // otherwise wrap it in a weak cell. 741 // otherwise wrap it in a weak cell.
743 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { 742 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) {
744 __ Push(callback); 743 __ Push(callback);
745 } else { 744 } else {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 // Return the generated code. 813 // Return the generated code.
815 return GetCode(kind(), Code::NORMAL, name); 814 return GetCode(kind(), Code::NORMAL, name);
816 } 815 }
817 816
818 817
819 #undef __ 818 #undef __
820 } // namespace internal 819 } // namespace internal
821 } // namespace v8 820 } // namespace v8
822 821
823 #endif // V8_TARGET_ARCH_X87 822 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698