| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |