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

Unified Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html

Issue 50243002: Extend Observatory to display libraries, classes, fields, functions and code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html b/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html
new file mode 100644
index 0000000000000000000000000000000000000000..fbca67f69456024355050a8ec82887da9c2933b7
--- /dev/null
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/field_view.html
@@ -0,0 +1,46 @@
+<head>
+ <link rel="import" href="observatory_element.html">
+</head>
+<polymer-element name="field-view" extends="observatory-element">
+ <template>
+ <div class="row">
+ <div class="col-md-8 col-md-offset-2">
+ <div class="panel panel-warning">
+ <div class="panel-heading">
+ <template if="{{ field['static'] }}">static</template>
+ <template if="{{ field['final'] }}">final</template>
+ <template if="{{ field['const'] }}">const</template>
+ {{ field['user_name'] }} ({{ field['name'] }})
+ <a class="pull-right" href="{{ app.locationManager.currentIsolateClassLink(field['class']['id'])}}">
+ {{ field['class']['user_name'] }}
+ </a>
+ </div>
+ <div class="panel-body">
+ <template if="{{ field['guard_class'] == 'dynamic'}}">
+ <div class="alert alert-danger">
+ Field has been assigned multiple types. If a field is only ever
+ assigned a single type, performance may improve.
+ </div>
+ </template>
+ <template if="{{ field['guard_class'] != 'dynamic'}}">
+ <div class="alert alert-success">Field has monomorphic type</div>
+ <template if="{{ (field['guard_class'] != 'dynamic') &&
+ field['guard_nullable'] }}">
+ <div class="alert alert-info">
+ Field has been assigned null. If a field is never assigned null,
+ performance may improve.
+ </div>
+ </template>
+ <blockquote>
+ <a href="{{ app.locationManager.currentIsolateClassLink(field['guard_class']['id'])}}">
+ {{ field['guard_class']['user_name'] }}
+ </a>
+ </blockquote>
+ </template>
+ </div>
+ </div>
+ </div>
+ </div>
+ </template>
+ <script type="application/dart" src="field_view.dart"></script>
+</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698