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

Unified Diff: sdk/lib/_internal/compiler/implementation/dump_info.dart

Issue 185543010: --dump-info: only computeType if field used (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/dump_info.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dump_info.dart b/sdk/lib/_internal/compiler/implementation/dump_info.dart
index 93c3425da219cb7c19e6f9aa96df1b20468446fb..159b07ebc4141a20994379135a41276cc6a0800c 100644
--- a/sdk/lib/_internal/compiler/implementation/dump_info.dart
+++ b/sdk/lib/_internal/compiler/implementation/dump_info.dart
@@ -272,14 +272,14 @@ class InfoDumpVisitor extends ElementVisitor<InfoNode> {
InfoNode visitFieldElement(FieldElement element) {
CodeBuffer emittedCode = compiler.backend.codeOf(element);
- int size = 0;
- DartType type = element.computeType(compiler);
TypeMask inferredType = compiler.typesTask
.getGuaranteedTypeOfElement(element);
// If a field has an empty inferred type it is never used.
if ((inferredType == null || inferredType.isEmpty) && emittedCode == null) {
return null;
}
+ int size = 0;
+ DartType type = element.computeType(compiler);
List<InfoNode> contents = new List<InfoNode>();
if (emittedCode != null) {
contents.add(new CodeInfoNode(
« 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