adapted to new semantics of the EHEAP error: no longer fatal
This commit is contained in:
		
							parent
							
								
									b190c55526
								
							
						
					
					
						commit
						b2275303a2
					
				
					 4 changed files with 7 additions and 5 deletions
				
			
		|  | @ -357,9 +357,9 @@ If it is smaller, then the heap shrinks. | ||||||
| HP may never point below its original value. | HP may never point below its original value. | ||||||
| All words between the current HP and the original HP | All words between the current HP and the original HP | ||||||
| are allocated to the heap. | are allocated to the heap. | ||||||
| The heap may not grow into a part of memory that is already allocated | The heap may not grow into a part of memory that is already allocated. | ||||||
| for the stack. |  | ||||||
| When this is attempted, the STR instruction will cause a trap to occur. | When this is attempted, the STR instruction will cause a trap to occur. | ||||||
|  | In this case, HP retains its old value. | ||||||
| .P | .P | ||||||
| The only way to address the heap is indirectly. | The only way to address the heap is indirectly. | ||||||
| Whenever an object is allocated by increasing HP, | Whenever an object is allocated by increasing HP, | ||||||
|  |  | ||||||
|  | @ -205,7 +205,8 @@ begin if (a<sp) or (a mod wsize<>0) then trap(ESTACK); lb:=a end; | ||||||
| 
 | 
 | ||||||
| procedure newhp(a:adr); | procedure newhp(a:adr); | ||||||
| begin if (a>sp) or (a>maxdata+1) or (a mod wsize<>0) | 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; | end; | ||||||
| 
 | 
 | ||||||
| function argc(a:double):sword; | function argc(a:double):sword; | ||||||
|  |  | ||||||
|  | @ -245,7 +245,8 @@ begin if (a<sp) or (a mod wsize<>0) then trap(ESTACK); lb:=a end; | ||||||
| 
 | 
 | ||||||
| procedure newhp(a:adr); | procedure newhp(a:adr); | ||||||
| begin if (a>sp) or (a>maxdata+1) or (a mod wsize<>0) | 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; | end; | ||||||
| 
 | 
 | ||||||
| function argc(a:double):sword; | function argc(a:double):sword; | ||||||
|  |  | ||||||
|  | @ -96,7 +96,7 @@ n l l. | ||||||
| 9@EFUND@Undefined float | 9@EFUND@Undefined float | ||||||
| 10@ECONV@Conversion error | 10@ECONV@Conversion error | ||||||
| 16*@ESTACK@Stack overflow | 16*@ESTACK@Stack overflow | ||||||
| 17*@EHEAP@Heap overflow | 17@EHEAP@Heap overflow | ||||||
| 18*@EILLINS@Illegal instruction | 18*@EILLINS@Illegal instruction | ||||||
| 19*@EODDZ@Illegal size argument | 19*@EODDZ@Illegal size argument | ||||||
| 20*@ECASE@Case error | 20*@ECASE@Case error | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue