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