| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 ASSERT(!cgen_->allocator()->is_used(result)); | 186 ASSERT(!cgen_->allocator()->is_used(result)); |
| 187 } | 187 } |
| 188 return result; | 188 return result; |
| 189 } | 189 } |
| 190 | 190 |
| 191 | 191 |
| 192 // Make the type of the element at a given index be MEMORY. | 192 // Make the type of the element at a given index be MEMORY. |
| 193 void VirtualFrame::SpillElementAt(int index) { | 193 void VirtualFrame::SpillElementAt(int index) { |
| 194 if (!elements_[index].is_valid()) return; | 194 if (!elements_[index].is_valid()) return; |
| 195 | 195 |
| 196 SyncElementAt(index); |
| 196 if (elements_[index].is_register()) { | 197 if (elements_[index].is_register()) { |
| 197 Unuse(elements_[index].reg()); | 198 Unuse(elements_[index].reg()); |
| 198 } | 199 } |
| 199 SyncElementAt(index); | |
| 200 // The element is now in memory. | 200 // The element is now in memory. |
| 201 elements_[index] = FrameElement::MemoryElement(); | 201 elements_[index] = FrameElement::MemoryElement(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 | 204 |
| 205 // Clear the dirty bits for the range of elements in [begin, end). | 205 // Clear the dirty bits for the range of elements in [begin, end). |
| 206 void VirtualFrame::SyncRange(int begin, int end) { | 206 void VirtualFrame::SyncRange(int begin, int end) { |
| 207 ASSERT(begin >= 0); | 207 ASSERT(begin >= 0); |
| 208 ASSERT(end <= elements_.length()); | 208 ASSERT(end <= elements_.length()); |
| 209 for (int i = begin; i < end; i++) { | 209 for (int i = begin; i < end; i++) { |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 if (frame_registers_.count(i) != other->frame_registers_.count(i)) { | 510 if (frame_registers_.count(i) != other->frame_registers_.count(i)) { |
| 511 return false; | 511 return false; |
| 512 } | 512 } |
| 513 } | 513 } |
| 514 | 514 |
| 515 return true; | 515 return true; |
| 516 } | 516 } |
| 517 #endif | 517 #endif |
| 518 | 518 |
| 519 } } // namespace v8::internal | 519 } } // namespace v8::internal |
| OLD | NEW |