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, |
| 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 |