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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 __ jmp(&success); | 585 __ jmp(&success); |
586 GenerateRestoreName(miss, name); | 586 GenerateRestoreName(miss, name); |
587 if (IC::ICUseVector(kind())) PopVectorAndSlot(); | 587 if (IC::ICUseVector(kind())) PopVectorAndSlot(); |
588 TailCallBuiltin(masm(), MissBuiltin(kind())); | 588 TailCallBuiltin(masm(), MissBuiltin(kind())); |
589 __ bind(&success); | 589 __ bind(&success); |
590 } | 590 } |
591 } | 591 } |
592 | 592 |
593 | 593 |
594 void NamedLoadHandlerCompiler::GenerateLoadCallback( | 594 void NamedLoadHandlerCompiler::GenerateLoadCallback( |
595 Register reg, Handle<ExecutableAccessorInfo> callback) { | 595 Register reg, Handle<AccessorInfo> callback) { |
596 // Insert additional parameters into the stack frame above return address. | 596 // Insert additional parameters into the stack frame above return address. |
597 DCHECK(!scratch4().is(reg)); | 597 DCHECK(!scratch4().is(reg)); |
598 __ PopReturnAddressTo(scratch4()); | 598 __ PopReturnAddressTo(scratch4()); |
599 | 599 |
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); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 __ PopReturnAddressTo(scratch2()); | 715 __ PopReturnAddressTo(scratch2()); |
716 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(), | 716 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(), |
717 holder()); | 717 holder()); |
718 __ PushReturnAddressFrom(scratch2()); | 718 __ PushReturnAddressFrom(scratch2()); |
719 | 719 |
720 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor); | 720 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor); |
721 } | 721 } |
722 | 722 |
723 | 723 |
724 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 724 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
725 Handle<JSObject> object, Handle<Name> name, | 725 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback) { |
726 Handle<ExecutableAccessorInfo> callback) { | |
727 Register holder_reg = Frontend(name); | 726 Register holder_reg = Frontend(name); |
728 | 727 |
729 __ PopReturnAddressTo(scratch1()); | 728 __ PopReturnAddressTo(scratch1()); |
730 __ Push(receiver()); | 729 __ Push(receiver()); |
731 __ Push(holder_reg); | 730 __ Push(holder_reg); |
732 // If the callback cannot leak, then push the callback directly, | 731 // If the callback cannot leak, then push the callback directly, |
733 // otherwise wrap it in a weak cell. | 732 // otherwise wrap it in a weak cell. |
734 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { | 733 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { |
735 __ Push(callback); | 734 __ Push(callback); |
736 } else { | 735 } else { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 // Return the generated code. | 804 // Return the generated code. |
806 return GetCode(kind(), Code::NORMAL, name); | 805 return GetCode(kind(), Code::NORMAL, name); |
807 } | 806 } |
808 | 807 |
809 | 808 |
810 #undef __ | 809 #undef __ |
811 } // namespace internal | 810 } // namespace internal |
812 } // namespace v8 | 811 } // namespace v8 |
813 | 812 |
814 #endif // V8_TARGET_ARCH_X64 | 813 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |