| 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/crankshaft/hydrogen-range-analysis.h" | 5 #include "src/crankshaft/hydrogen-range-analysis.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 | 9 |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Propagate flags for negative zero checks upwards from conversions | 64 // Propagate flags for negative zero checks upwards from conversions |
| 65 // int32-to-tagged and int32-to-double. | 65 // int32-to-tagged and int32-to-double. |
| 66 Representation from = instr->value()->representation(); | 66 Representation from = instr->value()->representation(); |
| 67 DCHECK(from.Equals(instr->from())); | 67 DCHECK(from.Equals(instr->from())); |
| 68 if (from.IsSmiOrInteger32()) { | 68 if (from.IsSmiOrInteger32()) { |
| 69 DCHECK(instr->to().IsTagged() || | 69 DCHECK(instr->to().IsTagged() || |
| 70 instr->to().IsDouble() || | 70 instr->to().IsDouble() || |
| 71 instr->to().IsSmiOrInteger32()); | 71 instr->to().IsSmiOrInteger32()); |
| 72 PropagateMinusZeroChecks(instr->value()); | 72 PropagateMinusZeroChecks(instr->value()); |
| 73 } | 73 } |
| 74 } else if (value->IsCompareMinusZeroAndBranch()) { | |
| 75 HCompareMinusZeroAndBranch* instr = | |
| 76 HCompareMinusZeroAndBranch::cast(value); | |
| 77 if (instr->value()->representation().IsSmiOrInteger32()) { | |
| 78 PropagateMinusZeroChecks(instr->value()); | |
| 79 } | |
| 80 } | 74 } |
| 81 } | 75 } |
| 82 | 76 |
| 83 // Continue analysis in all dominated blocks. | 77 // Continue analysis in all dominated blocks. |
| 84 const ZoneList<HBasicBlock*>* dominated_blocks(block->dominated_blocks()); | 78 const ZoneList<HBasicBlock*>* dominated_blocks(block->dominated_blocks()); |
| 85 if (!dominated_blocks->is_empty()) { | 79 if (!dominated_blocks->is_empty()) { |
| 86 // Continue with first dominated block, and push the | 80 // Continue with first dominated block, and push the |
| 87 // remaining blocks on the stack (in reverse order). | 81 // remaining blocks on the stack (in reverse order). |
| 88 int last_changed_range = changed_ranges_.length(); | 82 int last_changed_range = changed_ranges_.length(); |
| 89 for (int i = dominated_blocks->length() - 1; i > 0; --i) { | 83 for (int i = dominated_blocks->length() - 1; i > 0; --i) { |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 276 } |
| 283 | 277 |
| 284 in_worklist_.Clear(); | 278 in_worklist_.Clear(); |
| 285 DCHECK(in_worklist_.IsEmpty()); | 279 DCHECK(in_worklist_.IsEmpty()); |
| 286 DCHECK(worklist_.is_empty()); | 280 DCHECK(worklist_.is_empty()); |
| 287 } | 281 } |
| 288 | 282 |
| 289 | 283 |
| 290 } // namespace internal | 284 } // namespace internal |
| 291 } // namespace v8 | 285 } // namespace v8 |
| OLD | NEW |