diff options
author | Mike Pall <mike> | 2013-05-08 11:06:45 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-05-08 11:06:45 +0200 |
commit | 71ce1e87067fb2d12629b76d7868d7bb78ad68fb (patch) | |
tree | 81ed93470fa0e4f999f38d1870729eaaf3a24329 | |
parent | 87b560b3e18dc39934f7e49810f418a934036a61 (diff) | |
parent | c5d7666ec82380ad1fe7be0511654fc44af496b8 (diff) | |
download | luajit-71ce1e87067fb2d12629b76d7868d7bb78ad68fb.tar.gz luajit-71ce1e87067fb2d12629b76d7868d7bb78ad68fb.tar.bz2 luajit-71ce1e87067fb2d12629b76d7868d7bb78ad68fb.zip |
Merge branch 'master' into v2.1
-rw-r--r-- | src/lj_ffrecord.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index 39e80842..289c5775 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c | |||
@@ -269,7 +269,7 @@ static void LJ_FASTCALL recff_tonumber(jit_State *J, RecordFFData *rd) | |||
269 | { | 269 | { |
270 | TRef tr = J->base[0]; | 270 | TRef tr = J->base[0]; |
271 | TRef base = J->base[1]; | 271 | TRef base = J->base[1]; |
272 | if (tr && base) { | 272 | if (tr && !tref_isnil(base)) { |
273 | base = lj_opt_narrow_toint(J, base); | 273 | base = lj_opt_narrow_toint(J, base); |
274 | if (!tref_isk(base) || IR(tref_ref(base))->i != 10) | 274 | if (!tref_isk(base) || IR(tref_ref(base))->i != 10) |
275 | recff_nyiu(J); | 275 | recff_nyiu(J); |
@@ -693,7 +693,7 @@ static void LJ_FASTCALL recff_string_range(jit_State *J, RecordFFData *rd) | |||
693 | end = argv2int(J, &rd->argv[2]); | 693 | end = argv2int(J, &rd->argv[2]); |
694 | } | 694 | } |
695 | } else { /* string.byte(str, [,start [,end]]) */ | 695 | } else { /* string.byte(str, [,start [,end]]) */ |
696 | if (J->base[1]) { | 696 | if (!tref_isnil(J->base[1])) { |
697 | start = argv2int(J, &rd->argv[1]); | 697 | start = argv2int(J, &rd->argv[1]); |
698 | trstart = lj_opt_narrow_toint(J, J->base[1]); | 698 | trstart = lj_opt_narrow_toint(J, J->base[1]); |
699 | trend = J->base[2]; | 699 | trend = J->base[2]; |
@@ -778,7 +778,7 @@ static void LJ_FASTCALL recff_string_rep(jit_State *J, RecordFFData *rd) | |||
778 | TRef str = lj_ir_tostr(J, J->base[0]); | 778 | TRef str = lj_ir_tostr(J, J->base[0]); |
779 | TRef rep = lj_opt_narrow_toint(J, J->base[1]); | 779 | TRef rep = lj_opt_narrow_toint(J, J->base[1]); |
780 | TRef hdr, tr, str2 = 0; | 780 | TRef hdr, tr, str2 = 0; |
781 | if (J->base[2]) { | 781 | if (!tref_isnil(J->base[2])) { |
782 | TRef sep = lj_ir_tostr(J, J->base[2]); | 782 | TRef sep = lj_ir_tostr(J, J->base[2]); |
783 | int32_t vrep = argv2int(J, &rd->argv[1]); | 783 | int32_t vrep = argv2int(J, &rd->argv[1]); |
784 | emitir(IRTGI(vrep > 1 ? IR_GT : IR_LE), rep, lj_ir_kint(J, 1)); | 784 | emitir(IRTGI(vrep > 1 ? IR_GT : IR_LE), rep, lj_ir_kint(J, 1)); |