| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 void VirtualFrame::Unuse(Register reg) { | 128 void VirtualFrame::Unuse(Register reg) { |
| 129 frame_registers_.Unuse(reg); | 129 frame_registers_.Unuse(reg); |
| 130 cgen_->allocator()->Unuse(reg); | 130 cgen_->allocator()->Unuse(reg); |
| 131 } | 131 } |
| 132 | 132 |
| 133 | 133 |
| 134 void VirtualFrame::Spill(Register target) { | 134 void VirtualFrame::Spill(Register target) { |
| 135 if (!frame_registers_.is_used(target)) return; |
| 135 for (int i = 0; i < elements_.length(); i++) { | 136 for (int i = 0; i < elements_.length(); i++) { |
| 136 if (elements_[i].is_register() && elements_[i].reg().is(target)) { | 137 if (elements_[i].is_register() && elements_[i].reg().is(target)) { |
| 137 SpillElementAt(i); | 138 SpillElementAt(i); |
| 138 } | 139 } |
| 139 } | 140 } |
| 140 } | 141 } |
| 141 | 142 |
| 142 | 143 |
| 143 // Spill any register if possible, making its external reference count zero. | 144 // Spill any register if possible, making its external reference count zero. |
| 144 Register VirtualFrame::SpillAnyRegister() { | 145 Register VirtualFrame::SpillAnyRegister() { |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 return false; | 962 return false; |
| 962 } | 963 } |
| 963 } | 964 } |
| 964 return true; | 965 return true; |
| 965 } | 966 } |
| 966 #endif | 967 #endif |
| 967 | 968 |
| 968 #undef __ | 969 #undef __ |
| 969 | 970 |
| 970 } } // namespace v8::internal | 971 } } // namespace v8::internal |
| OLD | NEW |