mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 15:50:36 +02:00
* Removed ifdefs around notifications
ifdefs around for loop optimizations remain
This commit is contained in:
parent
190b09a5dd
commit
5041b70618
@ -117,17 +117,12 @@ interface
|
||||
|
||||
{ a node which is a reference to a certain temp }
|
||||
ttemprefnode = class(tnode)
|
||||
{$ifdef var_notification}
|
||||
writeaccess:boolean;
|
||||
{$endif}
|
||||
constructor create(const temp: ttempcreatenode); virtual;
|
||||
constructor create_offset(const temp: ttempcreatenode;aoffset:longint);
|
||||
function getcopy: tnode; override;
|
||||
function pass_1 : tnode; override;
|
||||
function det_resulttype : tnode; override;
|
||||
{$ifdef var_notification}
|
||||
procedure mark_write;override;
|
||||
{$endif}
|
||||
function docompare(p: tnode): boolean; override;
|
||||
protected
|
||||
tempinfo: ptempinfo;
|
||||
@ -679,13 +674,11 @@ implementation
|
||||
(ttemprefnode(p).tempinfo = tempinfo);
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Ttemprefnode.mark_write;
|
||||
|
||||
begin
|
||||
writeaccess:=true;
|
||||
include(flags,nf_write);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
@ -766,7 +759,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.38 2002-11-27 02:37:12 peter
|
||||
Revision 1.39 2003-01-03 12:15:55 daniel
|
||||
* Removed ifdefs around notifications
|
||||
ifdefs around for loop optimizations remain
|
||||
|
||||
Revision 1.38 2002/11/27 02:37:12 peter
|
||||
* case statement inlining added
|
||||
* fixed inlining of write()
|
||||
* switched statementnode left and right parts so the statements are
|
||||
|
@ -48,9 +48,7 @@ interface
|
||||
function getcopy : tnode;override;
|
||||
function pass_1 : tnode;override;
|
||||
function det_resulttype:tnode;override;
|
||||
{$ifdef var_notification}
|
||||
procedure mark_write;override;
|
||||
{$endif}
|
||||
function docompare(p: tnode) : boolean; override;
|
||||
private
|
||||
function resulttype_cord_to_pointer : tnode;
|
||||
@ -1293,14 +1291,11 @@ implementation
|
||||
result:=resulttype_call_helper(convtype);
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Ttypeconvnode.mark_write;
|
||||
|
||||
begin
|
||||
left.mark_write;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
||||
function ttypeconvnode.first_cord_to_pointer : tnode;
|
||||
|
||||
@ -2022,7 +2017,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.96 2002-12-22 16:34:49 peter
|
||||
Revision 1.97 2003-01-03 12:15:56 daniel
|
||||
* Removed ifdefs around notifications
|
||||
ifdefs around for loop optimizations remain
|
||||
|
||||
Revision 1.96 2002/12/22 16:34:49 peter
|
||||
* proc-procvar crash fixed (tw2277)
|
||||
|
||||
Revision 1.95 2002/12/20 16:01:26 peter
|
||||
|
@ -29,10 +29,7 @@ interface
|
||||
|
||||
uses
|
||||
node,cpubase,
|
||||
aasmbase,aasmtai,aasmcpu,
|
||||
{$ifdef var_notification}
|
||||
symnot,
|
||||
{$endif}
|
||||
aasmbase,aasmtai,aasmcpu,symnot,
|
||||
symppu,symtype,symbase,symdef,symsym;
|
||||
|
||||
type
|
||||
@ -87,13 +84,9 @@ interface
|
||||
tifnodeclass = class of tifnode;
|
||||
|
||||
tfornode = class(tloopnode)
|
||||
{$ifdef var_notification}
|
||||
loopvar_notid:cardinal;
|
||||
{$endif}
|
||||
constructor create(l,r,_t1,_t2 : tnode;back : boolean);virtual;
|
||||
{$ifdef var_notification}
|
||||
procedure loop_var_access(not_type:Tnotification_flag;symbol:Tsym);
|
||||
{$endif}
|
||||
function det_resulttype:tnode;override;
|
||||
function pass_1 : tnode;override;
|
||||
end;
|
||||
@ -658,7 +651,6 @@ implementation
|
||||
include(loopflags,lnf_testatbegin);
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Tfornode.loop_var_access(not_type:Tnotification_flag;
|
||||
symbol:Tsym);
|
||||
|
||||
@ -677,7 +669,6 @@ implementation
|
||||
end;
|
||||
Tvarsym(symbol).unregister_notification(loopvar_notid);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function tfornode.det_resulttype:tnode;
|
||||
var
|
||||
@ -757,14 +748,6 @@ implementation
|
||||
resulttypepass(right);
|
||||
set_varstate(right,true);
|
||||
inserttypeconv(right,t2.resulttype);
|
||||
(*
|
||||
{$ifdef var_notification}
|
||||
include(loopflags,lnf_dont_mind_loopvar_on_exit);
|
||||
if (hp.nodetype=loadn) and (Tloadnode(hp).symtableentry.typ=varsym) then
|
||||
loopvar_notid:=Tvarsym(Tloadnode(hp).symtableentry).
|
||||
register_notification([vn_onread,vn_onwrite],@loop_var_access);
|
||||
{$endif}
|
||||
*)
|
||||
end;
|
||||
|
||||
|
||||
@ -819,7 +802,7 @@ implementation
|
||||
|
||||
rg.cleartempgen;
|
||||
firstpass(right);
|
||||
{$ifdef var_notification}
|
||||
{$ifdef loopvar_dont_mind}
|
||||
{ Check count var, record fields are also allowed in tp7 }
|
||||
include(loopflags,lnf_dont_mind_loopvar_on_exit);
|
||||
hp:=t2;
|
||||
@ -1468,7 +1451,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.60 2002-12-31 09:55:58 daniel
|
||||
Revision 1.61 2003-01-03 12:15:56 daniel
|
||||
* Removed ifdefs around notifications
|
||||
ifdefs around for loop optimizations remain
|
||||
|
||||
Revision 1.60 2002/12/31 09:55:58 daniel
|
||||
+ Notification implementation complete
|
||||
+ Add for loop code optimization using notifications
|
||||
results in 1.5-1.9% speed improvement in nestloop benchmark
|
||||
|
@ -47,9 +47,7 @@ interface
|
||||
function getcopy : tnode;override;
|
||||
function pass_1 : tnode;override;
|
||||
function det_resulttype:tnode;override;
|
||||
{$ifdef var_notification}
|
||||
procedure mark_write;override;
|
||||
{$endif}
|
||||
function docompare(p: tnode): boolean; override;
|
||||
{$ifdef extdebug}
|
||||
procedure _dowrite;override;
|
||||
@ -84,9 +82,7 @@ interface
|
||||
function getcopy : tnode;override;
|
||||
function pass_1 : tnode;override;
|
||||
function det_resulttype:tnode;override;
|
||||
{$ifdef var_notification}
|
||||
procedure mark_write;override;
|
||||
{$endif}
|
||||
function docompare(p: tnode): boolean; override;
|
||||
end;
|
||||
tfuncretnodeclass = class of tfuncretnode;
|
||||
@ -158,9 +154,7 @@ implementation
|
||||
symtable,paramgr,defutil,defcmp,
|
||||
htypechk,pass_1,
|
||||
ncon,ninl,ncnv,nmem,ncal,cpubase,rgobj,cginfo,cgbase
|
||||
{$ifdef var_notification}
|
||||
,symnot
|
||||
{$endif}
|
||||
;
|
||||
|
||||
{*****************************************************************************
|
||||
@ -366,17 +360,7 @@ implementation
|
||||
if nf_absolute in flags then
|
||||
tvarsym(symtableentry).varstate:=vs_used
|
||||
else
|
||||
begin
|
||||
resulttype:=tvarsym(symtableentry).vartype;
|
||||
(*
|
||||
{$ifdef var_notification}
|
||||
if nf_write in flags then
|
||||
Tvarsym(symtableentry).trigger_notifications(vn_onwrite)
|
||||
else
|
||||
Tvarsym(symtableentry).trigger_notifications(vn_onread);
|
||||
{$endif}
|
||||
*)
|
||||
end;
|
||||
resulttype:=tvarsym(symtableentry).vartype;
|
||||
end;
|
||||
typedconstsym :
|
||||
if not(nf_absolute in flags) then
|
||||
@ -430,14 +414,11 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Tloadnode.mark_write;
|
||||
|
||||
begin
|
||||
include(flags,nf_write);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
||||
function tloadnode.pass_1 : tnode;
|
||||
begin
|
||||
@ -492,12 +473,10 @@ implementation
|
||||
|
||||
if ([vo_is_thread_var,vo_is_dll_var]*tvarsym(symtableentry).varoptions)<>[] then
|
||||
registers32:=1;
|
||||
{$ifdef var_notification}
|
||||
if nf_write in flags then
|
||||
Tvarsym(symtableentry).trigger_notifications(vn_onwrite)
|
||||
else
|
||||
Tvarsym(symtableentry).trigger_notifications(vn_onread);
|
||||
{$endif}
|
||||
{ count variable references }
|
||||
|
||||
{ this will create problem with local var set by
|
||||
@ -558,9 +537,7 @@ implementation
|
||||
|
||||
begin
|
||||
inherited create(assignn,l,r);
|
||||
{$ifdef var_notification}
|
||||
l.mark_write;
|
||||
{$endif}
|
||||
assigntype:=at_normal;
|
||||
end;
|
||||
|
||||
@ -875,13 +852,11 @@ implementation
|
||||
resulttype:=funcretsym.returntype;
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Tfuncretnode.mark_write;
|
||||
|
||||
begin
|
||||
include(flags,nf_write);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function tfuncretnode.pass_1 : tnode;
|
||||
begin
|
||||
@ -1297,7 +1272,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.77 2002-12-31 09:55:58 daniel
|
||||
Revision 1.78 2003-01-03 12:15:56 daniel
|
||||
* Removed ifdefs around notifications
|
||||
ifdefs around for loop optimizations remain
|
||||
|
||||
Revision 1.77 2002/12/31 09:55:58 daniel
|
||||
+ Notification implementation complete
|
||||
+ Add for loop code optimization using notifications
|
||||
results in 1.5-1.9% speed improvement in nestloop benchmark
|
||||
|
@ -80,9 +80,7 @@ interface
|
||||
constructor create(l : tnode);virtual;
|
||||
function pass_1 : tnode;override;
|
||||
function det_resulttype:tnode;override;
|
||||
{$ifdef var_notification}
|
||||
procedure mark_write;override;
|
||||
{$endif}
|
||||
end;
|
||||
tderefnodeclass = class of tderefnode;
|
||||
|
||||
@ -96,9 +94,7 @@ interface
|
||||
function pass_1 : tnode;override;
|
||||
function docompare(p: tnode): boolean; override;
|
||||
function det_resulttype:tnode;override;
|
||||
{$ifdef var_notification}
|
||||
procedure mark_write;override;
|
||||
{$endif}
|
||||
end;
|
||||
tsubscriptnodeclass = class of tsubscriptnode;
|
||||
|
||||
@ -106,9 +102,7 @@ interface
|
||||
constructor create(l,r : tnode);virtual;
|
||||
function pass_1 : tnode;override;
|
||||
function det_resulttype:tnode;override;
|
||||
{$ifdef var_notification}
|
||||
procedure mark_write;override;
|
||||
{$endif}
|
||||
end;
|
||||
tvecnodeclass = class of tvecnode;
|
||||
|
||||
@ -578,13 +572,11 @@ implementation
|
||||
CGMessage(cg_e_invalid_qualifier);
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Tderefnode.mark_write;
|
||||
|
||||
begin
|
||||
include(flags,nf_write);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function tderefnode.pass_1 : tnode;
|
||||
begin
|
||||
@ -655,13 +647,11 @@ implementation
|
||||
resulttype:=vs.vartype;
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Tsubscriptnode.mark_write;
|
||||
|
||||
begin
|
||||
include(flags,nf_write);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function tsubscriptnode.pass_1 : tnode;
|
||||
begin
|
||||
@ -780,13 +770,11 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Tvecnode.mark_write;
|
||||
|
||||
begin
|
||||
include(flags,nf_write);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function tvecnode.pass_1 : tnode;
|
||||
{$ifdef consteval}
|
||||
@ -1055,7 +1043,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.41 2002-11-25 17:43:20 peter
|
||||
Revision 1.42 2003-01-03 12:15:56 daniel
|
||||
* Removed ifdefs around notifications
|
||||
ifdefs around for loop optimizations remain
|
||||
|
||||
Revision 1.41 2002/11/25 17:43:20 peter
|
||||
* splitted defbase in defutil,symutil,defcmp
|
||||
* merged isconvertable and is_equal into compare_defs(_ext)
|
||||
* made operator search faster by walking the list only once
|
||||
|
@ -335,11 +335,9 @@ interface
|
||||
in a procedure }
|
||||
function track_state_pass(exec_known:boolean):boolean;virtual;
|
||||
{$endif}
|
||||
{$ifdef var_notification}
|
||||
{ For a t1:=t2 tree, mark the part of the tree t1 that gets
|
||||
written to (normally the loadnode) as write access. }
|
||||
procedure mark_write;virtual;abstract;
|
||||
{$endif}
|
||||
procedure det_temp;virtual;abstract;
|
||||
|
||||
procedure pass_2;virtual;abstract;
|
||||
@ -974,7 +972,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.46 2002-12-26 18:24:33 jonas
|
||||
Revision 1.47 2003-01-03 12:15:56 daniel
|
||||
* Removed ifdefs around notifications
|
||||
ifdefs around for loop optimizations remain
|
||||
|
||||
Revision 1.46 2002/12/26 18:24:33 jonas
|
||||
* fixed check for whether or not a high parameter was already generated
|
||||
* no type checking/conversions for invisible parameters
|
||||
|
||||
|
@ -34,9 +34,7 @@ interface
|
||||
symconst,symbase,symtype,symdef,
|
||||
{ ppu }
|
||||
ppu,symppu,
|
||||
{$ifdef var_notification}
|
||||
cclasses,symnot,
|
||||
{$endif}
|
||||
{ aasm }
|
||||
aasmbase,aasmtai,cpubase,
|
||||
globals
|
||||
@ -182,9 +180,7 @@ interface
|
||||
varspez : tvarspez; { sets the type of access }
|
||||
varstate : tvarstate;
|
||||
paraitem : tparaitem;
|
||||
{$ifdef var_notification}
|
||||
notifications : Tlinkedlist;
|
||||
{$endif}
|
||||
constructor create(const n : string;const tt : ttype);
|
||||
constructor create_dll(const n : string;const tt : ttype);
|
||||
constructor create_C(const n,mangled : string;const tt : ttype);
|
||||
@ -196,12 +192,10 @@ interface
|
||||
procedure set_mangledname(const s:string);
|
||||
function getsize : longint;
|
||||
function getvaluesize : longint;
|
||||
{$ifdef var_notification}
|
||||
procedure trigger_notifications(what:Tnotification_flag);
|
||||
function register_notification(flags:Tnotification_flags;
|
||||
callback:Tnotification_callback):cardinal;
|
||||
procedure unregister_notification(id:cardinal);
|
||||
{$endif}
|
||||
{$ifdef GDB}
|
||||
function stabstring : pchar;override;
|
||||
procedure concatstabto(asmlist : taasmoutput);override;
|
||||
@ -1653,10 +1647,8 @@ implementation
|
||||
|
||||
destructor tvarsym.destroy;
|
||||
begin
|
||||
{$ifdef var_notification}
|
||||
if assigned(notifications) then
|
||||
notifications.destroy;
|
||||
{$endif}
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
@ -1720,7 +1712,6 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
{$ifdef var_notification}
|
||||
procedure Tvarsym.trigger_notifications(what:Tnotification_flag);
|
||||
|
||||
var n:Tnotification;
|
||||
@ -1774,7 +1765,6 @@ implementation
|
||||
internalerror(200212311)
|
||||
end;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{$ifdef GDB}
|
||||
function tvarsym.stabstring : pchar;
|
||||
@ -2569,7 +2559,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.89 2003-01-02 11:14:02 michael
|
||||
Revision 1.90 2003-01-03 12:15:56 daniel
|
||||
* Removed ifdefs around notifications
|
||||
ifdefs around for loop optimizations remain
|
||||
|
||||
Revision 1.89 2003/01/02 11:14:02 michael
|
||||
+ Patch from peter to support initial values for local variables
|
||||
|
||||
Revision 1.88 2003/01/01 22:51:03 peter
|
||||
|
Loading…
Reference in New Issue
Block a user