void lookupswitch_print(lookupswitch_t*l)
{
- printf("default: %08x\n", l->def);
+ printf("default: %08x\n", (int)l->def);
code_list_t*t = l->targets;
while(t) {
- printf("target: %08x\n", t->code);
+ printf("target: %08x\n", (int)t->code);
t = t->next;
}
}
if(c->branch)
fprintf(fo, "->%d", c->branch->pos);
else
- fprintf(fo, "%08x", c->branch);
+ fprintf(fo, "%08x", (unsigned int)c->branch);
} else if(*p == 's') {
char*s = string_escape((string_t*)data);
fprintf(fo, "\"%s\"", s);
return code_cut(c);
}
+char is_getlocal(code_t*c)
+{
+ if(!c) return 0;
+ if(c->opcode == OPCODE_GETLOCAL ||
+ c->opcode == OPCODE_GETLOCAL_0 ||
+ c->opcode == OPCODE_GETLOCAL_1 ||
+ c->opcode == OPCODE_GETLOCAL_2 ||
+ c->opcode == OPCODE_GETLOCAL_3) {
+ return 1;
+ }
+ return 0;
+}
+
code_t* cut_last_push(code_t*c)
{
assert(!c->next);