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

Side by Side Diff: src/builtins/x87/builtins-x87.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/x64/builtins-x64.cc ('k') | src/code-factory.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_X87 5 #if V8_TARGET_ARCH_X87
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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after
2051 __ bind(&no_arguments); 2051 __ bind(&no_arguments);
2052 { 2052 {
2053 __ LoadRoot(eax, Heap::kempty_stringRootIndex); 2053 __ LoadRoot(eax, Heap::kempty_stringRootIndex);
2054 __ ret(1 * kPointerSize); 2054 __ ret(1 * kPointerSize);
2055 } 2055 }
2056 2056
2057 // 3a. Convert eax to a string. 2057 // 3a. Convert eax to a string.
2058 __ bind(&to_string); 2058 __ bind(&to_string);
2059 { 2059 {
2060 FrameScope scope(masm, StackFrame::MANUAL); 2060 FrameScope scope(masm, StackFrame::MANUAL);
2061 ToStringStub stub(masm->isolate());
2062 __ SmiTag(ebx); 2061 __ SmiTag(ebx);
2063 __ EnterBuiltinFrame(esi, edi, ebx); 2062 __ EnterBuiltinFrame(esi, edi, ebx);
2064 __ CallStub(&stub); 2063 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
2065 __ LeaveBuiltinFrame(esi, edi, ebx); 2064 __ LeaveBuiltinFrame(esi, edi, ebx);
2066 __ SmiUntag(ebx); 2065 __ SmiUntag(ebx);
2067 } 2066 }
2068 __ jmp(&drop_frame_and_ret, Label::kNear); 2067 __ jmp(&drop_frame_and_ret, Label::kNear);
2069 2068
2070 // 3b. Convert symbol in eax to a string. 2069 // 3b. Convert symbol in eax to a string.
2071 __ bind(&symbol_descriptive_string); 2070 __ bind(&symbol_descriptive_string);
2072 { 2071 {
2073 __ PopReturnAddressTo(ecx); 2072 __ PopReturnAddressTo(ecx);
2074 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); 2073 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 2117
2119 // 3. Make sure eax is a string. 2118 // 3. Make sure eax is a string.
2120 { 2119 {
2121 Label convert, done_convert; 2120 Label convert, done_convert;
2122 __ JumpIfSmi(eax, &convert, Label::kNear); 2121 __ JumpIfSmi(eax, &convert, Label::kNear);
2123 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ecx); 2122 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ecx);
2124 __ j(below, &done_convert); 2123 __ j(below, &done_convert);
2125 __ bind(&convert); 2124 __ bind(&convert);
2126 { 2125 {
2127 FrameScope scope(masm, StackFrame::MANUAL); 2126 FrameScope scope(masm, StackFrame::MANUAL);
2128 ToStringStub stub(masm->isolate());
2129 __ SmiTag(ebx); 2127 __ SmiTag(ebx);
2130 __ EnterBuiltinFrame(esi, edi, ebx); 2128 __ EnterBuiltinFrame(esi, edi, ebx);
2131 __ Push(edx); 2129 __ Push(edx);
2132 __ CallStub(&stub); 2130 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
2133 __ Pop(edx); 2131 __ Pop(edx);
2134 __ LeaveBuiltinFrame(esi, edi, ebx); 2132 __ LeaveBuiltinFrame(esi, edi, ebx);
2135 __ SmiUntag(ebx); 2133 __ SmiUntag(ebx);
2136 } 2134 }
2137 __ bind(&done_convert); 2135 __ bind(&done_convert);
2138 } 2136 }
2139 2137
2140 // 4. Check if new target and constructor differ. 2138 // 4. Check if new target and constructor differ.
2141 Label drop_frame_and_ret, done_alloc, new_object; 2139 Label drop_frame_and_ret, done_alloc, new_object;
2142 __ cmp(edx, edi); 2140 __ cmp(edx, edi);
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3168 3166
3169 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3167 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3170 Generate_OnStackReplacementHelper(masm, true); 3168 Generate_OnStackReplacementHelper(masm, true);
3171 } 3169 }
3172 3170
3173 #undef __ 3171 #undef __
3174 } // namespace internal 3172 } // namespace internal
3175 } // namespace v8 3173 } // namespace v8
3176 3174
3177 #endif // V8_TARGET_ARCH_X87 3175 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/builtins/x64/builtins-x64.cc ('k') | src/code-factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698