mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 05:12:26 +00:00
Enforce value params with sysflag [1] are read-only.
This commit is contained in:
parent
e22bec7fc1
commit
63817939ec
2 changed files with 3 additions and 7 deletions
|
|
@ -36,13 +36,9 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *)
|
||||||
node^.obj := obj; node^.typ := obj^.typ;
|
node^.obj := obj; node^.typ := obj^.typ;
|
||||||
|
|
||||||
(* Array and record value parameters with copy disabled are readonly *)
|
(* Array and record value parameters with copy disabled are readonly *)
|
||||||
(*
|
IF (obj.mode = OPT.Var) & (obj.typ.comp IN {OPT.Array, OPT.DynArr}) & (obj.typ.sysflag # 0) THEN
|
||||||
IF (obj.mode = OPT.Var)
|
|
||||||
& (obj.typ.comp IN {OPT.Array, OPT.DynArr})
|
|
||||||
& (obj.typ.sysflag # 0) THEN
|
|
||||||
node.readonly := TRUE;
|
node.readonly := TRUE;
|
||||||
END ;
|
END;
|
||||||
*)
|
|
||||||
|
|
||||||
RETURN node
|
RETURN node
|
||||||
END NewLeaf;
|
END NewLeaf;
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files
|
||||||
r.offset := offset + 1; r.res := 0
|
r.offset := offset + 1; r.res := 0
|
||||||
END Write;
|
END Write;
|
||||||
|
|
||||||
PROCEDURE WriteBytes* (VAR r: Rider; VAR x: ARRAY OF SYSTEM.BYTE; n: LONGINT);
|
PROCEDURE WriteBytes* (VAR r: Rider; x: ARRAY [1] OF SYSTEM.BYTE; n: LONGINT);
|
||||||
VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer;
|
VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer;
|
||||||
BEGIN
|
BEGIN
|
||||||
IF n > LEN(x) THEN IdxTrap END;
|
IF n > LEN(x) THEN IdxTrap END;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue