[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gambas-user] Re: Script error 'jump too far' ????
[Thread Prev] | [Thread Next]
- Subject: [Gambas-user] Re: Script error 'jump too far' ????
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Sun, 3 Mar 2024 19:44:23 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 03/03/2024 à 18:20, Brian G a écrit :
On 3/3/24 08:17, Brian G wrote:Ok I found this in the compiler, It seems to indicate that no single block of code can be larger than 32k when compiled?I have started getting this error on my larger scripts # Gambas module file : MMain:13575:14: Jump is too far 13575*: wend ^ Jump is too far Any idea, is there a limit somewhere? Benoit?void CODE_jump_length(ushort src, ushort dst) { if (src >= (cur_func->ncode - 1)) return; int diff = (int)dst - (int)src; if (diff < -32768 || diff > 32767) THROW("Jump is too far"); if (cur_func->code[src] == C_BREAK)cur_func->code[src + 2] = (short)(diff - 3); //dst - (src + 2) - 1;else if (cur_func->code[src] == C_NOP) cur_func->code[src] = (short)diff; //dst - src; elsecur_func->code[src + 1] = (short)(diff - 2); //dst - (src + 1) - 1;} I am guessing there is no work around for this?
No, this is a bytecode limit. This usually means that your function is far too big! Are your code written by hand or generated?
-- Benoît Minisini. ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
Re: [Gambas-user] Re: Script error 'jump too far' ???? | brian <brian@xxxxxxxxxxxxxxxx> |
[Gambas-user] Script error 'jump too far' ???? | Brian G <brian@xxxxxxxxxxxxxxxx> |
[Gambas-user] Re: Script error 'jump too far' ???? | Brian G <brian@xxxxxxxxxxxxxxxx> |