|
@@ -83,13 +83,11 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
83
|
83
|
private final GlobalTypeRegistry registry;
|
84
|
84
|
private final TypeMembers members;
|
85
|
85
|
private final LocalMemberCache cache;
|
86
|
|
- private final GenericMapper emptyMapper;
|
87
|
86
|
|
88
|
87
|
public TypeMemberBuilder(GlobalTypeRegistry registry, TypeMembers members, LocalMemberCache cache) {
|
89
|
88
|
this.registry = registry;
|
90
|
89
|
this.members = members;
|
91
|
90
|
this.cache = cache;
|
92
|
|
- emptyMapper = new GenericMapper(registry, Collections.emptyMap());
|
93
|
91
|
}
|
94
|
92
|
|
95
|
93
|
private void processType(HighLevelDefinition definition, ITypeID type) {
|
|
@@ -98,11 +96,12 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
98
|
96
|
throw new CompileException(expansion.position, CompileExceptionCode.INTERNAL_ERROR, "Missing expansion target");
|
99
|
97
|
|
100
|
98
|
Map<TypeParameter, ITypeID> mapping = matchType(type, expansion.target);
|
|
99
|
+ if (mapping == null)
|
|
100
|
+ continue;
|
|
101
|
+
|
101
|
102
|
GenericMapper mapper = new GenericMapper(registry, mapping);
|
102
|
|
- if (mapping != null) {
|
103
|
|
- for (IDefinitionMember member : expansion.members)
|
104
|
|
- member.registerTo(members, TypeMemberPriority.SPECIFIED, mapper);
|
105
|
|
- }
|
|
103
|
+ for (IDefinitionMember member : expansion.members)
|
|
104
|
+ member.registerTo(members, TypeMemberPriority.SPECIFIED, mapper);
|
106
|
105
|
}
|
107
|
106
|
|
108
|
107
|
if (members.hasOperator(OperatorType.EQUALS)) {
|
|
@@ -117,11 +116,8 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
117
|
116
|
}
|
118
|
117
|
|
119
|
118
|
private Map<TypeParameter, ITypeID> matchType(ITypeID type, ITypeID pattern) {
|
120
|
|
- if (type == pattern)
|
121
|
|
- return Collections.emptyMap();
|
122
|
|
-
|
123
|
119
|
Map<TypeParameter, ITypeID> mapping = new HashMap<>();
|
124
|
|
- if (pattern.inferTypeParameters(cache, type, mapping))
|
|
120
|
+ if (type.inferTypeParameters(cache, pattern, mapping))
|
125
|
121
|
return mapping;
|
126
|
122
|
|
127
|
123
|
return null;
|
|
@@ -212,7 +208,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
212
|
208
|
definition,
|
213
|
209
|
0,
|
214
|
210
|
new FunctionHeader(VOID, indexGetParameters),
|
215
|
|
- ARRAY_CONSTRUCTOR_SIZED).ref(emptyMapper));
|
|
211
|
+ ARRAY_CONSTRUCTOR_SIZED).ref(null));
|
216
|
212
|
}
|
217
|
213
|
|
218
|
214
|
FunctionParameter[] initialValueConstructorParameters = new FunctionParameter[dimension + 1];
|
|
@@ -226,7 +222,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
226
|
222
|
0,
|
227
|
223
|
initialValueConstructorHeader,
|
228
|
224
|
ARRAY_CONSTRUCTOR_INITIAL_VALUE)
|
229
|
|
- .registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
225
|
+ .registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
230
|
226
|
|
231
|
227
|
FunctionParameter[] lambdaConstructorParameters = new FunctionParameter[dimension + 1];
|
232
|
228
|
for (int i = 0; i < dimension; i++)
|
|
@@ -240,7 +236,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
240
|
236
|
definition,
|
241
|
237
|
0,
|
242
|
238
|
lambdaConstructorHeader,
|
243
|
|
- ARRAY_CONSTRUCTOR_LAMBDA).ref(emptyMapper));
|
|
239
|
+ ARRAY_CONSTRUCTOR_LAMBDA).ref(null));
|
244
|
240
|
|
245
|
241
|
{
|
246
|
242
|
TypeParameter mappedConstructorParameter = new TypeParameter(BUILTIN, "T");
|
|
@@ -256,7 +252,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
256
|
252
|
definition,
|
257
|
253
|
Modifiers.PUBLIC,
|
258
|
254
|
mappedConstructorFunctionWithoutIndex,
|
259
|
|
- ARRAY_CONSTRUCTOR_PROJECTED).ref(emptyMapper));
|
|
255
|
+ ARRAY_CONSTRUCTOR_PROJECTED).ref(null));
|
260
|
256
|
}
|
261
|
257
|
|
262
|
258
|
{
|
|
@@ -290,8 +286,8 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
290
|
286
|
|
291
|
287
|
getter(definition, ARRAY_ISEMPTY, "isEmpty", BOOL);
|
292
|
288
|
getter(definition, ARRAY_HASHCODE, "objectHashCode", INT);
|
293
|
|
- new ArrayIteratorKeyValues(array).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
294
|
|
- new ArrayIteratorValues(array).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
289
|
+ new ArrayIteratorKeyValues(array).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
|
290
|
+ new ArrayIteratorValues(array).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
295
|
291
|
|
296
|
292
|
equals(definition, ARRAY_EQUALS, array);
|
297
|
293
|
notequals(definition, ARRAY_NOTEQUALS, array);
|
|
@@ -328,7 +324,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
328
|
324
|
getter(builtin, BuiltinID.ASSOC_VALUES, "values", cache.getRegistry().getArray(valueType, 1));
|
329
|
325
|
getter(builtin, BuiltinID.ASSOC_HASHCODE, "objectHashCode", BasicTypeID.INT);
|
330
|
326
|
|
331
|
|
- new AssocIterator(assoc).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
327
|
+ new AssocIterator(assoc).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
332
|
328
|
|
333
|
329
|
equals(builtin, BuiltinID.ASSOC_EQUALS, assoc);
|
334
|
330
|
notequals(builtin, BuiltinID.ASSOC_NOTEQUALS, assoc);
|
|
@@ -378,7 +374,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
378
|
374
|
@Override
|
379
|
375
|
public Void visitFunction(FunctionTypeID function) {
|
380
|
376
|
FunctionDefinition builtin = new FunctionDefinition(BUILTIN, null, "", Modifiers.EXPORT, function.header);
|
381
|
|
- new CallerMember(BUILTIN, builtin, 0, function.header, FUNCTION_CALL).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
377
|
+ new CallerMember(BUILTIN, builtin, 0, function.header, FUNCTION_CALL).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
382
|
378
|
|
383
|
379
|
same(builtin, FUNCTION_SAME, function);
|
384
|
380
|
notsame(builtin, FUNCTION_NOTSAME, function);
|
|
@@ -390,7 +386,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
390
|
386
|
@Override
|
391
|
387
|
public Void visitDefinition(DefinitionTypeID type) {
|
392
|
388
|
HighLevelDefinition definition = type.definition;
|
393
|
|
- GenericMapper mapper = emptyMapper;
|
|
389
|
+ GenericMapper mapper = null;
|
394
|
390
|
if (type.hasTypeParameters() || (type.outer != null && type.outer.hasTypeParameters())) {
|
395
|
391
|
Map<TypeParameter, ITypeID> mapping = type.getTypeParameterMapping();
|
396
|
392
|
mapper = new GenericMapper(registry, mapping);
|
|
@@ -435,7 +431,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
435
|
431
|
definition,
|
436
|
432
|
Modifiers.PUBLIC,
|
437
|
433
|
new FunctionHeader(VOID, parameters),
|
438
|
|
- STRUCT_VALUE_CONSTRUCTOR).ref(emptyMapper), TypeMemberPriority.SPECIFIED);
|
|
434
|
+ STRUCT_VALUE_CONSTRUCTOR).ref(null), TypeMemberPriority.SPECIFIED);
|
439
|
435
|
}
|
440
|
436
|
} else if (definition instanceof EnumDefinition) {
|
441
|
437
|
// add default constructor
|
|
@@ -444,7 +440,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
444
|
440
|
definition,
|
445
|
441
|
Modifiers.PRIVATE,
|
446
|
442
|
new FunctionHeader(VOID),
|
447
|
|
- ENUM_EMPTY_CONSTRUCTOR).ref(emptyMapper), TypeMemberPriority.SPECIFIED);
|
|
443
|
+ ENUM_EMPTY_CONSTRUCTOR).ref(null), TypeMemberPriority.SPECIFIED);
|
448
|
444
|
}
|
449
|
445
|
}
|
450
|
446
|
|
|
@@ -511,7 +507,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
511
|
507
|
|| range.from == UINT
|
512
|
508
|
|| range.from == LONG
|
513
|
509
|
|| range.from == ULONG)) {
|
514
|
|
- new RangeIterator(range).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
510
|
+ new RangeIterator(range).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
515
|
511
|
}
|
516
|
512
|
|
517
|
513
|
processType(definition, range);
|
|
@@ -1120,19 +1116,19 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1120
|
1116
|
method(builtin, STRING_TO_LOWER_CASE, "toLowerCase", STRING);
|
1121
|
1117
|
method(builtin, STRING_TO_UPPER_CASE, "toUpperCase", STRING);
|
1122
|
1118
|
|
1123
|
|
- new StringCharIterator().registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1119
|
+ new StringCharIterator().registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1124
|
1120
|
|
1125
|
1121
|
processType(builtin, STRING);
|
1126
|
1122
|
}
|
1127
|
1123
|
|
1128
|
1124
|
private void castedTargetCall(OperatorMember member, BuiltinID casterBuiltin) {
|
1129
|
1125
|
CasterMemberRef caster = castImplicitRef(member.definition, casterBuiltin, member.header.parameters[0].type);
|
1130
|
|
- TranslatedOperatorMemberRef method = new TranslatedOperatorMemberRef(member, GenericMapper.EMPTY, call -> member.ref(emptyMapper).call(call.position, caster.cast(call.position, call.target, true), call.arguments, call.scope));
|
|
1126
|
+ TranslatedOperatorMemberRef method = new TranslatedOperatorMemberRef(member, GenericMapper.EMPTY, call -> member.ref(null).call(call.position, caster.cast(call.position, call.target, true), call.arguments, call.scope));
|
1131
|
1127
|
members.getOrCreateGroup(member.operator).addMethod(method, TypeMemberPriority.SPECIFIED);
|
1132
|
1128
|
}
|
1133
|
1129
|
|
1134
|
1130
|
private void register(IDefinitionMember member) {
|
1135
|
|
- member.registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1131
|
+ member.registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1136
|
1132
|
}
|
1137
|
1133
|
|
1138
|
1134
|
private void operator(
|
|
@@ -1146,7 +1142,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1146
|
1142
|
Modifiers.PUBLIC,
|
1147
|
1143
|
operator,
|
1148
|
1144
|
header,
|
1149
|
|
- builtin).ref(emptyMapper));
|
|
1145
|
+ builtin).ref(null));
|
1150
|
1146
|
}
|
1151
|
1147
|
|
1152
|
1148
|
private void not(HighLevelDefinition cls, BuiltinID id, ITypeID result) {
|
|
@@ -1180,7 +1176,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1180
|
1176
|
}
|
1181
|
1177
|
|
1182
|
1178
|
private void add(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result) {
|
1183
|
|
- addOp(definition, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1179
|
+ addOp(definition, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1184
|
1180
|
}
|
1185
|
1181
|
|
1186
|
1182
|
private void add(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1198,7 +1194,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1198
|
1194
|
}
|
1199
|
1195
|
|
1200
|
1196
|
private void sub(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1201
|
|
- subOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1197
|
+ subOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1202
|
1198
|
}
|
1203
|
1199
|
|
1204
|
1200
|
private void sub(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1216,7 +1212,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1216
|
1212
|
}
|
1217
|
1213
|
|
1218
|
1214
|
private void mul(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1219
|
|
- mulOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1215
|
+ mulOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1220
|
1216
|
}
|
1221
|
1217
|
|
1222
|
1218
|
private void mul(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1234,7 +1230,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1234
|
1230
|
}
|
1235
|
1231
|
|
1236
|
1232
|
private void div(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1237
|
|
- divOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1233
|
+ divOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1238
|
1234
|
}
|
1239
|
1235
|
|
1240
|
1236
|
private void div(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1252,7 +1248,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1252
|
1248
|
}
|
1253
|
1249
|
|
1254
|
1250
|
private void mod(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1255
|
|
- modOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1251
|
+ modOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1256
|
1252
|
}
|
1257
|
1253
|
|
1258
|
1254
|
private void mod(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1270,7 +1266,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1270
|
1266
|
}
|
1271
|
1267
|
|
1272
|
1268
|
private void shl(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1273
|
|
- shlOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1269
|
+ shlOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1274
|
1270
|
}
|
1275
|
1271
|
|
1276
|
1272
|
private void shl(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1288,7 +1284,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1288
|
1284
|
}
|
1289
|
1285
|
|
1290
|
1286
|
private void shr(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1291
|
|
- shrOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1287
|
+ shrOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1292
|
1288
|
}
|
1293
|
1289
|
|
1294
|
1290
|
private void shr(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1306,7 +1302,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1306
|
1302
|
}
|
1307
|
1303
|
|
1308
|
1304
|
private void ushr(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1309
|
|
- ushrOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1305
|
+ ushrOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1310
|
1306
|
}
|
1311
|
1307
|
|
1312
|
1308
|
private void ushr(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1324,11 +1320,11 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1324
|
1320
|
}
|
1325
|
1321
|
|
1326
|
1322
|
private void or(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1327
|
|
- orOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1323
|
+ orOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1328
|
1324
|
}
|
1329
|
1325
|
|
1330
|
1326
|
private void or(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
1331
|
|
- orOp(definition, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1327
|
+ orOp(definition, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1332
|
1328
|
}
|
1333
|
1329
|
|
1334
|
1330
|
private OperatorMember andOp(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
|
@@ -1342,7 +1338,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1342
|
1338
|
}
|
1343
|
1339
|
|
1344
|
1340
|
private void and(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1345
|
|
- andOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1341
|
+ andOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1346
|
1342
|
}
|
1347
|
1343
|
|
1348
|
1344
|
private void and(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1360,7 +1356,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1360
|
1356
|
}
|
1361
|
1357
|
|
1362
|
1358
|
private void xor(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID result) {
|
1363
|
|
- xorOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1359
|
+ xorOp(cls, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1364
|
1360
|
}
|
1365
|
1361
|
|
1366
|
1362
|
private void xor(HighLevelDefinition definition, BuiltinID id, ITypeID operand, ITypeID result, BuiltinID caster) {
|
|
@@ -1374,7 +1370,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1374
|
1370
|
Modifiers.PUBLIC,
|
1375
|
1371
|
OperatorType.INDEXGET,
|
1376
|
1372
|
new FunctionHeader(result, new FunctionParameter(operand)),
|
1377
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1373
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1378
|
1374
|
}
|
1379
|
1375
|
|
1380
|
1376
|
private void indexSet(HighLevelDefinition cls, BuiltinID id, ITypeID operand, ITypeID value) {
|
|
@@ -1384,7 +1380,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1384
|
1380
|
Modifiers.PUBLIC,
|
1385
|
1381
|
OperatorType.INDEXSET,
|
1386
|
1382
|
new FunctionHeader(VOID, operand, value),
|
1387
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1383
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1388
|
1384
|
}
|
1389
|
1385
|
|
1390
|
1386
|
private OperatorMember compareOp(HighLevelDefinition cls, BuiltinID id, ITypeID operand) {
|
|
@@ -1398,7 +1394,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1398
|
1394
|
}
|
1399
|
1395
|
|
1400
|
1396
|
private void compare(HighLevelDefinition cls, BuiltinID id, ITypeID operand) {
|
1401
|
|
- compareOp(cls, id, operand).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1397
|
+ compareOp(cls, id, operand).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1402
|
1398
|
}
|
1403
|
1399
|
|
1404
|
1400
|
private void compare(HighLevelDefinition definition, BuiltinID id, ITypeID operand, BuiltinID caster) {
|
|
@@ -1412,7 +1408,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1412
|
1408
|
Modifiers.PUBLIC,
|
1413
|
1409
|
name,
|
1414
|
1410
|
type,
|
1415
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1411
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1416
|
1412
|
}
|
1417
|
1413
|
|
1418
|
1414
|
private void constant(HighLevelDefinition cls, BuiltinID id, String name, Expression value) {
|
|
@@ -1424,7 +1420,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1424
|
1420
|
value.type,
|
1425
|
1421
|
id);
|
1426
|
1422
|
result.value = value;
|
1427
|
|
- result.registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1423
|
+ result.registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1428
|
1424
|
}
|
1429
|
1425
|
|
1430
|
1426
|
private void constructor(
|
|
@@ -1436,7 +1432,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1436
|
1432
|
definition,
|
1437
|
1433
|
Modifiers.PUBLIC,
|
1438
|
1434
|
header,
|
1439
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1435
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1440
|
1436
|
}
|
1441
|
1437
|
|
1442
|
1438
|
private void constructor(
|
|
@@ -1448,7 +1444,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1448
|
1444
|
definition,
|
1449
|
1445
|
Modifiers.PUBLIC,
|
1450
|
1446
|
new FunctionHeader(VOID, arguments),
|
1451
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1447
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1452
|
1448
|
}
|
1453
|
1449
|
|
1454
|
1450
|
private void method(
|
|
@@ -1501,7 +1497,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1501
|
1497
|
cls,
|
1502
|
1498
|
Modifiers.PUBLIC,
|
1503
|
1499
|
result,
|
1504
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1500
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1505
|
1501
|
}
|
1506
|
1502
|
|
1507
|
1503
|
private void castImplicit(HighLevelDefinition cls, BuiltinID id, ITypeID result) {
|
|
@@ -1510,7 +1506,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1510
|
1506
|
cls,
|
1511
|
1507
|
Modifiers.PUBLIC | Modifiers.IMPLICIT,
|
1512
|
1508
|
result,
|
1513
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1509
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1514
|
1510
|
}
|
1515
|
1511
|
|
1516
|
1512
|
private CasterMemberRef castImplicitRef(HighLevelDefinition definition, BuiltinID id, ITypeID result) {
|
|
@@ -1529,7 +1525,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1529
|
1525
|
Modifiers.PUBLIC,
|
1530
|
1526
|
OperatorType.EQUALS,
|
1531
|
1527
|
new FunctionHeader(BOOL, new FunctionParameter(type)),
|
1532
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1528
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1533
|
1529
|
}
|
1534
|
1530
|
|
1535
|
1531
|
private void same(HighLevelDefinition cls, BuiltinID id, ITypeID type) {
|
|
@@ -1539,7 +1535,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1539
|
1535
|
Modifiers.PUBLIC,
|
1540
|
1536
|
OperatorType.SAME,
|
1541
|
1537
|
new FunctionHeader(BOOL, new FunctionParameter(type)),
|
1542
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1538
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1543
|
1539
|
}
|
1544
|
1540
|
|
1545
|
1541
|
private void notequals(HighLevelDefinition cls, BuiltinID id, ITypeID type) {
|
|
@@ -1549,7 +1545,7 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1549
|
1545
|
Modifiers.PUBLIC,
|
1550
|
1546
|
OperatorType.NOTEQUALS,
|
1551
|
1547
|
new FunctionHeader(BOOL, new FunctionParameter(type)),
|
1552
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1548
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1553
|
1549
|
}
|
1554
|
1550
|
|
1555
|
1551
|
private void notsame(HighLevelDefinition cls, BuiltinID id, ITypeID type) {
|
|
@@ -1559,6 +1555,6 @@ public class TypeMemberBuilder implements ITypeVisitor<Void> {
|
1559
|
1555
|
Modifiers.PUBLIC,
|
1560
|
1556
|
OperatorType.NOTSAME,
|
1561
|
1557
|
new FunctionHeader(BOOL, new FunctionParameter(type)),
|
1562
|
|
- id).registerTo(members, TypeMemberPriority.SPECIFIED, emptyMapper);
|
|
1558
|
+ id).registerTo(members, TypeMemberPriority.SPECIFIED, null);
|
1563
|
1559
|
}
|
1564
|
1560
|
}
|