OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
719 __ push(name); | 719 __ push(name); |
720 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); | 720 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); |
721 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); | 721 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); |
722 Register scratch = name; | 722 Register scratch = name; |
723 __ mov(scratch, Operand(interceptor)); | 723 __ mov(scratch, Operand(interceptor)); |
724 __ push(scratch); | 724 __ push(scratch); |
725 __ push(receiver); | 725 __ push(receiver); |
726 __ push(holder); | 726 __ push(holder); |
727 __ ldr(scratch, FieldMemOperand(scratch, InterceptorInfo::kDataOffset)); | 727 __ ldr(scratch, FieldMemOperand(scratch, InterceptorInfo::kDataOffset)); |
728 __ push(scratch); | 728 __ push(scratch); |
729 __ mov(scratch, Operand(ExternalReference::isolate_address())); | 729 __ mov(scratch, Operand(ExternalReference::isolate_address(masm->isolate()))); |
730 __ push(scratch); | 730 __ push(scratch); |
731 } | 731 } |
732 | 732 |
733 | 733 |
734 static void CompileCallLoadPropertyWithInterceptor( | 734 static void CompileCallLoadPropertyWithInterceptor( |
735 MacroAssembler* masm, | 735 MacroAssembler* masm, |
736 Register receiver, | 736 Register receiver, |
737 Register holder, | 737 Register holder, |
738 Register name, | 738 Register name, |
739 Handle<JSObject> holder_obj) { | 739 Handle<JSObject> holder_obj) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
791 | 791 |
792 // Pass the additional arguments. | 792 // Pass the additional arguments. |
793 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 793 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
794 Handle<Object> call_data(api_call_info->data(), masm->isolate()); | 794 Handle<Object> call_data(api_call_info->data(), masm->isolate()); |
795 if (masm->isolate()->heap()->InNewSpace(*call_data)) { | 795 if (masm->isolate()->heap()->InNewSpace(*call_data)) { |
796 __ Move(r0, api_call_info); | 796 __ Move(r0, api_call_info); |
797 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset)); | 797 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset)); |
798 } else { | 798 } else { |
799 __ Move(r6, call_data); | 799 __ Move(r6, call_data); |
800 } | 800 } |
801 __ mov(r7, Operand(ExternalReference::isolate_address())); | 801 __ mov(r7, Operand(ExternalReference::isolate_address(masm->isolate()))); |
802 // Store JS function, call data and isolate. | 802 // Store JS function, call data and isolate. |
803 __ stm(ib, sp, r5.bit() | r6.bit() | r7.bit()); | 803 __ stm(ib, sp, r5.bit() | r6.bit() | r7.bit()); |
804 | 804 |
805 // Prepare arguments. | 805 // Prepare arguments. |
806 __ add(r2, sp, Operand(3 * kPointerSize)); | 806 __ add(r2, sp, Operand(3 * kPointerSize)); |
807 | 807 |
808 // Allocate the v8::Arguments structure in the arguments' space since | 808 // Allocate the v8::Arguments structure in the arguments' space since |
809 // it's not controlled by GC. | 809 // it's not controlled by GC. |
810 const int kApiStackSpace = 4; | 810 const int kApiStackSpace = 4; |
811 | 811 |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1288 Handle<ExecutableAccessorInfo> callback) { | 1288 Handle<ExecutableAccessorInfo> callback) { |
1289 // Build AccessorInfo::args_ list on the stack and push property name below | 1289 // Build AccessorInfo::args_ list on the stack and push property name below |
1290 // the exit frame to make GC aware of them and store pointers to them. | 1290 // the exit frame to make GC aware of them and store pointers to them. |
1291 __ push(receiver()); | 1291 __ push(receiver()); |
1292 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ | 1292 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ |
1293 if (heap()->InNewSpace(callback->data())) { | 1293 if (heap()->InNewSpace(callback->data())) { |
1294 __ Move(scratch3(), callback); | 1294 __ Move(scratch3(), callback); |
1295 __ ldr(scratch3(), FieldMemOperand(scratch3(), | 1295 __ ldr(scratch3(), FieldMemOperand(scratch3(), |
1296 ExecutableAccessorInfo::kDataOffset)); | 1296 ExecutableAccessorInfo::kDataOffset)); |
1297 } else { | 1297 } else { |
1298 __ Move(scratch3(), Handle<Object>(callback->data(), | 1298 __ Move(scratch3(), Handle<Object>(callback->data(), masm()->isolate())); |
Sven Panne
2013/04/23 13:18:08
StubCompiler has an isolate() method, so use this
| |
1299 callback->GetIsolate())); | |
1300 } | 1299 } |
1301 __ Push(reg, scratch3()); | 1300 __ Push(reg, scratch3()); |
1302 __ mov(scratch3(), Operand(ExternalReference::isolate_address())); | 1301 __ mov(scratch3(), |
1302 Operand(ExternalReference::isolate_address(masm()->isolate()))); | |
1303 __ Push(scratch3(), name()); | 1303 __ Push(scratch3(), name()); |
1304 __ mov(r0, sp); // r0 = Handle<Name> | 1304 __ mov(r0, sp); // r0 = Handle<Name> |
1305 | 1305 |
1306 const int kApiStackSpace = 1; | 1306 const int kApiStackSpace = 1; |
1307 FrameScope frame_scope(masm(), StackFrame::MANUAL); | 1307 FrameScope frame_scope(masm(), StackFrame::MANUAL); |
1308 __ EnterExitFrame(false, kApiStackSpace); | 1308 __ EnterExitFrame(false, kApiStackSpace); |
1309 | 1309 |
1310 // Create AccessorInfo instance on the stack above the exit frame with | 1310 // Create AccessorInfo instance on the stack above the exit frame with |
1311 // scratch2 (internal::Object** args_) as the data. | 1311 // scratch2 (internal::Object** args_) as the data. |
1312 __ str(scratch2(), MemOperand(sp, 1 * kPointerSize)); | 1312 __ str(scratch2(), MemOperand(sp, 1 * kPointerSize)); |
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3667 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3667 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
3668 } | 3668 } |
3669 } | 3669 } |
3670 | 3670 |
3671 | 3671 |
3672 #undef __ | 3672 #undef __ |
3673 | 3673 |
3674 } } // namespace v8::internal | 3674 } } // namespace v8::internal |
3675 | 3675 |
3676 #endif // V8_TARGET_ARCH_ARM | 3676 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |