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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart

Issue 141713007: Revert "Infer types for compile-time constant closures." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
index e5201e9805974bd336bc69298287dd91e85acad1..b568d03b6da29db177fe171cfacd09fa6c0868a1 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
@@ -17,7 +17,7 @@ import '../native_handler.dart' as native;
import '../util/util.dart' show Spannable, Setlet;
import 'simple_types_inferrer.dart';
import 'ir_type_inferrer.dart';
-import '../dart2jslib.dart' show invariant, Constant, FunctionConstant;
+import '../dart2jslib.dart' show invariant, Constant;
part 'type_graph_nodes.dart';
part 'closure_tracer.dart';
@@ -555,12 +555,7 @@ class TypeGraphInferrerEngine
Constant value =
compiler.constantHandler.getConstantForVariable(element);
if (value != null) {
- if (value.isFunction()) {
- FunctionConstant functionConstant = value;
- type = types.allocateClosure(node, functionConstant.element);
- } else {
- type = types.getConcreteTypeFor(value.computeMask(compiler));
- }
+ type = types.getConcreteTypeFor(value.computeMask(compiler));
}
}
recordType(element, type);
« no previous file with comments | « no previous file | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698