7
7
import kala .collection .immutable .ImmutableTreeSeq ;
8
8
import kala .collection .mutable .MutableSeq ;
9
9
import kala .control .Result ;
10
- import org .aya .compiler .free .data .FieldRef ;
11
10
import org .aya .compiler .free .data .MethodRef ;
11
+ import org .aya .compiler .free .data .FieldRef ;
12
12
import org .aya .syntax .compile .JitClass ;
13
13
import org .aya .syntax .compile .JitCon ;
14
14
import org .aya .syntax .compile .JitData ;
@@ -41,30 +41,30 @@ private Constants() { }
41
41
public static final @ NotNull ClassDesc CD_Result = FreeUtil .fromClass (Result .class );
42
42
43
43
// Term -> Term
44
- public static final @ NotNull MethodRef CLOSURE = new MethodRef . Default (
44
+ public static final @ NotNull MethodRef CLOSURE = new MethodRef (
45
45
FreeUtil .fromClass (UnaryOperator .class ),
46
46
"apply" ,
47
47
ConstantDescs .CD_Object , ImmutableSeq .of (ConstantDescs .CD_Object ),
48
48
true
49
49
);
50
50
51
51
// () -> Term
52
- public static final @ NotNull MethodRef THUNK = new MethodRef . Default (
52
+ public static final @ NotNull MethodRef THUNK = new MethodRef (
53
53
FreeUtil .fromClass (Supplier .class ),
54
54
"get" ,
55
55
ConstantDescs .CD_Object , ImmutableSeq .empty (),
56
56
true
57
57
);
58
58
59
- public static final @ NotNull MethodRef FUNCTION = new MethodRef . Default (
59
+ public static final @ NotNull MethodRef FUNCTION = new MethodRef (
60
60
FreeUtil .fromClass (Function .class ),
61
61
"apply" ,
62
62
ConstantDescs .CD_Object , ImmutableSeq .of (ConstantDescs .CD_Object ),
63
63
true
64
64
);
65
65
66
66
// ImmutableSeq from(Object[])
67
- public static final @ NotNull MethodRef IMMSEQ = new MethodRef . Default (
67
+ public static final @ NotNull MethodRef IMMSEQ = new MethodRef (
68
68
CD_ImmutableSeq ,
69
69
"from" ,
70
70
CD_ImmutableSeq , ImmutableSeq .of (ConstantDescs .CD_Object .arrayType ()),
@@ -74,7 +74,7 @@ private Constants() { }
74
74
/**
75
75
* @see MutableSeq#fill(int, Object)
76
76
*/
77
- public static final @ NotNull MethodRef MUTSEQ = new MethodRef . Default (
77
+ public static final @ NotNull MethodRef MUTSEQ = new MethodRef (
78
78
CD_MutableSeq ,
79
79
"fill" ,
80
80
CD_MutableSeq , ImmutableSeq .of (ConstantDescs .CD_int , ConstantDescs .CD_Object ),
@@ -84,7 +84,7 @@ private Constants() { }
84
84
/**
85
85
* @see MutableSeq#set(int, Object)
86
86
*/
87
- public static final @ NotNull MethodRef MUTSEQ_SET = new MethodRef . Default (
87
+ public static final @ NotNull MethodRef MUTSEQ_SET = new MethodRef (
88
88
CD_MutableSeq , "set" , ConstantDescs .CD_void ,
89
89
ImmutableSeq .of (ConstantDescs .CD_int , ConstantDescs .CD_Object ),
90
90
true
@@ -95,7 +95,7 @@ private Constants() { }
95
95
*
96
96
* @see Seq#get(int)
97
97
*/
98
- public static final @ NotNull MethodRef SEQ_GET = new MethodRef . Default (
98
+ public static final @ NotNull MethodRef SEQ_GET = new MethodRef (
99
99
CD_Seq , "get" , ConstantDescs .CD_Object ,
100
100
ImmutableSeq .of (ConstantDescs .CD_int ),
101
101
true
@@ -104,19 +104,19 @@ private Constants() { }
104
104
/**
105
105
* @see Seq#toImmutableSeq()
106
106
*/
107
- public static final @ NotNull MethodRef SEQ_TOIMMSEQ = new MethodRef . Default (
107
+ public static final @ NotNull MethodRef SEQ_TOIMMSEQ = new MethodRef (
108
108
CD_Seq , "toImmutableSeq" , CD_ImmutableSeq , ImmutableSeq .empty (), true
109
109
);
110
110
111
- public static final @ NotNull MethodRef IMMTREESEQ = new MethodRef . Default (
111
+ public static final @ NotNull MethodRef IMMTREESEQ = new MethodRef (
112
112
FreeUtil .fromClass (ImmutableTreeSeq .class ),
113
113
"from" ,
114
114
FreeUtil .fromClass (ImmutableTreeSeq .class ),
115
115
ImmutableSeq .of (ConstantDescs .CD_Object .arrayType ()),
116
116
false
117
117
);
118
118
119
- public static final @ NotNull MethodRef BETAMAKE = new MethodRef . Default (
119
+ public static final @ NotNull MethodRef BETAMAKE = new MethodRef (
120
120
FreeUtil .fromClass (BetaRedex .class ),
121
121
"make" ,
122
122
CD_Term , ImmutableSeq .empty (),
@@ -126,14 +126,14 @@ private Constants() { }
126
126
/**
127
127
* @see Term#elevate(int)
128
128
*/
129
- public static final @ NotNull MethodRef ELEVATE = new MethodRef . Default (
129
+ public static final @ NotNull MethodRef ELEVATE = new MethodRef (
130
130
CD_Term , "elevate" , CD_Term , ImmutableSeq .of (ConstantDescs .CD_int ), true
131
131
);
132
132
133
133
/**
134
134
* @see RuleReducer#make()
135
135
*/
136
- public static final @ NotNull MethodRef RULEREDUCER_MAKE = new MethodRef . Default (
136
+ public static final @ NotNull MethodRef RULEREDUCER_MAKE = new MethodRef (
137
137
FreeUtil .fromClass (RuleReducer .class ),
138
138
"make" ,
139
139
CD_Term , ImmutableSeq .empty (),
@@ -143,7 +143,7 @@ private Constants() { }
143
143
/**
144
144
* @see Closure#mkConst(Term)
145
145
*/
146
- public static final @ NotNull MethodRef CLOSURE_MKCONST = new MethodRef . Default (
146
+ public static final @ NotNull MethodRef CLOSURE_MKCONST = new MethodRef (
147
147
FreeUtil .fromClass (Closure .class ),
148
148
"mkConst" ,
149
149
FreeUtil .fromClass (Closure .class ),
@@ -154,15 +154,15 @@ private Constants() { }
154
154
/**
155
155
* @see Panic#unreachable()
156
156
*/
157
- public static final @ NotNull MethodRef PANIC = new MethodRef . Default (
157
+ public static final @ NotNull MethodRef PANIC = new MethodRef (
158
158
FreeUtil .fromClass (Panic .class ),
159
159
"unreachable" ,
160
160
ConstantDescs .CD_Object ,
161
161
ImmutableSeq .empty (),
162
162
true
163
163
);
164
164
165
- public static final @ NotNull MethodRef INT_REPR = new MethodRef . Default (
165
+ public static final @ NotNull MethodRef INT_REPR = new MethodRef (
166
166
FreeUtil .fromClass (IntegerTerm .class ),
167
167
"repr" ,
168
168
ConstantDescs .CD_int ,
@@ -173,7 +173,7 @@ private Constants() { }
173
173
/**
174
174
* @see ConCallLike#conArgs()
175
175
*/
176
- public static final @ NotNull MethodRef CONARGS = new MethodRef . Default (
176
+ public static final @ NotNull MethodRef CONARGS = new MethodRef (
177
177
FreeUtil .fromClass (ConCallLike .class ),
178
178
"conArgs" ,
179
179
CD_ImmutableSeq ,
@@ -184,7 +184,7 @@ private Constants() { }
184
184
/**
185
185
* @see TupTerm#lhs()
186
186
*/
187
- public static final @ NotNull MethodRef TUP_LHS = new MethodRef . Default (
187
+ public static final @ NotNull MethodRef TUP_LHS = new MethodRef (
188
188
FreeUtil .fromClass (TupTerm .class ),
189
189
"lhs" ,
190
190
CD_Term ,
@@ -195,7 +195,7 @@ private Constants() { }
195
195
/**
196
196
* @see TupTerm#rhs()
197
197
*/
198
- public static final @ NotNull MethodRef TUP_RHS = new MethodRef . Default (
198
+ public static final @ NotNull MethodRef TUP_RHS = new MethodRef (
199
199
FreeUtil .fromClass (TupTerm .class ),
200
200
"rhs" ,
201
201
CD_Term ,
@@ -206,13 +206,13 @@ private Constants() { }
206
206
/**
207
207
* @see Result#ok(Object)
208
208
*/
209
- public static final @ NotNull MethodRef RESULT_OK = new MethodRef . Default (
209
+ public static final @ NotNull MethodRef RESULT_OK = new MethodRef (
210
210
CD_Result , "ok" ,
211
211
CD_Result , ImmutableSeq .of (ConstantDescs .CD_Object ),
212
212
true
213
213
);
214
214
215
- public static final @ NotNull MethodRef RESULT_ERR = new MethodRef . Default (
215
+ public static final @ NotNull MethodRef RESULT_ERR = new MethodRef (
216
216
CD_Result , "err" ,
217
217
CD_Result , ImmutableSeq .of (ConstantDescs .CD_Object ),
218
218
true
@@ -225,13 +225,13 @@ private Constants() { }
225
225
ConstantDescs .CD_int , ConstantDescs .CD_boolean .arrayType (), ConstantDescs .CD_String .arrayType ()
226
226
);
227
227
228
- public static final @ NotNull FieldRef JITDATA_CONS = new FieldRef . Default (
228
+ public static final @ NotNull FieldRef JITDATA_CONS = new FieldRef (
229
229
FreeUtil .fromClass (JitData .class ),
230
230
FreeUtil .fromClass (JitCon .class ).arrayType (),
231
231
"constructors"
232
232
);
233
233
234
- public static final @ NotNull FieldRef JITCLASS_MEMS = new FieldRef . Default (
234
+ public static final @ NotNull FieldRef JITCLASS_MEMS = new FieldRef (
235
235
FreeUtil .fromClass (JitClass .class ),
236
236
FreeUtil .fromClass (JitMember .class ).arrayType (),
237
237
"members"
@@ -240,7 +240,7 @@ private Constants() { }
240
240
/**
241
241
* @see UnaryOperator#identity()
242
242
*/
243
- public static final @ NotNull MethodRef CLOSURE_ID = new MethodRef . Default (
243
+ public static final @ NotNull MethodRef CLOSURE_ID = new MethodRef (
244
244
FreeUtil .fromClass (UnaryOperator .class ),
245
245
"identity" ,
246
246
FreeUtil .fromClass (UnaryOperator .class ),
@@ -251,7 +251,7 @@ private Constants() { }
251
251
/**
252
252
* @see PatMatcher#apply(ImmutableSeq, ImmutableSeq)
253
253
*/
254
- public static final @ NotNull MethodRef PATMATCHER_APPLY = new MethodRef . Default (
254
+ public static final @ NotNull MethodRef PATMATCHER_APPLY = new MethodRef (
255
255
FreeUtil .fromClass (PatMatcher .class ), "apply" ,
256
256
CD_Result , ImmutableSeq .of (CD_ImmutableSeq , CD_ImmutableSeq ), false
257
257
);
0 commit comments