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

Side by Side Diff: runtime/observatory/lib/src/elements/helpers/any_ref.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:html'; 5 import 'dart:html';
6 import 'package:observatory/models.dart' as M; 6 import 'package:observatory/models.dart' as M;
7 import 'package:observatory/src/elements/class_ref.dart'; 7 import 'package:observatory/src/elements/class_ref.dart';
8 import 'package:observatory/src/elements/code_ref.dart'; 8 import 'package:observatory/src/elements/code_ref.dart';
9 import 'package:observatory/src/elements/context_ref.dart'; 9 import 'package:observatory/src/elements/context_ref.dart';
10 import 'package:observatory/src/elements/error_ref.dart'; 10 import 'package:observatory/src/elements/error_ref.dart';
11 import 'package:observatory/src/elements/field_ref.dart'; 11 import 'package:observatory/src/elements/field_ref.dart';
12 import 'package:observatory/src/elements/function_ref.dart'; 12 import 'package:observatory/src/elements/function_ref.dart';
13 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 13 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
14 import 'package:observatory/src/elements/helpers/uris.dart'; 14 import 'package:observatory/src/elements/helpers/uris.dart';
15 import 'package:observatory/src/elements/icdata_ref.dart'; 15 import 'package:observatory/src/elements/icdata_ref.dart';
16 import 'package:observatory/src/elements/instance_ref.dart'; 16 import 'package:observatory/src/elements/instance_ref.dart';
17 import 'package:observatory/src/elements/megamorphiccache_ref.dart'; 17 import 'package:observatory/src/elements/megamorphiccache_ref.dart';
18 import 'package:observatory/src/elements/library_ref.dart'; 18 import 'package:observatory/src/elements/library_ref.dart';
19 import 'package:observatory/src/elements/local_var_descriptors_ref.dart'; 19 import 'package:observatory/src/elements/local_var_descriptors_ref.dart';
20 import 'package:observatory/src/elements/objectpool_ref.dart'; 20 import 'package:observatory/src/elements/objectpool_ref.dart';
21 import 'package:observatory/src/elements/pc_descriptors_ref.dart'; 21 import 'package:observatory/src/elements/pc_descriptors_ref.dart';
22 import 'package:observatory/src/elements/script_ref.dart'; 22 import 'package:observatory/src/elements/script_ref.dart';
23 import 'package:observatory/src/elements/sentinel_value.dart'; 23 import 'package:observatory/src/elements/sentinel_value.dart';
24 import 'package:observatory/src/elements/type_arguments_ref.dart'; 24 import 'package:observatory/src/elements/type_arguments_ref.dart';
25 import 'package:observatory/src/elements/token_stream_ref.dart'; 25 import 'package:observatory/src/elements/token_stream_ref.dart';
26 import 'package:observatory/src/elements/unknown_ref.dart'; 26 import 'package:observatory/src/elements/unknown_ref.dart';
27 27
28 Element anyRef(M.IsolateRef isolate, ref, 28 Element anyRef(M.IsolateRef isolate, ref, M.InstanceRepository instances,
29 M.InstanceRepository instances, {RenderingQueue queue}) { 29 {RenderingQueue queue}) {
30 if (ref is M.Guarded) { 30 if (ref is M.Guarded) {
31 if (ref.isSentinel) { 31 if (ref.isSentinel) {
32 return anyRef(isolate, ref.asSentinel, instances, queue: queue); 32 return anyRef(isolate, ref.asSentinel, instances, queue: queue);
33 } else { 33 } else {
34 return anyRef(isolate, ref.asValue, instances, queue: queue); 34 return anyRef(isolate, ref.asValue, instances, queue: queue);
35 } 35 }
36 } else if (ref is M.ObjectRef) { 36 } else if (ref is M.ObjectRef) {
37 if (ref is M.ClassRef) { 37 if (ref is M.ClassRef) {
38 return new ClassRefElement(isolate, ref, queue: queue); 38 return new ClassRefElement(isolate, ref, queue: queue);
39 } else if (ref is M.CodeRef) { 39 } else if (ref is M.CodeRef) {
40 return new CodeRefElement(isolate, ref, queue: queue); 40 return new CodeRefElement(isolate, ref, queue: queue);
41 } else if (ref is M.ContextRef) { 41 } else if (ref is M.ContextRef) {
42 return new ContextRefElement(isolate, ref, queue: queue); 42 return new ContextRefElement(isolate, ref, queue: queue);
43 } else if (ref is M.Error ) { 43 } else if (ref is M.Error) {
44 return new ErrorRefElement(ref, queue: queue); 44 return new ErrorRefElement(ref, queue: queue);
45 } else if (ref is M.FieldRef) { 45 } else if (ref is M.FieldRef) {
46 return new FieldRefElement(isolate, ref, instances, queue: queue); 46 return new FieldRefElement(isolate, ref, instances, queue: queue);
47 } else if (ref is M.FunctionRef) { 47 } else if (ref is M.FunctionRef) {
48 return new FunctionRefElement(isolate, ref, queue: queue); 48 return new FunctionRefElement(isolate, ref, queue: queue);
49 } else if (ref is M.ICDataRef) { 49 } else if (ref is M.ICDataRef) {
50 return new ICDataRefElement(isolate, ref, queue: queue); 50 return new ICDataRefElement(isolate, ref, queue: queue);
51 } else if (ref is M.InstanceRef) { 51 } else if (ref is M.InstanceRef) {
52 return new InstanceRefElement(isolate, ref, instances, queue: queue); 52 return new InstanceRefElement(isolate, ref, instances, queue: queue);
53 } else if (ref is M.LibraryRef) { 53 } else if (ref is M.LibraryRef) {
54 return new LibraryRefElement(isolate, ref, queue: queue); 54 return new LibraryRefElement(isolate, ref, queue: queue);
55 } else if (ref is M.LocalVarDescriptorsRef) { 55 } else if (ref is M.LocalVarDescriptorsRef) {
56 return new LocalVarDescriptorsRefElement(isolate, ref, queue: queue); 56 return new LocalVarDescriptorsRefElement(isolate, ref, queue: queue);
57 } else if (ref is M.MegamorphicCacheRef) { 57 } else if (ref is M.MegamorphicCacheRef) {
(...skipping 12 matching lines...) Expand all
70 return new UnknownObjectRefElement(isolate, ref, queue: queue); 70 return new UnknownObjectRefElement(isolate, ref, queue: queue);
71 } else { 71 } else {
72 return new AnchorElement(href: Uris.inspect(isolate, object: ref)) 72 return new AnchorElement(href: Uris.inspect(isolate, object: ref))
73 ..text = 'object'; 73 ..text = 'object';
74 } 74 }
75 } else if (ref is M.Sentinel) { 75 } else if (ref is M.Sentinel) {
76 return new SentinelValueElement(ref, queue: queue); 76 return new SentinelValueElement(ref, queue: queue);
77 } 77 }
78 throw new Exception('Unknown ref type (${ref.runtimeType})'); 78 throw new Exception('Unknown ref type (${ref.runtimeType})');
79 } 79 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/heap_snapshot.dart ('k') | runtime/observatory/lib/src/elements/helpers/nav_bar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698