From 8cfc14b50ac62cf4c0f2e3e1751d9a8c5e943fb1 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 26 Nov 2022 15:45:26 -0600 Subject: [PATCH] Rename itype field of initializerRecord to basetype. --- CCommon.pas | 2 +- Parser.pas | 30 +++++++++++++++--------------- Symbol.pas | 12 ++++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CCommon.pas b/CCommon.pas index 8e20e63..68638a8 100644 --- a/CCommon.pas +++ b/CCommon.pas @@ -328,7 +328,7 @@ type case isConstant: boolean of {is this a constant initializer?} false: (iTree: tokenPtr); true : ( {Note: qVal.lo must overlap iVal} - case itype: baseTypeEnum of + case basetype: baseTypeEnum of cgByte, cgUByte, cgWord, diff --git a/Parser.pas b/Parser.pas index 1587e6b..ab4fc3e 100644 --- a/Parser.pas +++ b/Parser.pas @@ -1888,13 +1888,13 @@ var iPtr^.isStructOrUnion := false; iPtr^.iVal := bitvalue; if bitcount <= 8 then - iPtr^.itype := cgUByte + iPtr^.basetype := cgUByte else if bitcount <= 16 then - iPtr^.itype := cgUWord + iPtr^.basetype := cgUWord else if bitcount > 24 then - iPtr^.itype := cgULong + iPtr^.basetype := cgULong else begin {3-byte bitfield: split into two parts} - iPtr^.itype := cgUWord; + iPtr^.basetype := cgUWord; iPtr^.iVal := bitvalue & $0000FFFF; bitcount := bitcount - 16; bitvalue := bitvalue >> 16; @@ -2064,7 +2064,7 @@ var iPtr^.qval.hi := 0; iPtr^.iVal := expressionValue; end; {else} - iPtr^.itype := tp^.baseType; + iPtr^.basetype := tp^.baseType; InitializeBitField; end; {if} case tp^.kind of @@ -2128,7 +2128,7 @@ var if (etype = stringTypePtr) or (etype = utf16StringTypePtr) or (etype = utf32StringTypePtr) then begin iPtr^.isConstant := true; - iPtr^.iType := ccPointer; + iPtr^.basetype := ccPointer; iPtr^.pval := 0; iPtr^.pPlus := false; iPtr^.isName := false; @@ -2137,7 +2137,7 @@ var else if etype^.kind = scalarType then if etype^.baseType in [cgByte..cgULong] then if expressionValue = 0 then - iPtr^.iType := cgULong + iPtr^.basetype := cgULong else begin Error(47); errorFound := true; @@ -2145,7 +2145,7 @@ var else if etype^.baseType in [cgQuad,cgUQuad] then if (llExpressionValue.hi = 0) and (llExpressionValue.lo = 0) then - iPtr^.iType := cgULong + iPtr^.basetype := cgULong else begin Error(47); errorFound := true; @@ -2155,7 +2155,7 @@ var errorFound := true; end {else} else if etype^.kind = pointerType then begin - iPtr^.iType := cgULong; + iPtr^.basetype := cgULong; iPtr^.pval := expressionValue; end {else if} else begin @@ -2179,7 +2179,7 @@ var or ((tp^.kind = scalarType) and (tp^.baseType in [cgLong,cgULong]))) and (bitsize = 0) then begin - iPtr^.iType := ccPointer; + iPtr^.basetype := ccPointer; if variable^.storage in [external,global,private] then begin {do pointer constants with + or -} @@ -2431,13 +2431,13 @@ var {iPtr^.isStructOrUnion := false;} if iPtr^.isConstant then begin if tp^.kind = scalarType then - iPtr^.itype := tp^.baseType + iPtr^.basetype := tp^.baseType else if tp^.kind = pointertype then begin - iPtr^.itype := cgULong; + iPtr^.basetype := cgULong; {iPtr^.iVal := 0;} end {else if} else begin - iPtr^.itype := cgWord; + iPtr^.basetype := cgWord; Error(47); errorFound := true; end; {else} @@ -2530,7 +2530,7 @@ var iPtr^.isStructOrUnion := false; if (variable^.storage in [external,global,private]) then begin iPtr^.isConstant := true; - iPtr^.itype := cgString; + iPtr^.basetype := cgString; iPtr^.sval := token.sval; count := tp^.elements - stringLength; if count > 0 then @@ -4775,7 +4775,7 @@ iPtr^.count := 1; {iPtr^.bitsize := 0;} {iPtr^.isStructOrUnion := false;} iPtr^.isConstant := true; -iPtr^.itype := cgString; +iPtr^.basetype := cgString; iPtr^.sval := sval; id^.iPtr := iPtr; diff --git a/Symbol.pas b/Symbol.pas index 6197519..ad8eeaa 100644 --- a/Symbol.pas +++ b/Symbol.pas @@ -699,17 +699,17 @@ procedure DoGlobals; Gen2Name(dc_glb, 0, ord(sp^.storage = private), sp^.name); ip := sp^.iPtr; while ip <> nil do begin - case ip^.itype of + case ip^.basetype of cgByte,cgUByte,cgWord,cgUWord: begin lval := ip^.ival; - Gen2t(dc_cns, long(lval).lsw, ip^.count, ip^.itype); + Gen2t(dc_cns, long(lval).lsw, ip^.count, ip^.basetype); end; cgLong,cgULong: GenL1(dc_cns, ip^.ival, ip^.count); cgQuad,cgUQuad: GenQ1(dc_cns, ip^.qval, ip^.count); cgReal,cgDouble,cgComp,cgExtended: - GenR1t(dc_cns, ip^.rval, ip^.count, ip^.itype); + GenR1t(dc_cns, ip^.rval, ip^.count, ip^.basetype); cgString: GenS(dc_cns, ip^.sval); ccPointer: begin @@ -790,17 +790,17 @@ procedure DoGlobals; if sp^.state = initialized then begin Gen2Name(dc_glb, 0, ord(sp^.storage = private), sp^.name); ip := sp^.iPtr; - case ip^.itype of + case ip^.basetype of cgByte,cgUByte,cgWord,cgUWord: begin lval := ip^.ival; - Gen2t(dc_cns, long(lval).lsw, 1, ip^.itype); + Gen2t(dc_cns, long(lval).lsw, 1, ip^.basetype); end; cgLong,cgULong: GenL1(dc_cns, ip^.ival, 1); cgQuad,cgUQuad: GenQ1(dc_cns, ip^.qval, 1); cgReal,cgDouble,cgComp,cgExtended: - GenR1t(dc_cns, ip^.rval, 1, ip^.itype); + GenR1t(dc_cns, ip^.rval, 1, ip^.basetype); cgString: GenS(dc_cns, ip^.sval); ccPointer: begin