| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 // be adjusted. | 406 // be adjusted. |
| 407 const VirtualFrame::TopOfStack VirtualFrame::kStateAfterPop[TOS_STATES] = | 407 const VirtualFrame::TopOfStack VirtualFrame::kStateAfterPop[TOS_STATES] = |
| 408 { NO_TOS_REGISTERS, NO_TOS_REGISTERS, NO_TOS_REGISTERS, R0_TOS, R1_TOS }; | 408 { NO_TOS_REGISTERS, NO_TOS_REGISTERS, NO_TOS_REGISTERS, R0_TOS, R1_TOS }; |
| 409 // Pushing is done by the transition implied by kStateAfterPush. Of course if | 409 // Pushing is done by the transition implied by kStateAfterPush. Of course if |
| 410 // the maximum number of registers was already allocated to the top of stack | 410 // the maximum number of registers was already allocated to the top of stack |
| 411 // slots then one register must be physically pushed onto the stack. | 411 // slots then one register must be physically pushed onto the stack. |
| 412 const VirtualFrame::TopOfStack VirtualFrame::kStateAfterPush[TOS_STATES] = | 412 const VirtualFrame::TopOfStack VirtualFrame::kStateAfterPush[TOS_STATES] = |
| 413 { R0_TOS, R1_R0_TOS, R0_R1_TOS, R0_R1_TOS, R1_R0_TOS }; | 413 { R0_TOS, R1_R0_TOS, R0_R1_TOS, R0_R1_TOS, R1_R0_TOS }; |
| 414 | 414 |
| 415 | 415 |
| 416 bool VirtualFrame::SpilledScope::is_spilled_ = false; | |
| 417 | |
| 418 | |
| 419 void VirtualFrame::Drop(int count) { | 416 void VirtualFrame::Drop(int count) { |
| 420 ASSERT(count >= 0); | 417 ASSERT(count >= 0); |
| 421 ASSERT(height() >= count); | 418 ASSERT(height() >= count); |
| 422 // Discard elements from the virtual frame and free any registers. | 419 // Discard elements from the virtual frame and free any registers. |
| 423 int num_virtual_elements = kVirtualElements[top_of_stack_state_]; | 420 int num_virtual_elements = kVirtualElements[top_of_stack_state_]; |
| 424 while (num_virtual_elements > 0) { | 421 while (num_virtual_elements > 0) { |
| 425 Pop(); | 422 Pop(); |
| 426 num_virtual_elements--; | 423 num_virtual_elements--; |
| 427 count--; | 424 count--; |
| 428 if (count == 0) return; | 425 if (count == 0) return; |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 break; | 777 break; |
| 781 } | 778 } |
| 782 ASSERT(register_allocation_map_ == 0); // Not yet implemented. | 779 ASSERT(register_allocation_map_ == 0); // Not yet implemented. |
| 783 } | 780 } |
| 784 | 781 |
| 785 #undef __ | 782 #undef __ |
| 786 | 783 |
| 787 } } // namespace v8::internal | 784 } } // namespace v8::internal |
| 788 | 785 |
| 789 #endif // V8_TARGET_ARCH_ARM | 786 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |