OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 private: | 146 private: |
147 // Copy state to successor block. | 147 // Copy state to successor block. |
148 HCheckTable* Copy(HBasicBlock* succ, HBasicBlock* from_block, Zone* zone) { | 148 HCheckTable* Copy(HBasicBlock* succ, HBasicBlock* from_block, Zone* zone) { |
149 HCheckTable* copy = new(phase_->zone()) HCheckTable(phase_); | 149 HCheckTable* copy = new(phase_->zone()) HCheckTable(phase_); |
150 for (int i = 0; i < size_; i++) { | 150 for (int i = 0; i < size_; i++) { |
151 HCheckTableEntry* old_entry = &entries_[i]; | 151 HCheckTableEntry* old_entry = &entries_[i]; |
152 HCheckTableEntry* new_entry = ©->entries_[i]; | 152 HCheckTableEntry* new_entry = ©->entries_[i]; |
153 new_entry->object_ = old_entry->object_; | 153 new_entry->object_ = old_entry->object_; |
154 new_entry->maps_ = old_entry->maps_->Copy(phase_->zone()); | 154 new_entry->maps_ = old_entry->maps_->Copy(phase_->zone()); |
| 155 new_entry->is_stable_ = old_entry->is_stable_; |
155 // Keep the check if the existing check's block dominates the successor. | 156 // Keep the check if the existing check's block dominates the successor. |
156 if (old_entry->check_ != NULL && | 157 if (old_entry->check_ != NULL && |
157 old_entry->check_->block()->Dominates(succ)) { | 158 old_entry->check_->block()->Dominates(succ)) { |
158 new_entry->check_ = old_entry->check_; | 159 new_entry->check_ = old_entry->check_; |
159 new_entry->is_stable_ = old_entry->is_stable_; | |
160 } else { | 160 } else { |
161 // Leave it NULL till we meet a new check instruction for this object | 161 // Leave it NULL till we meet a new check instruction for this object |
162 // in the control flow. | 162 // in the control flow. |
163 new_entry->check_ = NULL; | 163 new_entry->check_ = NULL; |
164 } | 164 } |
165 } | 165 } |
166 copy->cursor_ = cursor_; | 166 copy->cursor_ = cursor_; |
167 copy->size_ = size_; | 167 copy->size_ = size_; |
168 | 168 |
169 // Create entries for succ block's phis. | 169 // Create entries for succ block's phis. |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 PRINT_STAT(removed_cho); | 726 PRINT_STAT(removed_cho); |
727 PRINT_STAT(narrowed); | 727 PRINT_STAT(narrowed); |
728 PRINT_STAT(loads); | 728 PRINT_STAT(loads); |
729 PRINT_STAT(empty); | 729 PRINT_STAT(empty); |
730 PRINT_STAT(compares_true); | 730 PRINT_STAT(compares_true); |
731 PRINT_STAT(compares_false); | 731 PRINT_STAT(compares_false); |
732 PRINT_STAT(transitions); | 732 PRINT_STAT(transitions); |
733 } | 733 } |
734 | 734 |
735 } } // namespace v8::internal | 735 } } // namespace v8::internal |
OLD | NEW |