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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 1288463002: Revert "dart2js: Do not use JSDouble for native behavior return types." (Closed) Base URL: git@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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index d394bb7c3dbba41ebd3944c6d0d3442792df9e12..b242c98e140d4a3a58feb1fb02e2585b75769ba2 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -373,11 +373,9 @@ abstract class InferrerEngine<T, V extends TypeSystem>
mappedType = types.stringType;
} else if (type.element == compiler.intClass) {
mappedType = types.intType;
- } else if (type.element == compiler.numClass ||
- type.element == compiler.doubleClass) {
- // Note: the backend double class is specifically for non-integer
- // doubles, and a native behavior returning 'double' does not guarantee
- // a non-integer return type, so we return the number type for those.
+ } else if (type.element == compiler.doubleClass) {
+ mappedType = types.doubleType;
+ } else if (type.element == compiler.numClass) {
mappedType = types.numType;
} else if (type.element == compiler.boolClass) {
mappedType = types.boolType;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698