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 29 matching lines...) Expand all Loading... |
40 if (index->left()->IsConstant()) { | 40 if (index->left()->IsConstant()) { |
41 constant = HConstant::cast(index->left()); | 41 constant = HConstant::cast(index->left()); |
42 index_base = index->right(); | 42 index_base = index->right(); |
43 } else if (index->right()->IsConstant()) { | 43 } else if (index->right()->IsConstant()) { |
44 constant = HConstant::cast(index->right()); | 44 constant = HConstant::cast(index->right()); |
45 index_base = index->left(); | 45 index_base = index->left(); |
46 } | 46 } |
47 } else if (check->index()->IsSub()) { | 47 } else if (check->index()->IsSub()) { |
48 HSub* index = HSub::cast(check->index()); | 48 HSub* index = HSub::cast(check->index()); |
49 is_sub = true; | 49 is_sub = true; |
50 if (index->left()->IsConstant()) { | 50 if (index->right()->IsConstant()) { |
51 constant = HConstant::cast(index->left()); | |
52 index_base = index->right(); | |
53 } else if (index->right()->IsConstant()) { | |
54 constant = HConstant::cast(index->right()); | 51 constant = HConstant::cast(index->right()); |
55 index_base = index->left(); | 52 index_base = index->left(); |
56 } | 53 } |
57 } else if (check->index()->IsConstant()) { | 54 } else if (check->index()->IsConstant()) { |
58 index_base = check->block()->graph()->GetConstant0(); | 55 index_base = check->block()->graph()->GetConstant0(); |
59 constant = HConstant::cast(check->index()); | 56 constant = HConstant::cast(check->index()); |
60 } | 57 } |
61 | 58 |
62 if (constant != NULL && constant->HasInteger32Value()) { | 59 if (constant != NULL && constant->HasInteger32Value()) { |
63 *offset = is_sub ? - constant->Integer32Value() | 60 *offset = is_sub ? - constant->Integer32Value() |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 if (data->FatherInDominatorTree()) { | 456 if (data->FatherInDominatorTree()) { |
460 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); | 457 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); |
461 } else { | 458 } else { |
462 table_.Delete(data->Key()); | 459 table_.Delete(data->Key()); |
463 } | 460 } |
464 data = data->NextInBasicBlock(); | 461 data = data->NextInBasicBlock(); |
465 } | 462 } |
466 } | 463 } |
467 | 464 |
468 } } // namespace v8::internal | 465 } } // namespace v8::internal |
OLD | NEW |