* readded removed changes

This commit is contained in:
florian 2002-07-15 18:03:14 +00:00
parent eeae0e4c00
commit c3f4220f3b
5 changed files with 58 additions and 32 deletions

View File

@ -129,7 +129,7 @@ implementation
uses
cutils,globtype,systems,
verbose,globals,
symconst,types,
symconst,paramgr,types,
htypechk,pass_1,cpuinfo,cpubase,
ncnv,nld,ninl,nadd,ncon,
rgobj,cgbase
@ -370,7 +370,7 @@ implementation
if not(assigned(aktcallprocdef) and
(aktcallprocdef.proccalloption in [pocall_cppdecl,pocall_cdecl]) and
(po_external in aktcallprocdef.procoptions)) and
push_high_param(defcoll.paratype.def) then
paramanager.push_high_param(defcoll.paratype.def) then
gen_high_tree(is_open_string(defcoll.paratype.def));
{ test conversions }
@ -417,7 +417,7 @@ implementation
left.resulttype.def.typename,defcoll.paratype.def.typename);
end;
{ Process open parameters }
if push_high_param(defcoll.paratype.def) then
if paramanager.push_high_param(defcoll.paratype.def) then
begin
{ insert type conv but hold the ranges of the array }
oldtype:=left.resulttype;
@ -682,7 +682,7 @@ implementation
restypeset := true;
{ both the normal and specified resulttype either have to be returned via a }
{ parameter or not, but no mixing (JM) }
if ret_in_param(restype.def) xor ret_in_param(symtableprocentry.defs^.def.rettype.def) then
if paramanager.ret_in_param(restype.def) xor paramanager.ret_in_param(symtableprocentry.defs^.def.rettype.def) then
internalerror(200108291);
end;
@ -691,7 +691,7 @@ implementation
begin
self.createintern(name,params);
funcretrefnode:=returnnode;
if not ret_in_param(symtableprocentry.defs^.def.rettype.def) then
if not paramanager.ret_in_param(symtableprocentry.defs^.def.rettype.def) then
internalerror(200204247);
end;
@ -1509,7 +1509,7 @@ implementation
{ get a register for the return value }
if (not is_void(resulttype.def)) then
begin
if ret_in_acc(resulttype.def) then
if paramanager.ret_in_acc(resulttype.def) then
begin
{ wide- and ansistrings are returned in EAX }
{ but they are imm. moved to a memory location }
@ -1638,13 +1638,13 @@ implementation
{ It doesn't hurt to calculate it already though :) (JM) }
rg.incrementregisterpushed(tprocdef(procdefinition).usedregisters);
end;
{ get a register for the return value }
if (not is_void(resulttype.def)) then
begin
if ret_in_param(resulttype.def) then
if paramanager.ret_in_param(resulttype.def) then
begin
location.loc:=LOC_CREFERENCE;
end
@ -1828,7 +1828,7 @@ implementation
retoffset:=-POINTER_SIZE; { less dangerous as zero (PM) }
para_offset:=0;
para_size:=inlineprocdef.para_size(target_info.alignment.paraalign);
if ret_in_param(inlineprocdef.rettype.def) then
if paramanager.ret_in_param(inlineprocdef.rettype.def) then
inc(para_size,POINTER_SIZE);
{ copy args }
if assigned(code) then
@ -1896,7 +1896,13 @@ begin
end.
{
$Log$
Revision 1.80 2002-07-14 18:00:43 daniel
Revision 1.81 2002-07-15 18:03:14 florian
* readded removed changes
Revision 1.79 2002/07/11 14:41:27 florian
* start of the new generic parameter handling
Revision 1.80 2002/07/14 18:00:43 daniel
+ Added the beginning of a state tracker. This will track the values of
variables through procedures and optimize things away.
@ -2014,4 +2020,4 @@ end.
Revision 1.62 2002/01/19 11:57:05 peter
* fixed path appending for lib
}
}

View File

@ -181,7 +181,7 @@ implementation
uses
globtype,systems,
cutils,verbose,globals,
symconst,symtable,types,htypechk,pass_1,
symconst,symtable,paramgr,types,htypechk,pass_1,
ncon,nmem,nld,ncnv,nbas,rgobj,
{$ifdef state_tracking}
nstate,
@ -338,12 +338,12 @@ implementation
{$ifdef state_tracking}
procedure Twhilerepeatnode.track_state_pass(exec_known:boolean);
var condition:Tnode;
code:Tnode;
done:boolean;
value:boolean;
begin
done:=false;
repeat
@ -372,7 +372,7 @@ implementation
begin
...
end;
When the loop is done, we do know that i<10 = false.
}
condition:=left.getcopy;
@ -660,7 +660,7 @@ implementation
if assigned(left) then
begin
inserttypeconv(left,aktprocdef.rettype);
if ret_in_param(aktprocdef.rettype.def) or
if paramanager.ret_in_param(aktprocdef.rettype.def) or
(procinfo^.no_fast_exit) or
((procinfo^.flags and pi_uses_exceptions)<>0) then
begin
@ -1166,10 +1166,16 @@ begin
end.
{
$Log$
Revision 1.35 2002-07-14 18:00:44 daniel
Revision 1.36 2002-07-15 18:03:15 florian
* readded removed changes
Revision 1.35 2002/07/14 18:00:44 daniel
+ Added the beginning of a state tracker. This will track the values of
variables through procedures and optimize things away.
Revision 1.34 2002/07/11 14:41:28 florian
* start of the new generic parameter handling
Revision 1.33 2002/07/01 18:46:23 peter
* internal linker
* reorganized aasm layer
@ -1217,4 +1223,4 @@ end.
- list field removed of the tnode class because it's not used currently
and can cause hard-to-find bugs
}
}

