Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 12490013: Deoptimizer support for hydrogen stubs that accept a variable number of arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback (sorry, includes rebase) Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 7715 matching lines...) Expand 10 before | Expand all | Expand 10 after
7818 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { 7818 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
7819 ASSERT(!Serializer::enabled()); 7819 ASSERT(!Serializer::enabled());
7820 bool save_fp_regs = CpuFeatures::IsSupported(SSE2); 7820 bool save_fp_regs = CpuFeatures::IsSupported(SSE2);
7821 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); 7821 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs);
7822 __ call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); 7822 __ call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET);
7823 int parameter_count_offset = 7823 int parameter_count_offset =
7824 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; 7824 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset;
7825 __ mov(ebx, MemOperand(ebp, parameter_count_offset)); 7825 __ mov(ebx, MemOperand(ebp, parameter_count_offset));
7826 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 7826 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
7827 __ pop(ecx); 7827 __ pop(ecx);
7828 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, 7828 int additional_offset = acting_as_js_function_ ? kPointerSize : 0;
7829 extra_expression_stack_count_ * kPointerSize)); 7829 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, additional_offset));
7830 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack. 7830 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack.
7831 } 7831 }
7832 7832
7833 7833
7834 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 7834 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
7835 if (entry_hook_ != NULL) { 7835 if (entry_hook_ != NULL) {
7836 ProfileEntryHookStub stub; 7836 ProfileEntryHookStub stub;
7837 masm->CallStub(&stub); 7837 masm->CallStub(&stub);
7838 } 7838 }
7839 } 7839 }
(...skipping 20 matching lines...) Expand all
7860 // Restore ecx. 7860 // Restore ecx.
7861 __ pop(ecx); 7861 __ pop(ecx);
7862 __ ret(0); 7862 __ ret(0);
7863 } 7863 }
7864 7864
7865 #undef __ 7865 #undef __
7866 7866
7867 } } // namespace v8::internal 7867 } } // namespace v8::internal
7868 7868
7869 #endif // V8_TARGET_ARCH_IA32 7869 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/deoptimizer.cc ('K') | « src/hydrogen-instructions.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698