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

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

Issue 1310493004: PPC: [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/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/ppc/code-stubs-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 __ mr(argument, r3); 225 __ mr(argument, r3);
226 __ IncrementCounter(counters->string_ctor_conversions(), 1, r6, r7); 226 __ IncrementCounter(counters->string_ctor_conversions(), 1, r6, r7);
227 __ b(&argument_is_string); 227 __ b(&argument_is_string);
228 228
229 // Invoke the conversion builtin and put the result into r5. 229 // Invoke the conversion builtin and put the result into r5.
230 __ bind(&convert_argument); 230 __ bind(&convert_argument);
231 __ push(function); // Preserve the function. 231 __ push(function); // Preserve the function.
232 __ IncrementCounter(counters->string_ctor_conversions(), 1, r6, r7); 232 __ IncrementCounter(counters->string_ctor_conversions(), 1, r6, r7);
233 { 233 {
234 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 234 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
235 __ push(r3); 235 ToStringStub stub(masm->isolate());
236 __ InvokeBuiltin(Context::TO_STRING_BUILTIN_INDEX, CALL_FUNCTION); 236 __ CallStub(&stub);
237 } 237 }
238 __ pop(function); 238 __ pop(function);
239 __ mr(argument, r3); 239 __ mr(argument, r3);
240 __ b(&argument_is_string); 240 __ b(&argument_is_string);
241 241
242 // Load the empty string into r5, remove the receiver from the 242 // Load the empty string into r5, remove the receiver from the
243 // stack, and jump back to the case where the argument is a string. 243 // stack, and jump back to the case where the argument is a string.
244 __ bind(&no_arguments); 244 __ bind(&no_arguments);
245 __ LoadRoot(argument, Heap::kempty_stringRootIndex); 245 __ LoadRoot(argument, Heap::kempty_stringRootIndex);
246 __ Drop(1); 246 __ Drop(1);
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 __ bkpt(0); 1928 __ bkpt(0);
1929 } 1929 }
1930 } 1930 }
1931 1931
1932 1932
1933 #undef __ 1933 #undef __
1934 } // namespace internal 1934 } // namespace internal
1935 } // namespace v8 1935 } // namespace v8
1936 1936
1937 #endif // V8_TARGET_ARCH_PPC 1937 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698