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

Side by Side Diff: src/mips64/builtins-mips64.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/mips/interface-descriptors-mips.cc ('k') | src/mips64/code-stubs-mips64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 __ mov(argument, a0); 232 __ mov(argument, a0);
233 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, a4); 233 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, a4);
234 __ Branch(&argument_is_string); 234 __ Branch(&argument_is_string);
235 235
236 // Invoke the conversion builtin and put the result into a2. 236 // Invoke the conversion builtin and put the result into a2.
237 __ bind(&convert_argument); 237 __ bind(&convert_argument);
238 __ push(function); // Preserve the function. 238 __ push(function); // Preserve the function.
239 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, a4); 239 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, a4);
240 { 240 {
241 FrameScope scope(masm, StackFrame::INTERNAL); 241 FrameScope scope(masm, StackFrame::INTERNAL);
242 __ push(a0); 242 ToStringStub stub(masm->isolate());
243 __ InvokeBuiltin(Context::TO_STRING_BUILTIN_INDEX, CALL_FUNCTION); 243 __ CallStub(&stub);
244 } 244 }
245 __ pop(function); 245 __ pop(function);
246 __ mov(argument, v0); 246 __ mov(argument, v0);
247 __ Branch(&argument_is_string); 247 __ Branch(&argument_is_string);
248 248
249 // Load the empty string into a2, remove the receiver from the 249 // Load the empty string into a2, remove the receiver from the
250 // stack, and jump back to the case where the argument is a string. 250 // stack, and jump back to the case where the argument is a string.
251 __ bind(&no_arguments); 251 __ bind(&no_arguments);
252 __ LoadRoot(argument, Heap::kempty_stringRootIndex); 252 __ LoadRoot(argument, Heap::kempty_stringRootIndex);
253 __ Drop(1); 253 __ Drop(1);
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 } 1879 }
1880 } 1880 }
1881 1881
1882 1882
1883 #undef __ 1883 #undef __
1884 1884
1885 } // namespace internal 1885 } // namespace internal
1886 } // namespace v8 1886 } // namespace v8
1887 1887
1888 #endif // V8_TARGET_ARCH_MIPS64 1888 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/interface-descriptors-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698