| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 } | 628 } |
| 629 } | 629 } |
| 630 EnsureOneFreeTOSRegister(); | 630 EnsureOneFreeTOSRegister(); |
| 631 top_of_stack_state_ = kStateAfterPush[top_of_stack_state_]; | 631 top_of_stack_state_ = kStateAfterPush[top_of_stack_state_]; |
| 632 Register dest = kTopRegister[top_of_stack_state_]; | 632 Register dest = kTopRegister[top_of_stack_state_]; |
| 633 __ Move(dest, reg); | 633 __ Move(dest, reg); |
| 634 } | 634 } |
| 635 | 635 |
| 636 | 636 |
| 637 void VirtualFrame::SetElementAt(Register reg, int this_far_down) { | 637 void VirtualFrame::SetElementAt(Register reg, int this_far_down) { |
| 638 int virtual_elements = kVirtualElements[top_of_stack_state_]; | |
| 639 if (this_far_down == 0) { | 638 if (this_far_down == 0) { |
| 640 Pop(); | 639 Pop(); |
| 641 Register dest = GetTOSRegister(); | 640 Register dest = GetTOSRegister(); |
| 642 if (dest.is(reg)) { | 641 if (dest.is(reg)) { |
| 643 // We already popped one item off the top of the stack. If the only | 642 // We already popped one item off the top of the stack. If the only |
| 644 // free register is the one we were asked to push then we have been | 643 // free register is the one we were asked to push then we have been |
| 645 // asked to push a register that was already in use, which cannot | 644 // asked to push a register that was already in use, which cannot |
| 646 // happen. It therefore folows that there are two free TOS registers: | 645 // happen. It therefore folows that there are two free TOS registers: |
| 647 ASSERT(top_of_stack_state_ == NO_TOS_REGISTERS); | 646 ASSERT(top_of_stack_state_ == NO_TOS_REGISTERS); |
| 648 dest = dest.is(r0) ? r1 : r0; | 647 dest = dest.is(r0) ? r1 : r0; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 default: | 742 default: |
| 744 UNREACHABLE(); | 743 UNREACHABLE(); |
| 745 break; | 744 break; |
| 746 } | 745 } |
| 747 ASSERT(register_allocation_map_ == 0); // Not yet implemented. | 746 ASSERT(register_allocation_map_ == 0); // Not yet implemented. |
| 748 } | 747 } |
| 749 | 748 |
| 750 #undef __ | 749 #undef __ |
| 751 | 750 |
| 752 } } // namespace v8::internal | 751 } } // namespace v8::internal |
| OLD | NEW |