| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 void VirtualFrame::Dup() { | 499 void VirtualFrame::Dup() { |
| 500 AssertIsNotSpilled(); | 500 AssertIsNotSpilled(); |
| 501 switch (top_of_stack_state_) { | 501 switch (top_of_stack_state_) { |
| 502 case NO_TOS_REGISTERS: | 502 case NO_TOS_REGISTERS: |
| 503 __ ldr(r0, MemOperand(sp, 0)); | 503 __ ldr(r0, MemOperand(sp, 0)); |
| 504 top_of_stack_state_ = R0_TOS; | 504 top_of_stack_state_ = R0_TOS; |
| 505 break; | 505 break; |
| 506 case R0_TOS: | 506 case R0_TOS: |
| 507 __ mov(r1, r0); | 507 __ mov(r1, r0); |
| 508 // r0 and r1 contains the same value. Prefer a state with r0 holding TOS. |
| 508 top_of_stack_state_ = R0_R1_TOS; | 509 top_of_stack_state_ = R0_R1_TOS; |
| 509 break; | 510 break; |
| 510 case R1_TOS: | 511 case R1_TOS: |
| 511 __ mov(r0, r1); | 512 __ mov(r0, r1); |
| 513 // r0 and r1 contains the same value. Prefer a state with r0 holding TOS. |
| 512 top_of_stack_state_ = R0_R1_TOS; | 514 top_of_stack_state_ = R0_R1_TOS; |
| 513 break; | 515 break; |
| 514 case R0_R1_TOS: | 516 case R0_R1_TOS: |
| 515 __ push(r1); | 517 __ push(r1); |
| 516 __ mov(r1, r0); | 518 __ mov(r1, r0); |
| 517 // No need to change state as r0 and r1 now contains the same value. | 519 // r0 and r1 contains the same value. Prefer a state with r0 holding TOS. |
| 520 top_of_stack_state_ = R0_R1_TOS; |
| 518 break; | 521 break; |
| 519 case R1_R0_TOS: | 522 case R1_R0_TOS: |
| 520 __ push(r0); | 523 __ push(r0); |
| 521 __ mov(r0, r1); | 524 __ mov(r0, r1); |
| 522 // No need to change state as r0 and r1 now contains the same value. | 525 // r0 and r1 contains the same value. Prefer a state with r0 holding TOS. |
| 526 top_of_stack_state_ = R0_R1_TOS; |
| 523 break; | 527 break; |
| 524 default: | 528 default: |
| 525 UNREACHABLE(); | 529 UNREACHABLE(); |
| 526 } | 530 } |
| 527 element_count_++; | 531 element_count_++; |
| 528 } | 532 } |
| 529 | 533 |
| 530 | 534 |
| 531 Register VirtualFrame::PopToRegister(Register but_not_to_this_one) { | 535 Register VirtualFrame::PopToRegister(Register but_not_to_this_one) { |
| 532 ASSERT(but_not_to_this_one.is(r0) || | 536 ASSERT(but_not_to_this_one.is(r0) || |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 default: | 663 default: |
| 660 UNREACHABLE(); | 664 UNREACHABLE(); |
| 661 break; | 665 break; |
| 662 } | 666 } |
| 663 ASSERT(register_allocation_map_ == 0); // Not yet implemented. | 667 ASSERT(register_allocation_map_ == 0); // Not yet implemented. |
| 664 } | 668 } |
| 665 | 669 |
| 666 #undef __ | 670 #undef __ |
| 667 | 671 |
| 668 } } // namespace v8::internal | 672 } } // namespace v8::internal |
| OLD | NEW |