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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 // -- sp[(argc + 3) * 4] : first JS argument | 704 // -- sp[(argc + 3) * 4] : first JS argument |
705 // -- sp[(argc + 4) * 4] : receiver | 705 // -- sp[(argc + 4) * 4] : receiver |
706 // ----------------------------------- | 706 // ----------------------------------- |
707 // Get the function and setup the context. | 707 // Get the function and setup the context. |
708 Handle<JSFunction> function = optimization.constant_function(); | 708 Handle<JSFunction> function = optimization.constant_function(); |
709 __ LoadHeapObject(r5, function); | 709 __ LoadHeapObject(r5, function); |
710 __ ldr(cp, FieldMemOperand(r5, JSFunction::kContextOffset)); | 710 __ ldr(cp, FieldMemOperand(r5, JSFunction::kContextOffset)); |
711 | 711 |
712 // Pass the additional arguments. | 712 // Pass the additional arguments. |
713 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 713 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
714 Handle<Object> call_data(api_call_info->data()); | 714 Handle<Object> call_data(api_call_info->data(), masm->isolate()); |
715 if (masm->isolate()->heap()->InNewSpace(*call_data)) { | 715 if (masm->isolate()->heap()->InNewSpace(*call_data)) { |
716 __ Move(r0, api_call_info); | 716 __ Move(r0, api_call_info); |
717 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset)); | 717 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset)); |
718 } else { | 718 } else { |
719 __ Move(r6, call_data); | 719 __ Move(r6, call_data); |
720 } | 720 } |
721 __ mov(r7, Operand(ExternalReference::isolate_address())); | 721 __ mov(r7, Operand(ExternalReference::isolate_address())); |
722 // Store JS function, call data and isolate. | 722 // Store JS function, call data and isolate. |
723 __ stm(ib, sp, r5.bit() | r6.bit() | r7.bit()); | 723 __ stm(ib, sp, r5.bit() | r6.bit() | r7.bit()); |
724 | 724 |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 | 1276 |
1277 // Build AccessorInfo::args_ list on the stack and push property name below | 1277 // Build AccessorInfo::args_ list on the stack and push property name below |
1278 // the exit frame to make GC aware of them and store pointers to them. | 1278 // the exit frame to make GC aware of them and store pointers to them. |
1279 __ push(receiver); | 1279 __ push(receiver); |
1280 __ mov(scratch2, sp); // scratch2 = AccessorInfo::args_ | 1280 __ mov(scratch2, sp); // scratch2 = AccessorInfo::args_ |
1281 if (heap()->InNewSpace(callback->data())) { | 1281 if (heap()->InNewSpace(callback->data())) { |
1282 __ Move(scratch3, callback); | 1282 __ Move(scratch3, callback); |
1283 __ ldr(scratch3, | 1283 __ ldr(scratch3, |
1284 FieldMemOperand(scratch3, ExecutableAccessorInfo::kDataOffset)); | 1284 FieldMemOperand(scratch3, ExecutableAccessorInfo::kDataOffset)); |
1285 } else { | 1285 } else { |
1286 __ Move(scratch3, Handle<Object>(callback->data())); | 1286 __ Move(scratch3, Handle<Object>(callback->data(), isolate())); |
1287 } | 1287 } |
1288 __ Push(reg, scratch3); | 1288 __ Push(reg, scratch3); |
1289 __ mov(scratch3, Operand(ExternalReference::isolate_address())); | 1289 __ mov(scratch3, Operand(ExternalReference::isolate_address())); |
1290 __ Push(scratch3, name_reg); | 1290 __ Push(scratch3, name_reg); |
1291 __ mov(r0, sp); // r0 = Handle<String> | 1291 __ mov(r0, sp); // r0 = Handle<String> |
1292 | 1292 |
1293 const int kApiStackSpace = 1; | 1293 const int kApiStackSpace = 1; |
1294 FrameScope frame_scope(masm(), StackFrame::MANUAL); | 1294 FrameScope frame_scope(masm(), StackFrame::MANUAL); |
1295 __ EnterExitFrame(false, kApiStackSpace); | 1295 __ EnterExitFrame(false, kApiStackSpace); |
1296 | 1296 |
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3331 // Argument passed - find it on the stack. | 3331 // Argument passed - find it on the stack. |
3332 __ ldr(r2, MemOperand(r1, (arg_number + 1) * -kPointerSize)); | 3332 __ ldr(r2, MemOperand(r1, (arg_number + 1) * -kPointerSize)); |
3333 __ str(r2, MemOperand(r5, kPointerSize, PostIndex)); | 3333 __ str(r2, MemOperand(r5, kPointerSize, PostIndex)); |
3334 __ b(&next); | 3334 __ b(&next); |
3335 __ bind(¬_passed); | 3335 __ bind(¬_passed); |
3336 // Set the property to undefined. | 3336 // Set the property to undefined. |
3337 __ str(r7, MemOperand(r5, kPointerSize, PostIndex)); | 3337 __ str(r7, MemOperand(r5, kPointerSize, PostIndex)); |
3338 __ bind(&next); | 3338 __ bind(&next); |
3339 } else { | 3339 } else { |
3340 // Set the property to the constant value. | 3340 // Set the property to the constant value. |
3341 Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i)); | 3341 Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i), |
| 3342 isolate()); |
3342 __ mov(r2, Operand(constant)); | 3343 __ mov(r2, Operand(constant)); |
3343 __ str(r2, MemOperand(r5, kPointerSize, PostIndex)); | 3344 __ str(r2, MemOperand(r5, kPointerSize, PostIndex)); |
3344 } | 3345 } |
3345 } | 3346 } |
3346 | 3347 |
3347 // Fill the unused in-object property fields with undefined. | 3348 // Fill the unused in-object property fields with undefined. |
3348 for (int i = shared->this_property_assignments_count(); | 3349 for (int i = shared->this_property_assignments_count(); |
3349 i < function->initial_map()->inobject_properties(); | 3350 i < function->initial_map()->inobject_properties(); |
3350 i++) { | 3351 i++) { |
3351 __ str(r7, MemOperand(r5, kPointerSize, PostIndex)); | 3352 __ str(r7, MemOperand(r5, kPointerSize, PostIndex)); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4172 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4173 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
4173 } | 4174 } |
4174 } | 4175 } |
4175 | 4176 |
4176 | 4177 |
4177 #undef __ | 4178 #undef __ |
4178 | 4179 |
4179 } } // namespace v8::internal | 4180 } } // namespace v8::internal |
4180 | 4181 |
4181 #endif // V8_TARGET_ARCH_ARM | 4182 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |