85 unsigned int count = 0;
87 ws_info(compiler,
"optimize: jumps to jumps");
111 i->ws_label->ws_label_refcount--;
112 j->ws_label->ws_label_refcount++;
114 i->ws_label = j->ws_label;
128 ws_info(compiler,
"optimize: jumps to next instruction");
141 if (i->ws_label != j)
148 i->ws_label->ws_label_refcount--;
173 ws_info(compiler,
"optimize: dead code");
189 j->ws_label->ws_label_refcount--;
216 ws_info(compiler,
"optimize: peephole");
313 ws_info(compiler,
"optimize: peephole");
#define WS_ASM_CONST_TRUE
unsigned int no_opt_dead_code
static WsBool opt_jumps_to_jumps(WsCompilerPtr compiler)
unsigned int no_opt_jumps_to_next_instruction
#define WS_ASM_CONST_INVALID
static WsBool opt_dead_code(WsCompilerPtr compiler)
#define WS_ASM_CONST_FALSE
static WsBool opt_peephole(WsCompilerPtr compiler)
struct WsAsmInsRec * next
#define WS_ASM_P_LOAD_VAR
static WsBool opt_jumps_to_next_instruction(WsCompilerPtr compiler)
WsAsmIns * ws_asm_ins(WsCompiler *compiler, WsUInt32 line, WsUInt8 opcode)
unsigned int no_opt_peephole
struct WsAsmInsRec * prev
static WsBool opt_conv(WsCompilerPtr compiler)
void ws_asm_optimize(WsCompilerPtr compiler)
#define WS_ASM_P_BRANCH(ins)
#define WS_ASM_P_LOAD_CONST
void ws_info(WsCompilerPtr compiler, char *message,...)
unsigned int no_opt_jumps_to_jumps