aboutsummaryrefslogtreecommitdiff
path: root/gcc/m2/gm2-compiler
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/m2/gm2-compiler')
-rw-r--r--gcc/m2/gm2-compiler/M2GCCDeclare.def2
-rw-r--r--gcc/m2/gm2-compiler/M2GCCDeclare.mod6
-rw-r--r--gcc/m2/gm2-compiler/M2GenGCC.mod51
-rw-r--r--gcc/m2/gm2-compiler/M2Quads.mod107
-rw-r--r--gcc/m2/gm2-compiler/M2Range.mod2
-rw-r--r--gcc/m2/gm2-compiler/M2System.mod123
6 files changed, 192 insertions, 99 deletions
diff --git a/gcc/m2/gm2-compiler/M2GCCDeclare.def b/gcc/m2/gm2-compiler/M2GCCDeclare.def
index 1d87d6b..b3a5790 100644
--- a/gcc/m2/gm2-compiler/M2GCCDeclare.def
+++ b/gcc/m2/gm2-compiler/M2GCCDeclare.def
@@ -98,7 +98,7 @@ PROCEDURE TryDeclareConstant (tokenno: CARDINAL; sym: CARDINAL) ;
then enter it into the to do list.
*)
-PROCEDURE TryDeclareType (tokenno: CARDINAL; type: CARDINAL) ;
+PROCEDURE TryDeclareType (type: CARDINAL) ;
(*
diff --git a/gcc/m2/gm2-compiler/M2GCCDeclare.mod b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
index 7dcf439..b12add6 100644
--- a/gcc/m2/gm2-compiler/M2GCCDeclare.mod
+++ b/gcc/m2/gm2-compiler/M2GCCDeclare.mod
@@ -144,7 +144,7 @@ FROM M2Base IMPORT IsPseudoBaseProcedure, IsPseudoBaseFunction,
Boolean, True, False, Nil,
IsRealType, IsNeededAtRunTime, IsComplexType ;
-FROM M2System IMPORT IsPseudoSystemFunction, IsSystemType,
+FROM M2System IMPORT IsPseudoSystemFunction, IsSystemType, IsRealN,
GetSystemTypeMinMax, Address, Word, Byte, Loc,
System, IntegerN, CardinalN, WordN, RealN, SetN, ComplexN,
CSizeT, CSSizeT, COffT ;
@@ -1918,7 +1918,7 @@ END IsAnyType ;
then enter it into the to do list.
*)
-PROCEDURE TryDeclareType (tokenno: CARDINAL; type: CARDINAL) ;
+PROCEDURE TryDeclareType (type: CARDINAL) ;
BEGIN
IF (type#NulSym) AND IsAnyType (type)
THEN
@@ -2013,7 +2013,7 @@ BEGIN
ELSIF IsConstructor(sym)
THEN
DeclareConstantFromTree(sym, PopConstructorTree(tokenno))
- ELSIF IsRealType(GetDType(sym))
+ ELSIF IsRealType (GetDType (sym)) OR IsRealN (GetDType (sym))
THEN
type := GetDType(sym) ;
DeclareConstantFromTree(sym, BuildConvert(TokenToLocation(tokenno), Mod2Gcc(type), PopRealTree(), TRUE))
diff --git a/gcc/m2/gm2-compiler/M2GenGCC.mod b/gcc/m2/gm2-compiler/M2GenGCC.mod
index ec38dc2..a1e3c07 100644
--- a/gcc/m2/gm2-compiler/M2GenGCC.mod
+++ b/gcc/m2/gm2-compiler/M2GenGCC.mod
@@ -43,7 +43,7 @@ FROM SymbolTable IMPORT PushSize, PopSize, PushValue, PopValue,
IsConst, IsConstSet, IsProcedure, IsProcType,
IsVar, IsVarParamAny, IsTemporary, IsTuple,
IsEnumeration,
- IsUnbounded, IsArray, IsSet, IsConstructor,
+ IsUnbounded, IsArray, IsSet, IsConstructor, IsConstructorConstant,
IsProcedureVariable,
IsUnboundedParamAny,
IsRecordField, IsFieldVarient, IsVarient, IsRecord,
@@ -232,7 +232,7 @@ FROM m2statement IMPORT BuildAsm, BuildProcedureCallTree, BuildParam, BuildFunct
BuildReturnValueCode, SetLastFunction,
BuildIncludeVarConst, BuildIncludeVarVar,
BuildExcludeVarConst, BuildExcludeVarVar,
- BuildBuiltinCallTree,
+ BuildBuiltinCallTree, CopyByField,
GetParamTree, BuildCleanUp,
BuildTryFinally,
GetLastFunction, SetLastFunction,
@@ -241,7 +241,7 @@ FROM m2statement IMPORT BuildAsm, BuildProcedureCallTree, BuildParam, BuildFunct
FROM m2type IMPORT ChainOnParamValue, GetPointerType, GetIntegerType, AddStatement,
GetCardinalType, GetWordType, GetM2ZType, GetM2RType, GetM2CType,
BuildCharConstant, AddStringToTreeList, BuildArrayStringConstructor,
- GetArrayNoOfElements, GetTreeType ;
+ GetArrayNoOfElements, GetTreeType, IsGccStrictTypeEquivalent ;
FROM m2block IMPORT RememberConstant, pushGlobalScope, popGlobalScope, finishFunctionDecl,
pushFunctionScope, popFunctionScope,
@@ -3498,6 +3498,29 @@ END checkDeclare ;
(*
+ PerformCodeBecomes -
+*)
+
+PROCEDURE PerformCodeBecomes (location: location_t;
+ virtpos: CARDINAL; des, expr: CARDINAL) ;
+VAR
+ destree, exprtree: tree ;
+BEGIN
+ destree := Mod2Gcc (des) ;
+ exprtree := FoldConstBecomes (virtpos, des, expr) ;
+ IF IsVar (des) AND IsVariableSSA (des)
+ THEN
+ Replace (des, exprtree)
+ ELSIF IsGccStrictTypeEquivalent (destree, exprtree)
+ THEN
+ BuildAssignmentStatement (location, destree, exprtree)
+ ELSE
+ CopyByField (location, destree, exprtree)
+ END
+END PerformCodeBecomes ;
+
+
+(*
------------------------------------------------------------------------------
:= Operator
------------------------------------------------------------------------------
@@ -3576,14 +3599,7 @@ BEGIN
ELSE
IF checkBecomes (des, expr, virtpos, despos, exprpos)
THEN
- IF IsVar (des) AND IsVariableSSA (des)
- THEN
- Replace (des, FoldConstBecomes (virtpos, des, expr))
- ELSE
- BuildAssignmentStatement (location,
- Mod2Gcc (des),
- FoldConstBecomes (virtpos, des, expr))
- END
+ PerformCodeBecomes (location, virtpos, des, expr)
ELSE
SubQuad (quad) (* We don't want multiple errors for the quad. *)
END
@@ -4821,18 +4837,17 @@ END FoldBuiltinTypeInfo ;
PROCEDURE FoldTBitsize (tokenno: CARDINAL; p: WalkAction;
quad: CARDINAL;
- op1, op2, op3: CARDINAL) ;
+ res, type: CARDINAL) ;
VAR
- type : CARDINAL ;
location: location_t ;
BEGIN
location := TokenToLocation(tokenno) ;
- TryDeclareType (tokenno, op3) ;
- type := GetDType (op3) ;
+ TryDeclareType (type) ;
+ type := GetDType (type) ;
IF CompletelyResolved (type)
THEN
- AddModGcc (op1, BuildSystemTBitSize (location, Mod2Gcc (type))) ;
- p (op1) ;
+ AddModGcc (res, BuildSystemTBitSize (location, Mod2Gcc (type))) ;
+ p (res) ;
NoChange := FALSE ;
SubQuad (quad)
END
@@ -4971,7 +4986,7 @@ BEGIN
END
ELSIF op2=TBitSize
THEN
- FoldTBitsize (tokenno, p, quad, op1, op2, op3)
+ FoldTBitsize (tokenno, p, quad, op1, op3)
ELSE
InternalError ('only expecting LENGTH, CAP, ABS, IM, RE')
END
diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod
index a45d67a..9bb8c4d 100644
--- a/gcc/m2/gm2-compiler/M2Quads.mod
+++ b/gcc/m2/gm2-compiler/M2Quads.mod
@@ -8474,7 +8474,7 @@ BEGIN
THEN
(* we cannot test for IsConst(Param) AND (GetSType(Param)=Char) as the type might not be assigned yet *)
MetaError1 ('base procedure {%EkHIGH} expects a variable or string constant as its parameter {%1d:rather than {%1d}} {%1asa}', Param)
- ELSIF IsUnbounded(Type)
+ ELSIF (Type # NulSym) AND IsUnbounded(Type)
THEN
BuildHighFromUnbounded (combinedtok)
ELSE
@@ -9776,11 +9776,30 @@ END CheckBaseTypeValue ;
(*
- GetTypeMin - returns the minimium value of type.
+ GetTypeMin - returns the minimium value of type and generate an error
+ if this is unavailable.
*)
PROCEDURE GetTypeMin (tok: CARDINAL; func, type: CARDINAL) : CARDINAL ;
VAR
+ min: CARDINAL ;
+BEGIN
+ min := GetTypeMinLower (tok, func, type) ;
+ IF min = NulSym
+ THEN
+ MetaErrorT1 (tok,
+ 'unable to obtain the {%AkMIN} value for type {%1ad}', type)
+ END ;
+ RETURN min
+END GetTypeMin ;
+
+
+(*
+ GetTypeMinLower - obtain the maximum value for type.
+*)
+
+PROCEDURE GetTypeMinLower (tok: CARDINAL; func, type: CARDINAL) : CARDINAL ;
+VAR
min, max: CARDINAL ;
BEGIN
IF IsSubrange (type)
@@ -9803,22 +9822,38 @@ BEGIN
RETURN min
ELSIF GetSType (type) = NulSym
THEN
- MetaErrorT1 (tok,
- 'unable to obtain the {%AkMIN} value for type {%1ad}', type) ;
- (* non recoverable error. *)
- InternalError ('MetaErrorT1 {%AkMIN} should call abort')
+ RETURN NulSym
ELSE
RETURN GetTypeMin (tok, func, GetSType (type))
END
-END GetTypeMin ;
+END GetTypeMinLower ;
(*
- GetTypeMax - returns the maximum value of type.
+ GetTypeMax - returns the maximum value of type and generate an error
+ if this is unavailable.
*)
PROCEDURE GetTypeMax (tok: CARDINAL; func, type: CARDINAL) : CARDINAL ;
VAR
+ max: CARDINAL ;
+BEGIN
+ max := GetTypeMaxLower (tok, func, type) ;
+ IF max = NulSym
+ THEN
+ MetaErrorT1 (tok,
+ 'unable to obtain the {%AkMAX} value for type {%1ad}', type)
+ END ;
+ RETURN max
+END GetTypeMax ;
+
+
+(*
+ GetTypeMaxLower - obtain the maximum value for type.
+*)
+
+PROCEDURE GetTypeMaxLower (tok: CARDINAL; func, type: CARDINAL) : CARDINAL ;
+VAR
min, max: CARDINAL ;
BEGIN
IF IsSubrange (type)
@@ -9841,14 +9876,11 @@ BEGIN
RETURN max
ELSIF GetSType (type) = NulSym
THEN
- MetaErrorT1 (tok,
- 'unable to obtain the {%AkMAX} value for type {%1ad}', type) ;
- (* non recoverable error. *)
- InternalError ('MetaErrorT1 {%AkMAX} should call abort')
+ RETURN NulSym
ELSE
RETURN GetTypeMax (tok, func, GetSType (type))
END
-END GetTypeMax ;
+END GetTypeMaxLower ;
(*
@@ -11449,13 +11481,12 @@ END BuildDesignatorPointerError ;
(*
BuildDesignatorArray - Builds the array referencing.
The purpose of this procedure is to work out
- whether the DesignatorArray is a static or
- dynamic array and to call the appropriate
+ whether the DesignatorArray is a constant string or
+ dynamic array/static array and to call the appropriate
BuildRoutine.
The Stack is expected to contain:
-
Entry Exit
===== ====
@@ -11468,6 +11499,41 @@ END BuildDesignatorPointerError ;
*)
PROCEDURE BuildDesignatorArray ;
+BEGIN
+ IF IsConst (OperandT (2)) AND IsConstString (OperandT (2))
+ THEN
+ MetaErrorT1 (OperandTtok (2),
+ '{%1Ead} is not an array, but a constant string. Hint use a string constant created with an array constructor',
+ OperandT (2)) ;
+ BuildDesignatorError ('bad array access')
+ ELSE
+ BuildDesignatorArrayStaticDynamic
+ END
+END BuildDesignatorArray ;
+
+
+(*
+ BuildDesignatorArrayStaticDynamic - Builds the array referencing.
+ The purpose of this procedure is to work out
+ whether the DesignatorArray is a static or
+ dynamic array and to call the appropriate
+ BuildRoutine.
+
+ The Stack is expected to contain:
+
+
+ Entry Exit
+ ===== ====
+
+ Ptr ->
+ +--------------+
+ | e | <- Ptr
+ |--------------| +------------+
+ | Sym | Type | | S | T |
+ |--------------| |------------|
+*)
+
+PROCEDURE BuildDesignatorArrayStaticDynamic ;
VAR
combinedTok,
arrayTok,
@@ -11480,10 +11546,7 @@ BEGIN
IF IsConst (OperandT (2))
THEN
type := GetDType (OperandT (2)) ;
- IF type = NulSym
- THEN
- InternalError ('constant type should have been resolved')
- ELSIF IsArray (type)
+ IF (type # NulSym) AND IsArray (type)
THEN
PopTtok (e, exprTok) ;
PopTFDtok (Sym, Type, dim, arrayTok) ;
@@ -11501,7 +11564,7 @@ BEGIN
IF (NOT IsVar (OperandT (2))) AND (NOT IsTemporary (OperandT (2)))
THEN
MetaErrorT1 (OperandTtok (2),
- 'can only access arrays using variables or formal parameters not {%1Ead}',
+ 'can only access arrays using constants, variables or formal parameters not {%1Ead}',
OperandT (2)) ;
BuildDesignatorError ('bad array access')
END ;
@@ -11528,7 +11591,7 @@ BEGIN
Sym) ;
BuildDesignatorError ('bad array access')
END
-END BuildDesignatorArray ;
+END BuildDesignatorArrayStaticDynamic ;
(*
diff --git a/gcc/m2/gm2-compiler/M2Range.mod b/gcc/m2/gm2-compiler/M2Range.mod
index 347012b..2a5bfab 100644
--- a/gcc/m2/gm2-compiler/M2Range.mod
+++ b/gcc/m2/gm2-compiler/M2Range.mod
@@ -1257,6 +1257,7 @@ END FoldAssignment ;
CheckCancelled - check to see if the range has been cancelled and if so remove quad.
*)
+(*
PROCEDURE CheckCancelled (range: CARDINAL; quad: CARDINAL) ;
BEGIN
IF IsCancelled (range)
@@ -1264,6 +1265,7 @@ BEGIN
SubQuad (quad)
END
END CheckCancelled ;
+*)
(*
diff --git a/gcc/m2/gm2-compiler/M2System.mod b/gcc/m2/gm2-compiler/M2System.mod
index efd5d11..68ed9dc 100644
--- a/gcc/m2/gm2-compiler/M2System.mod
+++ b/gcc/m2/gm2-compiler/M2System.mod
@@ -61,7 +61,7 @@ FROM NameKey IMPORT Name, MakeKey, NulName ;
FROM M2Batch IMPORT MakeDefinitionSource ;
FROM M2Base IMPORT Cardinal, ZType ;
FROM M2Size IMPORT Size, MakeSize ;
-FROM M2ALU IMPORT PushCard, PushIntegerTree, DivTrunc ;
+FROM M2ALU IMPORT PushCard, PushIntegerTree, PushRealTree, DivTrunc ;
FROM M2Error IMPORT InternalError ;
FROM Lists IMPORT List, InitList, IsItemInList, PutItemIntoList, GetItemFromList, NoOfItemsInList ;
FROM SymbolKey IMPORT SymbolTree, InitTree, GetSymKey, PutSymKey ;
@@ -114,21 +114,32 @@ END Init ;
(*
- CreateMinMaxFor - creates the min and max values for, type, given gccType.
+ CreateMinMaxFor - creates the min and max values for type given gccType.
*)
-PROCEDURE CreateMinMaxFor (type: CARDINAL; min, max: ARRAY OF CHAR; gccType: tree) ;
+PROCEDURE CreateMinMaxFor (type: CARDINAL; min, max: ARRAY OF CHAR;
+ gccType: tree; realtype: BOOLEAN) ;
VAR
maxval, minval: CARDINAL ;
BEGIN
maxval := MakeConstVar (BuiltinTokenNo, MakeKey(max)) ;
- PushIntegerTree (GetMaxFrom (BuiltinsLocation (), gccType)) ;
+ IF realtype
+ THEN
+ PushRealTree (GetMaxFrom (BuiltinsLocation (), gccType))
+ ELSE
+ PushIntegerTree (GetMaxFrom (BuiltinsLocation (), gccType))
+ END ;
PopValue (maxval) ;
PutVar (maxval, type) ;
PutSymKey (MaxValues, GetSymName (type), maxval) ;
minval := MakeConstVar (BuiltinTokenNo, MakeKey(min)) ;
- PushIntegerTree (GetMinFrom (BuiltinsLocation (), gccType)) ;
+ IF realtype
+ THEN
+ PushRealTree (GetMinFrom (BuiltinsLocation (), gccType))
+ ELSE
+ PushIntegerTree (GetMinFrom (BuiltinsLocation (), gccType))
+ END ;
PopValue (minval) ;
PutVar (minval, type) ;
PutSymKey (MinValues, GetSymName (type), minval)
@@ -136,31 +147,32 @@ END CreateMinMaxFor ;
(*
- MapType -
+ MapType - create a mapping of the M2 frontend type to gcctype.
*)
PROCEDURE MapType (type: CARDINAL;
name, min, max: ARRAY OF CHAR;
- needsExporting: BOOLEAN; t: tree) ;
+ needsExporting: BOOLEAN;
+ gcctype: tree; realtype: BOOLEAN) ;
VAR
n: Name ;
BEGIN
- PushIntegerTree(BuildSize(BuiltinsLocation(), t, FALSE)) ;
- PopSize(type) ;
- IF IsItemInList(SystemTypes, type)
+ PushIntegerTree (BuildSize (BuiltinsLocation (), gcctype, FALSE)) ;
+ PopSize (type) ;
+ IF IsItemInList (SystemTypes, type)
THEN
InternalError ('not expecting system type to already be declared')
END ;
- PutItemIntoList(SystemTypes, type) ;
+ PutItemIntoList (SystemTypes, type) ;
- (* create min, max constants if type is ordinal *)
- IF (NOT StrEqual(min, '')) AND (NOT StrEqual(max, ''))
+ (* Create min, max constants if type is ordinal or a floating point type. *)
+ IF (NOT StrEqual (min, '')) AND (NOT StrEqual (max, ''))
THEN
- CreateMinMaxFor(type, min, max, t)
+ CreateMinMaxFor (type, min, max, gcctype, realtype)
END ;
IF needsExporting AND DumpSystemExports
THEN
- n := GetSymName(type) ;
+ n := GetSymName (type) ;
printf1('SYSTEM module creates type: %a\n', n)
END
END MapType ;
@@ -171,7 +183,8 @@ END MapType ;
*)
PROCEDURE CreateType (name, min, max: ARRAY OF CHAR;
- needsExporting: BOOLEAN; gccType: tree) : CARDINAL ;
+ needsExporting: BOOLEAN; gccType: tree;
+ realtype: BOOLEAN) : CARDINAL ;
VAR
type: CARDINAL ;
BEGIN
@@ -183,7 +196,7 @@ BEGIN
(* Create base type. *)
type := MakeType (BuiltinTokenNo, MakeKey (name)) ;
PutType (type, NulSym) ; (* a Base Type *)
- MapType (type, name, min, max, needsExporting, gccType) ;
+ MapType (type, name, min, max, needsExporting, gccType, realtype) ;
RETURN type
END
END CreateType ;
@@ -195,9 +208,11 @@ END CreateType ;
*)
PROCEDURE AttemptToCreateType (name, min, max: ARRAY OF CHAR;
- needsExporting: BOOLEAN; gccType: tree) ;
+ needsExporting: BOOLEAN; gccType: tree;
+ realtype: BOOLEAN) ;
BEGIN
- Assert (IsLegal (CreateType (name, min, max, needsExporting, gccType)))
+ Assert (IsLegal (CreateType (name, min, max, needsExporting,
+ gccType, realtype)))
END AttemptToCreateType ;
@@ -226,7 +241,7 @@ BEGIN
subrange := MakeSubrange (BuiltinTokenNo, NulName) ;
PutSubrange (subrange, low, high, Cardinal) ;
PutSet (type, subrange, FALSE) ;
- MapType (type, name, '', '', needsExporting, gccType) ;
+ MapType (type, name, '', '', needsExporting, gccType, FALSE) ;
RETURN type
END
END CreateSetType ;
@@ -251,33 +266,33 @@ END AttemptToCreateSetType ;
PROCEDURE MakeFixedSizedTypes ;
BEGIN
- AttemptToCreateType ('INTEGER8', 'MinInteger8', 'MaxInteger8', TRUE, GetM2Integer8 ()) ;
- AttemptToCreateType ('INTEGER16', 'MinInteger16', 'MaxInteger16', TRUE, GetM2Integer16 ()) ;
- AttemptToCreateType ('INTEGER32', 'MinInteger32', 'MaxInteger32', TRUE, GetM2Integer32 ()) ;
- AttemptToCreateType ('INTEGER64', 'MinInteger64', 'MaxInteger64', TRUE, GetM2Integer64 ()) ;
+ AttemptToCreateType ('INTEGER8', 'MinInteger8', 'MaxInteger8', TRUE, GetM2Integer8 (), FALSE) ;
+ AttemptToCreateType ('INTEGER16', 'MinInteger16', 'MaxInteger16', TRUE, GetM2Integer16 (), FALSE) ;
+ AttemptToCreateType ('INTEGER32', 'MinInteger32', 'MaxInteger32', TRUE, GetM2Integer32 (), FALSE) ;
+ AttemptToCreateType ('INTEGER64', 'MinInteger64', 'MaxInteger64', TRUE, GetM2Integer64 (), FALSE) ;
- AttemptToCreateType ('CARDINAL8', 'MinCardinal8', 'MaxCardinal8', TRUE, GetM2Cardinal8 ()) ;
- AttemptToCreateType ('CARDINAL16', 'MinCardinal16', 'MaxCardinal16', TRUE, GetM2Cardinal16 ()) ;
- AttemptToCreateType ('CARDINAL32', 'MinCardinal32', 'MaxCardinal32', TRUE, GetM2Cardinal32 ()) ;
- AttemptToCreateType ('CARDINAL64', 'MinCardinal64', 'MaxCardinal64', TRUE, GetM2Cardinal64 ()) ;
+ AttemptToCreateType ('CARDINAL8', 'MinCardinal8', 'MaxCardinal8', TRUE, GetM2Cardinal8 (), FALSE) ;
+ AttemptToCreateType ('CARDINAL16', 'MinCardinal16', 'MaxCardinal16', TRUE, GetM2Cardinal16 (), FALSE) ;
+ AttemptToCreateType ('CARDINAL32', 'MinCardinal32', 'MaxCardinal32', TRUE, GetM2Cardinal32 (), FALSE) ;
+ AttemptToCreateType ('CARDINAL64', 'MinCardinal64', 'MaxCardinal64', TRUE, GetM2Cardinal64 (), FALSE) ;
- AttemptToCreateType ('WORD16', '', '', TRUE, GetM2Word16 ()) ;
- AttemptToCreateType ('WORD32', '', '', TRUE, GetM2Word32 ()) ;
- AttemptToCreateType ('WORD64', '', '', TRUE, GetM2Word64 ()) ;
+ AttemptToCreateType ('WORD16', '', '', TRUE, GetM2Word16 (), FALSE) ;
+ AttemptToCreateType ('WORD32', '', '', TRUE, GetM2Word32 (), FALSE) ;
+ AttemptToCreateType ('WORD64', '', '', TRUE, GetM2Word64 (), FALSE) ;
AttemptToCreateSetType ('BITSET8' , '7' , TRUE, GetM2Bitset8 ()) ;
AttemptToCreateSetType ('BITSET16', '15', TRUE, GetM2Bitset16 ()) ;
AttemptToCreateSetType ('BITSET32', '31', TRUE, GetM2Bitset32 ()) ;
- AttemptToCreateType ('REAL32', '', '', TRUE, GetM2Real32 ()) ;
- AttemptToCreateType ('REAL64', '', '', TRUE, GetM2Real64 ()) ;
- AttemptToCreateType ('REAL96', '', '', TRUE, GetM2Real96 ()) ;
- AttemptToCreateType ('REAL128', '', '', TRUE, GetM2Real128 ()) ;
+ AttemptToCreateType ('REAL32', 'MinReal32', 'MaxReal32', TRUE, GetM2Real32 (), TRUE) ;
+ AttemptToCreateType ('REAL64', 'MinReal64', 'MaxReal64', TRUE, GetM2Real64 (), TRUE) ;
+ AttemptToCreateType ('REAL96', 'MinReal96', 'MaxReal96', TRUE, GetM2Real96 (), TRUE) ;
+ AttemptToCreateType ('REAL128', 'MinReal128', 'MaxReal128', TRUE, GetM2Real128 (), TRUE) ;
- AttemptToCreateType ('COMPLEX32', '', '', TRUE, GetM2Complex32 ()) ;
- AttemptToCreateType ('COMPLEX64', '', '', TRUE, GetM2Complex64 ()) ;
- AttemptToCreateType ('COMPLEX96', '', '', TRUE, GetM2Complex96 ()) ;
- AttemptToCreateType ('COMPLEX128', '', '', TRUE, GetM2Complex128 ())
+ AttemptToCreateType ('COMPLEX32', '', '', TRUE, GetM2Complex32 (), TRUE) ;
+ AttemptToCreateType ('COMPLEX64', '', '', TRUE, GetM2Complex64 (), TRUE) ;
+ AttemptToCreateType ('COMPLEX96', '', '', TRUE, GetM2Complex96 (), TRUE) ;
+ AttemptToCreateType ('COMPLEX128', '', '', TRUE, GetM2Complex128 (), TRUE)
END MakeFixedSizedTypes ;
@@ -287,16 +302,16 @@ END MakeFixedSizedTypes ;
PROCEDURE InitPIMTypes ;
BEGIN
- Loc := CreateType ('LOC', '', '', TRUE, GetISOLocType()) ;
+ Loc := CreateType ('LOC', '', '', TRUE, GetISOLocType(), FALSE) ;
InitSystemTypes(BuiltinsLocation(), Loc) ;
- Word := CreateType ('WORD', '', '', TRUE, GetWordType()) ;
- Byte := CreateType ('BYTE', '', '', TRUE, GetByteType()) ;
+ Word := CreateType ('WORD', '', '', TRUE, GetWordType(), FALSE) ;
+ Byte := CreateType ('BYTE', '', '', TRUE, GetByteType(), FALSE) ;
(* ADDRESS = POINTER TO BYTE *)
Address := MakePointer (BuiltinTokenNo, MakeKey('ADDRESS')) ;
PutPointer (Address, Byte) ; (* Base Type *)
- MapType (Address, 'ADDRESS', '', '', TRUE, GetPointerType())
+ MapType (Address, 'ADDRESS', '', '', TRUE, GetPointerType(), FALSE)
END InitPIMTypes ;
@@ -306,17 +321,15 @@ END InitPIMTypes ;
PROCEDURE InitISOTypes ;
BEGIN
- Loc := CreateType ('LOC', 'MinLoc', 'MaxLoc', TRUE, GetISOLocType ()) ;
+ Loc := CreateType ('LOC', 'MinLoc', 'MaxLoc', TRUE, GetISOLocType (), FALSE) ;
InitSystemTypes (BuiltinsLocation (), Loc) ;
Address := MakePointer (BuiltinTokenNo, MakeKey ('ADDRESS')) ;
PutPointer (Address, Loc) ; (* Base Type *)
- MapType (Address, 'ADDRESS', '', '', TRUE, GetPointerType()) ;
-
- Byte := CreateType ('BYTE', '', '', TRUE, GetISOByteType()) ;
- Word := CreateType ('WORD', '', '', TRUE, GetISOWordType()) ;
+ MapType (Address, 'ADDRESS', '', '', TRUE, GetPointerType(), FALSE) ;
- (* CreateMinMaxFor(Loc, 'MinLoc', 'MaxLoc', GetISOLocType()) *)
+ Byte := CreateType ('BYTE', '', '', TRUE, GetISOByteType(), FALSE) ;
+ Word := CreateType ('WORD', '', '', TRUE, GetISOWordType(), FALSE) ;
END InitISOTypes ;
@@ -327,9 +340,9 @@ END InitISOTypes ;
PROCEDURE MakeExtraSystemTypes ;
BEGIN
- CSizeT := CreateType ('CSIZE_T' , '', '', TRUE, GetCSizeTType ()) ;
- CSSizeT := CreateType ('CSSIZE_T', '', '', TRUE, GetCSSizeTType ()) ;
- COffT := CreateType ('COFF_T', '', '', TRUE, GetCOffTType ()) ;
+ CSizeT := CreateType ('CSIZE_T' , '', '', TRUE, GetCSizeTType (), FALSE) ;
+ CSSizeT := CreateType ('CSSIZE_T', '', '', TRUE, GetCSSizeTType (), FALSE) ;
+ COffT := CreateType ('COFF_T', '', '', TRUE, GetCOffTType (), FALSE)
END MakeExtraSystemTypes ;
@@ -425,9 +438,9 @@ BEGIN
MakeKey('THROW')) ; (* Procedure *)
PutProcedureNoReturn (Throw, DefProcedure, TRUE) ;
- CreateMinMaxFor(Word, 'MinWord', 'MaxWord', GetWordType()) ;
- CreateMinMaxFor(Address, 'MinAddress', 'MaxAddress', GetPointerType()) ;
- CreateMinMaxFor(Byte, 'MinByte', 'MaxByte', GetByteType()) ;
+ CreateMinMaxFor(Word, 'MinWord', 'MaxWord', GetWordType(), FALSE) ;
+ CreateMinMaxFor(Address, 'MinAddress', 'MaxAddress', GetPointerType(), FALSE) ;
+ CreateMinMaxFor(Byte, 'MinByte', 'MaxByte', GetByteType(), FALSE) ;
MakeFixedSizedTypes ;
MakeExtraSystemTypes ;