RecordTypeProcs:
TYPE =
RECORD[
createIndirectNode: PROC [cc: CC, data: REF ANY, indirectType, targetType: CirioTypes.Type, mem: CirioTypes.Mem] RETURNS [CirioTypes.Node],
getBitSize: PROC[indirectType: CirioTypes.Type, cc: CC, data: REF ANY] RETURNS[CARD],
getPaint: PROC[data: REF ANY] RETURNS[REF ANY],
comparePaint: PROC[data: REF ANY, otherPaint: REF ANY] RETURNS[BOOLEAN],
nFields: PROC[data: REF ANY] RETURNS[INT],
fieldIndexToName: PROC[index: INT, data: REF ANY] RETURNS[Rope.ROPE],
nameToFieldIndex: PROC[name: Rope.ROPE, data: REF ANY] RETURNS[INT],
fieldIndexToType: PROC[index: INT, cc: CC, data: REF ANY] RETURNS[CirioTypes.Type],
fieldIndexToDefault: PROC[index: INT, cc: CC, data: REF ANY] RETURNS[CirioSyntacticOperations.ParseTree, CirioTypes.Node],
fieldIndexToFieldCase: PROC[index: INT, cc: CC, data: REF ANY] RETURNS[FieldCase],
fieldIndexToCompileTimeConstantValue:
PROC[index:
INT, cc:
CC, data:
REF
ANY]
RETURNS[CirioTypes.Node]];
note: field indices are in [0..nFields)
note: nameToFieldIndex returns -1 if there is no such field
note: getPaint returns NIL for unpainted records. comparePaint[data, otherPaint] returns TRUE if getPaint[data]^ = otherPaint^. [don't call comparePaint if one of them has nil paint.] If comparePaint[data, getPaint[otherData]] = TRUE, then the two record types are guaranteed to be the same. I.E. they have the same textual point of declaration.
FieldCase:
TYPE = {
nodeTimeReadWrite, -- the field exists in memory and is modifiable
nodeTimeReadOnly, -- the field exists in memory, but it is not modifiable
nodeTimeConstant, -- the field does not exist in memory, but its value can not be computed until we know the actual location of some other appropriate data structure, e.g., a global or local frame.
typeTimeConstant -- the field does not exist in memory and the value can be computed without reference to the contents of memory
CreateFieldListType:
PROC[procs:
REF RecordTypeProcs, cc:
CC, data:
REF
ANY]
RETURNS[CirioTypes.Type];
field lists are record-like entities that occur embedded in other values. For example, the preamble fields of a variant record are a field-list type. FieldLists behave exactly like records, except that when they are shown they appear as a naked list of field values, not enclosed in brackets.
CirioCode.GetTypeClass[type] = $record
CCTypes.GetTypeRepresentation will return data.