| 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 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 5 import '../common/codegen.dart' show CodegenWorkItem; |
| 6 import '../compiler.dart' show Compiler; | 6 import '../compiler.dart' show Compiler; |
| 7 import '../constant_system_dart.dart'; | 7 import '../constant_system_dart.dart'; |
| 8 import '../constants/constant_system.dart'; | 8 import '../constants/constant_system.dart'; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../js_backend/js_backend.dart'; | 10 import '../js_backend/js_backend.dart'; |
| 11 | |
| 12 import 'nodes.dart'; | 11 import 'nodes.dart'; |
| 13 import 'optimize.dart'; | 12 import 'optimize.dart'; |
| 14 | 13 |
| 15 class ValueRangeInfo { | 14 class ValueRangeInfo { |
| 16 final ConstantSystem constantSystem; | 15 final ConstantSystem constantSystem; |
| 17 | 16 |
| 18 IntValue intZero; | 17 IntValue intZero; |
| 19 IntValue intOne; | 18 IntValue intOne; |
| 20 | 19 |
| 21 ValueRangeInfo(this.constantSystem) { | 20 ValueRangeInfo(this.constantSystem) { |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 } | 1082 } |
| 1084 | 1083 |
| 1085 Range handleBinaryOperation(HBinaryArithmetic instruction) { | 1084 Range handleBinaryOperation(HBinaryArithmetic instruction) { |
| 1086 Range leftRange = visit(instruction.left); | 1085 Range leftRange = visit(instruction.left); |
| 1087 Range rightRange = visit(instruction.right); | 1086 Range rightRange = visit(instruction.right); |
| 1088 if (leftRange == null || rightRange == null) return null; | 1087 if (leftRange == null || rightRange == null) return null; |
| 1089 BinaryOperation operation = instruction.operation(info.constantSystem); | 1088 BinaryOperation operation = instruction.operation(info.constantSystem); |
| 1090 return operation.apply(leftRange, rightRange); | 1089 return operation.apply(leftRange, rightRange); |
| 1091 } | 1090 } |
| 1092 } | 1091 } |
| OLD | NEW |