* fixed firstpass when det_resulttype returns an error

This commit is contained in:
peter 2001-10-20 17:23:43 +00:00
parent 6a42a332dd
commit 7edaf1332f

View File

@ -137,27 +137,47 @@ implementation
{ determine the resulttype if not done } { determine the resulttype if not done }
if (p.resulttype.def=nil) then if (p.resulttype.def=nil) then
begin begin
aktfilepos:=p.fileinfo;
aktlocalswitches:=p.localswitches;
hp:=p.det_resulttype; hp:=p.det_resulttype;
{ should the node be replaced? } { should the node be replaced? }
if assigned(hp) then if assigned(hp) then
begin begin
p.free; p.free;
{ run resulttypepass }
resulttypepass(hp);
{ switch to new node }
p:=hp; p:=hp;
end; end;
if codegenerror then
begin
include(p.flags,nf_error);
{ default to errortype if no type is set yet }
if p.resulttype.def=nil then
p.resulttype:=generrortype;
end;
aktlocalswitches:=oldlocalswitches;
aktfilepos:=oldpos;
codegenerror:=codegenerror or oldcodegenerror;
end; end;
{ first pass } { first pass }
hp:=p.pass_1; if not(nf_error in p.flags) then
{ should the node be replaced? } begin
if assigned(hp) then aktfilepos:=p.fileinfo;
begin aktlocalswitches:=p.localswitches;
p.free; hp:=p.pass_1;
p:=hp; { should the node be replaced? }
end; if assigned(hp) then
begin
p.free;
p:=hp;
end;
if codegenerror then
include(p.flags,nf_error);
end;
codegenerror:=codegenerror or oldcodegenerror;
aktlocalswitches:=oldlocalswitches; aktlocalswitches:=oldlocalswitches;
aktfilepos:=oldpos; aktfilepos:=oldpos;
if codegenerror then
include(p.flags,nf_error);
codegenerror:=codegenerror or oldcodegenerror;
end end
else else
codegenerror:=true; codegenerror:=true;
@ -178,7 +198,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.17 2001-09-02 21:18:28 peter Revision 1.18 2001-10-20 17:23:43 peter
* fixed firstpass when det_resulttype returns an error
Revision 1.17 2001/09/02 21:18:28 peter
* split constsym.value in valueord,valueordptr,valueptr. The valueordptr * split constsym.value in valueord,valueordptr,valueptr. The valueordptr
is used for holding target platform pointer values. As those can be is used for holding target platform pointer values. As those can be
bigger than the source platform. bigger than the source platform.