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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( | 131 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( |
132 Isolate* isolate, | 132 Isolate* isolate, |
133 CodeStubInterfaceDescriptor* descriptor) { | 133 CodeStubInterfaceDescriptor* descriptor) { |
134 static Register registers[] = { edx }; | 134 static Register registers[] = { edx }; |
135 descriptor->register_param_count_ = 1; | 135 descriptor->register_param_count_ = 1; |
136 descriptor->register_params_ = registers; | 136 descriptor->register_params_ = registers; |
137 descriptor->deoptimization_handler_ = NULL; | 137 descriptor->deoptimization_handler_ = NULL; |
138 } | 138 } |
139 | 139 |
140 | 140 |
| 141 void KeyedArrayCallStub::InitializeInterfaceDescriptor( |
| 142 Isolate* isolate, |
| 143 CodeStubInterfaceDescriptor* descriptor) { |
| 144 static Register registers[] = { ecx }; |
| 145 descriptor->register_param_count_ = 1; |
| 146 descriptor->register_params_ = registers; |
| 147 descriptor->continuation_type_ = TAIL_CALL_CONTINUATION; |
| 148 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
| 149 descriptor->deoptimization_handler_ = |
| 150 FUNCTION_ADDR(KeyedCallIC_MissFromStubFailure); |
| 151 } |
| 152 |
| 153 |
141 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( | 154 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( |
142 Isolate* isolate, | 155 Isolate* isolate, |
143 CodeStubInterfaceDescriptor* descriptor) { | 156 CodeStubInterfaceDescriptor* descriptor) { |
144 static Register registers[] = { edx, ecx, eax }; | 157 static Register registers[] = { edx, ecx, eax }; |
145 descriptor->register_param_count_ = 3; | 158 descriptor->register_param_count_ = 3; |
146 descriptor->register_params_ = registers; | 159 descriptor->register_params_ = registers; |
147 descriptor->deoptimization_handler_ = | 160 descriptor->deoptimization_handler_ = |
148 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); | 161 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); |
149 } | 162 } |
150 | 163 |
(...skipping 5501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5652 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 5665 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
5653 __ pop(ecx); | 5666 __ pop(ecx); |
5654 int additional_offset = function_mode_ == JS_FUNCTION_STUB_MODE | 5667 int additional_offset = function_mode_ == JS_FUNCTION_STUB_MODE |
5655 ? kPointerSize | 5668 ? kPointerSize |
5656 : 0; | 5669 : 0; |
5657 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, additional_offset)); | 5670 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, additional_offset)); |
5658 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack. | 5671 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack. |
5659 } | 5672 } |
5660 | 5673 |
5661 | 5674 |
| 5675 void StubFailureTailCallTrampolineStub::Generate(MacroAssembler* masm) { |
| 5676 CEntryStub ces(1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); |
| 5677 __ call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
| 5678 __ mov(edi, eax); |
| 5679 int parameter_count_offset = |
| 5680 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 5681 __ mov(eax, MemOperand(ebp, parameter_count_offset)); |
| 5682 // The parameter count above includes the receiver for the arguments passed to |
| 5683 // the deoptimization handler. Subtract the receiver for the parameter count |
| 5684 // for the call. |
| 5685 __ sub(eax, Immediate(1)); |
| 5686 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 5687 ParameterCount argument_count(eax); |
| 5688 __ InvokeFunction( |
| 5689 edi, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); |
| 5690 } |
| 5691 |
| 5692 |
5662 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 5693 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
5663 if (masm->isolate()->function_entry_hook() != NULL) { | 5694 if (masm->isolate()->function_entry_hook() != NULL) { |
5664 // It's always safe to call the entry hook stub, as the hook itself | 5695 // It's always safe to call the entry hook stub, as the hook itself |
5665 // is not allowed to call back to V8. | 5696 // is not allowed to call back to V8. |
5666 AllowStubCallsScope allow_stub_calls(masm, true); | 5697 AllowStubCallsScope allow_stub_calls(masm, true); |
5667 | 5698 |
5668 ProfileEntryHookStub stub; | 5699 ProfileEntryHookStub stub; |
5669 masm->CallStub(&stub); | 5700 masm->CallStub(&stub); |
5670 } | 5701 } |
5671 } | 5702 } |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6024 __ bind(&fast_elements_case); | 6055 __ bind(&fast_elements_case); |
6025 GenerateCase(masm, FAST_ELEMENTS); | 6056 GenerateCase(masm, FAST_ELEMENTS); |
6026 } | 6057 } |
6027 | 6058 |
6028 | 6059 |
6029 #undef __ | 6060 #undef __ |
6030 | 6061 |
6031 } } // namespace v8::internal | 6062 } } // namespace v8::internal |
6032 | 6063 |
6033 #endif // V8_TARGET_ARCH_IA32 | 6064 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |