Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: pkg/compiler/lib/src/ssa/value_range_analyzer.dart

Issue 2941033002: Finish strong mode cleaning of dart2js. (Closed)
Patch Set: Add bug numbers and address comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/type_builder.dart ('k') | pkg/compiler/lib/src/ssa/variable_allocator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/value_range_analyzer.dart
diff --git a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
index 49e27f61713d3385fe0e5154b10399ef1e70d069..e13b83445ba5e33db09a397f979ac2ccd8a96574 100644
--- a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
+++ b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
@@ -132,21 +132,21 @@ class IntValue extends Value {
const IntValue(this.value, info) : super(info);
- Value operator +(other) {
+ Value operator +(dynamic other) {
if (other.isZero) return this;
if (other is! IntValue) return other + this;
ConstantSystem constantSystem = info.constantSystem;
- var constant = constantSystem.add.fold(
+ dynamic constant = constantSystem.add.fold(
constantSystem.createInt(value), constantSystem.createInt(other.value));
if (!constant.isInt) return const UnknownValue();
return info.newIntValue(constant.primitiveValue);
}
- Value operator -(other) {
+ Value operator -(dynamic other) {
if (other.isZero) return this;
if (other is! IntValue) return -other + this;
ConstantSystem constantSystem = info.constantSystem;
- var constant = constantSystem.subtract.fold(
+ dynamic constant = constantSystem.subtract.fold(
constantSystem.createInt(value), constantSystem.createInt(other.value));
if (!constant.isInt) return const UnknownValue();
return info.newIntValue(constant.primitiveValue);
@@ -155,25 +155,26 @@ class IntValue extends Value {
Value operator -() {
if (isZero) return this;
ConstantSystem constantSystem = info.constantSystem;
- var constant = constantSystem.negate.fold(constantSystem.createInt(value));
+ dynamic constant =
+ constantSystem.negate.fold(constantSystem.createInt(value));
if (!constant.isInt) return const UnknownValue();
return info.newIntValue(constant.primitiveValue);
}
- Value operator &(other) {
+ Value operator &(dynamic other) {
if (other is! IntValue) return const UnknownValue();
ConstantSystem constantSystem = info.constantSystem;
- var constant = constantSystem.bitAnd.fold(
+ dynamic constant = constantSystem.bitAnd.fold(
constantSystem.createInt(value), constantSystem.createInt(other.value));
return info.newIntValue(constant.primitiveValue);
}
- Value min(other) {
+ Value min(dynamic other) {
if (other is! IntValue) return other.min(this);
return this.value < other.value ? this : other;
}
- Value max(other) {
+ Value max(dynamic other) {
if (other is! IntValue) return other.max(this);
return this.value < other.value ? other : this;
}
@@ -969,7 +970,7 @@ class SsaValueRangeAnalyzer extends HBaseVisitor implements OptimizationPhase {
}
Range visitConditionalBranch(HConditionalBranch branch) {
- var condition = branch.condition;
+ dynamic condition = branch.condition;
// TODO(ngeoffray): Handle complex conditions.
if (condition is! HRelational) return info.newUnboundRange();
if (condition is HIdentity) return info.newUnboundRange();
« no previous file with comments | « pkg/compiler/lib/src/ssa/type_builder.dart ('k') | pkg/compiler/lib/src/ssa/variable_allocator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698