Mark indirect goto and address-as-label as extensions

This commit is contained in:
Andrew Johnson 2024-06-23 16:12:25 +03:00
parent 4b5e033bc8
commit a28c53cd38

View file

@ -14584,13 +14584,13 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValue func_obj,
#define DEFAULT default
#define BREAK break
#else
static const void * const dispatch_table[256] = {
__extension__ static const void * const dispatch_table[256] = {
#define DEF(id, size, n_pop, n_push, f) && case_OP_ ## id,
#define def(id, size, n_pop, n_push, f)
#include "quickjs-opcode.h"
[ OP_COUNT ... 255 ] = &&case_default
};
#define SWITCH(pc) DUMP_BYTECODE_OR_DONT(pc) goto *dispatch_table[opcode = *pc++];
#define SWITCH(pc) DUMP_BYTECODE_OR_DONT(pc) __extension__ ({ goto *dispatch_table[opcode = *pc++]; });
#define CASE(op) case_ ## op
#define DEFAULT case_default
#define BREAK SWITCH(pc)