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

Side by Side Diff: src/builtins/x64/builtins-x64.cc

Issue 2380973002: [stubs] replaced ToString MacroAssembler Stub with CodeStubAssembler builtin (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/v8/v8 into ToStringTFStub Created 4 years, 2 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
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 __ bind(&no_arguments); 1997 __ bind(&no_arguments);
1998 { 1998 {
1999 __ LoadRoot(rax, Heap::kempty_stringRootIndex); 1999 __ LoadRoot(rax, Heap::kempty_stringRootIndex);
2000 __ ret(1 * kPointerSize); 2000 __ ret(1 * kPointerSize);
2001 } 2001 }
2002 2002
2003 // 3a. Convert rax to a string. 2003 // 3a. Convert rax to a string.
2004 __ bind(&to_string); 2004 __ bind(&to_string);
2005 { 2005 {
2006 FrameScope scope(masm, StackFrame::MANUAL); 2006 FrameScope scope(masm, StackFrame::MANUAL);
2007 ToStringStub stub(masm->isolate());
2008 __ EnterBuiltinFrame(rsi, rdi, r8); 2007 __ EnterBuiltinFrame(rsi, rdi, r8);
2009 __ CallStub(&stub); 2008 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
2010 __ LeaveBuiltinFrame(rsi, rdi, r8); 2009 __ LeaveBuiltinFrame(rsi, rdi, r8);
2011 } 2010 }
2012 __ jmp(&drop_frame_and_ret, Label::kNear); 2011 __ jmp(&drop_frame_and_ret, Label::kNear);
2013 2012
2014 // 3b. Convert symbol in rax to a string. 2013 // 3b. Convert symbol in rax to a string.
2015 __ bind(&symbol_descriptive_string); 2014 __ bind(&symbol_descriptive_string);
2016 { 2015 {
2017 __ PopReturnAddressTo(rcx); 2016 __ PopReturnAddressTo(rcx);
2018 __ SmiToInteger32(r8, r8); 2017 __ SmiToInteger32(r8, r8);
2019 __ leap(rsp, Operand(rsp, r8, times_pointer_size, kPointerSize)); 2018 __ leap(rsp, Operand(rsp, r8, times_pointer_size, kPointerSize));
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 2065
2067 // 3. Make sure rbx is a string. 2066 // 3. Make sure rbx is a string.
2068 { 2067 {
2069 Label convert, done_convert; 2068 Label convert, done_convert;
2070 __ JumpIfSmi(rbx, &convert, Label::kNear); 2069 __ JumpIfSmi(rbx, &convert, Label::kNear);
2071 __ CmpObjectType(rbx, FIRST_NONSTRING_TYPE, rcx); 2070 __ CmpObjectType(rbx, FIRST_NONSTRING_TYPE, rcx);
2072 __ j(below, &done_convert); 2071 __ j(below, &done_convert);
2073 __ bind(&convert); 2072 __ bind(&convert);
2074 { 2073 {
2075 FrameScope scope(masm, StackFrame::MANUAL); 2074 FrameScope scope(masm, StackFrame::MANUAL);
2076 ToStringStub stub(masm->isolate());
2077 __ EnterBuiltinFrame(rsi, rdi, r8); 2075 __ EnterBuiltinFrame(rsi, rdi, r8);
2078 __ Push(rdx); 2076 __ Push(rdx);
2079 __ Move(rax, rbx); 2077 __ Move(rax, rbx);
2080 __ CallStub(&stub); 2078 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
2081 __ Move(rbx, rax); 2079 __ Move(rbx, rax);
2082 __ Pop(rdx); 2080 __ Pop(rdx);
2083 __ LeaveBuiltinFrame(rsi, rdi, r8); 2081 __ LeaveBuiltinFrame(rsi, rdi, r8);
2084 } 2082 }
2085 __ bind(&done_convert); 2083 __ bind(&done_convert);
2086 } 2084 }
2087 2085
2088 // 4. Check if new target and constructor differ. 2086 // 4. Check if new target and constructor differ.
2089 Label drop_frame_and_ret, new_object; 2087 Label drop_frame_and_ret, new_object;
2090 __ cmpp(rdx, rdi); 2088 __ cmpp(rdx, rdi);
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
3091 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3089 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3092 Generate_OnStackReplacementHelper(masm, true); 3090 Generate_OnStackReplacementHelper(masm, true);
3093 } 3091 }
3094 3092
3095 #undef __ 3093 #undef __
3096 3094
3097 } // namespace internal 3095 } // namespace internal
3098 } // namespace v8 3096 } // namespace v8
3099 3097
3100 #endif // V8_TARGET_ARCH_X64 3098 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698