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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 CodeStubInterfaceDescriptor* descriptor) { | 82 CodeStubInterfaceDescriptor* descriptor) { |
83 // register state | 83 // register state |
84 // edi -- constructor function | 84 // edi -- constructor function |
85 // ebx -- type info cell with elements kind | 85 // ebx -- type info cell with elements kind |
86 // eax -- number of arguments to the constructor function | 86 // eax -- number of arguments to the constructor function |
87 static Register registers[] = { edi, ebx }; | 87 static Register registers[] = { edi, ebx }; |
88 descriptor->register_param_count_ = 2; | 88 descriptor->register_param_count_ = 2; |
89 // stack param count needs (constructor pointer, and single argument) | 89 // stack param count needs (constructor pointer, and single argument) |
90 descriptor->stack_parameter_count_ = &eax; | 90 descriptor->stack_parameter_count_ = &eax; |
91 descriptor->register_params_ = registers; | 91 descriptor->register_params_ = registers; |
92 descriptor->extra_expression_stack_count_ = 1; | 92 descriptor->acting_as_js_function_ = true; |
93 descriptor->deoptimization_handler_ = | 93 descriptor->deoptimization_handler_ = |
94 FUNCTION_ADDR(ArrayConstructor_StubFailure); | 94 FUNCTION_ADDR(ArrayConstructor_StubFailure); |
95 } | 95 } |
96 | 96 |
97 | 97 |
98 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 98 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
99 Isolate* isolate, | 99 Isolate* isolate, |
100 CodeStubInterfaceDescriptor* descriptor) { | 100 CodeStubInterfaceDescriptor* descriptor) { |
101 InitializeArrayConstructorDescriptor(isolate, descriptor); | 101 InitializeArrayConstructorDescriptor(isolate, descriptor); |
102 } | 102 } |
(...skipping 7726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7829 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 7829 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
7830 ASSERT(!Serializer::enabled()); | 7830 ASSERT(!Serializer::enabled()); |
7831 bool save_fp_regs = CpuFeatures::IsSupported(SSE2); | 7831 bool save_fp_regs = CpuFeatures::IsSupported(SSE2); |
7832 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); | 7832 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); |
7833 __ call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); | 7833 __ call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
7834 int parameter_count_offset = | 7834 int parameter_count_offset = |
7835 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 7835 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
7836 __ mov(ebx, MemOperand(ebp, parameter_count_offset)); | 7836 __ mov(ebx, MemOperand(ebp, parameter_count_offset)); |
7837 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 7837 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
7838 __ pop(ecx); | 7838 __ pop(ecx); |
7839 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, | 7839 int additional_offset = acting_as_js_function_ ? kPointerSize : 0; |
7840 extra_expression_stack_count_ * kPointerSize)); | 7840 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, additional_offset)); |
7841 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack. | 7841 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack. |
7842 } | 7842 } |
7843 | 7843 |
7844 | 7844 |
7845 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 7845 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
7846 if (entry_hook_ != NULL) { | 7846 if (entry_hook_ != NULL) { |
7847 ProfileEntryHookStub stub; | 7847 ProfileEntryHookStub stub; |
7848 masm->CallStub(&stub); | 7848 masm->CallStub(&stub); |
7849 } | 7849 } |
7850 } | 7850 } |
(...skipping 20 matching lines...) Expand all Loading... |
7871 // Restore ecx. | 7871 // Restore ecx. |
7872 __ pop(ecx); | 7872 __ pop(ecx); |
7873 __ ret(0); | 7873 __ ret(0); |
7874 } | 7874 } |
7875 | 7875 |
7876 #undef __ | 7876 #undef __ |
7877 | 7877 |
7878 } } // namespace v8::internal | 7878 } } // namespace v8::internal |
7879 | 7879 |
7880 #endif // V8_TARGET_ARCH_IA32 | 7880 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |