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

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 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/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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 CodeStubInterfaceDescriptor* descriptor) { 88 CodeStubInterfaceDescriptor* descriptor) {
89 // register state 89 // register state
90 // rdi -- constructor function 90 // rdi -- constructor function
91 // rbx -- type info cell with elements kind 91 // rbx -- type info cell with elements kind
92 // rax -- number of arguments to the constructor function 92 // rax -- number of arguments to the constructor function
93 static Register registers[] = { rdi, rbx }; 93 static Register registers[] = { rdi, rbx };
94 descriptor->register_param_count_ = 2; 94 descriptor->register_param_count_ = 2;
95 // stack param count needs (constructor pointer, and single argument) 95 // stack param count needs (constructor pointer, and single argument)
96 descriptor->stack_parameter_count_ = &rax; 96 descriptor->stack_parameter_count_ = &rax;
97 descriptor->register_params_ = registers; 97 descriptor->register_params_ = registers;
98 descriptor->extra_expression_stack_count_ = 1; 98 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
99 descriptor->deoptimization_handler_ = 99 descriptor->deoptimization_handler_ =
100 FUNCTION_ADDR(ArrayConstructor_StubFailure); 100 FUNCTION_ADDR(ArrayConstructor_StubFailure);
101 } 101 }
102 102
103 103
104 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 104 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
105 Isolate* isolate, 105 Isolate* isolate,
106 CodeStubInterfaceDescriptor* descriptor) { 106 CodeStubInterfaceDescriptor* descriptor) {
107 InitializeArrayConstructorDescriptor(isolate, descriptor); 107 InitializeArrayConstructorDescriptor(isolate, descriptor);
108 } 108 }
(...skipping 6667 matching lines...) Expand 10 before | Expand all | Expand 10 after
6776 6776
6777 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { 6777 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
6778 ASSERT(!Serializer::enabled()); 6778 ASSERT(!Serializer::enabled());
6779 CEntryStub ces(1, kSaveFPRegs); 6779 CEntryStub ces(1, kSaveFPRegs);
6780 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); 6780 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET);
6781 int parameter_count_offset = 6781 int parameter_count_offset =
6782 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; 6782 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset;
6783 __ movq(rbx, MemOperand(rbp, parameter_count_offset)); 6783 __ movq(rbx, MemOperand(rbp, parameter_count_offset));
6784 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 6784 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
6785 __ pop(rcx); 6785 __ pop(rcx);
6786 __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, 6786 int additional_offset = function_mode_ == JS_FUNCTION_STUB_MODE
6787 extra_expression_stack_count_ * kPointerSize)); 6787 ? kPointerSize
6788 : 0;
6789 __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, additional_offset));
6788 __ jmp(rcx); // Return to IC Miss stub, continuation still on stack. 6790 __ jmp(rcx); // Return to IC Miss stub, continuation still on stack.
6789 } 6791 }
6790 6792
6791 6793
6792 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 6794 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
6793 if (entry_hook_ != NULL) { 6795 if (entry_hook_ != NULL) {
6794 ProfileEntryHookStub stub; 6796 ProfileEntryHookStub stub;
6795 masm->CallStub(&stub); 6797 masm->CallStub(&stub);
6796 } 6798 }
6797 } 6799 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
6854 #endif 6856 #endif
6855 6857
6856 __ Ret(); 6858 __ Ret();
6857 } 6859 }
6858 6860
6859 #undef __ 6861 #undef __
6860 6862
6861 } } // namespace v8::internal 6863 } } // namespace v8::internal
6862 6864
6863 #endif // V8_TARGET_ARCH_X64 6865 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698