| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 CodeStubInterfaceDescriptor* descriptor) { | 89 CodeStubInterfaceDescriptor* descriptor) { |
| 90 // register state | 90 // register state |
| 91 // a1 -- constructor function | 91 // a1 -- constructor function |
| 92 // a2 -- type info cell with elements kind | 92 // a2 -- type info cell with elements kind |
| 93 // a0 -- number of arguments to the constructor function | 93 // a0 -- number of arguments to the constructor function |
| 94 static Register registers[] = { a1, a2 }; | 94 static Register registers[] = { a1, a2 }; |
| 95 descriptor->register_param_count_ = 2; | 95 descriptor->register_param_count_ = 2; |
| 96 // stack param count needs (constructor pointer, and single argument) | 96 // stack param count needs (constructor pointer, and single argument) |
| 97 descriptor->stack_parameter_count_ = &a0; | 97 descriptor->stack_parameter_count_ = &a0; |
| 98 descriptor->register_params_ = registers; | 98 descriptor->register_params_ = registers; |
| 99 descriptor->extra_expression_stack_count_ = 1; | 99 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 100 descriptor->deoptimization_handler_ = | 100 descriptor->deoptimization_handler_ = |
| 101 FUNCTION_ADDR(ArrayConstructor_StubFailure); | 101 FUNCTION_ADDR(ArrayConstructor_StubFailure); |
| 102 } | 102 } |
| 103 | 103 |
| 104 | 104 |
| 105 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 105 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 106 Isolate* isolate, | 106 Isolate* isolate, |
| 107 CodeStubInterfaceDescriptor* descriptor) { | 107 CodeStubInterfaceDescriptor* descriptor) { |
| 108 InitializeArrayConstructorDescriptor(isolate, descriptor); | 108 InitializeArrayConstructorDescriptor(isolate, descriptor); |
| 109 } | 109 } |
| (...skipping 7970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8080 | 8080 |
| 8081 | 8081 |
| 8082 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 8082 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
| 8083 ASSERT(!Serializer::enabled()); | 8083 ASSERT(!Serializer::enabled()); |
| 8084 bool save_fp_regs = CpuFeatures::IsSupported(FPU); | 8084 bool save_fp_regs = CpuFeatures::IsSupported(FPU); |
| 8085 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); | 8085 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); |
| 8086 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); | 8086 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
| 8087 int parameter_count_offset = | 8087 int parameter_count_offset = |
| 8088 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 8088 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 8089 __ lw(a1, MemOperand(fp, parameter_count_offset)); | 8089 __ lw(a1, MemOperand(fp, parameter_count_offset)); |
| 8090 if (function_mode_ == JS_FUNCTION_STUB_MODE) { |
| 8091 __ Addu(a1, a1, Operand(1)); |
| 8092 } |
| 8090 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 8093 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 8091 __ sll(a1, a1, kPointerSizeLog2); | 8094 __ sll(a1, a1, kPointerSizeLog2); |
| 8092 __ Addu(sp, sp, a1); | 8095 __ Addu(sp, sp, a1); |
| 8093 __ Ret(); | 8096 __ Ret(); |
| 8094 } | 8097 } |
| 8095 | 8098 |
| 8096 | 8099 |
| 8097 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 8100 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
| 8098 if (entry_hook_ != NULL) { | 8101 if (entry_hook_ != NULL) { |
| 8099 ProfileEntryHookStub stub; | 8102 ProfileEntryHookStub stub; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8152 __ Pop(ra, t1, a1); | 8155 __ Pop(ra, t1, a1); |
| 8153 __ Ret(); | 8156 __ Ret(); |
| 8154 } | 8157 } |
| 8155 | 8158 |
| 8156 | 8159 |
| 8157 #undef __ | 8160 #undef __ |
| 8158 | 8161 |
| 8159 } } // namespace v8::internal | 8162 } } // namespace v8::internal |
| 8160 | 8163 |
| 8161 #endif // V8_TARGET_ARCH_MIPS | 8164 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |