| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 __ Mov(argument, arg); | 221 __ Mov(argument, arg); |
| 222 __ IncrementCounter(counters->string_ctor_string_value(), 1, x10, x11); | 222 __ IncrementCounter(counters->string_ctor_string_value(), 1, x10, x11); |
| 223 __ B(&argument_is_string); | 223 __ B(&argument_is_string); |
| 224 | 224 |
| 225 // Invoke the conversion builtin and put the result into x2. | 225 // Invoke the conversion builtin and put the result into x2. |
| 226 __ Bind(&convert_argument); | 226 __ Bind(&convert_argument); |
| 227 __ Push(function); // Preserve the function. | 227 __ Push(function); // Preserve the function. |
| 228 __ IncrementCounter(counters->string_ctor_conversions(), 1, x10, x11); | 228 __ IncrementCounter(counters->string_ctor_conversions(), 1, x10, x11); |
| 229 { | 229 { |
| 230 FrameScope scope(masm, StackFrame::INTERNAL); | 230 FrameScope scope(masm, StackFrame::INTERNAL); |
| 231 __ Push(arg); | 231 ToStringStub stub(masm->isolate()); |
| 232 __ InvokeBuiltin(Context::TO_STRING_BUILTIN_INDEX, CALL_FUNCTION); | 232 __ CallStub(&stub); |
| 233 } | 233 } |
| 234 __ Pop(function); | 234 __ Pop(function); |
| 235 __ Mov(argument, x0); | 235 __ Mov(argument, x0); |
| 236 __ B(&argument_is_string); | 236 __ B(&argument_is_string); |
| 237 | 237 |
| 238 // Load the empty string into x2, remove the receiver from the | 238 // Load the empty string into x2, remove the receiver from the |
| 239 // stack, and jump back to the case where the argument is a string. | 239 // stack, and jump back to the case where the argument is a string. |
| 240 __ Bind(&no_arguments); | 240 __ Bind(&no_arguments); |
| 241 __ LoadRoot(argument, Heap::kempty_stringRootIndex); | 241 __ LoadRoot(argument, Heap::kempty_stringRootIndex); |
| 242 __ Drop(1); | 242 __ Drop(1); |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1935 } | 1935 } |
| 1936 } | 1936 } |
| 1937 | 1937 |
| 1938 | 1938 |
| 1939 #undef __ | 1939 #undef __ |
| 1940 | 1940 |
| 1941 } // namespace internal | 1941 } // namespace internal |
| 1942 } // namespace v8 | 1942 } // namespace v8 |
| 1943 | 1943 |
| 1944 #endif // V8_TARGET_ARCH_ARM | 1944 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |