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

Unified Diff: runtime/observatory/lib/src/elements/script_inset.dart

Issue 1596563003: Properly display un-compiled nested functions. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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: runtime/observatory/lib/src/elements/script_inset.dart
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index 506d03d2319f3f4a126948685804d2a7f20a3ce8..aa3c0a832024d7f1eb4bd5f4f08c26a4b97f2383 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -1084,12 +1084,11 @@ class ScriptInsetElement extends ObservatoryElement {
hitsUnknown(e);
return e;
}
- bool compiled = false;
+ bool compiled = true;
bool hasCallInfo = false;
bool executed = false;
for (var range in ranges) {
if (range['compiled']) {
- compiled = true;
for (var callSite in range['callSites']) {
var callLine = line.script.tokenToLine(callSite['tokenPos']);
if (lineNumber == callLine) {
@@ -1105,6 +1104,10 @@ class ScriptInsetElement extends ObservatoryElement {
}
}
}
+ } else {
+ // If any range isn't compiled, show the line as not compiled.
+ // This is necessary so that nested functions appear to be uncompiled.
+ compiled = false;
}
}
if (executed) {
« 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