OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
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 | |
4 | |
5 part of models; | |
6 | |
7 enum CodeKind { | |
8 Dart, | |
Cutch
2016/08/01 22:24:26
The Dart style guide says enum values should be
l
cbernaschina
2016/08/01 22:45:51
Done.
| |
9 Native, | |
10 Stub, | |
11 Tag, | |
12 Collected | |
13 } | |
14 | |
15 bool isSyntheticCode(CodeKind kind) { | |
16 switch (kind) { | |
17 case CodeKind.Collected: | |
18 case CodeKind.Native: | |
19 case CodeKind.Tag: | |
20 return true; | |
21 default: | |
22 return false; | |
23 } | |
24 } | |
25 | |
26 bool isDartCode(CodeKind kind) => !isSyntheticCode(kind); | |
27 | |
28 abstract class CodeRef extends ObjectRef { | |
29 /// The name of this class. | |
30 String get name; | |
31 | |
32 // What kind of code object is this? | |
33 CodeKind get kind; | |
34 | |
35 bool get isOptimized; | |
36 } | |
37 | |
38 abstract class Code extends Object implements CodeRef { | |
39 } | |
OLD | NEW |