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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_propagation.dart

Issue 1294423002: cps: Use BuiltinOperator.IsNumber for 'is num' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index d93f05154e3baff2b274c9ff9ab737d14b9abd1f..43f912cf44df88d5f1bdc3154ab8c55ebcf2a2f9 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -1784,6 +1784,13 @@ class TransformingVisitor extends LeafVisitor {
<Primitive>[prim, prim, prim],
node.sourceInformation);
}
+ if (node.type == dartTypes.coreTypes.numType ||
+ node.type == dartTypes.coreTypes.doubleType) {
+ return new ApplyBuiltinOperator(
+ BuiltinOperator.IsNumber,
+ <Primitive>[prim],
+ node.sourceInformation);
+ }
return null;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698