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

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: 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
« src/deoptimizer.cc ('K') | « src/ia32/code-stubs-ia32.cc ('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 6695 matching lines...) Expand 10 before | Expand all | Expand 10 after
6793 6793
6794 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { 6794 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
6795 ASSERT(!Serializer::enabled()); 6795 ASSERT(!Serializer::enabled());
6796 CEntryStub ces(1, kSaveFPRegs); 6796 CEntryStub ces(1, kSaveFPRegs);
6797 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); 6797 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET);
6798 int parameter_count_offset = 6798 int parameter_count_offset =
6799 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; 6799 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset;
6800 __ movq(rbx, MemOperand(rbp, parameter_count_offset)); 6800 __ movq(rbx, MemOperand(rbp, parameter_count_offset));
6801 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 6801 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
6802 __ pop(rcx); 6802 __ pop(rcx);
6803 __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, 6803 int additional_offset = acting_as_js_function_ ? kPointerSize : 0;
6804 extra_expression_stack_count_ * kPointerSize)); 6804 __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, additional_offset));
6805 __ jmp(rcx); // Return to IC Miss stub, continuation still on stack. 6805 __ jmp(rcx); // Return to IC Miss stub, continuation still on stack.
6806 } 6806 }
6807 6807
6808 6808
6809 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 6809 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
6810 if (entry_hook_ != NULL) { 6810 if (entry_hook_ != NULL) {
6811 ProfileEntryHookStub stub; 6811 ProfileEntryHookStub stub;
6812 masm->CallStub(&stub); 6812 masm->CallStub(&stub);
6813 } 6813 }
6814 } 6814 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
6871 #endif 6871 #endif
6872 6872
6873 __ Ret(); 6873 __ Ret();
6874 } 6874 }
6875 6875
6876 #undef __ 6876 #undef __
6877 6877
6878 } } // namespace v8::internal 6878 } } // namespace v8::internal
6879 6879
6880 #endif // V8_TARGET_ARCH_X64 6880 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/deoptimizer.cc ('K') | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698