diff options
| author | Mike Pall <mike> | 2010-12-28 18:23:41 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2010-12-28 18:23:41 +0100 |
| commit | a70fb9416a535146dc60b680313c8ef7fa7daaf6 (patch) | |
| tree | 9df0e29cb24b40465f422d70af0bcfbdc05013a2 | |
| parent | 44935dae0d6b07b07ade4db7ffddc0268767bc43 (diff) | |
| download | luajit-a70fb9416a535146dc60b680313c8ef7fa7daaf6.tar.gz luajit-a70fb9416a535146dc60b680313c8ef7fa7daaf6.tar.bz2 luajit-a70fb9416a535146dc60b680313c8ef7fa7daaf6.zip | |
Make recording of type() independent of LJ_T*/IRT_* mapping.
| -rw-r--r-- | src/lj_ffrecord.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index e2f8a39f..b7ee06cd 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c | |||
| @@ -127,7 +127,13 @@ static void LJ_FASTCALL recff_assert(jit_State *J, RecordFFData *rd) | |||
| 127 | static void LJ_FASTCALL recff_type(jit_State *J, RecordFFData *rd) | 127 | static void LJ_FASTCALL recff_type(jit_State *J, RecordFFData *rd) |
| 128 | { | 128 | { |
| 129 | /* Arguments already specialized. Result is a constant string. Neat, huh? */ | 129 | /* Arguments already specialized. Result is a constant string. Neat, huh? */ |
| 130 | IRType t = tref_isinteger(J->base[0]) ? IRT_NUM : tref_type(J->base[0]); | 130 | uint32_t t; |
| 131 | if (tvisnum(&rd->argv[0])) | ||
| 132 | t = ~LJ_TNUMX; | ||
| 133 | else if (LJ_64 && tvislightud(&rd->argv[0])) | ||
| 134 | t = ~LJ_TLIGHTUD; | ||
| 135 | else | ||
| 136 | t = ~itype(&rd->argv[0]); | ||
| 131 | J->base[0] = lj_ir_kstr(J, strV(&J->fn->c.upvalue[t])); | 137 | J->base[0] = lj_ir_kstr(J, strV(&J->fn->c.upvalue[t])); |
| 132 | UNUSED(rd); | 138 | UNUSED(rd); |
| 133 | } | 139 | } |
