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

Unified Diff: pkg/compiler/lib/src/dump_info.dart

Issue 2468303003: dart2js: move type-mask intermediate data from tree-elements into the global (Closed)
Patch Set: bug fix: handle closures and constructor bodies Created 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dump_info.dart
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index 4b5d1a71c1e89ccdf697eb6e3409bf2192235b76..e1e39c807f4aa9b130073a2471597ee5af6a3370 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -115,8 +115,10 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
return info;
}
+ _resultOf(e) => compiler.globalInference.results.resultOf(e);
+
FieldInfo visitFieldElement(FieldElement element, _) {
- TypeMask inferredType = compiler.globalInference.results.typeOf(element);
+ TypeMask inferredType = _resultOf(element).type;
// If a field has an empty inferred type it is never used.
if (inferredType == null || inferredType.isEmpty) return null;
@@ -249,10 +251,8 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
if (element.hasFunctionSignature) {
FunctionSignature signature = element.functionSignature;
signature.forEachParameter((parameter) {
- parameters.add(new ParameterInfo(
- parameter.name,
- '${compiler.globalInference.results.typeOf(parameter)}',
- '${parameter.node.type}'));
+ parameters.add(new ParameterInfo(parameter.name,
+ '${_resultOf(parameter).type}', '${parameter.node.type}'));
});
}
@@ -263,8 +263,7 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
compiler.closedWorld.allFunctions.contains(element)) {
returnType = '${element.type.returnType}';
}
- String inferredReturnType =
- '${compiler.globalInference.results.returnTypeOf(element)}';
+ String inferredReturnType = '${_resultOf(element).returnType}';
String sideEffects =
'${compiler.closedWorld.getSideEffectsOfElement(element)}';
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698