mirror of
https://git.code.sf.net/p/newrpl/sources
synced 2024-11-16 19:51:25 +01:00
Improved compiler/decomp. behavior in low memory conditions.
This commit is contained in:
parent
ba11a5d121
commit
7e155fb16a
1 changed files with 12 additions and 0 deletions
12
compiler.c
12
compiler.c
|
@ -615,6 +615,11 @@ WORDPTR rplCompile(BYTEPTR string,BINT length, BINT addwrapper)
|
|||
if( (CompileEnd!=TempObEnd) && !Exceptions) {
|
||||
|
||||
WORDPTR newobject=TempObEnd;
|
||||
if( CompileEnd+TEMPOBSLACK>TempObSize) {
|
||||
// ENLARGE TEMPOB AS NEEDED
|
||||
growTempOb((BINT)(CompileEnd-TempOb)+TEMPOBSLACK);
|
||||
if(Exceptions) return 0;
|
||||
}
|
||||
|
||||
// STORE BLOCK SIZE
|
||||
rplAddTempBlock(TempObEnd);
|
||||
|
@ -1261,11 +1266,18 @@ end_of_expression:
|
|||
LAMTop=LAMTopSaved; // RESTORE ENVIRONMENTS
|
||||
if( !Exceptions) {
|
||||
|
||||
// GUARANTEE MINIMUM SLACK SPACE
|
||||
if( CompileEnd+TEMPOBSLACK>TempObSize) {
|
||||
// ENLARGE TEMPOB AS NEEDED
|
||||
growTempOb((BINT)(CompileEnd-TempOb)+TEMPOBSLACK);
|
||||
if(Exceptions) return 0;
|
||||
}
|
||||
|
||||
// STORE BLOCK SIZE
|
||||
rplAddTempBlock(TempObEnd);
|
||||
WORDPTR newobject=TempObEnd;
|
||||
TempObEnd=CompileEnd;
|
||||
|
||||
return newobject;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue