- removed withnode (was no longer used since a very long time)

git-svn-id: trunk@40777 -
This commit is contained in:
Jonas Maebe 2019-01-05 22:28:37 +00:00
parent f89431c4f7
commit 170ec00348
9 changed files with 2 additions and 100 deletions

View File

@ -55,10 +55,6 @@ interface
procedure pass_generate_code;override;
end;
tcgwithnode = class(twithnode)
procedure pass_generate_code;override;
end;
tcgvecnode = class(tvecnode)
function get_mul_size : asizeint;
private
@ -607,19 +603,6 @@ implementation
end;
{*****************************************************************************
TCGWITHNODE
*****************************************************************************}
procedure tcgwithnode.pass_generate_code;
begin
location_reset(location,LOC_VOID,OS_NO);
if assigned(left) then
secondpass(left);
end;
{*****************************************************************************
TCGVECNODE
*****************************************************************************}
@ -1109,6 +1092,5 @@ begin
caddrnode:=tcgaddrnode;
cderefnode:=tcgderefnode;
csubscriptnode:=tcgsubscriptnode;
cwithnode:=tcgwithnode;
cvecnode:=tcgvecnode;
end.

View File

@ -136,25 +136,12 @@ interface
end;
tvecnodeclass = class of tvecnode;
twithnode = class(tunarynode)
constructor create(l:tnode);
destructor destroy;override;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
function dogetcopy : tnode;override;
function pass_1 : tnode;override;
function docompare(p: tnode): boolean; override;
function pass_typecheck:tnode;override;
end;
twithnodeclass = class of twithnode;
var
cloadvmtaddrnode : tloadvmtaddrnodeclass= tloadvmtaddrnode;
caddrnode : taddrnodeclass= taddrnode;
cderefnode : tderefnodeclass= tderefnode;
csubscriptnode : tsubscriptnodeclass= tsubscriptnode;
cvecnode : tvecnodeclass= tvecnode;
cwithnode : twithnodeclass= twithnode;
cloadparentfpnode : tloadparentfpnodeclass = tloadparentfpnode;
function is_big_untyped_addrnode(p: tnode): boolean;
@ -1315,66 +1302,6 @@ implementation
end;
{*****************************************************************************
TWITHNODE
*****************************************************************************}
constructor twithnode.create(l:tnode);
begin
inherited create(withn,l);
fileinfo:=l.fileinfo;
end;
destructor twithnode.destroy;
begin
inherited destroy;
end;
constructor twithnode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
begin
inherited ppuload(t,ppufile);
end;
procedure twithnode.ppuwrite(ppufile:tcompilerppufile);
begin
inherited ppuwrite(ppufile);
end;
function twithnode.dogetcopy : tnode;
var
p : twithnode;
begin
p:=twithnode(inherited dogetcopy);
result:=p;
end;
function twithnode.pass_typecheck:tnode;
begin
result:=nil;
resultdef:=voidtype;
if assigned(left) then
typecheckpass(left);
end;
function twithnode.pass_1 : tnode;
begin
result:=nil;
expectloc:=LOC_VOID;
end;
function twithnode.docompare(p: tnode): boolean;
begin
docompare :=
inherited docompare(p);
end;
function is_big_untyped_addrnode(p: tnode): boolean;
begin
is_big_untyped_addrnode:=(p.nodetype=addrn) and

View File

@ -86,7 +86,6 @@ interface
whilerepeatn, {A while or repeat statement}
forn, {A for loop}
exitn, {An exit statement}
withn, {A with statement}
casen, {A case statement}
labeln, {A label}
goton, {A goto statement}
@ -171,7 +170,6 @@ interface
'whilerepeatn',
'forn',
'exitn',
'withn',
'casen',
'labeln',
'goton',

View File

@ -92,7 +92,7 @@ unit optconstprop;
iterate manually here so we have full controll how all nodes are processed }
{ We cannot analyze beyond those nodes, so we terminate to be on the safe side }
if (n.nodetype in [addrn,derefn,asmn,withn,casen,whilerepeatn,labeln,continuen,breakn,
if (n.nodetype in [addrn,derefn,asmn,casen,whilerepeatn,labeln,continuen,breakn,
tryexceptn,raisen,tryfinallyn,onn,loadparentfpn,loadvmtaddrn,guidconstn,rttin,addoptn,asn,goton,
objcselectorn,objcprotocoln]) then
exit(false)

View File

@ -318,7 +318,6 @@ unit optutils;
{ raise never returns }
p.successor:=nil;
end;
withn,
tryexceptn,
tryfinallyn,
onn:

View File

@ -132,7 +132,6 @@ implementation
'while_repeat', {whilerepeatn}
'for', {forn}
'exitn', {exitn}
'with', {withn}
'case', {casen}
'label', {labeln}
'goto', {goton}

View File

@ -43,7 +43,7 @@ type
{$endif Test_Double_checksum}
const
CurrentPPUVersion = 205;
CurrentPPUVersion = 206;
{ unit flags }
uf_init = $000001; { unit has initialization section }

View File

@ -776,8 +776,6 @@ implementation
symtablestack.pop(TSymtable(withsymtablelist[i]));
withsymtablelist.free;
// p:=cwithnode.create(right,twithsymtable(withsymtable),levelcount,refnode);
{ Finalize complex withnode with destroy of temp }
if assigned(newblock) then
begin

View File

@ -798,7 +798,6 @@ implementation
nodeclass[whilerepeatn]:=cwhilerepeatnode;
nodeclass[forn]:=cfornode;
nodeclass[exitn]:=cexitnode;
nodeclass[withn]:=cwithnode;
nodeclass[casen]:=ccasenode;
nodeclass[labeln]:=clabelnode;
nodeclass[goton]:=cgotonode;