| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 entry_frame_->elements_[i] = | 263 entry_frame_->elements_[i] = |
| 264 FrameElement::RegisterElement(reg, | 264 FrameElement::RegisterElement(reg, |
| 265 FrameElement::NOT_SYNCED); | 265 FrameElement::NOT_SYNCED); |
| 266 } | 266 } |
| 267 } else { | 267 } else { |
| 268 // The element is already determined. | 268 // The element is already determined. |
| 269 entry_frame_->elements_[i] = *elements[i]; | 269 entry_frame_->elements_[i] = *elements[i]; |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 | 272 |
| 273 // Set the copied flags in the frame to be exact. This assumes that |
| 274 // the backing store of copies is always lower in the frame. |
| 275 for (int i = 0; i < length; i++) { |
| 276 entry_frame_->elements_[i].clear_copied(); |
| 277 if (entry_frame_->elements_[i].is_copy()) { |
| 278 int index = entry_frame_->elements_[i].index(); |
| 279 entry_frame_->elements_[index].set_copied(); |
| 280 } |
| 281 } |
| 282 |
| 273 // Fill in the other fields of the entry frame. | 283 // Fill in the other fields of the entry frame. |
| 274 entry_frame_->local_count_ = initial_frame->local_count_; | 284 entry_frame_->local_count_ = initial_frame->local_count_; |
| 275 entry_frame_->frame_pointer_ = initial_frame->frame_pointer_; | 285 entry_frame_->frame_pointer_ = initial_frame->frame_pointer_; |
| 276 | 286 |
| 277 // The stack pointer is at the highest synced element or the base of | 287 // The stack pointer is at the highest synced element or the base of |
| 278 // the expression stack. | 288 // the expression stack. |
| 279 int stack_pointer = length - 1; | 289 int stack_pointer = length - 1; |
| 280 while (stack_pointer >= entry_frame_->expression_base_index() && | 290 while (stack_pointer >= entry_frame_->expression_base_index() && |
| 281 !entry_frame_->elements_[stack_pointer].is_synced()) { | 291 !entry_frame_->elements_[stack_pointer].is_synced()) { |
| 282 stack_pointer--; | 292 stack_pointer--; |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 temp.CopyTo(this); | 643 temp.CopyTo(this); |
| 634 temp.Reset(); // So the destructor does not deallocate virtual frames. | 644 temp.Reset(); // So the destructor does not deallocate virtual frames. |
| 635 | 645 |
| 636 #ifdef DEBUG | 646 #ifdef DEBUG |
| 637 is_shadowing_ = false; | 647 is_shadowing_ = false; |
| 638 #endif | 648 #endif |
| 639 } | 649 } |
| 640 | 650 |
| 641 | 651 |
| 642 } } // namespace v8::internal | 652 } } // namespace v8::internal |
| OLD | NEW |