adapted to new semantics of the EHEAP error: no longer fatal

This commit is contained in:
ceriel 1988-04-11 10:29:59 +00:00
parent b190c55526
commit b2275303a2
4 changed files with 7 additions and 5 deletions

View file

@ -357,9 +357,9 @@ If it is smaller, then the heap shrinks.
HP may never point below its original value.
All words between the current HP and the original HP
are allocated to the heap.
The heap may not grow into a part of memory that is already allocated
for the stack.
The heap may not grow into a part of memory that is already allocated.
When this is attempted, the STR instruction will cause a trap to occur.
In this case, HP retains its old value.
.P
The only way to address the heap is indirectly.
Whenever an object is allocated by increasing HP,

View file

@ -205,7 +205,8 @@ begin if (a<sp) or (a mod wsize<>0) then trap(ESTACK); lb:=a end;
procedure newhp(a:adr);
begin if (a>sp) or (a>maxdata+1) or (a mod wsize<>0)
then trap(EHEAP); hp:=a
then trap(EHEAP)
else hp:=a
end;
function argc(a:double):sword;

View file

@ -245,7 +245,8 @@ begin if (a<sp) or (a mod wsize<>0) then trap(ESTACK); lb:=a end;
procedure newhp(a:adr);
begin if (a>sp) or (a>maxdata+1) or (a mod wsize<>0)
then trap(EHEAP); hp:=a
then trap(EHEAP)
else hp:=a
end;
function argc(a:double):sword;

View file

@ -96,7 +96,7 @@ n l l.
9@EFUND@Undefined float
10@ECONV@Conversion error
16*@ESTACK@Stack overflow
17*@EHEAP@Heap overflow
17@EHEAP@Heap overflow
18*@EILLINS@Illegal instruction
19*@EODDZ@Illegal size argument
20*@ECASE@Case error