OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/hydrogen-bce.h" | 5 #include "src/hydrogen-bce.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 | 9 |
10 | 10 |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 373 |
374 BoundsCheckBbData* HBoundsCheckEliminationPhase::PreProcessBlock( | 374 BoundsCheckBbData* HBoundsCheckEliminationPhase::PreProcessBlock( |
375 HBasicBlock* bb) { | 375 HBasicBlock* bb) { |
376 BoundsCheckBbData* bb_data_list = NULL; | 376 BoundsCheckBbData* bb_data_list = NULL; |
377 | 377 |
378 for (HInstructionIterator it(bb); !it.Done(); it.Advance()) { | 378 for (HInstructionIterator it(bb); !it.Done(); it.Advance()) { |
379 HInstruction* i = it.Current(); | 379 HInstruction* i = it.Current(); |
380 if (!i->IsBoundsCheck()) continue; | 380 if (!i->IsBoundsCheck()) continue; |
381 | 381 |
382 HBoundsCheck* check = HBoundsCheck::cast(i); | 382 HBoundsCheck* check = HBoundsCheck::cast(i); |
383 int32_t offset; | 383 int32_t offset = 0; |
384 BoundsCheckKey* key = | 384 BoundsCheckKey* key = |
385 BoundsCheckKey::Create(zone(), check, &offset); | 385 BoundsCheckKey::Create(zone(), check, &offset); |
386 if (key == NULL) continue; | 386 if (key == NULL) continue; |
387 BoundsCheckBbData** data_p = table_.LookupOrInsert(key, zone()); | 387 BoundsCheckBbData** data_p = table_.LookupOrInsert(key, zone()); |
388 BoundsCheckBbData* data = *data_p; | 388 BoundsCheckBbData* data = *data_p; |
389 if (data == NULL) { | 389 if (data == NULL) { |
390 bb_data_list = new(zone()) BoundsCheckBbData(key, | 390 bb_data_list = new(zone()) BoundsCheckBbData(key, |
391 offset, | 391 offset, |
392 offset, | 392 offset, |
393 bb, | 393 bb, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 if (data->FatherInDominatorTree()) { | 457 if (data->FatherInDominatorTree()) { |
458 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); | 458 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); |
459 } else { | 459 } else { |
460 table_.Delete(data->Key()); | 460 table_.Delete(data->Key()); |
461 } | 461 } |
462 data = data->NextInBasicBlock(); | 462 data = data->NextInBasicBlock(); |
463 } | 463 } |
464 } | 464 } |
465 | 465 |
466 } } // namespace v8::internal | 466 } } // namespace v8::internal |
OLD | NEW |