| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 CodeStubInterfaceDescriptor* descriptor) { | 77 CodeStubInterfaceDescriptor* descriptor) { |
| 78 // register state | 78 // register state |
| 79 // r1 -- constructor function | 79 // r1 -- constructor function |
| 80 // r2 -- type info cell with elements kind | 80 // r2 -- type info cell with elements kind |
| 81 // r0 -- number of arguments to the constructor function | 81 // r0 -- number of arguments to the constructor function |
| 82 static Register registers[] = { r1, r2 }; | 82 static Register registers[] = { r1, r2 }; |
| 83 descriptor->register_param_count_ = 2; | 83 descriptor->register_param_count_ = 2; |
| 84 // stack param count needs (constructor pointer, and single argument) | 84 // stack param count needs (constructor pointer, and single argument) |
| 85 descriptor->stack_parameter_count_ = &r0; | 85 descriptor->stack_parameter_count_ = &r0; |
| 86 descriptor->register_params_ = registers; | 86 descriptor->register_params_ = registers; |
| 87 descriptor->extra_expression_stack_count_ = 1; | 87 descriptor->acting_as_js_function_ = true; |
| 88 descriptor->deoptimization_handler_ = | 88 descriptor->deoptimization_handler_ = |
| 89 FUNCTION_ADDR(ArrayConstructor_StubFailure); | 89 FUNCTION_ADDR(ArrayConstructor_StubFailure); |
| 90 } | 90 } |
| 91 | 91 |
| 92 | 92 |
| 93 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 93 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 94 Isolate* isolate, | 94 Isolate* isolate, |
| 95 CodeStubInterfaceDescriptor* descriptor) { | 95 CodeStubInterfaceDescriptor* descriptor) { |
| 96 InitializeArrayConstructorDescriptor(isolate, descriptor); | 96 InitializeArrayConstructorDescriptor(isolate, descriptor); |
| 97 } | 97 } |
| (...skipping 7893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7991 | 7991 |
| 7992 | 7992 |
| 7993 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 7993 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
| 7994 ASSERT(!Serializer::enabled()); | 7994 ASSERT(!Serializer::enabled()); |
| 7995 bool save_fp_regs = CpuFeatures::IsSupported(VFP2); | 7995 bool save_fp_regs = CpuFeatures::IsSupported(VFP2); |
| 7996 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); | 7996 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); |
| 7997 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); | 7997 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
| 7998 int parameter_count_offset = | 7998 int parameter_count_offset = |
| 7999 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 7999 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 8000 __ ldr(r1, MemOperand(fp, parameter_count_offset)); | 8000 __ ldr(r1, MemOperand(fp, parameter_count_offset)); |
| 8001 if (acting_as_js_function_) { |
| 8002 __ add(r1, r1, Operand(1)); |
| 8003 } |
| 8001 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 8004 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 8002 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); | 8005 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); |
| 8003 __ add(sp, sp, r1); | 8006 __ add(sp, sp, r1); |
| 8004 __ Ret(); | 8007 __ Ret(); |
| 8005 } | 8008 } |
| 8006 | 8009 |
| 8007 | 8010 |
| 8008 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 8011 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
| 8009 if (entry_hook_ != NULL) { | 8012 if (entry_hook_ != NULL) { |
| 8010 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); | 8013 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8062 | 8065 |
| 8063 __ Pop(lr, r5, r1); | 8066 __ Pop(lr, r5, r1); |
| 8064 __ Ret(); | 8067 __ Ret(); |
| 8065 } | 8068 } |
| 8066 | 8069 |
| 8067 #undef __ | 8070 #undef __ |
| 8068 | 8071 |
| 8069 } } // namespace v8::internal | 8072 } } // namespace v8::internal |
| 8070 | 8073 |
| 8071 #endif // V8_TARGET_ARCH_ARM | 8074 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |