| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 | 497 |
| 498 Register function = r1; | 498 Register function = r1; |
| 499 if (FLAG_debug_code) { | 499 if (FLAG_debug_code) { |
| 500 __ LoadGlobalFunction(Context::STRING_FUNCTION_INDEX, r2); | 500 __ LoadGlobalFunction(Context::STRING_FUNCTION_INDEX, r2); |
| 501 __ cmp(function, Operand(r2)); | 501 __ cmp(function, Operand(r2)); |
| 502 __ Assert(eq, "Unexpected String function"); | 502 __ Assert(eq, "Unexpected String function"); |
| 503 } | 503 } |
| 504 | 504 |
| 505 // Load the first arguments in r0 and get rid of the rest. | 505 // Load the first arguments in r0 and get rid of the rest. |
| 506 Label no_arguments; | 506 Label no_arguments; |
| 507 __ cmp(r0, Operand(0)); | 507 __ cmp(r0, Operand(0, RelocInfo::NONE)); |
| 508 __ b(eq, &no_arguments); | 508 __ b(eq, &no_arguments); |
| 509 // First args = sp[(argc - 1) * 4]. | 509 // First args = sp[(argc - 1) * 4]. |
| 510 __ sub(r0, r0, Operand(1)); | 510 __ sub(r0, r0, Operand(1)); |
| 511 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); | 511 __ ldr(r0, MemOperand(sp, r0, LSL, kPointerSizeLog2, PreIndex)); |
| 512 // sp now point to args[0], drop args[0] + receiver. | 512 // sp now point to args[0], drop args[0] + receiver. |
| 513 __ Drop(2); | 513 __ Drop(2); |
| 514 | 514 |
| 515 Register argument = r2; | 515 Register argument = r2; |
| 516 Label not_cached, argument_is_string; | 516 Label not_cached, argument_is_string; |
| 517 NumberToStringStub::GenerateLookupNumberStringCache( | 517 NumberToStringStub::GenerateLookupNumberStringCache( |
| (...skipping 23 matching lines...) Expand all Loading... |
| 541 TAG_OBJECT); | 541 TAG_OBJECT); |
| 542 | 542 |
| 543 // Initialising the String Object. | 543 // Initialising the String Object. |
| 544 Register map = r3; | 544 Register map = r3; |
| 545 __ LoadGlobalFunctionInitialMap(function, map, r4); | 545 __ LoadGlobalFunctionInitialMap(function, map, r4); |
| 546 if (FLAG_debug_code) { | 546 if (FLAG_debug_code) { |
| 547 __ ldrb(r4, FieldMemOperand(map, Map::kInstanceSizeOffset)); | 547 __ ldrb(r4, FieldMemOperand(map, Map::kInstanceSizeOffset)); |
| 548 __ cmp(r4, Operand(JSValue::kSize >> kPointerSizeLog2)); | 548 __ cmp(r4, Operand(JSValue::kSize >> kPointerSizeLog2)); |
| 549 __ Assert(eq, "Unexpected string wrapper instance size"); | 549 __ Assert(eq, "Unexpected string wrapper instance size"); |
| 550 __ ldrb(r4, FieldMemOperand(map, Map::kUnusedPropertyFieldsOffset)); | 550 __ ldrb(r4, FieldMemOperand(map, Map::kUnusedPropertyFieldsOffset)); |
| 551 __ cmp(r4, Operand(0)); | 551 __ cmp(r4, Operand(0, RelocInfo::NONE)); |
| 552 __ Assert(eq, "Unexpected unused properties of string wrapper"); | 552 __ Assert(eq, "Unexpected unused properties of string wrapper"); |
| 553 } | 553 } |
| 554 __ str(map, FieldMemOperand(r0, HeapObject::kMapOffset)); | 554 __ str(map, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 555 | 555 |
| 556 __ LoadRoot(r3, Heap::kEmptyFixedArrayRootIndex); | 556 __ LoadRoot(r3, Heap::kEmptyFixedArrayRootIndex); |
| 557 __ str(r3, FieldMemOperand(r0, JSObject::kPropertiesOffset)); | 557 __ str(r3, FieldMemOperand(r0, JSObject::kPropertiesOffset)); |
| 558 __ str(r3, FieldMemOperand(r0, JSObject::kElementsOffset)); | 558 __ str(r3, FieldMemOperand(r0, JSObject::kElementsOffset)); |
| 559 | 559 |
| 560 __ str(argument, FieldMemOperand(r0, JSValue::kValueOffset)); | 560 __ str(argument, FieldMemOperand(r0, JSValue::kValueOffset)); |
| 561 | 561 |
| (...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 __ bind(&dont_adapt_arguments); | 1568 __ bind(&dont_adapt_arguments); |
| 1569 __ Jump(r3); | 1569 __ Jump(r3); |
| 1570 } | 1570 } |
| 1571 | 1571 |
| 1572 | 1572 |
| 1573 #undef __ | 1573 #undef __ |
| 1574 | 1574 |
| 1575 } } // namespace v8::internal | 1575 } } // namespace v8::internal |
| 1576 | 1576 |
| 1577 #endif // V8_TARGET_ARCH_ARM | 1577 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |