OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 __ mov(argument, a0); | 266 __ mov(argument, a0); |
267 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); | 267 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); |
268 __ Branch(&argument_is_string); | 268 __ Branch(&argument_is_string); |
269 | 269 |
270 // Invoke the conversion builtin and put the result into a2. | 270 // Invoke the conversion builtin and put the result into a2. |
271 __ bind(&convert_argument); | 271 __ bind(&convert_argument); |
272 __ push(function); // Preserve the function. | 272 __ push(function); // Preserve the function. |
273 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); | 273 __ IncrementCounter(counters->string_ctor_conversions(), 1, a3, t0); |
274 { | 274 { |
275 FrameScope scope(masm, StackFrame::INTERNAL); | 275 FrameScope scope(masm, StackFrame::INTERNAL); |
276 __ push(v0); | 276 __ push(a0); |
277 __ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); | 277 __ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); |
278 } | 278 } |
279 __ pop(function); | 279 __ pop(function); |
280 __ mov(argument, v0); | 280 __ mov(argument, v0); |
281 __ Branch(&argument_is_string); | 281 __ Branch(&argument_is_string); |
282 | 282 |
283 // Load the empty string into a2, remove the receiver from the | 283 // Load the empty string into a2, remove the receiver from the |
284 // stack, and jump back to the case where the argument is a string. | 284 // stack, and jump back to the case where the argument is a string. |
285 __ bind(&no_arguments); | 285 __ bind(&no_arguments); |
286 __ LoadRoot(argument, Heap::kempty_stringRootIndex); | 286 __ LoadRoot(argument, Heap::kempty_stringRootIndex); |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 __ bind(&dont_adapt_arguments); | 1516 __ bind(&dont_adapt_arguments); |
1517 __ Jump(a3); | 1517 __ Jump(a3); |
1518 } | 1518 } |
1519 | 1519 |
1520 | 1520 |
1521 #undef __ | 1521 #undef __ |
1522 | 1522 |
1523 } } // namespace v8::internal | 1523 } } // namespace v8::internal |
1524 | 1524 |
1525 #endif // V8_TARGET_ARCH_MIPS | 1525 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |