diff --git a/compiler/innr.inc b/compiler/innr.inc index 1d72e61618..d5c5c2bd67 100644 --- a/compiler/innr.inc +++ b/compiler/innr.inc @@ -51,6 +51,7 @@ const in_break = 39; in_continue = 40; in_assert_x_y = 41; + in_addr_x = 42; { Internal constant functions } in_const_trunc = 100; @@ -72,7 +73,10 @@ const in_const_sin = 116; { $Log$ - Revision 1.10 1998-10-05 12:32:45 peter + Revision 1.11 1999-04-17 13:12:19 peter + * addr() internal + + Revision 1.10 1998/10/05 12:32:45 peter + assert() support Revision 1.9 1998/10/02 09:24:20 peter diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index c1e1d1da82..2b97e9d4ec 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -271,6 +271,19 @@ unit pexpr; statement_syssym:=p1; end; + in_addr_x : + begin + consume(LKLAMMER); + in_args:=true; + p1:=comp_expr(true); + p1:=gensinglenode(addrn,p1); + Must_be_valid:=false; + do_firstpass(p1); + pd:=p1^.resulttype; + consume(RKLAMMER); + statement_syssym:=p1; + end; + in_seg_x : begin consume(LKLAMMER); @@ -1965,7 +1978,10 @@ unit pexpr; end. { $Log$ - Revision 1.93 1999-04-15 09:00:08 peter + Revision 1.94 1999-04-17 13:12:17 peter + * addr() internal + + Revision 1.93 1999/04/15 09:00:08 peter * fixed property write Revision 1.92 1999/04/08 20:59:43 florian diff --git a/compiler/psystem.pas b/compiler/psystem.pas index 3b04230e97..0c698e6d99 100644 --- a/compiler/psystem.pas +++ b/compiler/psystem.pas @@ -66,6 +66,7 @@ begin {$IfnDef OLDVAL} p^.insert(new(psyssym,init('VAL',in_val_x))); {$EndIf OLDVAL} + p^.insert(new(psyssym,init('ADDR',in_addr_x))); end; @@ -259,7 +260,10 @@ end; end. { $Log$ - Revision 1.19 1999-04-07 15:31:12 pierre + Revision 1.20 1999-04-17 13:12:20 peter + * addr() internal + + Revision 1.19 1999/04/07 15:31:12 pierre * all formaldefs are now a sinlge definition cformaldef (this was necessary for double_checksum) + small part of double_checksum code diff --git a/rtl/inc/innr.inc b/rtl/inc/innr.inc index 8750eabbc0..d5ebe7b5cb 100644 --- a/rtl/inc/innr.inc +++ b/rtl/inc/innr.inc @@ -51,6 +51,7 @@ const in_break = 39; in_continue = 40; in_assert_x_y = 41; + in_addr_x = 42; { Internal constant functions } in_const_trunc = 100; @@ -72,7 +73,10 @@ const in_const_sin = 116; { $Log$ - Revision 1.6 1998-10-05 12:32:50 peter + Revision 1.7 1999-04-17 13:10:23 peter + * addr() internal + + Revision 1.10 1998/10/05 12:32:45 peter + assert() support Revision 1.9 1998/10/02 09:24:20 peter diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index ad237d2614..25895a3570 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -240,10 +240,12 @@ Begin ptr:=pointer(off); End; -Function Addr (Var X) : Pointer; -Begin - Addr:=@(X); -End; +{$ifndef INTERNALADDR} +Function Addr(var x):pointer; +begin + Addr:=@x; +end; +{$endif} Function CSeg : Word; Begin @@ -540,7 +542,10 @@ end; { $Log$ - Revision 1.56 1999-04-15 12:20:01 peter + Revision 1.57 1999-04-17 13:10:25 peter + * addr() internal + + Revision 1.56 1999/04/15 12:20:01 peter + finalization support Revision 1.55 1999/03/01 15:41:03 peter diff --git a/rtl/inc/systemh.inc b/rtl/inc/systemh.inc index b01f665e50..61f302231d 100644 --- a/rtl/inc/systemh.inc +++ b/rtl/inc/systemh.inc @@ -187,7 +187,9 @@ Function odd(l:Longint):Boolean; {$ifndef RTLLITE} Function ptr(sel,off:Longint):pointer; -Function Addr (Var X):pointer; +{$ifndef INTERNALADDR} +Function Addr(var x):pointer; +{$endif} Function Cseg:Word; Function Dseg:Word; Function Sseg:Word; @@ -452,7 +454,10 @@ const { $Log$ - Revision 1.54 1999-04-08 15:57:56 peter + Revision 1.55 1999-04-17 13:10:26 peter + * addr() internal + + Revision 1.54 1999/04/08 15:57:56 peter + subrange checking for readln() Revision 1.53 1999/03/16 17:49:37 jonas