style, renamed some fields

This commit is contained in:
Basile Burg 2015-05-15 09:14:05 +02:00
parent b1c1c54792
commit 120602356b
1 changed files with 77 additions and 70 deletions

View File

@ -68,16 +68,16 @@ type
TMsgOpts = class(TOptsGroup) TMsgOpts = class(TOptsGroup)
private private
fDepHandling : TDepHandling; fDepHandling : TDepHandling;
fVerb: boolean; fVerbose: boolean;
fWarn: boolean; fWarnings: boolean;
fWarnEx: boolean; fWarnEx: boolean;
fVtls: boolean; fVtls: boolean;
fQuiet: boolean; fQuiet: boolean;
fVgc: boolean; fVgc: boolean;
fCol: boolean; fCol: boolean;
procedure setDepHandling(const aValue: TDepHandling); procedure setDepHandling(const aValue: TDepHandling);
procedure setVerb(const aValue: boolean); procedure setVerbose(const aValue: boolean);
procedure setWarn(const aValue: boolean); procedure setWarnings(const aValue: boolean);
procedure setWarnEx(const aValue: boolean); procedure setWarnEx(const aValue: boolean);
procedure setVtls(const aValue: boolean); procedure setVtls(const aValue: boolean);
procedure setQuiet(const aValue: boolean); procedure setQuiet(const aValue: boolean);
@ -85,8 +85,8 @@ type
procedure setCol(const aValue: boolean); procedure setCol(const aValue: boolean);
published published
property depreciationHandling: TDepHandling read fDepHandling write setDepHandling default warning; property depreciationHandling: TDepHandling read fDepHandling write setDepHandling default warning;
property verbose: boolean read fVerb write setVerb default false; property verbose: boolean read fVerbose write setVerbose default false;
property warnings: boolean read fWarn write setWarn default true; property warnings: boolean read fWarnings write setWarnings default true;
property additionalWarnings: boolean read fWarnEx write setWarnEx default false; property additionalWarnings: boolean read fWarnEx write setWarnEx default false;
property tlsInformations: boolean read fVtls write setVtls default false; property tlsInformations: boolean read fVtls write setVtls default false;
property quiet: boolean read fQuiet write setQuiet default false; property quiet: boolean read fQuiet write setQuiet default false;
@ -120,25 +120,25 @@ type
private private
fTrgKind: TTargetSystem; fTrgKind: TTargetSystem;
fBinKind: TBinaryKind; fBinKind: TBinaryKind;
fUt: boolean; fUnittest: boolean;
fVerIds: TStringList; fVerIds: TStringList;
fInline: boolean; fInline: boolean;
fBoundsCheck: TBoundCheckKind; fBoundsCheck: TBoundCheckKind;
fOptimz: boolean; fOptimz: boolean;
fGenStack: boolean; fGenStack: boolean;
fMain: boolean; fAddMain: boolean;
fRelease: boolean; fRelease: boolean;
fAllInst: boolean; fAllInst: boolean;
fStackStomp: boolean; fStackStomp: boolean;
procedure setAllInst(const aValue: boolean); procedure setAllInst(const aValue: boolean);
procedure setUt(const aValue: boolean); procedure setUnittest(const aValue: boolean);
procedure setTrgKind(const aValue: TTargetSystem); procedure setTrgKind(const aValue: TTargetSystem);
procedure setBinKind(const aValue: TBinaryKind); procedure setBinKind(const aValue: TBinaryKind);
procedure setInline(const aValue: boolean); procedure setInline(const aValue: boolean);
procedure setBoundsCheck(const aValue: TBoundCheckKind); procedure setBoundsCheck(const aValue: TBoundCheckKind);
procedure setOptims(const aValue: boolean); procedure setOptims(const aValue: boolean);
procedure setGenStack(const aValue: boolean); procedure setGenStack(const aValue: boolean);
procedure setMain(const aValue: boolean); procedure setAddMain(const aValue: boolean);
procedure setRelease(const aValue: boolean); procedure setRelease(const aValue: boolean);
procedure setVerIds(const aValue: TStringList); procedure setVerIds(const aValue: TStringList);
procedure setStackStomp(const aValue: boolean); procedure setStackStomp(const aValue: boolean);
@ -149,9 +149,9 @@ type
property boundsCheck: TBoundCheckKind read fBoundsCheck write setBoundsCheck default safeOnly; property boundsCheck: TBoundCheckKind read fBoundsCheck write setBoundsCheck default safeOnly;
property optimizations: boolean read fOptimz write setOptims default false; property optimizations: boolean read fOptimz write setOptims default false;
property generateStackFrame: boolean read fGenStack write setGenStack default false; property generateStackFrame: boolean read fGenStack write setGenStack default false;
property addMain: boolean read fMain write setMain default false; property addMain: boolean read fAddMain write setAddMain default false;
property release: boolean read fRelease write setRelease default false; property release: boolean read fRelease write setRelease default false;
property unittest: boolean read fUt write setUt default false; property unittest: boolean read fUnittest write setUnittest default false;
property versionIdentifiers: TStringList read fVerIds write setVerIds; property versionIdentifiers: TStringList read fVerIds write setVerIds;
property generateAllTmpCode: boolean read fAllInst write setAllInst default false; property generateAllTmpCode: boolean read fAllInst write setAllInst default false;
property addStackStompCode: boolean read fStackStomp write setStackStomp default false; property addStackStompCode: boolean read fStackStomp write setStackStomp default false;
@ -167,27 +167,27 @@ type
*) *)
TDebugOpts = class(TOptsGroup) TDebugOpts = class(TOptsGroup)
private private
fDbg: boolean; fDebug: boolean;
fDbgD: boolean; fDbgD: boolean;
fDbgC: boolean; fDbgC: boolean;
fMap: boolean; fGenMap: boolean;
fDbgIdents: TStringList; fDbgIdents: TStringList;
fDbgLevel: Integer; fDbgLevel: Integer;
fForceDbgBool: boolean; fForceDbgBool: boolean;
procedure updateForceDbgBool; procedure updateForceDbgBool;
procedure setDbg(const aValue: boolean); procedure setDebug(const aValue: boolean);
procedure setDbgD(const aValue: boolean); procedure setDbgD(const aValue: boolean);
procedure setDbgC(const aValue: boolean); procedure setDbgC(const aValue: boolean);
procedure setMap(const aValue: boolean); procedure setGenMap(const aValue: boolean);
procedure setDbgLevel(const aValue: Integer); procedure setDbgLevel(const aValue: Integer);
procedure setDbgIdents(const aValue: TStringList); procedure setDbgIdents(const aValue: TStringList);
published published
property debug: boolean read fDbg write setDbg default false; property debug: boolean read fDebug write setDebug default false;
property debugIdentifiers: TStringList read fDbgIdents write setDbgIdents; property debugIdentifiers: TStringList read fDbgIdents write setDbgIdents;
property debugLevel: Integer read fDbgLevel write setDbgLevel default 0; property debugLevel: Integer read fDbgLevel write setDbgLevel default 0;
property codeviewDexts: boolean read fDbgD write setDbgD default false; property codeviewDexts: boolean read fDbgD write setDbgD default false;
property codeviewCformat: boolean read fDbgC write setDbgC default false; property codeviewCformat: boolean read fDbgC write setDbgC default false;
property generateMapFile: boolean read fMap write setMap default false; property generateMapFile: boolean read fGenMap write setGenMap default false;
public public
constructor create; constructor create;
destructor destroy; override; destructor destroy; override;
@ -381,6 +381,7 @@ begin
if (aValue is TDocOpts) then if (aValue is TDocOpts) then
begin begin
src := TDocOpts(aValue); src := TDocOpts(aValue);
//
fGenDoc := src.fGenDoc; fGenDoc := src.fGenDoc;
fGenJson := src.fGenJson; fGenJson := src.fGenJson;
fDocDir := patchPlateformPath(src.fDocDir); fDocDir := patchPlateformPath(src.fDocDir);
@ -442,7 +443,7 @@ end;
constructor TMsgOpts.create; constructor TMsgOpts.create;
begin begin
fDepHandling := TDepHandling.warning; fDepHandling := TDepHandling.warning;
fWarn := true; fWarnings := true;
end; end;
procedure TMsgOpts.getOpts(const aList: TStrings); procedure TMsgOpts.getOpts(const aList: TStrings);
@ -453,8 +454,8 @@ const
begin begin
opt := DepStr[fDepHandling]; opt := DepStr[fDepHandling];
if opt <> '' then aList.Add(opt); if opt <> '' then aList.Add(opt);
if fVerb then aList.Add('-v'); if fVerbose then aList.Add('-v');
if fWarn then aList.Add('-w'); if fWarnings then aList.Add('-w');
if fWarnEx then aList.Add('-wi'); if fWarnEx then aList.Add('-wi');
if fVtls then aList.Add('-vtls'); if fVtls then aList.Add('-vtls');
if fQuiet then aList.Add('-quiet'); if fQuiet then aList.Add('-quiet');
@ -469,14 +470,15 @@ begin
if (aValue is TMsgOpts) then if (aValue is TMsgOpts) then
begin begin
src := TMsgOpts(aValue); src := TMsgOpts(aValue);
//
fDepHandling := src.fDepHandling; fDepHandling := src.fDepHandling;
fVerb := src.fVerb; fVerbose := src.fVerbose;
fWarn := src.fWarn; fWarnings := src.fWarnings;
fWarnEx := src.fWarnEx; fWarnEx := src.fWarnEx;
fVtls := src.fVtls; fVtls := src.fVtls;
fQuiet := src.fQuiet; fQuiet := src.fQuiet;
fVgc := src.fVgc; fVgc := src.fVgc;
fCOl := src.fCol; fCol := src.fCol;
end end
else inherited; else inherited;
end; end;
@ -488,17 +490,17 @@ begin
doChanged; doChanged;
end; end;
procedure TMsgOpts.setVerb(const aValue: boolean); procedure TMsgOpts.setVerbose(const aValue: boolean);
begin begin
if fVerb = aValue then exit; if fVerbose = aValue then exit;
fVerb := aValue; fVerbose := aValue;
doChanged; doChanged;
end; end;
procedure TMsgOpts.setWarn(const aValue: boolean); procedure TMsgOpts.setWarnings(const aValue: boolean);
begin begin
if fWarn = aValue then exit; if fWarnings = aValue then exit;
fWarn := aValue; fWarnings := aValue;
doChanged; doChanged;
end; end;
@ -563,13 +565,13 @@ begin
if opt <> '' then aList.Add(opt); if opt <> '' then aList.Add(opt);
opt := trgKindStr[fTrgKind]; opt := trgKindStr[fTrgKind];
if opt <> '' then aList.Add(opt); if opt <> '' then aList.Add(opt);
if fUt then aList.Add('-unittest'); if fUnittest then aList.Add('-unittest');
if fInline then aList.Add('-inline'); if fInline then aList.Add('-inline');
if fOptimz then aList.Add('-O'); if fOptimz then aList.Add('-O');
if fGenStack then aList.Add('-gs'); if fGenStack then aList.Add('-gs');
if fStackStomp then aList.Add('-gx'); if fStackStomp then aList.Add('-gx');
if fAllInst then aList.Add('-allinst'); if fAllInst then aList.Add('-allinst');
if fMain then aList.Add('-main'); if fAddMain then aList.Add('-main');
if fRelease then aList.Add('-release'); if fRelease then aList.Add('-release');
for opt in fVerIds do begin for opt in fVerIds do begin
if length(opt) > 0 then if length(opt) > 0 then
@ -599,15 +601,16 @@ begin
if (aValue is TOutputOpts) then if (aValue is TOutputOpts) then
begin begin
src := TOutputOpts(aValue); src := TOutputOpts(aValue);
//
fVerIds.Assign(src.fVerIds);
fBinKind := src.fBinKind; fBinKind := src.fBinKind;
fTrgKind := src.fTrgKind; fTrgKind := src.fTrgKind;
fUt := src.fUt; fUnittest := src.fUnittest;
fVerIds.Assign(src.fVerIds);
fInline := src.fInline; fInline := src.fInline;
fBoundsCheck:= src.fBoundsCheck; fBoundsCheck:= src.fBoundsCheck;
fOptimz := src.fOptimz; fOptimz := src.fOptimz;
fGenStack := src.fGenStack; fGenStack := src.fGenStack;
fMain := src.fMain; fAddMain := src.fAddMain;
fRelease := src.fRelease; fRelease := src.fRelease;
fAllinst := src.fAllInst; fAllinst := src.fAllInst;
fStackStomp := src.fStackStomp; fStackStomp := src.fStackStomp;
@ -615,10 +618,10 @@ begin
else inherited; else inherited;
end; end;
procedure TOutputOpts.setUt(const aValue: boolean); procedure TOutputOpts.setUnittest(const aValue: boolean);
begin begin
if fUt = aValue then exit; if fUnittest = aValue then exit;
fUt := aValue; fUnittest := aValue;
doChanged; doChanged;
end; end;
@ -677,10 +680,10 @@ begin
doChanged; doChanged;
end; end;
procedure TOutputOpts.setMain(const aValue: boolean); procedure TOutputOpts.setAddMain(const aValue: boolean);
begin begin
if fMain = aValue then exit; if fAddMain = aValue then exit;
fMain := aValue; fAddMain := aValue;
doChanged; doChanged;
end; end;
@ -715,14 +718,14 @@ procedure TDebugOpts.getOpts(const aList: TStrings);
var var
idt: string; idt: string;
begin begin
if fDbg then aList.Add('-debug'); if fDebug then aList.Add('-debug');
if fDbgLevel <> 0 then if fDbgLevel <> 0 then
aList.Add('-debug=' + intToStr(fDbgLevel)); aList.Add('-debug=' + intToStr(fDbgLevel));
for idt in fDbgIdents do for idt in fDbgIdents do
aList.Add('-debug=' + idt); aList.Add('-debug=' + idt);
if fDbgD then aList.Add('-g'); if fDbgD then aList.Add('-g');
if fDbgC then aList.Add('-gc'); if fDbgC then aList.Add('-gc');
if fMap then aList.Add('-map'); if fGenMap then aList.Add('-map');
end; end;
procedure TDebugOpts.assign(aValue: TPersistent); procedure TDebugOpts.assign(aValue: TPersistent);
@ -732,12 +735,13 @@ begin
if (aValue is TDebugOpts) then if (aValue is TDebugOpts) then
begin begin
src := TDebugOpts(aValue); src := TDebugOpts(aValue);
fDbg := src.fDbg; //
fDbgIdents.Assign(src.fDbgIdents); fDbgIdents.Assign(src.fDbgIdents);
fDebug := src.fDebug;
fDbgLevel := src.fDbgLevel; fDbgLevel := src.fDbgLevel;
fDbgD := src.fDbgD; fDbgD := src.fDbgD;
fDbgC := src.fDbgC; fDbgC := src.fDbgC;
fMap := src.fMap; fGenMap := src.fGenMap;
end end
else inherited; else inherited;
end; end;
@ -745,18 +749,18 @@ end;
procedure TDebugOpts.updateForceDbgBool; procedure TDebugOpts.updateForceDbgBool;
begin begin
fForceDbgBool := (fDbgLevel > 0) or (fDbgIdents.Count > 0); fForceDbgBool := (fDbgLevel > 0) or (fDbgIdents.Count > 0);
if fForceDbgBool then setDbg(true); if fForceDbgBool then setDebug(true);
end; end;
procedure TDebugOpts.setDbg(const aValue: boolean); procedure TDebugOpts.setDebug(const aValue: boolean);
begin begin
if fForceDbgBool then if fForceDbgBool then
begin begin
fDbg := true; fDebug := true;
exit; exit;
end; end;
if fDbg = aValue then exit; if fDebug = aValue then exit;
fDbg := aValue; fDebug := aValue;
doChanged; doChanged;
end; end;
@ -774,10 +778,10 @@ begin
doChanged; doChanged;
end; end;
procedure TDebugOpts.setMap(const aValue: boolean); procedure TDebugOpts.setGenMap(const aValue: boolean);
begin begin
if fMap = aValue then exit; if fGenMap = aValue then exit;
fMap := aValue; fGenMap := aValue;
doChanged; doChanged;
end; end;
@ -847,12 +851,13 @@ begin
if (aValue is TPathsOpts) then if (aValue is TPathsOpts) then
begin begin
src := TPathsOpts(aValue); src := TPathsOpts(aValue);
//
fExtraSrcs.Assign(src.fExtraSrcs); fExtraSrcs.Assign(src.fExtraSrcs);
fImpMod.Assign(src.fImpMod); fImpMod.Assign(src.fImpMod);
fImpStr.Assign(src.fImpStr); fImpStr.Assign(src.fImpStr);
fExcl.Assign(src.fExcl);
fFName := patchPlateformPath(src.fFname); fFName := patchPlateformPath(src.fFname);
fObjDir := patchPlateformPath(src.fObjDir); fObjDir := patchPlateformPath(src.fObjDir);
fExcl.Assign(src.fExcl);
end end
else inherited; else inherited;
end; end;
@ -980,6 +985,7 @@ begin
if source is TCustomProcOptions then if source is TCustomProcOptions then
begin begin
src := TCustomProcOptions(source); src := TCustomProcOptions(source);
//
Parameters.Assign(src.Parameters); Parameters.Assign(src.Parameters);
fOptions := src.fOptions; fOptions := src.fOptions;
fExecutable := src.fExecutable; fExecutable := src.fExecutable;
@ -1110,6 +1116,7 @@ begin
if (aValue is TCompilerConfiguration) then if (aValue is TCompilerConfiguration) then
begin begin
src := TCompilerConfiguration(aValue); src := TCompilerConfiguration(aValue);
//
fDocOpts.assign(src.fDocOpts); fDocOpts.assign(src.fDocOpts);
fDebugOpts.assign(src.fDebugOpts); fDebugOpts.assign(src.fDebugOpts);
fMsgOpts.assign(src.fMsgOpts); fMsgOpts.assign(src.fMsgOpts);