OLD | NEW |
1 // Copyright (c) 2015, the Fletch 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 fletchc.fletch_selector; | 5 library fletchc.fletch_selector; |
6 | 6 |
7 enum SelectorKind { | 7 enum SelectorKind { |
8 Method, | 8 Method, |
9 Getter, | 9 Getter, |
10 Setter, | 10 Setter, |
11 } | 11 } |
(...skipping 29 matching lines...) Expand all Loading... |
41 static int encodeMethod(int id, int arity) { | 41 static int encodeMethod(int id, int arity) { |
42 return encode(id, SelectorKind.Method, arity); | 42 return encode(id, SelectorKind.Method, arity); |
43 } | 43 } |
44 | 44 |
45 static int encodeGetter(int id) => encode(id, SelectorKind.Getter, 0); | 45 static int encodeGetter(int id) => encode(id, SelectorKind.Getter, 0); |
46 | 46 |
47 static int encodeSetter(int id) => encode(id, SelectorKind.Setter, 1); | 47 static int encodeSetter(int id) => encode(id, SelectorKind.Setter, 1); |
48 | 48 |
49 static int decodeId(int selector) => selector >> ID_SHIFT; | 49 static int decodeId(int selector) => selector >> ID_SHIFT; |
50 } | 50 } |
OLD | NEW |