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 MegamorphicCacheRefMock implements M.MegamorphicCacheRef { | 7 class MegamorphicCacheRefMock implements M.MegamorphicCacheRef { |
8 final String id; | 8 final String id; |
9 final String selector; | 9 final String selector; |
10 | 10 |
11 const MegamorphicCacheRefMock({this.id : 'megamorphiccache-id', | 11 const MegamorphicCacheRefMock( |
12 this.selector: 'selector'}); | 12 {this.id: 'megamorphiccache-id', this.selector: 'selector'}); |
13 } | 13 } |
14 | 14 |
15 class MegamorphicCacheMock implements M.MegamorphicCache { | 15 class MegamorphicCacheMock implements M.MegamorphicCache { |
16 final String id; | 16 final String id; |
17 final M.ClassRef clazz; | 17 final M.ClassRef clazz; |
18 final String vmName; | 18 final String vmName; |
19 final int size; | 19 final int size; |
20 final String selector; | 20 final String selector; |
21 final int mask; | 21 final int mask; |
22 final M.InstanceRef buckets; | 22 final M.InstanceRef buckets; |
23 final M.InstanceRef argumentsDescriptor; | 23 final M.InstanceRef argumentsDescriptor; |
24 | 24 |
25 const MegamorphicCacheMock({this.id : 'megamorphiccache-id', | 25 const MegamorphicCacheMock( |
26 this.vmName: 'megamorphiccache-vmName', | 26 {this.id: 'megamorphiccache-id', |
27 this.clazz: const ClassRefMock(), | 27 this.vmName: 'megamorphiccache-vmName', |
28 this.size: 1, this.selector: 'selector', | 28 this.clazz: const ClassRefMock(), |
29 this.mask: 0, | 29 this.size: 1, |
30 this.buckets: const InstanceRefMock(), | 30 this.selector: 'selector', |
31 this.argumentsDescriptor: const InstanceRefMock() | 31 this.mask: 0, |
32 }); | 32 this.buckets: const InstanceRefMock(), |
| 33 this.argumentsDescriptor: const InstanceRefMock()}); |
33 } | 34 } |
OLD | NEW |