Use native IRT_PTR instead of IRT_LIGHTUD workaround for FILE*.

This commit is contained in:
Mike Pall 2010-12-06 02:14:39 +01:00
parent 73bc83cda1
commit e137408752
2 changed files with 5 additions and 2 deletions

View File

@ -733,8 +733,8 @@ static TRef recff_io_fp(jit_State *J, uint32_t id)
tr = emitir(IRT(IR_FLOAD, IRT_U8), ud, IRFL_UDATA_UDTYPE);
emitir(IRTGI(IR_EQ), tr, lj_ir_kint(J, UDTYPE_IO_FILE));
}
fp = emitir(IRT(IR_FLOAD, IRT_LIGHTUD), ud, IRFL_UDATA_FILE);
emitir(IRTG(IR_NE, IRT_LIGHTUD), fp, lj_ir_knull(J, IRT_LIGHTUD));
fp = emitir(IRT(IR_FLOAD, IRT_PTR), ud, IRFL_UDATA_FILE);
emitir(IRTG(IR_NE, IRT_PTR), fp, lj_ir_knull(J, IRT_PTR));
return fp;
}

View File

@ -338,6 +338,9 @@ typedef enum {
IRT_U64,
/* There is room for 10 more types. */
/* Native pointer type. */
IRT_PTR = LJ_64 ? IRT_P64 : IRT_P32,
/* Additional flags. */
IRT_MARK = 0x20, /* Marker for misc. purposes. */
IRT_ISPHI = 0x40, /* Instruction is left or right PHI operand. */