| 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 __ push(v0); | 691 __ push(v0); |
| 692 __ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); | 692 __ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); |
| 693 } | 693 } |
| 694 __ pop(function); | 694 __ pop(function); |
| 695 __ mov(argument, v0); | 695 __ mov(argument, v0); |
| 696 __ Branch(&argument_is_string); | 696 __ Branch(&argument_is_string); |
| 697 | 697 |
| 698 // Load the empty string into a2, remove the receiver from the | 698 // Load the empty string into a2, remove the receiver from the |
| 699 // stack, and jump back to the case where the argument is a string. | 699 // stack, and jump back to the case where the argument is a string. |
| 700 __ bind(&no_arguments); | 700 __ bind(&no_arguments); |
| 701 __ LoadRoot(argument, Heap::kEmptyStringRootIndex); | 701 __ LoadRoot(argument, Heap::kempty_stringRootIndex); |
| 702 __ Drop(1); | 702 __ Drop(1); |
| 703 __ Branch(&argument_is_string); | 703 __ Branch(&argument_is_string); |
| 704 | 704 |
| 705 // At this point the argument is already a string. Call runtime to | 705 // At this point the argument is already a string. Call runtime to |
| 706 // create a string wrapper. | 706 // create a string wrapper. |
| 707 __ bind(&gc_required); | 707 __ bind(&gc_required); |
| 708 __ IncrementCounter(counters->string_ctor_gc_required(), 1, a3, t0); | 708 __ IncrementCounter(counters->string_ctor_gc_required(), 1, a3, t0); |
| 709 { | 709 { |
| 710 FrameScope scope(masm, StackFrame::INTERNAL); | 710 FrameScope scope(masm, StackFrame::INTERNAL); |
| 711 __ push(argument); | 711 __ push(argument); |
| (...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 __ bind(&dont_adapt_arguments); | 1896 __ bind(&dont_adapt_arguments); |
| 1897 __ Jump(a3); | 1897 __ Jump(a3); |
| 1898 } | 1898 } |
| 1899 | 1899 |
| 1900 | 1900 |
| 1901 #undef __ | 1901 #undef __ |
| 1902 | 1902 |
| 1903 } } // namespace v8::internal | 1903 } } // namespace v8::internal |
| 1904 | 1904 |
| 1905 #endif // V8_TARGET_ARCH_MIPS | 1905 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |