OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 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 part of mocks; | 5 part of mocks; |
6 | 6 |
7 class FunctionRefMock implements M.FunctionRef { | 7 class FunctionRefMock implements M.FunctionRef { |
8 final String id; | 8 final String id; |
9 final String name; | 9 final String name; |
10 final M.ObjectRef dartOwner; | 10 final M.ObjectRef dartOwner; |
11 final bool isStatic; | 11 final bool isStatic; |
12 final bool isConst; | 12 final bool isConst; |
13 final M.FunctionKind kind; | 13 final M.FunctionKind kind; |
14 | 14 |
15 const FunctionRefMock( | 15 const FunctionRefMock({this.id, this.name, this.dartOwner, |
16 {this.id, | 16 this.isStatic : false, this.isConst : false, this.kind}); |
17 this.name, | |
18 this.dartOwner, | |
19 this.isStatic: false, | |
20 this.isConst: false, | |
21 this.kind}); | |
22 } | 17 } |
23 | 18 |
24 class FunctionMock implements M.Function { | 19 class FunctionMock implements M.Function { |
25 final String id; | 20 final String id; |
26 final String name; | 21 final String name; |
27 final M.ClassRef clazz; | 22 final M.ClassRef clazz; |
28 final int size; | 23 final int size; |
29 final M.ObjectRef dartOwner; | 24 final M.ObjectRef dartOwner; |
30 final bool isStatic; | 25 final bool isStatic; |
31 final bool isConst; | 26 final bool isConst; |
32 final M.FunctionKind kind; | 27 final M.FunctionKind kind; |
33 final M.SourceLocation location; | 28 final M.SourceLocation location; |
34 final M.CodeRef code; | 29 final M.CodeRef code; |
35 final M.CodeRef unoptimizedCode; | 30 final M.CodeRef unoptimizedCode; |
36 final M.FieldRef field; | 31 final M.FieldRef field; |
37 final int usageCounter; | 32 final int usageCounter; |
38 final M.InstanceRef icDataArray; | 33 final M.InstanceRef icDataArray; |
39 final int deoptimizations; | 34 final int deoptimizations; |
40 final bool isOptimizable; | 35 final bool isOptimizable; |
41 final bool isInlinable; | 36 final bool isInlinable; |
42 final bool hasIntrinsic; | 37 final bool hasIntrinsic; |
43 final bool isRecognized; | 38 final bool isRecognized; |
44 final bool isNative; | 39 final bool isNative; |
45 final String vmName; | 40 final String vmName; |
46 const FunctionMock({ | 41 const FunctionMock({this.id, this.name, this.clazz, this.size, this.dartOwner, |
47 this.id, | 42 this.isStatic : false, this.isConst : false, this.kind, this.location, |
48 this.name, | 43 this.code, this.unoptimizedCode, this.field, this.usageCounter: 0, |
49 this.clazz, | 44 this.icDataArray: const InstanceRefMock(), this.deoptimizations: 0, |
50 this.size, | 45 this.isOptimizable: false, this.isInlinable: false, |
51 this.dartOwner, | 46 this.hasIntrinsic: false, this.isRecognized: false, this.isNative: false, |
52 this.isStatic: false, | 47 this.vmName: 'function-vm-name',}); |
53 this.isConst: false, | |
54 this.kind, | |
55 this.location, | |
56 this.code, | |
57 this.unoptimizedCode, | |
58 this.field, | |
59 this.usageCounter: 0, | |
60 this.icDataArray: const InstanceRefMock(), | |
61 this.deoptimizations: 0, | |
62 this.isOptimizable: false, | |
63 this.isInlinable: false, | |
64 this.hasIntrinsic: false, | |
65 this.isRecognized: false, | |
66 this.isNative: false, | |
67 this.vmName: 'function-vm-name', | |
68 }); | |
69 } | 48 } |
OLD | NEW |