updated dmdwrap for dmd 2.066

This commit is contained in:
Basile Burg 2014-08-19 01:19:03 +02:00
parent 3ae7eae9b3
commit d8e44821cb
3 changed files with 26 additions and 17 deletions

View File

@ -74,6 +74,7 @@ type
fVtls: boolean; fVtls: boolean;
fQuiet: boolean; fQuiet: boolean;
fVgc: boolean; fVgc: boolean;
fCol: boolean;
procedure setDepHandling(const aValue: TDepHandling); procedure setDepHandling(const aValue: TDepHandling);
procedure setVerb(const aValue: boolean); procedure setVerb(const aValue: boolean);
procedure setWarn(const aValue: boolean); procedure setWarn(const aValue: boolean);
@ -81,6 +82,7 @@ type
procedure setVtls(const aValue: boolean); procedure setVtls(const aValue: boolean);
procedure setQuiet(const aValue: boolean); procedure setQuiet(const aValue: boolean);
procedure setVgc(const aValue: boolean); procedure setVgc(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 fVerb write setVerb default false;
@ -89,6 +91,7 @@ type
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;
property showHiddenAlloc: boolean read fVgc write setVgc default false; property showHiddenAlloc: boolean read fVgc write setVgc default false;
property showColumnsNumber: boolean read fCol write setCol default false;
public public
constructor create; constructor create;
procedure assign(aValue: TPersistent); override; procedure assign(aValue: TPersistent); override;
@ -440,7 +443,8 @@ begin
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');
//if fVgc then aList.Add('-vgc'); if fVgc then aList.Add('-vgc');
if fCol then aList.Add('-vcolumns');
end; end;
procedure TMsgOpts.assign(aValue: TPersistent); procedure TMsgOpts.assign(aValue: TPersistent);
@ -457,6 +461,7 @@ begin
fVtls := src.fVtls; fVtls := src.fVtls;
fQuiet := src.fQuiet; fQuiet := src.fQuiet;
fVgc := src.fVgc; fVgc := src.fVgc;
fCOl := src.fCol;
end end
else inherited; else inherited;
end; end;
@ -509,6 +514,13 @@ begin
fVgc := aValue; fVgc := aValue;
doChanged; doChanged;
end; end;
procedure TMsgOpts.setCol(const aValue: boolean);
begin
if fCol = aValue then exit;
fCol := aValue;
doChanged;
end;
{$ENDREGION} {$ENDREGION}
{$REGION TOutputOpts -----------------------------------------------------------} {$REGION TOutputOpts -----------------------------------------------------------}
@ -526,12 +538,11 @@ end;
procedure TOutputOpts.depPatch; procedure TOutputOpts.depPatch;
begin begin
// patch deprecated fields // patch deprecated fields
//if fVerId <> '' then if fNoBounds then
//begin begin
// if fVerIds.IndexOf(fVerId) = -1 then fNoBounds := false;
// fVerIds.Add(fVerId); fBoundsCheck := offAlways;
// fVerId := ''; end;
//end;
end; end;
procedure TOutputOpts.getOpts(const aList: TStrings); procedure TOutputOpts.getOpts(const aList: TStrings);
@ -540,7 +551,7 @@ var
const const
trgKindStr: array[TTargetSystem] of string = ('', '-m32','-m64'); trgKindStr: array[TTargetSystem] of string = ('', '-m32','-m64');
binKindStr: array[TBinaryKind] of string = ('', '-lib', '-shared', '-c'); binKindStr: array[TBinaryKind] of string = ('', '-lib', '-shared', '-c');
//bchKindStr: array[TBoundCheckKind] of string = ('on', 'safeonly', 'off'); bchKindStr: array[TBoundCheckKind] of string = ('on', 'safeonly', 'off');
begin begin
depPatch; depPatch;
// //
@ -550,11 +561,10 @@ begin
if opt <> '' then aList.Add(opt); if opt <> '' then aList.Add(opt);
if fUt then aList.Add('-unittest'); if fUt then aList.Add('-unittest');
if fInline then aList.Add('-inline'); if fInline then aList.Add('-inline');
if fNoBounds then aList.Add('-noboundscheck');
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 fMain then aList.Add('-main');
if fRelease then aList.Add('-release'); if fRelease then aList.Add('-release');
for opt in fVerIds do for opt in fVerIds do
@ -563,11 +573,11 @@ begin
if fRelease then if fRelease then
begin begin
if fBoundsCheck <> safeOnly then if fBoundsCheck <> safeOnly then
(*generate option*); aList.Add('-boundscheck=' + bchKindStr[fBoundsCheck] );
end end
else else
if fBoundsCheck <> onAlways then if fBoundsCheck <> onAlways then
(*generate option*); aList.Add('-boundscheck=' + bchKindStr[fBoundsCheck] );
end; end;
@ -581,7 +591,6 @@ begin
fBinKind := src.fBinKind; fBinKind := src.fBinKind;
fTrgKind := src.fTrgKind; fTrgKind := src.fTrgKind;
fUt := src.fUt; fUt := src.fUt;
//fVerId := src.fVerId;
fVerIds.Assign(src.fVerIds); fVerIds.Assign(src.fVerIds);
fInline := src.fInline; fInline := src.fInline;
fNoBounds := src.fNoBounds; fNoBounds := src.fNoBounds;
@ -642,7 +651,7 @@ procedure TOutputOpts.setBoundsCheck(const aValue: TBoundCheckKind);
begin begin
if fBoundsCheck = aValue then exit; if fBoundsCheck = aValue then exit;
fBoundsCheck := aValue; fBoundsCheck := aValue;
doChanged; depPatch;
end; end;
procedure TOutputOpts.setNoBounds(const aValue: boolean); procedure TOutputOpts.setNoBounds(const aValue: boolean);
@ -650,8 +659,6 @@ begin
if fNoBounds = aValue then exit; if fNoBounds = aValue then exit;
fNoBounds := aValue; fNoBounds := aValue;
doChanged; doChanged;
// turns old option to TBoundCheckKind.onAlways if true and set
// fNoBounds to false (wont be written anymore).
end; end;
procedure TOutputOpts.setOptims(const aValue: boolean); procedure TOutputOpts.setOptims(const aValue: boolean);

View File

@ -508,6 +508,7 @@ begin
end; end;
end; end;
//TODO-cbugfix: doesnt work with -vcolumns
function getLineFromDmdMessage(const aMessage: string): TPoint; function getLineFromDmdMessage(const aMessage: string): TPoint;
var var
i: NativeInt; i: NativeInt;

View File

@ -218,6 +218,7 @@ begin
identifierToD2Syn; identifierToD2Syn;
end; end;
// TODO-cfeaturerecovery: previously colors was set in the mainform lfm, now they have to be hardcoded.
initialization initialization
D2Syn := TSynD2Syn.create(nil); D2Syn := TSynD2Syn.create(nil);
LfmSyn := TSynLFMSyn.Create(nil); LfmSyn := TSynLFMSyn.Create(nil);