| 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->function_mode_ = JS_FUNCTION_MODE; |
| 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 7882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7980 | 7980 |
| 7981 | 7981 |
| 7982 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 7982 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
| 7983 ASSERT(!Serializer::enabled()); | 7983 ASSERT(!Serializer::enabled()); |
| 7984 bool save_fp_regs = CpuFeatures::IsSupported(VFP2); | 7984 bool save_fp_regs = CpuFeatures::IsSupported(VFP2); |
| 7985 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); | 7985 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); |
| 7986 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); | 7986 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
| 7987 int parameter_count_offset = | 7987 int parameter_count_offset = |
| 7988 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 7988 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 7989 __ ldr(r1, MemOperand(fp, parameter_count_offset)); | 7989 __ ldr(r1, MemOperand(fp, parameter_count_offset)); |
| 7990 if (function_mode_ == JS_FUNCTION_MODE) { |
| 7991 __ add(r1, r1, Operand(1)); |
| 7992 } |
| 7990 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 7993 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 7991 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); | 7994 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); |
| 7992 __ add(sp, sp, r1); | 7995 __ add(sp, sp, r1); |
| 7993 __ Ret(); | 7996 __ Ret(); |
| 7994 } | 7997 } |
| 7995 | 7998 |
| 7996 | 7999 |
| 7997 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 8000 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
| 7998 if (entry_hook_ != NULL) { | 8001 if (entry_hook_ != NULL) { |
| 7999 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); | 8002 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8051 | 8054 |
| 8052 __ Pop(lr, r5, r1); | 8055 __ Pop(lr, r5, r1); |
| 8053 __ Ret(); | 8056 __ Ret(); |
| 8054 } | 8057 } |
| 8055 | 8058 |
| 8056 #undef __ | 8059 #undef __ |
| 8057 | 8060 |
| 8058 } } // namespace v8::internal | 8061 } } // namespace v8::internal |
| 8059 | 8062 |
| 8060 #endif // V8_TARGET_ARCH_ARM | 8063 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |