diff options
Diffstat (limited to 'src/lj_crecord.c')
-rw-r--r-- | src/lj_crecord.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index d4dc9ef9..e2b3e8af 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -301,8 +301,6 @@ static TRef crec_tv_ct(jit_State *J, CType *s, CTypeID sid, TRef sp) | |||
301 | if (ctype_isnum(sinfo)) { | 301 | if (ctype_isnum(sinfo)) { |
302 | IRType t = crec_ct2irt(s); | 302 | IRType t = crec_ct2irt(s); |
303 | TRef tr; | 303 | TRef tr; |
304 | if ((sinfo & CTF_BOOL)) | ||
305 | goto err_nyi; /* NYI: specialize to the result. */ | ||
306 | if (t == IRT_CDATA) | 304 | if (t == IRT_CDATA) |
307 | goto err_nyi; /* NYI: copyval of >64 bit integers. */ | 305 | goto err_nyi; /* NYI: copyval of >64 bit integers. */ |
308 | tr = emitir(IRT(IR_XLOAD, t), sp, 0); | 306 | tr = emitir(IRT(IR_XLOAD, t), sp, 0); |
@@ -314,6 +312,11 @@ static TRef crec_tv_ct(jit_State *J, CType *s, CTypeID sid, TRef sp) | |||
314 | lj_ir_kintp(J, sizeof(GCcdata))); | 312 | lj_ir_kintp(J, sizeof(GCcdata))); |
315 | emitir(IRT(IR_XSTORE, t), ptr, tr); | 313 | emitir(IRT(IR_XSTORE, t), ptr, tr); |
316 | return dp; | 314 | return dp; |
315 | } else if ((sinfo & CTF_BOOL)) { | ||
316 | /* Assume not equal to zero. Fixup and emit pending guard later. */ | ||
317 | lj_ir_set(J, IRTGI(IR_NE), tr, lj_ir_kint(J, 0)); | ||
318 | J->postproc = LJ_POST_FIXGUARD; | ||
319 | tr = TREF_TRUE; | ||
317 | } | 320 | } |
318 | return tr; | 321 | return tr; |
319 | } else if (ctype_isptr(sinfo)) { | 322 | } else if (ctype_isptr(sinfo)) { |