| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 __ cmp(r0, Operand::Zero()); | 186 __ cmp(r0, Operand::Zero()); |
| 187 __ b(eq, &no_arguments); | 187 __ b(eq, &no_arguments); |
| 188 // First args = sp[(argc - 1) * 4]. | 188 // First args = sp[(argc - 1) * 4]. |
| 189 __ sub(r0, r0, Operand(1)); | 189 __ sub(r0, r0, Operand(1)); |
| 190 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); | 190 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); |
| 191 // sp now point to args[0], drop args[0] + receiver. | 191 // sp now point to args[0], drop args[0] + receiver. |
| 192 __ Drop(2); | 192 __ Drop(2); |
| 193 | 193 |
| 194 Register argument = r2; | 194 Register argument = r2; |
| 195 Label not_cached, argument_is_string; | 195 Label not_cached, argument_is_string; |
| 196 NumberToStringStub::GenerateLookupNumberStringCache( | 196 __ LookupNumberStringCache(r0, // Input. |
| 197 masm, | 197 argument, // Result. |
| 198 r0, // Input. | 198 r3, // Scratch. |
| 199 argument, // Result. | 199 r4, // Scratch. |
| 200 r3, // Scratch. | 200 r5, // Scratch. |
| 201 r4, // Scratch. | 201 ¬_cached); |
| 202 r5, // Scratch. | |
| 203 ¬_cached); | |
| 204 __ IncrementCounter(counters->string_ctor_cached_number(), 1, r3, r4); | 202 __ IncrementCounter(counters->string_ctor_cached_number(), 1, r3, r4); |
| 205 __ bind(&argument_is_string); | 203 __ bind(&argument_is_string); |
| 206 | 204 |
| 207 // ----------- S t a t e ------------- | 205 // ----------- S t a t e ------------- |
| 208 // -- r2 : argument converted to string | 206 // -- r2 : argument converted to string |
| 209 // -- r1 : constructor function | 207 // -- r1 : constructor function |
| 210 // -- lr : return address | 208 // -- lr : return address |
| 211 // ----------------------------------- | 209 // ----------------------------------- |
| 212 | 210 |
| 213 Label gc_required; | 211 Label gc_required; |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1438 __ bind(&dont_adapt_arguments); | 1436 __ bind(&dont_adapt_arguments); |
| 1439 __ Jump(r3); | 1437 __ Jump(r3); |
| 1440 } | 1438 } |
| 1441 | 1439 |
| 1442 | 1440 |
| 1443 #undef __ | 1441 #undef __ |
| 1444 | 1442 |
| 1445 } } // namespace v8::internal | 1443 } } // namespace v8::internal |
| 1446 | 1444 |
| 1447 #endif // V8_TARGET_ARCH_ARM | 1445 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |