summaryrefslogtreecommitdiff
path: root/src/lj_crecord.c
diff options
context:
space:
mode:
authorMike Pall <mike>2011-02-08 00:09:33 +0100
committerMike Pall <mike>2011-02-08 00:09:33 +0100
commitc39ca7c35b4f4efd91c83ab0777f32c294766e23 (patch)
tree915ac9ce5b18762e98c58b239ddcc159bb309442 /src/lj_crecord.c
parent7a37b93f1b40ba83cc68965b1c80c35363c1493d (diff)
downloadluajit-c39ca7c35b4f4efd91c83ab0777f32c294766e23.tar.gz
luajit-c39ca7c35b4f4efd91c83ab0777f32c294766e23.tar.bz2
luajit-c39ca7c35b4f4efd91c83ab0777f32c294766e23.zip
FFI: Record ffi.abi().
Diffstat (limited to 'src/lj_crecord.c')
-rw-r--r--src/lj_crecord.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c
index 8e68a5d6..73575fe2 100644
--- a/src/lj_crecord.c
+++ b/src/lj_crecord.c
@@ -1008,6 +1008,16 @@ void LJ_FASTCALL recff_ffi_fill(jit_State *J, RecordFFData *rd)
1008 } /* else: interpreter will throw. */ 1008 } /* else: interpreter will throw. */
1009} 1009}
1010 1010
1011void LJ_FASTCALL recff_ffi_abi(jit_State *J, RecordFFData *rd)
1012{
1013 if (tref_isstr(J->base[0])) {
1014 /* Specialize to the ABI string to make the boolean result a constant. */
1015 emitir(IRTG(IR_EQ, IRT_STR), J->base[0], lj_ir_kstr(J, strV(&rd->argv[0])));
1016 J->postproc = LJ_POST_FIXBOOL;
1017 J->base[0] = TREF_TRUE;
1018 } /* else: interpreter will throw. */
1019}
1020
1011/* -- Miscellaneous library functions ------------------------------------- */ 1021/* -- Miscellaneous library functions ------------------------------------- */
1012 1022
1013void LJ_FASTCALL lj_crecord_tonumber(jit_State *J, RecordFFData *rd) 1023void LJ_FASTCALL lj_crecord_tonumber(jit_State *J, RecordFFData *rd)