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

Side by Side Diff: src/arm/builtins-arm.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 | « no previous file | src/arm/code-stubs-arm.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 __ mov(argument, r0); 228 __ mov(argument, r0);
229 __ IncrementCounter(counters->string_ctor_conversions(), 1, r3, r4); 229 __ IncrementCounter(counters->string_ctor_conversions(), 1, r3, r4);
230 __ b(&argument_is_string); 230 __ b(&argument_is_string);
231 231
232 // Invoke the conversion builtin and put the result into r2. 232 // Invoke the conversion builtin and put the result into r2.
233 __ bind(&convert_argument); 233 __ bind(&convert_argument);
234 __ push(function); // Preserve the function. 234 __ push(function); // Preserve the function.
235 __ IncrementCounter(counters->string_ctor_conversions(), 1, r3, r4); 235 __ IncrementCounter(counters->string_ctor_conversions(), 1, r3, r4);
236 { 236 {
237 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 237 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
238 __ push(r0); 238 ToStringStub stub(masm->isolate());
239 __ InvokeBuiltin(Context::TO_STRING_BUILTIN_INDEX, CALL_FUNCTION); 239 __ CallStub(&stub);
240 } 240 }
241 __ pop(function); 241 __ pop(function);
242 __ mov(argument, r0); 242 __ mov(argument, r0);
243 __ b(&argument_is_string); 243 __ b(&argument_is_string);
244 244
245 // Load the empty string into r2, remove the receiver from the 245 // Load the empty string into r2, remove the receiver from the
246 // stack, and jump back to the case where the argument is a string. 246 // stack, and jump back to the case where the argument is a string.
247 __ bind(&no_arguments); 247 __ bind(&no_arguments);
248 __ LoadRoot(argument, Heap::kempty_stringRootIndex); 248 __ LoadRoot(argument, Heap::kempty_stringRootIndex);
249 __ Drop(1); 249 __ Drop(1);
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 } 1872 }
1873 } 1873 }
1874 1874
1875 1875
1876 #undef __ 1876 #undef __
1877 1877
1878 } // namespace internal 1878 } // namespace internal
1879 } // namespace v8 1879 } // namespace v8
1880 1880
1881 #endif // V8_TARGET_ARCH_ARM 1881 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698