Chromium Code Reviews| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 Spill(result); | 163 Spill(result); |
| 164 ASSERT(!cgen_->allocator()->is_used(result)); | 164 ASSERT(!cgen_->allocator()->is_used(result)); |
| 165 } | 165 } |
| 166 return result; | 166 return result; |
| 167 } | 167 } |
| 168 | 168 |
| 169 | 169 |
| 170 // Spill an element, making its type be MEMORY. | 170 // Spill an element, making its type be MEMORY. |
| 171 // Does not decrement usage counts, if element is a register. | 171 // Does not decrement usage counts, if element is a register. |
| 172 void VirtualFrame::RawSpillElementAt(int index) { | 172 void VirtualFrame::RawSpillElementAt(int index) { |
| 173 SyncElementAt(index); | 173 if (elements_[index].is_valid()) { |
|
Kevin Millikin (Chromium)
2009/02/03 09:48:55
I think there should also be an early exit in RawS
| |
| 174 // The element is now in memory. | 174 SyncElementAt(index); |
| 175 elements_[index] = FrameElement::MemoryElement(); | 175 // The element is now in memory. |
| 176 elements_[index] = FrameElement::MemoryElement(); | |
| 177 } | |
| 176 } | 178 } |
| 177 | 179 |
| 178 | 180 |
| 179 // Make the type of the element at a given index be MEMORY. | 181 // Make the type of the element at a given index be MEMORY. |
| 180 void VirtualFrame::SpillElementAt(int index) { | 182 void VirtualFrame::SpillElementAt(int index) { |
| 181 if (elements_[index].is_register()) { | 183 if (elements_[index].is_register()) { |
| 182 Unuse(elements_[index].reg()); | 184 Unuse(elements_[index].reg()); |
| 183 } | 185 } |
| 184 RawSpillElementAt(index); | 186 RawSpillElementAt(index); |
| 185 } | 187 } |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1119 return false; | 1121 return false; |
| 1120 } | 1122 } |
| 1121 } | 1123 } |
| 1122 return true; | 1124 return true; |
| 1123 } | 1125 } |
| 1124 #endif | 1126 #endif |
| 1125 | 1127 |
| 1126 #undef __ | 1128 #undef __ |
| 1127 | 1129 |
| 1128 } } // namespace v8::internal | 1130 } } // namespace v8::internal |
| OLD | NEW |