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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 9874014: New CL for https://chromiumcodereview.appspot.com/9784002/: Support non-speculative type propagatio… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « no previous file | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
===================================================================
--- lib/compiler/implementation/ssa/nodes.dart (revision 5967)
+++ lib/compiler/implementation/ssa/nodes.dart (working copy)
@@ -757,6 +757,19 @@
assert(false);
}
+ String toString() {
+ if (isConflicting()) return 'conflicting';
+ if (isUnknown()) return 'unknown';
+ if (isBoolean()) return 'boolean';
+ if (isInteger()) return 'integer';
+ if (isDouble()) return 'double';
+ if (isString()) return 'string';
+ if (isArray()) return 'array';
+ if (isNumber()) return 'number';
+ if (isStringOrArray()) return 'string or array';
+ unreachable();
+ }
+
HType combine(HType other) {
if (isUnknown()) return other;
if (other.isUnknown()) return this;
@@ -842,26 +855,6 @@
// inserted to make sure the users get the right type in.
bool hasExpectedType() => false;
- // Re-compute and update the type of the instruction. Returns
- // whether or not the type was changed.
- bool updateType() {
- if (type.isConflicting()) return false;
- HType newType = computeType();
- HType desiredType = computeDesiredType();
- HType combined = newType.combine(desiredType);
- if (combined.isKnown()) newType = combined;
-
- bool changed = (type != newType);
- if (type.isUnknown()) {
- type = newType;
- return changed;
- } else if (changed) {
- type = type.combine(newType);
- return changed;
- }
- return false;
- }
-
bool isInBasicBlock() => block !== null;
String inputsToString() {
@@ -1687,9 +1680,6 @@
accept(HVisitor visitor) => visitor.visitConstant(this);
HType computeType() => type;
- // Literals have the type they have. It can't be changed.
- bool updateType() => false;
-
bool hasExpectedType() => true;
bool isConstant() => true;
@@ -1800,12 +1790,6 @@
return true;
}
- void setInitialTypeForLoopPhi() {
- assert(block.isLoopHeader());
- assert(type.isUnknown());
- type = inputs[0].type;
- }
-
bool isLogicalOperator() => logicalOperatorType != IS_NOT_LOGICAL_OPERATOR;
String logicalOperator() {
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698