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

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

Issue 12811010: - Introduce the notion of setter constraints in the type inferrer, where we record things like: fie… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | sdk/lib/_internal/compiler/implementation/ssa/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart (revision 20142)
+++ sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart (working copy)
@@ -144,7 +144,7 @@
Compiler compiler) {
if (input == instruction.inputs[1]) {
HType propagatedType = instruction.instructionType;
- if (propagatedType.isUnknown() || propagatedType.isNumber()) {
+ if (propagatedType.canBePrimitiveNumber(compiler)) {
return HType.INTEGER;
}
}
@@ -182,7 +182,7 @@
// want the outgoing type to be the input too.
// If we don't know the outgoing type we try to make it a number.
if (propagatedType.isNumber()) return propagatedType;
- if (propagatedType.isUnknown()) return HType.NUMBER;
+ if (propagatedType.canBePrimitiveNumber(compiler)) return HType.NUMBER;
}
return HType.UNKNOWN;
}
@@ -228,7 +228,7 @@
// If the outgoing type should be a number we can get that if both inputs
// are numbers. If we don't know the outgoing type we try to make it a
// number.
- if (propagatedType.isUnknown() || propagatedType.isNumber()) {
+ if (propagatedType.canBePrimitiveNumber(compiler)) {
return HType.NUMBER;
}
// Even if the desired outgoing type is not a number we still want the
@@ -378,7 +378,7 @@
// If the outgoing type should be a number we can get that only if both
// inputs are integers. If we don't know the outgoing type we try to make
// it an integer.
- if (propagatedType.isUnknown() || propagatedType.isNumber()) {
+ if (propagatedType.canBePrimitiveNumber(compiler)) {
return HType.INTEGER;
}
return HType.UNKNOWN;
@@ -478,7 +478,7 @@
// For all relational operations except HIdentity, we expect to get numbers
// only. With numbers the outgoing type is a boolean. If something else
// is desired, then numbers are incorrect, though.
- if (propagatedType.isUnknown() || propagatedType.isBoolean()) {
+ if (propagatedType.canBePrimitiveBoolean(compiler)) {
HInstruction left = instruction.inputs[1];
if (left.instructionType.canBePrimitiveNumber(compiler)) {
return HType.NUMBER;
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698