diff options
author | Mike Pall <mike> | 2010-12-09 22:48:01 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-12-09 22:48:01 +0100 |
commit | 09e2bdbb0a55ee326b1520069ed5409bebcc331d (patch) | |
tree | 758d81f0ae2ce86500e23e4665a74bd3fb85f0de /src | |
parent | 870bcd76405a4b695055a422c8a83956ae7afa7c (diff) | |
download | luajit-09e2bdbb0a55ee326b1520069ed5409bebcc331d.tar.gz luajit-09e2bdbb0a55ee326b1520069ed5409bebcc331d.tar.bz2 luajit-09e2bdbb0a55ee326b1520069ed5409bebcc331d.zip |
FFI: Always specialize to the field name for struct access.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_crecord.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 566c064b..a543ffd1 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -352,6 +352,8 @@ void LJ_FASTCALL recff_cdata_index(jit_State *J, RecordFFData *rd) | |||
352 | } | 352 | } |
353 | } else if (tref_isstr(idx)) { | 353 | } else if (tref_isstr(idx)) { |
354 | GCstr *name = strV(&rd->argv[1]); | 354 | GCstr *name = strV(&rd->argv[1]); |
355 | /* Always specialize to the field name. */ | ||
356 | emitir(IRTG(IR_EQ, IRT_STR), idx, lj_ir_kstr(J, name)); | ||
355 | if (ctype_isstruct(ct->info)) { | 357 | if (ctype_isstruct(ct->info)) { |
356 | CTSize fofs; | 358 | CTSize fofs; |
357 | CType *fct = lj_ctype_getfield(cts, ct, name, &fofs); | 359 | CType *fct = lj_ctype_getfield(cts, ct, name, &fofs); |