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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Shuffle things around so the top of stack only in r0. | 61 // Shuffle things around so the top of stack only in r0. |
62 MergeTOSTo(R0_TOS); | 62 MergeTOSTo(R0_TOS); |
63 // Pop the register off the stack so it is detached from the frame. | 63 // Pop the register off the stack so it is detached from the frame. |
64 LowerHeight(1); | 64 LowerHeight(1); |
65 top_of_stack_state_ = NO_TOS_REGISTERS; | 65 top_of_stack_state_ = NO_TOS_REGISTERS; |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 void VirtualFrame::MergeTo(const VirtualFrame* expected, Condition cond) { | 69 void VirtualFrame::MergeTo(const VirtualFrame* expected, Condition cond) { |
70 if (Equals(expected)) return; | 70 if (Equals(expected)) return; |
| 71 ASSERT((expected->tos_known_smi_map_ & tos_known_smi_map_) == |
| 72 expected->tos_known_smi_map_); |
71 ASSERT(expected->IsCompatibleWith(this)); | 73 ASSERT(expected->IsCompatibleWith(this)); |
72 MergeTOSTo(expected->top_of_stack_state_, cond); | 74 MergeTOSTo(expected->top_of_stack_state_, cond); |
73 ASSERT(register_allocation_map_ == expected->register_allocation_map_); | 75 ASSERT(register_allocation_map_ == expected->register_allocation_map_); |
74 } | 76 } |
75 | 77 |
76 | 78 |
77 void VirtualFrame::MergeTo(VirtualFrame* expected, Condition cond) { | 79 void VirtualFrame::MergeTo(VirtualFrame* expected, Condition cond) { |
78 if (Equals(expected)) return; | 80 if (Equals(expected)) return; |
79 expected->tos_known_smi_map_ &= tos_known_smi_map_; | 81 tos_known_smi_map_ &= expected->tos_known_smi_map_; |
80 MergeTOSTo(expected->top_of_stack_state_, cond); | 82 MergeTOSTo(expected->top_of_stack_state_, cond); |
81 ASSERT(register_allocation_map_ == expected->register_allocation_map_); | 83 ASSERT(register_allocation_map_ == expected->register_allocation_map_); |
82 } | 84 } |
83 | 85 |
84 | 86 |
85 void VirtualFrame::MergeTOSTo( | 87 void VirtualFrame::MergeTOSTo( |
86 VirtualFrame::TopOfStack expected_top_of_stack_state, Condition cond) { | 88 VirtualFrame::TopOfStack expected_top_of_stack_state, Condition cond) { |
87 #define CASE_NUMBER(a, b) ((a) * TOS_STATES + (b)) | 89 #define CASE_NUMBER(a, b) ((a) * TOS_STATES + (b)) |
88 switch (CASE_NUMBER(top_of_stack_state_, expected_top_of_stack_state)) { | 90 switch (CASE_NUMBER(top_of_stack_state_, expected_top_of_stack_state)) { |
89 case CASE_NUMBER(NO_TOS_REGISTERS, NO_TOS_REGISTERS): | 91 case CASE_NUMBER(NO_TOS_REGISTERS, NO_TOS_REGISTERS): |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 break; | 825 break; |
824 } | 826 } |
825 ASSERT(register_allocation_map_ == 0); // Not yet implemented. | 827 ASSERT(register_allocation_map_ == 0); // Not yet implemented. |
826 } | 828 } |
827 | 829 |
828 #undef __ | 830 #undef __ |
829 | 831 |
830 } } // namespace v8::internal | 832 } } // namespace v8::internal |
831 | 833 |
832 #endif // V8_TARGET_ARCH_ARM | 834 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |