mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 00:20:55 +02:00
Update LuaJIT to LuaJIT/LuaJIT@7a0cf5f
This commit is contained in:
@@ -50,8 +50,6 @@
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -55,8 +55,6 @@ td.abiparam { font-weight: bold; width: 6em; }
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -55,8 +55,6 @@ td.convop { font-style: italic; width: 40%; }
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -57,8 +57,6 @@ td.idiomlua b { font-weight: normal; color: #2142bf; }
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -67,8 +67,6 @@ td.excinterop {
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -53,8 +53,6 @@ dd { margin-left: 1.5em; }
|
||||
</li><li>
|
||||
<a class="current" href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
@@ -65,8 +63,6 @@ dd { margin-left: 1.5em; }
|
||||
<ul style="padding: 0;">
|
||||
<li>The <a href="https://luajit.org/list.html"><span class="ext">»</span> LuaJIT mailing list</a> focuses on topics
|
||||
related to LuaJIT.</li>
|
||||
<li>The <a href="http://wiki.luajit.org/"><span class="ext">»</span> LuaJIT wiki</a> gathers community
|
||||
resources about LuaJIT.</li>
|
||||
<li>News about Lua itself can be found at the
|
||||
<a href="https://www.lua.org/lua-l.html"><span class="ext">»</span> Lua mailing list</a>.
|
||||
The mailing list archives are worth checking out for older postings
|
||||
|
||||
@@ -73,8 +73,6 @@ td.compatx {
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -135,8 +135,6 @@ table.feature small {
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -72,8 +72,6 @@ td.param_default {
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -53,8 +53,6 @@ ul li { padding-bottom: 0.3em; }
|
||||
</li><li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li><li>
|
||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||
</li><li>
|
||||
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
@@ -128,7 +128,7 @@ LJLIB_CF(buffer_method_put) LJLIB_REC(.)
|
||||
lj_strfmt_putfnum((SBuf *)sbx, STRFMT_G14, numV(o));
|
||||
} else if (tvisbuf(o)) {
|
||||
SBufExt *sbx2 = bufV(o);
|
||||
if (sbx2 == sbx) lj_err_arg(L, arg+1, LJ_ERR_BUFFER_SELF);
|
||||
if (sbx2 == sbx) lj_err_arg(L, (int)(arg+1), LJ_ERR_BUFFER_SELF);
|
||||
lj_buf_putmem((SBuf *)sbx, sbx2->r, sbufxlen(sbx2));
|
||||
} else if (!mo && !tvisnil(mo = lj_meta_lookup(L, o, MM_tostring))) {
|
||||
/* Call __tostring metamethod inline. */
|
||||
@@ -140,7 +140,7 @@ LJLIB_CF(buffer_method_put) LJLIB_REC(.)
|
||||
L->top = L->base + narg;
|
||||
goto retry; /* Retry with the result. */
|
||||
} else {
|
||||
lj_err_argtype(L, arg+1, "string/number/__tostring");
|
||||
lj_err_argtype(L, (int)(arg+1), "string/number/__tostring");
|
||||
}
|
||||
/* Probably not useful to inline other __tostring MMs, e.g. FFI numbers. */
|
||||
}
|
||||
@@ -169,7 +169,7 @@ LJLIB_CF(buffer_method_get) LJLIB_REC(.)
|
||||
for (arg = 1; arg < narg; arg++) {
|
||||
TValue *o = &L->base[arg];
|
||||
MSize n = tvisnil(o) ? LJ_MAX_BUF :
|
||||
(MSize) lj_lib_checkintrange(L, arg+1, 0, LJ_MAX_BUF);
|
||||
(MSize) lj_lib_checkintrange(L, (int)(arg+1), 0, LJ_MAX_BUF);
|
||||
MSize len = sbufxlen(sbx);
|
||||
if (n > len) n = len;
|
||||
setstrV(L, o, lj_str_new(L, sbx->r, n));
|
||||
@@ -177,7 +177,7 @@ LJLIB_CF(buffer_method_get) LJLIB_REC(.)
|
||||
}
|
||||
if (sbx->r == sbx->w && !sbufiscow(sbx)) sbx->r = sbx->w = sbx->b;
|
||||
lj_gc_check(L);
|
||||
return narg-1;
|
||||
return (int)(narg-1);
|
||||
}
|
||||
|
||||
#if LJ_HASFFI
|
||||
|
||||
@@ -93,6 +93,9 @@
|
||||
#elif defined(__CYGWIN__)
|
||||
#define LJ_TARGET_CYGWIN 1
|
||||
#define LUAJIT_OS LUAJIT_OS_POSIX
|
||||
#elif defined(__QNX__)
|
||||
#define LJ_TARGET_QNX 1
|
||||
#define LUAJIT_OS LUAJIT_OS_POSIX
|
||||
#else
|
||||
#define LUAJIT_OS LUAJIT_OS_OTHER
|
||||
#endif
|
||||
|
||||
@@ -1201,7 +1201,7 @@ dotypecheck:
|
||||
tmp = ra_scratch(as, allow);
|
||||
rset_clear(allow, tmp);
|
||||
}
|
||||
if (irt_isnum(t) && !(ir->op2 & IRSLOAD_CONVERT))
|
||||
if (ra_hasreg(dest) && irt_isnum(t) && !(ir->op2 & IRSLOAD_CONVERT))
|
||||
emit_dn(as, A64I_FMOV_D_R, (dest & 31), tmp);
|
||||
/* Need type check, even if the load result is unused. */
|
||||
asm_guardcc(as, irt_isnum(t) ? CC_LS : CC_NE);
|
||||
|
||||
@@ -777,6 +777,7 @@ LJ_NOINLINE void lj_err_mem(lua_State *L)
|
||||
{
|
||||
if (L->status == LUA_ERRERR+1) /* Don't touch the stack during lua_open. */
|
||||
lj_vm_unwind_c(L->cframe, LUA_ERRMEM);
|
||||
if (curr_funcisL(L)) L->top = curr_topL(L);
|
||||
setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRMEM));
|
||||
lj_err_throw(L, LUA_ERRMEM);
|
||||
}
|
||||
|
||||
@@ -1117,7 +1117,7 @@ static LJ_AINLINE TRef recff_sbufx_len(jit_State *J, TRef trr, TRef trw)
|
||||
}
|
||||
|
||||
/* Emit typecheck for string buffer. */
|
||||
static TRef recff_sbufx_check(jit_State *J, RecordFFData *rd, int arg)
|
||||
static TRef recff_sbufx_check(jit_State *J, RecordFFData *rd, ptrdiff_t arg)
|
||||
{
|
||||
TRef trtype, ud = J->base[arg];
|
||||
if (!tvisbuf(&rd->argv[arg])) lj_trace_err(J, LJ_TRERR_BADTYPE);
|
||||
@@ -1135,7 +1135,7 @@ static TRef recff_sbufx_write(jit_State *J, TRef ud)
|
||||
}
|
||||
|
||||
/* Check for integer in range for the buffer API. */
|
||||
static TRef recff_sbufx_checkint(jit_State *J, RecordFFData *rd, int arg)
|
||||
static TRef recff_sbufx_checkint(jit_State *J, RecordFFData *rd, ptrdiff_t arg)
|
||||
{
|
||||
TRef tr = J->base[arg];
|
||||
TRef trlim = lj_ir_kint(J, LJ_MAX_BUF);
|
||||
|
||||
@@ -125,7 +125,7 @@ static PRGR libfunc_rgr;
|
||||
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
|
||||
#define LJ_TARGET_HAS_GETENTROPY 1
|
||||
#endif
|
||||
#elif (LJ_TARGET_BSD && !defined(__NetBSD__)) || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN
|
||||
#elif (LJ_TARGET_BSD && !defined(__NetBSD__)) || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN || LJ_TARGET_QNX
|
||||
#define LJ_TARGET_HAS_GETENTROPY 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -185,7 +185,11 @@ static void profile_timer_start(ProfileState *ps)
|
||||
tm.it_value.tv_sec = tm.it_interval.tv_sec = interval / 1000;
|
||||
tm.it_value.tv_usec = tm.it_interval.tv_usec = (interval % 1000) * 1000;
|
||||
setitimer(ITIMER_PROF, &tm, NULL);
|
||||
#if LJ_TARGET_QNX
|
||||
sa.sa_flags = 0;
|
||||
#else
|
||||
sa.sa_flags = SA_RESTART;
|
||||
#endif
|
||||
sa.sa_handler = profile_signal;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(SIGPROF, &sa, &ps->oldsa);
|
||||
|
||||
@@ -1964,7 +1964,7 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
|
||||
vbase = emitir(IRT(IR_ADD, IRT_PGC), vbase, lj_ir_kint(J, frofs-8*(1+LJ_FR2)));
|
||||
for (i = 0; i < nload; i++) {
|
||||
IRType t = itype2irt(&J->L->base[i-1-LJ_FR2-nvararg]);
|
||||
J->base[dst+i] = lj_record_vload(J, vbase, i, t);
|
||||
J->base[dst+i] = lj_record_vload(J, vbase, (MSize)i, t);
|
||||
}
|
||||
} else {
|
||||
emitir(IRTGI(IR_LE), fr, lj_ir_kint(J, frofs));
|
||||
@@ -2572,7 +2572,8 @@ void lj_record_ins(jit_State *J)
|
||||
break;
|
||||
case BC_JLOOP:
|
||||
rec_loop_jit(J, rc, rec_loop(J, ra,
|
||||
!bc_isret(bc_op(traceref(J, rc)->startins))));
|
||||
!bc_isret(bc_op(traceref(J, rc)->startins)) &&
|
||||
bc_op(traceref(J, rc)->startins) != BC_ITERN));
|
||||
break;
|
||||
|
||||
case BC_IFORL:
|
||||
|
||||
Reference in New Issue
Block a user