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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 | 577 |
578 | 578 |
579 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) { | 579 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) { |
580 // Return the constant value. | 580 // Return the constant value. |
581 __ li(v0, value); | 581 __ li(v0, value); |
582 __ Ret(); | 582 __ Ret(); |
583 } | 583 } |
584 | 584 |
585 | 585 |
586 void NamedLoadHandlerCompiler::GenerateLoadCallback( | 586 void NamedLoadHandlerCompiler::GenerateLoadCallback( |
587 Register reg, Handle<ExecutableAccessorInfo> callback) { | 587 Register reg, Handle<AccessorInfo> callback) { |
588 // Build AccessorInfo::args_ list on the stack and push property name below | 588 // Build AccessorInfo::args_ list on the stack and push property name below |
589 // the exit frame to make GC aware of them and store pointers to them. | 589 // the exit frame to make GC aware of them and store pointers to them. |
590 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); | 590 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); |
591 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); | 591 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); |
592 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); | 592 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); |
593 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); | 593 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); |
594 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); | 594 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); |
595 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); | 595 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); |
596 STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); | 596 STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); |
597 DCHECK(!scratch2().is(reg)); | 597 DCHECK(!scratch2().is(reg)); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 DCHECK(holder()->HasNamedInterceptor()); | 698 DCHECK(holder()->HasNamedInterceptor()); |
699 DCHECK(!holder()->GetNamedInterceptor()->getter()->IsUndefined()); | 699 DCHECK(!holder()->GetNamedInterceptor()->getter()->IsUndefined()); |
700 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(), | 700 PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(), |
701 holder()); | 701 holder()); |
702 | 702 |
703 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor); | 703 __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor); |
704 } | 704 } |
705 | 705 |
706 | 706 |
707 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 707 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
708 Handle<JSObject> object, Handle<Name> name, | 708 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback) { |
709 Handle<ExecutableAccessorInfo> callback) { | |
710 Register holder_reg = Frontend(name); | 709 Register holder_reg = Frontend(name); |
711 | 710 |
712 __ Push(receiver(), holder_reg); // Receiver. | 711 __ Push(receiver(), holder_reg); // Receiver. |
713 // If the callback cannot leak, then push the callback directly, | 712 // If the callback cannot leak, then push the callback directly, |
714 // otherwise wrap it in a weak cell. | 713 // otherwise wrap it in a weak cell. |
715 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { | 714 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { |
716 __ li(at, Operand(callback)); | 715 __ li(at, Operand(callback)); |
717 } else { | 716 } else { |
718 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); | 717 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); |
719 __ li(at, Operand(cell)); | 718 __ li(at, Operand(cell)); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // Return the generated code. | 780 // Return the generated code. |
782 return GetCode(kind(), Code::NORMAL, name); | 781 return GetCode(kind(), Code::NORMAL, name); |
783 } | 782 } |
784 | 783 |
785 | 784 |
786 #undef __ | 785 #undef __ |
787 } // namespace internal | 786 } // namespace internal |
788 } // namespace v8 | 787 } // namespace v8 |
789 | 788 |
790 #endif // V8_TARGET_ARCH_MIPS | 789 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |