| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of ssa; | 5 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 6 import '../compiler.dart' show Compiler; |
| 7 import '../constant_system_dart.dart'; |
| 8 import '../constants/constant_system.dart'; |
| 9 import '../constants/values.dart'; |
| 10 import '../js_backend/js_backend.dart'; |
| 6 | 11 |
| 12 import 'nodes.dart'; |
| 13 import 'optimize.dart'; |
| 7 | 14 |
| 8 class ValueRangeInfo { | 15 class ValueRangeInfo { |
| 9 final ConstantSystem constantSystem; | 16 final ConstantSystem constantSystem; |
| 10 | 17 |
| 11 IntValue intZero; | 18 IntValue intZero; |
| 12 IntValue intOne; | 19 IntValue intOne; |
| 13 | 20 |
| 14 ValueRangeInfo(this.constantSystem) { | 21 ValueRangeInfo(this.constantSystem) { |
| 15 intZero = newIntValue(0); | 22 intZero = newIntValue(0); |
| 16 intOne = newIntValue(1); | 23 intOne = newIntValue(1); |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 } | 1085 } |
| 1079 | 1086 |
| 1080 Range handleBinaryOperation(HBinaryArithmetic instruction) { | 1087 Range handleBinaryOperation(HBinaryArithmetic instruction) { |
| 1081 Range leftRange = visit(instruction.left); | 1088 Range leftRange = visit(instruction.left); |
| 1082 Range rightRange = visit(instruction.right); | 1089 Range rightRange = visit(instruction.right); |
| 1083 if (leftRange == null || rightRange == null) return null; | 1090 if (leftRange == null || rightRange == null) return null; |
| 1084 BinaryOperation operation = instruction.operation(info.constantSystem); | 1091 BinaryOperation operation = instruction.operation(info.constantSystem); |
| 1085 return operation.apply(leftRange, rightRange); | 1092 return operation.apply(leftRange, rightRange); |
| 1086 } | 1093 } |
| 1087 } | 1094 } |
| OLD | NEW |