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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart

Issue 614993002: Rename Constant to ConstantValue and ConstExp to ConstantExpression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 3 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
Index: sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
index 15f460bfaf4a23a31c768e6a37ac1c49b1f4f08a..3b7f3dc312c674a86e8e61218a977153f8980484 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
@@ -136,7 +136,7 @@ class IntValue extends Value {
var constant = constantSystem.add.fold(
constantSystem.createInt(value), constantSystem.createInt(other.value));
if (!constant.isInt) return const UnknownValue();
- return info.newIntValue(constant.value);
+ return info.newIntValue(constant.primitiveValue);
}
Value operator -(other) {
@@ -146,7 +146,7 @@ class IntValue extends Value {
var constant = constantSystem.subtract.fold(
constantSystem.createInt(value), constantSystem.createInt(other.value));
if (!constant.isInt) return const UnknownValue();
- return info.newIntValue(constant.value);
+ return info.newIntValue(constant.primitiveValue);
}
Value operator -() {
@@ -155,7 +155,7 @@ class IntValue extends Value {
var constant = constantSystem.negate.fold(
constantSystem.createInt(value));
if (!constant.isInt) return const UnknownValue();
- return info.newIntValue(constant.value);
+ return info.newIntValue(constant.primitiveValue);
}
Value operator &(other) {
@@ -163,7 +163,7 @@ class IntValue extends Value {
ConstantSystem constantSystem = info.constantSystem;
var constant = constantSystem.bitAnd.fold(
constantSystem.createInt(value), constantSystem.createInt(other.value));
- return info.newIntValue(constant.value);
+ return info.newIntValue(constant.primitiveValue);
}
Value min(other) {
@@ -672,15 +672,15 @@ class SsaValueRangeAnalyzer extends HBaseVisitor implements OptimizationPhase {
Range visitConstant(HConstant hConstant) {
if (!hConstant.isInteger(compiler)) return info.newUnboundRange();
- Constant constant = hConstant.constant;
- NumConstant constantNum;
- if (constant is DeferredConstant) {
+ ConstantValue constant = hConstant.constant;
+ NumConstantValue constantNum;
+ if (constant is DeferredConstantValue) {
constantNum = constant.referenced;
} else {
constantNum = constant;
}
- if (constantNum.isMinusZero) constantNum = new IntConstant(0);
- Value value = info.newIntValue(constantNum.value);
+ if (constantNum.isMinusZero) constantNum = new IntConstantValue(0);
+ Value value = info.newIntValue(constantNum.primitiveValue);
return info.newNormalizedRange(value, value);
}

Powered by Google App Engine
This is Rietveld 408576698