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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 TightenCheck(upper_check_, new_check); | 176 TightenCheck(upper_check_, new_check); |
177 UpdateUpperOffsets(upper_check_, upper_offset_); | 177 UpdateUpperOffsets(upper_check_, upper_offset_); |
178 } | 178 } |
179 } else if (new_offset < lower_offset_) { | 179 } else if (new_offset < lower_offset_) { |
180 lower_offset_ = new_offset; | 180 lower_offset_ = new_offset; |
181 if (HasSingleCheck()) { | 181 if (HasSingleCheck()) { |
182 keep_new_check = true; | 182 keep_new_check = true; |
183 lower_check_ = new_check; | 183 lower_check_ = new_check; |
184 } else { | 184 } else { |
185 TightenCheck(lower_check_, new_check); | 185 TightenCheck(lower_check_, new_check); |
186 UpdateLowerOffsets(upper_check_, upper_offset_); | 186 UpdateLowerOffsets(lower_check_, lower_offset_); |
187 } | 187 } |
188 } else { | 188 } else { |
189 // Should never have called CoverCheck() in this case. | 189 // Should never have called CoverCheck() in this case. |
190 UNREACHABLE(); | 190 UNREACHABLE(); |
191 } | 191 } |
192 | 192 |
193 if (!keep_new_check) { | 193 if (!keep_new_check) { |
194 new_check->block()->graph()->isolate()->counters()-> | 194 new_check->block()->graph()->isolate()->counters()-> |
195 bounds_checks_eliminated()->Increment(); | 195 bounds_checks_eliminated()->Increment(); |
196 new_check->DeleteAndReplaceWith(new_check->ActualValue()); | 196 new_check->DeleteAndReplaceWith(new_check->ActualValue()); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 if (data->FatherInDominatorTree()) { | 425 if (data->FatherInDominatorTree()) { |
426 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); | 426 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); |
427 } else { | 427 } else { |
428 table_.Delete(data->Key()); | 428 table_.Delete(data->Key()); |
429 } | 429 } |
430 data = data->NextInBasicBlock(); | 430 data = data->NextInBasicBlock(); |
431 } | 431 } |
432 } | 432 } |
433 | 433 |
434 } } // namespace v8::internal | 434 } } // namespace v8::internal |
OLD | NEW |