From 45bf0518857f6e2084c4bc3928f38b38b1718a6c Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 16 Jul 1999 10:04:32 +0000 Subject: [PATCH] * merged --- compiler/htypechk.pas | 20 +++++++++++++++----- compiler/pdecl.pas | 11 ++++++++++- compiler/pexpr.pas | 21 +++++++++++++++++---- compiler/scandir.inc | 14 +++++++++----- compiler/tcadd.pas | 23 ++++++++++++++++++++++- compiler/tcmem.pas | 25 ++++++++++++++++++++----- 6 files changed, 93 insertions(+), 21 deletions(-) diff --git a/compiler/htypechk.pas b/compiler/htypechk.pas index 19f8fe3cf0..0902cab875 100644 --- a/compiler/htypechk.pas +++ b/compiler/htypechk.pas @@ -124,11 +124,15 @@ implementation (not is_boolean(def_to))) then b:=0; end; -{ enumdef : + enumdef : begin - doconv:=tc_int_2_int; - b:=1; - end;} + { needed for char(enum) } + if explicit then + begin + doconv:=tc_int_2_int; + b:=1; + end; + end; end; end; @@ -662,9 +666,15 @@ implementation end. { $Log$ - Revision 1.30 1999-06-28 16:02:30 peter + Revision 1.31 1999-07-16 10:04:32 peter * merged + Revision 1.30 1999/06/28 16:02:30 peter + * merged + + Revision 1.27.2.4 1999/07/16 09:52:18 peter + * allow char(enum) + Revision 1.27.2.3 1999/06/28 15:51:27 peter * tp7 fix diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index 5f9155f05f..1054272d26 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -2124,7 +2124,10 @@ unit pdecl; end. { $Log$ - Revision 1.132 1999-07-11 21:24:31 michael + Revision 1.133 1999-07-16 10:04:34 peter + * merged + + Revision 1.132 1999/07/11 21:24:31 michael + Fixed integer message table Revision 1.131 1999/07/06 21:48:23 florian @@ -2146,6 +2149,12 @@ end. * use of is_ordinal checked: often a qword/int64 isn't allowed (case/for ...) * small qword problems fixed + Revision 1.127.2.4 1999/07/11 21:48:01 michael + + merged dispatch fix + + Revision 1.127.2.3 1999/07/07 07:53:22 michael + + Merged patches from florian + Revision 1.127.2.2 1999/07/05 20:03:27 peter * removed warning/notes diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index c81d0332cc..5f4f3e152c 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -60,7 +60,9 @@ unit pexpr; {$endif} ; - const allow_type : boolean = true; + const + allow_type : boolean = true; + got_addrn : boolean = false; function parse_paras(_colon,in_prop_paras : boolean) : ptree; @@ -116,9 +118,9 @@ unit pexpr; begin if (m_tp_procvar in aktmodeswitches) and -{ (not afterassignment) and } + (not got_addrn) and (not in_args) and - (p^.treetype in [loadn]) then + (p^.treetype=loadn) then begin { support if procvar then for tp7 and many other expression like this } Store_valid:=Must_be_valid; @@ -1741,7 +1743,9 @@ unit pexpr; end; KLAMMERAFFE : begin consume(KLAMMERAFFE); + got_addrn:=true; p1:=factor(true); + got_addrn:=false; p1:=gensinglenode(addrn,p1); end; LKLAMMER : begin @@ -2042,7 +2046,10 @@ unit pexpr; end. { $Log$ - Revision 1.120 1999-07-06 22:38:11 florian + Revision 1.121 1999-07-16 10:04:35 peter + * merged + + Revision 1.120 1999/07/06 22:38:11 florian * another fix for TP/Delphi styled procedure variables Revision 1.119 1999/07/05 20:13:16 peter @@ -2061,6 +2068,12 @@ end. Revision 1.116 1999/06/26 00:24:53 pierre * mereg from fixes-0_99_12 branch + Revision 1.112.2.8 1999/07/16 09:54:57 peter + * @procvar support in tp7 mode works again + + Revision 1.112.2.7 1999/07/07 07:53:10 michael + + Merged patches from florian + Revision 1.112.2.6 1999/07/01 21:31:59 peter * procvar fixes again diff --git a/compiler/scandir.inc b/compiler/scandir.inc index fdc5e4c633..aab5dbb572 100644 --- a/compiler/scandir.inc +++ b/compiler/scandir.inc @@ -918,11 +918,9 @@ const current_scanner^.readchar; current_scanner^.skipspace; l:=current_scanner^.readval; - if l>1024 then - maxheapsize:=l; + { Ignore this value, because the limit is set by the OS + info and shouldn't be changed by the user (PFV) } end; - if heapsize>maxheapsize then - message(scan_w_illegal_switch); end; @@ -1087,10 +1085,16 @@ const { $Log$ - Revision 1.54 1999-07-03 00:29:58 peter + Revision 1.55 1999-07-16 10:04:36 peter + * merged + + Revision 1.54 1999/07/03 00:29:58 peter * new link writing to the ppu, one .ppu is needed for all link types, static (.o) is now always created also when smartlinking is used + Revision 1.53.2.1 1999/07/16 09:53:06 peter + * ignore maxheapsize + Revision 1.53 1999/06/02 22:44:18 pierre * previous wrong log corrected diff --git a/compiler/tcadd.pas b/compiler/tcadd.pas index 962ed245b2..98c5cc9834 100644 --- a/compiler/tcadd.pas +++ b/compiler/tcadd.pas @@ -926,6 +926,21 @@ implementation end else + { support procvar=nil,procvar<>nil } + if ((ld^.deftype=procvardef) and (rt=niln)) or + ((rd^.deftype=procvardef) and (lt=niln)) then + begin + calcregisters(p,1,0,0); + p^.location.loc:=LOC_REGISTER; + case p^.treetype of + equaln,unequaln : ; + else + CGMessage(type_e_mismatch); + end; + convdone:=true; + end + else + if (rd^.deftype=pointerdef) or is_zero_based_array(rd) then begin @@ -1102,9 +1117,15 @@ implementation end. { $Log$ - Revision 1.36 1999-06-17 15:32:48 pierre + Revision 1.37 1999-07-16 10:04:37 peter + * merged + + Revision 1.36 1999/06/17 15:32:48 pierre * merged from 0-99-12 branch + Revision 1.34.2.3 1999/07/16 09:54:58 peter + * @procvar support in tp7 mode works again + Revision 1.34.2.2 1999/06/17 15:25:07 pierre * for arrays of char operators can not be overloaded diff --git a/compiler/tcmem.pas b/compiler/tcmem.pas index d2fd150a2b..3454519980 100644 --- a/compiler/tcmem.pas +++ b/compiler/tcmem.pas @@ -179,9 +179,18 @@ implementation { proc/procvar 2 procvar ? } if p^.left^.treetype=calln then begin - { it could also be a procvar, not only pprocsym ! } - if p^.left^.symtableprocentry^.typ=varsym then - hp:=genloadnode(pvarsym(p^.left^.symtableentry),p^.left^.symtableproc) + { is it a procvar, this is needed for @procvar in tp mode ! } + if assigned(p^.left^.right) then + begin + { just return the load of the procvar, remove the + addrn and calln nodes } + hp:=p^.left^.right; + putnode(p^.left); + putnode(p); + firstpass(hp); + p:=hp; + exit; + end else begin { generate a methodcallnode or proccallnode } @@ -268,7 +277,7 @@ implementation if is_constnode(p^.left) then begin aktfilepos:=p^.left^.fileinfo; - CGMessage(type_e_no_addr_of_constant); + CGMessage(type_e_no_addr_of_constant); end else begin @@ -582,12 +591,18 @@ implementation end. { $Log$ - Revision 1.20 1999-07-05 20:25:41 peter + Revision 1.21 1999-07-16 10:04:39 peter + * merged + + Revision 1.20 1999/07/05 20:25:41 peter * merged Revision 1.19 1999/07/05 16:24:17 peter * merged + Revision 1.18.2.4 1999/07/16 09:54:59 peter + * @procvar support in tp7 mode works again + Revision 1.18.2.3 1999/07/05 20:06:47 peter * give error instead of warning for ln(0) and sqrt(0)