diff --git a/ChangeLog b/ChangeLog index 8832707..640c891 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-02-14 Aleksey Demakov + + * jit/jit-function.c (compile_block): check if cache is full and + exit if so. + 2007-02-13 Aleksey Demakov * doc/texinfo.tex: remove an ancient file version from the tree. diff --git a/jit/jit-function.c b/jit/jit-function.c index dac32ff..0c0bcfb 100644 --- a/jit/jit-function.c +++ b/jit/jit-function.c @@ -518,6 +518,16 @@ static void compile_block(jit_gencode_t gen, jit_function_t func, printf("Start of binary code: 0x%08x\n", p1); #endif + /* The cache is full. */ + if(!jit_cache_check_for_n(&gen->posn, 1)) + { +#ifdef _JIT_COMPILE_DEBUG + printf("No space left in the code cache.\n\n"); + fflush(stdout); +#endif + return; + } + switch(insn->opcode) { case JIT_OP_NOP: break; /* Ignore NOP's */