diff options
Diffstat (limited to 'src/lj_ir.c')
-rw-r--r-- | src/lj_ir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_ir.c b/src/lj_ir.c index e1a59105..fc2fc2ce 100644 --- a/src/lj_ir.c +++ b/src/lj_ir.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #if LJ_HASJIT | 15 | #if LJ_HASJIT |
16 | 16 | ||
17 | #include "lj_gc.h" | 17 | #include "lj_gc.h" |
18 | #include "lj_buf.h" | ||
18 | #include "lj_str.h" | 19 | #include "lj_str.h" |
19 | #include "lj_tab.h" | 20 | #include "lj_tab.h" |
20 | #include "lj_ir.h" | 21 | #include "lj_ir.h" |
@@ -29,6 +30,7 @@ | |||
29 | #endif | 30 | #endif |
30 | #include "lj_vm.h" | 31 | #include "lj_vm.h" |
31 | #include "lj_strscan.h" | 32 | #include "lj_strscan.h" |
33 | #include "lj_strfmt.h" | ||
32 | #include "lj_lib.h" | 34 | #include "lj_lib.h" |
33 | 35 | ||
34 | /* Some local macros to save typing. Undef'd at the end. */ | 36 | /* Some local macros to save typing. Undef'd at the end. */ |
@@ -443,7 +445,8 @@ TRef LJ_FASTCALL lj_ir_tostr(jit_State *J, TRef tr) | |||
443 | if (!tref_isstr(tr)) { | 445 | if (!tref_isstr(tr)) { |
444 | if (!tref_isnumber(tr)) | 446 | if (!tref_isnumber(tr)) |
445 | lj_trace_err(J, LJ_TRERR_BADTYPE); | 447 | lj_trace_err(J, LJ_TRERR_BADTYPE); |
446 | tr = emitir(IRT(IR_TOSTR, IRT_STR), tr, 0); | 448 | tr = emitir(IRT(IR_TOSTR, IRT_STR), tr, |
449 | tref_isnum(tr) ? IRTOSTR_NUM : IRTOSTR_INT); | ||
447 | } | 450 | } |
448 | return tr; | 451 | return tr; |
449 | } | 452 | } |