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

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

Powered by Google App Engine
This is Rietveld 408576698