View File

@ -128,7 +128,7 @@ implementation
uses
cutils,verbose,globtype,globals,systems,
symtable,types,
symtable,paramgr,types,
htypechk,pass_1,
ncon,ninl,ncnv,nmem,ncal,cpubase,rgobj,cginfo,cgbase
;
@ -351,7 +351,7 @@ implementation
{ we need a register for call by reference parameters }
if (tvarsym(symtableentry).varspez in [vs_var,vs_out]) or
((tvarsym(symtableentry).varspez=vs_const) and
push_addr_param(tvarsym(symtableentry).vartype.def)) or
paramanager.push_addr_param(tvarsym(symtableentry).vartype.def)) or
{ call by value open arrays are also indirect addressed }
is_open_array(tvarsym(symtableentry).vartype.def) then
registers32:=1;
@ -631,7 +631,7 @@ implementation
begin
result:=nil;
location.loc:=LOC_REFERENCE;
if ret_in_param(resulttype.def) or
if paramanager.ret_in_param(resulttype.def) or
(lexlevel<>funcretsym.owner.symtablelevel) then
registers32:=1;
end;
@ -983,7 +983,13 @@ begin
end.
{
$Log$
Revision 1.44 2002-07-14 18:00:44 daniel
Revision 1.45 2002-07-15 18:03:15 florian
* readded removed changes
Revision 1.43 2002/07/11 14:41:28 florian
* start of the new generic parameter handling
Revision 1.44 2002/07/14 18:00:44 daniel
+ Added the beginning of a state tracker. This will track the values of
variables through procedures and optimize things away.

View File

@ -22,7 +22,7 @@
}
unit nstate;
{$i fpcdefs.inc}
interface
@ -121,12 +121,14 @@ begin
end;
end;
end.
{
$Log$
Revision 1.1 2002-07-14 18:00:44 daniel
Revision 1.2 2002-07-15 18:03:15 florian
* readded removed changes
Revision 1.1 2002/07/14 18:00:44 daniel
+ Added the beginning of a state tracker. This will track the values of
variables through procedures and optimize things away.
}
end.

View File

@ -46,7 +46,7 @@ implementation
{ aasm }
cpubase,cpuinfo,aasmbase,aasmtai,
{ symtable }
symconst,symbase,symdef,symsym,symtype,symtable,types,
symconst,symbase,symdef,symsym,symtype,symtable,types,paramgr,
ppu,fmodule,
{ pass 1 }
node,
@ -106,7 +106,7 @@ implementation
{ insert in local symtable }
symtablestack.insert(aktprocdef.funcretsym);
akttokenpos:=storepos;
if ret_in_acc(aktprocdef.rettype.def) or
if paramanager.ret_in_acc(aktprocdef.rettype.def) or
(aktprocdef.rettype.def.deftype=floatdef) then
procinfo^.return_offset:=-tfuncretsym(aktprocdef.funcretsym).address;
{ insert result also if support is on }
@ -130,7 +130,7 @@ implementation
{ because we don't know yet where the address is }
if not is_void(aktprocdef.rettype.def) then
begin
if ret_in_acc(aktprocdef.rettype.def) or (aktprocdef.rettype.def.deftype=floatdef) then
if paramanager.ret_in_acc(aktprocdef.rettype.def) or (aktprocdef.rettype.def.deftype=floatdef) then
begin
{ the space has been set in the local symtable }
procinfo^.return_offset:=-tfuncretsym(aktprocdef.funcretsym).address;
@ -654,7 +654,7 @@ implementation
{$endif i386}
{ pointer to the return value ? }
if ret_in_param(aktprocdef.rettype.def) then
if paramanager.ret_in_param(aktprocdef.rettype.def) then
begin
procinfo^.return_offset:=procinfo^.para_offset;
inc(procinfo^.para_offset,pointer_size);
@ -829,7 +829,13 @@ implementation
end.
{
$Log$
Revision 1.58 2002-07-14 18:00:44 daniel
Revision 1.59 2002-07-15 18:03:15 florian
* readded removed changes
Revision 1.57 2002/07/11 14:41:28 florian
* start of the new generic parameter handling
Revision 1.58 2002/07/14 18:00:44 daniel
+ Added the beginning of a state tracker. This will track the values of
variables through procedures and optimize things away.