delete OP_PUSHFLOAT
This commit is contained in:
parent
d70d96cb34
commit
53fe18a94e
|
@ -14,7 +14,6 @@ enum pic_opcode {
|
|||
OP_PUSHNIL,
|
||||
OP_PUSHTRUE,
|
||||
OP_PUSHFALSE,
|
||||
OP_PUSHFLOAT,
|
||||
OP_PUSHINT,
|
||||
OP_PUSHCHAR,
|
||||
OP_PUSHCONST,
|
||||
|
|
|
@ -1167,11 +1167,6 @@ codegen(codegen_state *state, pic_value obj)
|
|||
}
|
||||
cxt->clen++;
|
||||
return;
|
||||
case PIC_TT_FLOAT:
|
||||
cxt->code[cxt->clen].insn = OP_PUSHFLOAT;
|
||||
cxt->code[cxt->clen].u.f = pic_float(obj);
|
||||
cxt->clen++;
|
||||
return;
|
||||
case PIC_TT_INT:
|
||||
cxt->code[cxt->clen].insn = OP_PUSHINT;
|
||||
cxt->code[cxt->clen].u.i = pic_int(obj);
|
||||
|
@ -1511,9 +1506,6 @@ print_code(pic_state *pic, struct pic_code c)
|
|||
case OP_PUSHFALSE:
|
||||
puts("OP_PUSHFALSE");
|
||||
break;
|
||||
case OP_PUSHFLOAT:
|
||||
printf("OP_PUSHFLOAT\t%f\n", c.u.f);
|
||||
break;
|
||||
case OP_PUSHINT:
|
||||
printf("OP_PUSHINT\t%d\n", c.u.i);
|
||||
break;
|
||||
|
|
6
src/vm.c
6
src/vm.c
|
@ -387,7 +387,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
|
|||
|
||||
#if PIC_DIRECT_THREADED_VM
|
||||
static void *oplabels[] = {
|
||||
&&L_OP_POP, &&L_OP_PUSHNIL, &&L_OP_PUSHTRUE, &&L_OP_PUSHFALSE, &&L_OP_PUSHFLOAT,
|
||||
&&L_OP_POP, &&L_OP_PUSHNIL, &&L_OP_PUSHTRUE, &&L_OP_PUSHFALSE,
|
||||
&&L_OP_PUSHINT, &&L_OP_PUSHCHAR, &&L_OP_PUSHCONST,
|
||||
&&L_OP_GREF, &&L_OP_GSET, &&L_OP_LREF, &&L_OP_LSET, &&L_OP_CREF, &&L_OP_CSET,
|
||||
&&L_OP_JMP, &&L_OP_JMPIF, &&L_OP_CALL, &&L_OP_TAILCALL, &&L_OP_RET, &&L_OP_LAMBDA,
|
||||
|
@ -459,10 +459,6 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
|
|||
PUSH(pic_false_value());
|
||||
NEXT;
|
||||
}
|
||||
CASE(OP_PUSHFLOAT) {
|
||||
PUSH(pic_float_value(c.u.f));
|
||||
NEXT;
|
||||
}
|
||||
CASE(OP_PUSHINT) {
|
||||
PUSH(pic_int_value(c.u.i));
|
||||
NEXT;
|
||||
|
|
Loading…
Reference in New Issue