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

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

Issue 2676693003: Only generate coverageIds when needed (Closed)
Patch Set: Created 3 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: 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 07089d8ae99bb15f9709b754f4bd0c850b801045..9f1efbc8824981909919fbab88743c0fdfbdc5d4 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -130,9 +130,6 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
FieldInfo info = new FieldInfo(
name: element.name,
- // We use element.hashCode because it is globally unique and it is
- // available while we are doing codegen.
- coverageId: '${element.hashCode}',
type: '${element.type}',
inferredType: '$inferredType',
code: code,
@@ -147,6 +144,12 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
}
}
+ if (JavaScriptBackend.TRACE_METHOD == 'post') {
+ // We use element.hashCode because it is globally unique and it is
+ // available while we are doing codegen.
+ info.coverageId = '${element.hashCode}';
+ }
+
int closureSize = _addClosureInfo(info, element);
info.size = size + closureSize;
@@ -274,9 +277,6 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
FunctionInfo info = new FunctionInfo(
name: name,
functionKind: kind,
- // We use element.hashCode because it is globally unique and it is
- // available while we are doing codegen.
- coverageId: '${element.hashCode}',
modifiers: modifiers,
returnType: returnType,
inferredReturnType: inferredReturnType,
@@ -295,6 +295,12 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
info.closures = <ClosureInfo>[];
}
+ if (JavaScriptBackend.TRACE_METHOD == 'post') {
+ // We use element.hashCode because it is globally unique and it is
+ // available while we are doing codegen.
+ info.coverageId = '${element.hashCode}';
+ }
+
info.size = size;
result.functions.add(info);
« 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