diff options
author | Mike Pall <mike> | 2011-01-13 16:39:42 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-01-13 16:39:42 +0100 |
commit | 6e702d703efc1aee4e0f4dfa749a4ce51d7b97f8 (patch) | |
tree | 8855c5874ae9acd090ab860673c661bce7df5f1f /src/lj_crecord.c | |
parent | 0ec7f5ed92b6b9720c80669b2de3aa3c40967153 (diff) | |
download | luajit-6e702d703efc1aee4e0f4dfa749a4ce51d7b97f8.tar.gz luajit-6e702d703efc1aee4e0f4dfa749a4ce51d7b97f8.tar.bz2 luajit-6e702d703efc1aee4e0f4dfa749a4ce51d7b97f8.zip |
FFI: Cleanup some type conversions.
Remove pointless conversions to booleans.
Allow assigning functions to function pointers.
Diffstat (limited to '')
-rw-r--r-- | src/lj_crecord.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index eb26bd0f..0f48f213 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -133,10 +133,7 @@ static void crec_ct_ct(jit_State *J, CType *d, CType *s, TRef dp, TRef sp) | |||
133 | case CCX(B, B): | 133 | case CCX(B, B): |
134 | goto xstore; /* Source operand is already normalized. */ | 134 | goto xstore; /* Source operand is already normalized. */ |
135 | case CCX(B, I): | 135 | case CCX(B, I): |
136 | case CCX(B, P): | ||
137 | case CCX(B, F): | 136 | case CCX(B, F): |
138 | case CCX(B, C): | ||
139 | case CCX(B, A): | ||
140 | /* NYI: specialize to the result of a comparison against 0. */ | 137 | /* NYI: specialize to the result of a comparison against 0. */ |
141 | goto err_nyi; | 138 | goto err_nyi; |
142 | 139 | ||
@@ -683,6 +680,9 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd) | |||
683 | } else if (!(ctype_isptr(ct->info) || ctype_isrefarray(ct->info))) { | 680 | } else if (!(ctype_isptr(ct->info) || ctype_isrefarray(ct->info))) { |
684 | goto err_type; | 681 | goto err_type; |
685 | } | 682 | } |
683 | } else if (tref_isnil(tr)) { | ||
684 | tr = lj_ir_kptr(J, NULL); | ||
685 | ct = ctype_get(cts, CTID_P_VOID); | ||
686 | } else if (tref_isinteger(tr)) { | 686 | } else if (tref_isinteger(tr)) { |
687 | ct = ctype_get(cts, CTID_INT32); | 687 | ct = ctype_get(cts, CTID_INT32); |
688 | } else if (!tref_isnum(tr)) { | 688 | } else if (!tref_isnum(tr)) { |