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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 masm_ = cgen->masm(); | 67 masm_ = cgen->masm(); |
68 direction_ = direction; | 68 direction_ = direction; |
69 } | 69 } |
70 | 70 |
71 | 71 |
72 void JumpTarget::Unuse() { | 72 void JumpTarget::Unuse() { |
73 // We should not deallocate jump targets that have unresolved jumps | 73 // We should not deallocate jump targets that have unresolved jumps |
74 // to them. In the event of a compile-time stack overflow or an | 74 // to them. In the event of a compile-time stack overflow or an |
75 // unitialized jump target, we don't care. | 75 // unitialized jump target, we don't care. |
76 ASSERT(!is_linked() || cgen_ == NULL || cgen_->HasStackOverflow()); | 76 ASSERT(!is_linked() || cgen_ == NULL || cgen_->HasStackOverflow()); |
77 #ifdef DEBUG | |
78 for (int i = 0; i < reaching_frames_.length(); i++) { | 77 for (int i = 0; i < reaching_frames_.length(); i++) { |
79 ASSERT(reaching_frames_[i] == NULL); | 78 delete reaching_frames_[i]; |
80 } | 79 } |
81 #endif | |
82 delete entry_frame_; | 80 delete entry_frame_; |
83 | 81 |
84 Reset(); | 82 Reset(); |
85 } | 83 } |
86 | 84 |
87 | 85 |
88 void JumpTarget::Reset() { | 86 void JumpTarget::Reset() { |
89 reaching_frames_.Clear(); | 87 reaching_frames_.Clear(); |
90 merge_labels_.Clear(); | 88 merge_labels_.Clear(); |
91 entry_frame_ = NULL; | 89 entry_frame_ = NULL; |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 temp.CopyTo(this); | 649 temp.CopyTo(this); |
652 temp.Reset(); // So the destructor does not deallocate virtual frames. | 650 temp.Reset(); // So the destructor does not deallocate virtual frames. |
653 | 651 |
654 #ifdef DEBUG | 652 #ifdef DEBUG |
655 is_shadowing_ = false; | 653 is_shadowing_ = false; |
656 #endif | 654 #endif |
657 } | 655 } |
658 | 656 |
659 | 657 |
660 } } // namespace v8::internal | 658 } } // namespace v8::internal |
OLD | NEW |