Fix compilation with FFI disabled.

This commit is contained in:
Mike Pall 2012-08-26 14:36:00 +02:00
parent dad6645098
commit cf3a263044
2 changed files with 5 additions and 3 deletions

View File

@ -808,9 +808,9 @@ static void asm_snap_alloc1(ASMState *as, IRRef ref)
asm_snap_alloc1(as, ir->op2);
if (LJ_32 && (ir+1)->o == IR_HIOP)
asm_snap_alloc1(as, (ir+1)->op2);
}
} else
#endif
else { /* Allocate stored values for TNEW, TDUP and CNEW. */
{ /* Allocate stored values for TNEW, TDUP and CNEW. */
IRIns *irs;
lua_assert(ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW);
for (irs = IR(as->snapref-1); irs > ir; irs--)

View File

@ -108,7 +108,8 @@ static void lex_number(LexState *ls, TValue *tv)
setitype(tv, LJ_TISNUM);
} else if (fmt == STRSCAN_NUM) {
/* Already in correct format. */
} else if (LJ_HASFFI && fmt != STRSCAN_ERROR) {
#if LJ_HASFFI
} else if (fmt != STRSCAN_ERROR) {
lua_State *L = ls->L;
GCcdata *cd;
lua_assert(fmt == STRSCAN_I64 || fmt == STRSCAN_U64 || fmt == STRSCAN_IMAG);
@ -126,6 +127,7 @@ static void lex_number(LexState *ls, TValue *tv)
*(uint64_t *)cdataptr(cd) = tv->u64;
}
lj_parse_keepcdata(ls, tv, cd);
#endif
} else {
lua_assert(fmt == STRSCAN_ERROR);
lj_lex_error(ls, TK_number, LJ_ERR_XNUMBER);