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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // First args = sp[(argc - 1) * 4]. | 194 // First args = sp[(argc - 1) * 4]. |
195 __ Subu(a0, a0, Operand(1)); | 195 __ Subu(a0, a0, Operand(1)); |
196 __ sll(a0, a0, kPointerSizeLog2); | 196 __ sll(a0, a0, kPointerSizeLog2); |
197 __ Addu(sp, a0, sp); | 197 __ Addu(sp, a0, sp); |
198 __ lw(a0, MemOperand(sp)); | 198 __ lw(a0, MemOperand(sp)); |
199 // sp now point to args[0], drop args[0] + receiver. | 199 // sp now point to args[0], drop args[0] + receiver. |
200 __ Drop(2); | 200 __ Drop(2); |
201 | 201 |
202 Register argument = a2; | 202 Register argument = a2; |
203 Label not_cached, argument_is_string; | 203 Label not_cached, argument_is_string; |
204 NumberToStringStub::GenerateLookupNumberStringCache( | 204 __ LookupNumberStringCache(a0, // Input. |
205 masm, | 205 argument, // Result. |
206 a0, // Input. | 206 a3, // Scratch. |
207 argument, // Result. | 207 t0, // Scratch. |
208 a3, // Scratch. | 208 t1, // Scratch. |
209 t0, // Scratch. | 209 ¬_cached); |
210 t1, // Scratch. | |
211 ¬_cached); | |
212 __ IncrementCounter(counters->string_ctor_cached_number(), 1, a3, t0); | 210 __ IncrementCounter(counters->string_ctor_cached_number(), 1, a3, t0); |
213 __ bind(&argument_is_string); | 211 __ bind(&argument_is_string); |
214 | 212 |
215 // ----------- S t a t e ------------- | 213 // ----------- S t a t e ------------- |
216 // -- a2 : argument converted to string | 214 // -- a2 : argument converted to string |
217 // -- a1 : constructor function | 215 // -- a1 : constructor function |
218 // -- ra : return address | 216 // -- ra : return address |
219 // ----------------------------------- | 217 // ----------------------------------- |
220 | 218 |
221 Label gc_required; | 219 Label gc_required; |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1476 __ bind(&dont_adapt_arguments); | 1474 __ bind(&dont_adapt_arguments); |
1477 __ Jump(a3); | 1475 __ Jump(a3); |
1478 } | 1476 } |
1479 | 1477 |
1480 | 1478 |
1481 #undef __ | 1479 #undef __ |
1482 | 1480 |
1483 } } // namespace v8::internal | 1481 } } // namespace v8::internal |
1484 | 1482 |
1485 #endif // V8_TARGET_ARCH_MIPS | 1483 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |