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

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

Issue 1319973007: [runtime] Add %ToString and %_ToString and remove the TO_STRING builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/arm/interface-descriptors-arm.cc ('k') | src/arm64/code-stubs-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 __ Mov(argument, arg); 221 __ Mov(argument, arg);
222 __ IncrementCounter(counters->string_ctor_string_value(), 1, x10, x11); 222 __ IncrementCounter(counters->string_ctor_string_value(), 1, x10, x11);
223 __ B(&argument_is_string); 223 __ B(&argument_is_string);
224 224
225 // Invoke the conversion builtin and put the result into x2. 225 // Invoke the conversion builtin and put the result into x2.
226 __ Bind(&convert_argument); 226 __ Bind(&convert_argument);
227 __ Push(function); // Preserve the function. 227 __ Push(function); // Preserve the function.
228 __ IncrementCounter(counters->string_ctor_conversions(), 1, x10, x11); 228 __ IncrementCounter(counters->string_ctor_conversions(), 1, x10, x11);
229 { 229 {
230 FrameScope scope(masm, StackFrame::INTERNAL); 230 FrameScope scope(masm, StackFrame::INTERNAL);
231 __ Push(arg); 231 ToStringStub stub(masm->isolate());
232 __ InvokeBuiltin(Context::TO_STRING_BUILTIN_INDEX, CALL_FUNCTION); 232 __ CallStub(&stub);
233 } 233 }
234 __ Pop(function); 234 __ Pop(function);
235 __ Mov(argument, x0); 235 __ Mov(argument, x0);
236 __ B(&argument_is_string); 236 __ B(&argument_is_string);
237 237
238 // Load the empty string into x2, remove the receiver from the 238 // Load the empty string into x2, remove the receiver from the
239 // stack, and jump back to the case where the argument is a string. 239 // stack, and jump back to the case where the argument is a string.
240 __ Bind(&no_arguments); 240 __ Bind(&no_arguments);
241 __ LoadRoot(argument, Heap::kempty_stringRootIndex); 241 __ LoadRoot(argument, Heap::kempty_stringRootIndex);
242 __ Drop(1); 242 __ Drop(1);
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1935 } 1935 }
1936 } 1936 }
1937 1937
1938 1938
1939 #undef __ 1939 #undef __
1940 1940
1941 } // namespace internal 1941 } // namespace internal
1942 } // namespace v8 1942 } // namespace v8
1943 1943
1944 #endif // V8_TARGET_ARCH_ARM 1944 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/interface-descriptors-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698