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

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

Issue 11361060: Support checked mode for return type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/nodes.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (revision 14515)
+++ sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (working copy)
@@ -871,6 +871,7 @@
bool isInteger(HTypeMap types) => types[this].isInteger();
bool isDouble(HTypeMap types) => types[this].isDouble();
bool isNumber(HTypeMap types) => types[this].isNumber();
+ bool isNumberOrNull(HTypeMap types) => types[this].isNumberOrNull();
bool isString(HTypeMap types) => types[this].isString();
bool isTypeUnknown(HTypeMap types) => types[this].isUnknown();
bool isIndexablePrimitive(HTypeMap types)
@@ -1128,10 +1129,7 @@
}
- HInstruction convertType(Compiler compiler,
- Element sourceElement,
- int kind) {
- DartType type = sourceElement.computeType(compiler);
+ HInstruction convertType(Compiler compiler, DartType type, int kind) {
if (type == null) return this;
if (identical(type.element, compiler.dynamicClass)) return this;
if (identical(type.element, compiler.objectClass)) return this;

Powered by Google App Engine
This is Rietveld 408576698