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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 void BreakTarget::set_direction(Directionality direction) { | 477 void BreakTarget::set_direction(Directionality direction) { |
478 JumpTarget::set_direction(direction); | 478 JumpTarget::set_direction(direction); |
479 ASSERT(cgen()->has_valid_frame()); | 479 ASSERT(cgen()->has_valid_frame()); |
480 expected_height_ = cgen()->frame()->height(); | 480 expected_height_ = cgen()->frame()->height(); |
481 } | 481 } |
482 | 482 |
483 | 483 |
484 void BreakTarget::CopyTo(BreakTarget* destination) { | 484 void BreakTarget::CopyTo(BreakTarget* destination) { |
485 ASSERT(destination != NULL); | 485 ASSERT(destination != NULL); |
486 destination->direction_ = direction_; | 486 destination->direction_ = direction_; |
487 destination->reaching_frames_.Clear(); | 487 destination->reaching_frames_ = reaching_frames_; |
488 destination->merge_labels_.Clear(); | 488 destination->merge_labels_ = merge_labels_; |
489 ASSERT(reaching_frames_.length() == merge_labels_.length()); | |
490 for (int i = 0; i < reaching_frames_.length(); i++) { | |
491 destination->reaching_frames_.Add(reaching_frames_[i]); | |
492 destination->merge_labels_.Add(merge_labels_[i]); | |
493 } | |
494 destination->entry_frame_ = entry_frame_; | 489 destination->entry_frame_ = entry_frame_; |
495 destination->entry_label_ = entry_label_; | 490 destination->entry_label_ = entry_label_; |
496 destination->expected_height_ = expected_height_; | 491 destination->expected_height_ = expected_height_; |
497 } | 492 } |
498 | 493 |
499 | 494 |
500 void BreakTarget::Jump() { | 495 void BreakTarget::Jump() { |
501 ASSERT(cgen()->has_valid_frame()); | 496 ASSERT(cgen()->has_valid_frame()); |
502 | 497 |
503 // Drop leftover statement state from the frame before merging. | 498 // Drop leftover statement state from the frame before merging. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 temp.CopyTo(this); | 604 temp.CopyTo(this); |
610 temp.Unuse(); | 605 temp.Unuse(); |
611 | 606 |
612 #ifdef DEBUG | 607 #ifdef DEBUG |
613 is_shadowing_ = false; | 608 is_shadowing_ = false; |
614 #endif | 609 #endif |
615 } | 610 } |
616 | 611 |
617 | 612 |
618 } } // namespace v8::internal | 613 } } // namespace v8::internal |
OLD | NEW |