diff options
| author | Mike Pall <mike> | 2014-04-08 12:12:27 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2014-04-08 12:12:27 +0200 |
| commit | 347b49ec7d3d8f1a2c771c15ad080960af842f56 (patch) | |
| tree | 05c3ba1256c79086726ad7e45e948e9c43aa3382 | |
| parent | d3e3700180afe1bec58438a2c1a490ea0527d74e (diff) | |
| parent | 4ed3ee1f046618c5251baae3013f125b4cc7ca9c (diff) | |
| download | luajit-347b49ec7d3d8f1a2c771c15ad080960af842f56.tar.gz luajit-347b49ec7d3d8f1a2c771c15ad080960af842f56.tar.bz2 luajit-347b49ec7d3d8f1a2c771c15ad080960af842f56.zip | |
Merge branch 'master' into v2.1
| -rw-r--r-- | src/lj_carith.c | 4 | ||||
| -rw-r--r-- | src/lj_crecord.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c index 1b1786a6..53257e18 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c | |||
| @@ -64,7 +64,7 @@ static int carith_checkarg(lua_State *L, CTState *cts, CDArith *ca) | |||
| 64 | TValue *o2 = i == 0 ? o+1 : o-1; | 64 | TValue *o2 = i == 0 ? o+1 : o-1; |
| 65 | CType *ct = ctype_raw(cts, cdataV(o2)->ctypeid); | 65 | CType *ct = ctype_raw(cts, cdataV(o2)->ctypeid); |
| 66 | ca->ct[i] = NULL; | 66 | ca->ct[i] = NULL; |
| 67 | ca->p[i] = NULL; | 67 | ca->p[i] = (uint8_t *)strVdata(o); |
| 68 | ok = 0; | 68 | ok = 0; |
| 69 | if (ctype_isenum(ct->info)) { | 69 | if (ctype_isenum(ct->info)) { |
| 70 | CTSize ofs; | 70 | CTSize ofs; |
| @@ -75,7 +75,7 @@ static int carith_checkarg(lua_State *L, CTState *cts, CDArith *ca) | |||
| 75 | ok = 1; | 75 | ok = 1; |
| 76 | } else { | 76 | } else { |
| 77 | ca->ct[1-i] = ct; /* Use enum to improve error message. */ | 77 | ca->ct[1-i] = ct; /* Use enum to improve error message. */ |
| 78 | ca->p[1-i] = (void *)(intptr_t)1; /* To make it unequal. */ | 78 | ca->p[1-i] = NULL; |
| 79 | break; | 79 | break; |
| 80 | } | 80 | } |
| 81 | } | 81 | } |
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 29733567..83dd28da 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
| @@ -1453,7 +1453,9 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd) | |||
| 1453 | ct = ctype_child(cts, cct); | 1453 | ct = ctype_child(cts, cct); |
| 1454 | tr = lj_ir_kint(J, (int32_t)ofs); | 1454 | tr = lj_ir_kint(J, (int32_t)ofs); |
| 1455 | } /* else: interpreter will throw. */ | 1455 | } /* else: interpreter will throw. */ |
| 1456 | } /* else: interpreter will throw. */ | 1456 | } else { |
| 1457 | tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCstr))); | ||
| 1458 | } | ||
| 1457 | } else if (!tref_isnum(tr)) { | 1459 | } else if (!tref_isnum(tr)) { |
| 1458 | tr = 0; | 1460 | tr = 0; |
| 1459 | } | 1461 | } |
