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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 void BreakTarget::set_direction(Directionality direction) { | 473 void BreakTarget::set_direction(Directionality direction) { |
474 JumpTarget::set_direction(direction); | 474 JumpTarget::set_direction(direction); |
475 ASSERT(cgen()->has_valid_frame()); | 475 ASSERT(cgen()->has_valid_frame()); |
476 expected_height_ = cgen()->frame()->height(); | 476 expected_height_ = cgen()->frame()->height(); |
477 } | 477 } |
478 | 478 |
479 | 479 |
480 void BreakTarget::CopyTo(BreakTarget* destination) { | 480 void BreakTarget::CopyTo(BreakTarget* destination) { |
481 ASSERT(destination != NULL); | 481 ASSERT(destination != NULL); |
482 destination->direction_ = direction_; | 482 destination->direction_ = direction_; |
483 destination->reaching_frames_ = reaching_frames_; | 483 destination->reaching_frames_.Rewind(0); |
484 destination->merge_labels_ = merge_labels_; | 484 destination->reaching_frames_.AddAll(reaching_frames_); |
| 485 destination->merge_labels_.Rewind(0); |
| 486 destination->merge_labels_.AddAll(merge_labels_); |
485 destination->entry_frame_ = entry_frame_; | 487 destination->entry_frame_ = entry_frame_; |
486 destination->entry_label_ = entry_label_; | 488 destination->entry_label_ = entry_label_; |
487 destination->expected_height_ = expected_height_; | 489 destination->expected_height_ = expected_height_; |
488 } | 490 } |
489 | 491 |
490 | 492 |
491 void BreakTarget::Jump() { | 493 void BreakTarget::Jump() { |
492 ASSERT(cgen()->has_valid_frame()); | 494 ASSERT(cgen()->has_valid_frame()); |
493 | 495 |
494 // Drop leftover statement state from the frame before merging. | 496 // Drop leftover statement state from the frame before merging. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 temp.CopyTo(this); | 602 temp.CopyTo(this); |
601 temp.Unuse(); | 603 temp.Unuse(); |
602 | 604 |
603 #ifdef DEBUG | 605 #ifdef DEBUG |
604 is_shadowing_ = false; | 606 is_shadowing_ = false; |
605 #endif | 607 #endif |
606 } | 608 } |
607 | 609 |
608 | 610 |
609 } } // namespace v8::internal | 611 } } // namespace v8::internal |
OLD | NEW |