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

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 Created 7 years, 8 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
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 CodeStubInterfaceDescriptor* descriptor) { 93 CodeStubInterfaceDescriptor* descriptor) {
94 // register state 94 // register state
95 // edi -- constructor function 95 // edi -- constructor function
96 // ebx -- type info cell with elements kind 96 // ebx -- type info cell with elements kind
97 // eax -- number of arguments to the constructor function 97 // eax -- number of arguments to the constructor function
98 static Register registers[] = { edi, ebx }; 98 static Register registers[] = { edi, ebx };
99 descriptor->register_param_count_ = 2; 99 descriptor->register_param_count_ = 2;
100 // stack param count needs (constructor pointer, and single argument) 100 // stack param count needs (constructor pointer, and single argument)
101 descriptor->stack_parameter_count_ = &eax; 101 descriptor->stack_parameter_count_ = &eax;
102 descriptor->register_params_ = registers; 102 descriptor->register_params_ = registers;
103 descriptor->extra_expression_stack_count_ = 1; 103 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
104 descriptor->deoptimization_handler_ = 104 descriptor->deoptimization_handler_ =
105 FUNCTION_ADDR(ArrayConstructor_StubFailure); 105 FUNCTION_ADDR(ArrayConstructor_StubFailure);
106 } 106 }
107 107
108 108
109 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 109 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
110 Isolate* isolate, 110 Isolate* isolate,
111 CodeStubInterfaceDescriptor* descriptor) { 111 CodeStubInterfaceDescriptor* descriptor) {
112 InitializeArrayConstructorDescriptor(isolate, descriptor); 112 InitializeArrayConstructorDescriptor(isolate, descriptor);
113 } 113 }
(...skipping 7704 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 = function_mode_ == JS_FUNCTION_STUB_MODE
7829 extra_expression_stack_count_ * kPointerSize)); 7829 ? kPointerSize
7830 : 0;
7831 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, additional_offset));
7830 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack. 7832 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack.
7831 } 7833 }
7832 7834
7833 7835
7834 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 7836 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
7835 if (entry_hook_ != NULL) { 7837 if (entry_hook_ != NULL) {
7836 ProfileEntryHookStub stub; 7838 ProfileEntryHookStub stub;
7837 masm->CallStub(&stub); 7839 masm->CallStub(&stub);
7838 } 7840 }
7839 } 7841 }
(...skipping 20 matching lines...) Expand all
7860 // Restore ecx. 7862 // Restore ecx.
7861 __ pop(ecx); 7863 __ pop(ecx);
7862 __ ret(0); 7864 __ ret(0);
7863 } 7865 }
7864 7866
7865 #undef __ 7867 #undef __
7866 7868
7867 } } // namespace v8::internal 7869 } } // namespace v8::internal
7868 7870
7869 #endif // V8_TARGET_ARCH_IA32 7871 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « 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