OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { | 599 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
600 // ----------- S t a t e ------------- | 600 // ----------- S t a t e ------------- |
601 // -- eax : key (index) | 601 // -- eax : key (index) |
602 // -- edx : receiver | 602 // -- edx : receiver |
603 // -- esp[0] : return address | 603 // -- esp[0] : return address |
604 // ----------------------------------- | 604 // ----------------------------------- |
605 Label miss; | 605 Label miss; |
606 | 606 |
607 Register receiver = edx; | 607 Register receiver = edx; |
608 Register index = eax; | 608 Register index = eax; |
609 Register scratch1 = ebx; | 609 Register scratch = ecx; |
610 Register scratch2 = ecx; | |
611 Register result = eax; | 610 Register result = eax; |
612 | 611 |
613 StringCharAtGenerator char_at_generator(receiver, | 612 StringCharAtGenerator char_at_generator(receiver, |
614 index, | 613 index, |
615 scratch1, | 614 scratch, |
616 scratch2, | |
617 result, | 615 result, |
618 &miss, // When not a string. | 616 &miss, // When not a string. |
619 &miss, // When not a number. | 617 &miss, // When not a number. |
620 &miss, // When index out of range. | 618 &miss, // When index out of range. |
621 STRING_INDEX_IS_ARRAY_INDEX); | 619 STRING_INDEX_IS_ARRAY_INDEX); |
622 char_at_generator.GenerateFast(masm); | 620 char_at_generator.GenerateFast(masm); |
623 __ ret(0); | 621 __ ret(0); |
624 | 622 |
625 StubRuntimeCallHelper call_helper; | 623 StubRuntimeCallHelper call_helper; |
626 char_at_generator.GenerateSlow(masm, call_helper); | 624 char_at_generator.GenerateSlow(masm, call_helper); |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1674 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1677 ? not_zero | 1675 ? not_zero |
1678 : zero; | 1676 : zero; |
1679 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1677 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1680 } | 1678 } |
1681 | 1679 |
1682 | 1680 |
1683 } } // namespace v8::internal | 1681 } } // namespace v8::internal |
1684 | 1682 |
1685 #endif // V8_TARGET_ARCH_IA32 | 1683 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |