diff options
Diffstat (limited to 'opcode.c')
| -rw-r--r-- | opcode.c | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 3.64 1996/03/21 16:31:32 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.65 1996/03/21 18:55:02 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdio.h> | 9 | #include <stdio.h> |
| @@ -25,6 +25,10 @@ char *rcs_opcode="$Id: opcode.c,v 3.64 1996/03/21 16:31:32 roberto Exp roberto $ | |||
| 25 | 25 | ||
| 26 | #define STACK_SIZE 128 | 26 | #define STACK_SIZE 128 |
| 27 | 27 | ||
| 28 | #ifndef STACK_LIMIT | ||
| 29 | #define STACK_LIMIT 6000 | ||
| 30 | #endif | ||
| 31 | |||
| 28 | typedef int StkId; /* index to stack elements */ | 32 | typedef int StkId; /* index to stack elements */ |
| 29 | 33 | ||
| 30 | static Object initial_stack; | 34 | static Object initial_stack; |
| @@ -93,7 +97,7 @@ static void growstack (void) | |||
| 93 | lua_initstack(); | 97 | lua_initstack(); |
| 94 | else | 98 | else |
| 95 | { | 99 | { |
| 96 | static int limit = 10000; | 100 | static int limit = STACK_LIMIT; |
| 97 | StkId t = top-stack; | 101 | StkId t = top-stack; |
| 98 | Long stacksize = stackLimit - stack; | 102 | Long stacksize = stackLimit - stack; |
| 99 | stacksize = growvector(&stack, stacksize, Object, stackEM, limit+100); | 103 | stacksize = growvector(&stack, stacksize, Object, stackEM, limit+100); |
