| 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 "hydrogen-bce.h" | 5 #include "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 } | 54 } |
| 58 | 55 |
| 59 if (constant != NULL && constant->HasInteger32Value()) { | 56 if (constant != NULL && constant->HasInteger32Value()) { |
| 60 *offset = is_sub ? - constant->Integer32Value() | 57 *offset = is_sub ? - constant->Integer32Value() |
| 61 : constant->Integer32Value(); | 58 : constant->Integer32Value(); |
| 62 } else { | 59 } else { |
| 63 *offset = 0; | 60 *offset = 0; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 if (data->FatherInDominatorTree()) { | 438 if (data->FatherInDominatorTree()) { |
| 442 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); | 439 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); |
| 443 } else { | 440 } else { |
| 444 table_.Delete(data->Key()); | 441 table_.Delete(data->Key()); |
| 445 } | 442 } |
| 446 data = data->NextInBasicBlock(); | 443 data = data->NextInBasicBlock(); |
| 447 } | 444 } |
| 448 } | 445 } |
| 449 | 446 |
| 450 } } // namespace v8::internal | 447 } } // namespace v8::internal |
| OLD | NEW |