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

Side by Side Diff: src/x64/code-stubs-x64.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: Deoptimizer and BuildGraph() support for variable argument stubs 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
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | no next file » | 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 CodeStubInterfaceDescriptor* descriptor) { 77 CodeStubInterfaceDescriptor* descriptor) {
78 // register state 78 // register state
79 // rdi -- constructor function 79 // rdi -- constructor function
80 // rbx -- type info cell with elements kind 80 // rbx -- type info cell with elements kind
81 // rax -- number of arguments to the constructor function 81 // rax -- number of arguments to the constructor function
82 static Register registers[] = { rdi, rbx }; 82 static Register registers[] = { rdi, rbx };
83 descriptor->register_param_count_ = 2; 83 descriptor->register_param_count_ = 2;
84 // stack param count needs (constructor pointer, and single argument) 84 // stack param count needs (constructor pointer, and single argument)
85 descriptor->stack_parameter_count_ = &rax; 85 descriptor->stack_parameter_count_ = &rax;
86 descriptor->register_params_ = registers; 86 descriptor->register_params_ = registers;
87 descriptor->extra_expression_stack_count_ = 1; 87 descriptor->acting_as_js_function_ = true;
88 descriptor->deoptimization_handler_ = 88 descriptor->deoptimization_handler_ =
89 FUNCTION_ADDR(ArrayConstructor_StubFailure); 89 FUNCTION_ADDR(ArrayConstructor_StubFailure);
90 } 90 }
91 91
92 92
93 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 93 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
94 Isolate* isolate, 94 Isolate* isolate,
95 CodeStubInterfaceDescriptor* descriptor) { 95 CodeStubInterfaceDescriptor* descriptor) {
96 InitializeArrayConstructorDescriptor(isolate, descriptor); 96 InitializeArrayConstructorDescriptor(isolate, descriptor);
97 } 97 }
(...skipping 6709 matching lines...) Expand 10 before | Expand all | Expand 10 after
6807 6807
6808 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { 6808 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
6809 ASSERT(!Serializer::enabled()); 6809 ASSERT(!Serializer::enabled());
6810 CEntryStub ces(1, kSaveFPRegs); 6810 CEntryStub ces(1, kSaveFPRegs);
6811 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); 6811 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET);
6812 int parameter_count_offset = 6812 int parameter_count_offset =
6813 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; 6813 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset;
6814 __ movq(rbx, MemOperand(rbp, parameter_count_offset)); 6814 __ movq(rbx, MemOperand(rbp, parameter_count_offset));
6815 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 6815 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
6816 __ pop(rcx); 6816 __ pop(rcx);
6817 __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, 6817 int additional_offset = acting_as_js_function_ ? kPointerSize : 0;
6818 extra_expression_stack_count_ * kPointerSize)); 6818 __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, additional_offset));
6819 __ jmp(rcx); // Return to IC Miss stub, continuation still on stack. 6819 __ jmp(rcx); // Return to IC Miss stub, continuation still on stack.
6820 } 6820 }
6821 6821
6822 6822
6823 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 6823 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
6824 if (entry_hook_ != NULL) { 6824 if (entry_hook_ != NULL) {
6825 ProfileEntryHookStub stub; 6825 ProfileEntryHookStub stub;
6826 masm->CallStub(&stub); 6826 masm->CallStub(&stub);
6827 } 6827 }
6828 } 6828 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
6885 #endif 6885 #endif
6886 6886
6887 __ Ret(); 6887 __ Ret();
6888 } 6888 }
6889 6889
6890 #undef __ 6890 #undef __
6891 6891
6892 } } // namespace v8::internal 6892 } } // namespace v8::internal
6893 6893
6894 #endif // V8_TARGET_ARCH_X64 6894 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698