CCTypeProcs:
TYPE =
RECORD[
createIndirectNode:
PROC [cc:
CC, procData:
REF
ANY, indirectType, targetType: Type, mem: Mem]
RETURNS [Node],
Invoked only on indirect types.
checkConformance: PROC[valType, varType: Type, cc: CC, procData: REF ANY] RETURNS[ConformanceCheck],
storable: PROC[valType, indirectType: Type, cc: CC, procData: REF ANY] RETURNS[BOOLEAN],
checkFamilyInclusion: PROC[valType, varType: Type, cc: CC, procData: REF ANY] RETURNS[BOOLEAN],
isASingleton: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[BOOLEAN],
binaryOperandTypes: PROC[op: Operator, left, right: Type, cc: CC, procData: REF ANY] RETURNS[BinaryTargetTypes],
isAnIndirect: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[BOOLEAN],
getRTargetType: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[Type],
getLTargetType: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[Type],
getFieldsType: PROC[rcdType: Type, cc: CC, procData: REF ANY] RETURNS[Type],
getRefType: PROC[rhs: Type, cc: CC, procData: REF ANY] RETURNS[Type],
hasIdField: PROC[id: ROPE, fieldContext: Type, cc: CC, procData: REF ANY] RETURNS[IdFieldCase],
containsVariance: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[BOOLEAN],
getNVariants: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[INT],
asIndexSet: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[Type],
operand: PROC[op: Operator, lr: LR, tc: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
applyOperand: PROC[operatorType: Type, operand: ParseTree, cc: CC, procData: REF ANY] RETURNS[TypedCode],
indexOperand: PROC[operatorType: Type, operand: ParseTree, cc: CC, procData: REF ANY] RETURNS[TypedCode],
coerceToType: PROC[targetType: Type, tc: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
binaryOp: PROC[op: Operator, left, right: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
unaryOp: PROC[op: Operator, arg: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
nAryOperandType: PROC[op: Operator, typeSoFar, nextType: Type, cc: CC, procData: REF ANY] RETURNS[Type],
nAryOp: PROC[op: Operator, args: LIST OF TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
typeOp: PROC[op: Operator, type: Type, cc: CC, procData: REF ANY] RETURNS[TypedCode],
typeOp2OperandType: PROC[op: Operator, type: Type, cc: CC, procData: REF ANY] RETURNS[Type],
typeOp2: PROC[op: Operator, type: Type, arg: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
constructor: PROC[list: LIST OF ParseTree, targetType: Type, cc: CC, procData: REF ANY] RETURNS[TypedCode],
pairConstructor: PROC[list: LIST OF NameArgPair, targetType: Type, cc: CC, procData: REF ANY] RETURNS[TypedCode],
store: PROC[value: TypedCode, indirect: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
load: PROC[indirect: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
extractIdField: PROC[id: ROPE, fieldContext: Type, cc: CC, procData: REF ANY] RETURNS[TypedCode],
loadIdVal: PROC[id: ROPE, targetType: Type, cc: CC, procData: REF ANY] RETURNS[TypedCode],
selectIdField: PROC[id: ROPE, fieldIndirectContext: Type, cc: CC, procData: REF ANY] RETURNS[TypedCode],
loadIdField: PROC[id: ROPE, fieldIndirectContext: Type, cc: CC, procData: REF ANY] RETURNS[TypedCode],
apply: PROC[operator: TypedCode, operand: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
index: PROC[operator: TypedCode, operand: TypedCode, cc: CC, procData: REF ANY] RETURNS[TypedCode],
getTypeRepresentation: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[REF ANY],
getNElements: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[CARD],
getBitSize:
PROC[indirectType, targetType: Type, cc:
CC, procData:
REF
ANY]
RETURNS[
CARD],
We only ask bitSize of indirect types; the answer is the size of the referent.
note: we include bitSize as a proc because in some cases it requires bitSize information from component types. We wish to avoid analyzing the component types while constructing this AnalyzedSEHBody. So, we compute the bitSize lazily and record it in private when we have it. Hopefull, no call on bitSize will be made until the analysis is complete.
further note: The individual computations of bitSize are supposed to be inspired by [PCedar2.0]<Mimosa>SymbolOpsImpl.BitsForType.
getScopeIndex: PROC [type: Type, cc: CC, procData: REF ANY] RETURNS [CARD],
getGroundType: PROC[type: Type, cc: CC, procData: REF ANY] RETURNS[Type],
printType: PROC [to: IO.STREAM, type: Type, printDepth: INT, printWidth: INT, cc: CC, procData: REF ANY]
];