OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library dartino.debug_state; | 5 library dartino.debug_state; |
6 | 6 |
7 import 'bytecodes.dart'; | 7 import 'bytecodes.dart'; |
8 import 'dartino_system.dart'; | 8 import 'dartino_system.dart'; |
9 import 'incremental/dartino_compiler_incremental.dart'; | 9 import 'incremental/dartino_compiler_incremental.dart'; |
10 import 'vm_context.dart'; | 10 import 'vm_context.dart'; |
11 import 'src/debug_info.dart'; | 11 import 'src/debug_info.dart'; |
12 import 'src/class_debug_info.dart'; | 12 import 'src/class_debug_info.dart'; |
13 | 13 |
14 import 'vm_commands.dart' show | 14 import 'vm_commands.dart' show |
15 Array, | |
16 ArrayStructure, | |
15 DartValue, | 17 DartValue, |
16 InstanceStructure; | 18 InstanceStructure; |
17 | 19 |
18 import 'dartino_class.dart' show | 20 import 'dartino_class.dart' show |
19 DartinoClass; | 21 DartinoClass; |
20 | 22 |
21 /// A representation of a remote object. | 23 /// A representation of a remote object. |
22 abstract class RemoteObject { | 24 abstract class RemoteObject { |
23 String name; | 25 String name; |
24 | 26 |
25 RemoteObject(this.name); | 27 RemoteObject(this.name); |
26 } | 28 } |
27 | 29 |
28 /// A representation of a remote instance. | 30 /// A representation of a remote instance. |
29 class RemoteInstance extends RemoteObject { | 31 class RemoteInstance extends RemoteObject { |
30 /// An [InstanceStructure] describing the remote instance. | 32 /// An [InstanceStructure] describing the remote instance. |
31 final InstanceStructure instance; | 33 final InstanceStructure instance; |
32 | 34 |
33 /// The fields as [DartValue]s of the remote instance. | 35 /// The fields as [DartValue]s of the remote instance. |
34 final List<DartValue> fields; | 36 final List<DartValue> fields; |
35 | 37 |
36 RemoteInstance(this.instance, this.fields, {String name}) : super(name); | 38 RemoteInstance(this.instance, this.fields, {String name}) : super(name); |
37 } | 39 } |
38 | 40 |
41 /// A representation of a remote instance. | |
42 class RemoteArray extends RemoteObject { | |
Søren Gjesse
2016/06/15 11:25:09
We probably need a mechanism here for handling lar
sigurdm
2016/06/15 14:50:49
I made an issue and a TODO.
| |
43 /// An [Array] describing the remote instance. | |
44 final ArrayStructure array; | |
45 | |
46 /// The values of the array as [DartValue]s of the remote instance. | |
47 final List<DartValue> values; | |
48 | |
49 RemoteArray(this.array, this.values, {String name}) : super(name); | |
50 } | |
51 | |
39 /// A representation of a remote primitive value (i.e. used for non-instances). | 52 /// A representation of a remote primitive value (i.e. used for non-instances). |
40 class RemoteValue extends RemoteObject { | 53 class RemoteValue extends RemoteObject { |
41 /// A [DartValue] describing the remote object. | 54 /// A [DartValue] describing the remote object. |
42 final DartValue value; | 55 final DartValue value; |
43 | 56 |
44 RemoteValue(this.value, {String name}) : super(name); | 57 RemoteValue(this.value, {String name}) : super(name); |
45 bool get isError => false; | 58 bool get isError => false; |
46 } | 59 } |
47 | 60 |
48 /// A representation of a failure to retrieve a remote object. | 61 /// A representation of a failure to retrieve a remote object. |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
359 return (!topFrame.isVisible || | 372 return (!topFrame.isVisible || |
360 currentLocation == null || | 373 currentLocation == null || |
361 currentLocation.isSameSourceLevelLocationAs(previous) || | 374 currentLocation.isSameSourceLevelLocationAs(previous) || |
362 currentLocation.node == null); | 375 currentLocation.node == null); |
363 } | 376 } |
364 | 377 |
365 SourceLocation sourceLocationForFrame(int frame) { | 378 SourceLocation sourceLocationForFrame(int frame) { |
366 return currentBackTrace.frames[frame].sourceLocation(); | 379 return currentBackTrace.frames[frame].sourceLocation(); |
367 } | 380 } |
368 } | 381 } |
OLD | NEW |