Skip to content

Commit

Permalink
deps src: Automatic update
Browse files Browse the repository at this point in the history
  • Loading branch information
marvim committed Sep 22, 2023
1 parent b875a64 commit 3b9822a
Show file tree
Hide file tree
Showing 19 changed files with 123 additions and 74 deletions.
34 changes: 17 additions & 17 deletions src/luajit-stamp/download-luajit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ function(check_file_hash has_hash hash_is_good)
set("${has_hash}" TRUE PARENT_SCOPE)

message(STATUS "verifying file...
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz'")
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz'")

file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz" actual_value)
file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz" actual_value)

if(NOT "${actual_value}" STREQUAL "f28030c61602bffd28a445f3fef23198264a845aab94d909587bac6c12c8b874")
if(NOT "${actual_value}" STREQUAL "7d4dd85cbf224c70f2014203903202a90f3cfe7b1c6e7b1b36f8ae472dfc7fba")
set("${hash_is_good}" FALSE PARENT_SCOPE)
message(STATUS "SHA256 hash of
/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz
/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz
does not match expected value
expected: 'f28030c61602bffd28a445f3fef23198264a845aab94d909587bac6c12c8b874'
expected: '7d4dd85cbf224c70f2014203903202a90f3cfe7b1c6e7b1b36f8ae472dfc7fba'
actual: '${actual_value}'")
else()
set("${hash_is_good}" TRUE PARENT_SCOPE)
Expand Down Expand Up @@ -71,40 +71,40 @@ function(sleep_before_download attempt)
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep "${sleep_seconds}")
endfunction()

if("/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz" STREQUAL "")
if("/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz" STREQUAL "")
message(FATAL_ERROR "LOCAL can't be empty")
endif()

if("https://github.com/LuaJIT/LuaJIT/archive/e897c5743f97a6b05c59852709092e7da4119914.tar.gz" STREQUAL "")
if("https://github.com/LuaJIT/LuaJIT/archive/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz" STREQUAL "")
message(FATAL_ERROR "REMOTE can't be empty")
endif()

if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz")
if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz")
check_file_hash(has_hash hash_is_good)
if(has_hash)
if(hash_is_good)
message(STATUS "File already exists and hash match (skip download):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz'
SHA256='f28030c61602bffd28a445f3fef23198264a845aab94d909587bac6c12c8b874'"
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz'
SHA256='7d4dd85cbf224c70f2014203903202a90f3cfe7b1c6e7b1b36f8ae472dfc7fba'"
)
return()
else()
message(STATUS "File already exists but hash mismatch. Removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz")
endif()
else()
message(STATUS "File already exists but no hash specified (use URL_HASH):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz'
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz'
Old file will be removed and new file downloaded from URL."
)
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz")
endif()
endif()

set(retry_number 5)

message(STATUS "Downloading...
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz'
dst='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz'
timeout='none'
inactivity timeout='none'"
)
Expand All @@ -115,7 +115,7 @@ foreach(i RANGE ${retry_number})
if(status_code IN_LIST download_retry_codes)
sleep_before_download(${i})
endif()
foreach(url https://github.com/LuaJIT/LuaJIT/archive/e897c5743f97a6b05c59852709092e7da4119914.tar.gz)
foreach(url https://github.com/LuaJIT/LuaJIT/archive/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz)
if(NOT url IN_LIST skip_url_list)
message(STATUS "Using src='${url}'")

Expand All @@ -126,7 +126,7 @@ foreach(i RANGE ${retry_number})

file(
DOWNLOAD
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz"
"${url}" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz"

# no TIMEOUT
# no INACTIVITY_TIMEOUT
Expand All @@ -143,7 +143,7 @@ foreach(i RANGE ${retry_number})
check_file_hash(has_hash hash_is_good)
if(has_hash AND NOT hash_is_good)
message(STATUS "Hash mismatch, removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz")
else()
message(STATUS "Downloading... done")
return()
Expand Down
2 changes: 1 addition & 1 deletion src/luajit-stamp/extract-luajit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.5)

# Make file names absolute:
#
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/e897c5743f97a6b05c59852709092e7da4119914.tar.gz" ABSOLUTE)
get_filename_component(filename "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz" ABSOLUTE)
get_filename_component(directory "/home/runner/work/deps/deps/neovim/deps/build/src/luajit" ABSOLUTE)

message(STATUS "extracting...
Expand Down
4 changes: 2 additions & 2 deletions src/luajit-stamp/luajit-urlinfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ method=url
command=/usr/local/bin/cmake;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/download-luajit.cmake;COMMAND;/usr/local/bin/cmake;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/verify-luajit.cmake;COMMAND;/usr/local/bin/cmake;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/extract-luajit.cmake
source_dir=/home/runner/work/deps/deps/neovim/deps/build/src/luajit
work_dir=/home/runner/work/deps/deps/neovim/deps/build/src
url(s)=https://github.com/LuaJIT/LuaJIT/archive/e897c5743f97a6b05c59852709092e7da4119914.tar.gz
hash=SHA256=f28030c61602bffd28a445f3fef23198264a845aab94d909587bac6c12c8b874
url(s)=https://github.com/LuaJIT/LuaJIT/archive/d1a2fef8a8f53b0055ee041f7f63d83a27444ffa.tar.gz
hash=SHA256=7d4dd85cbf224c70f2014203903202a90f3cfe7b1c6e7b1b36f8ae472dfc7fba
no_extract=

2 changes: 1 addition & 1 deletion src/luajit/.relver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1694940244
1695266395
5 changes: 4 additions & 1 deletion src/luajit/src/lib_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,10 @@ static int ffh_resume(lua_State *L, lua_State *co, int wrap)
setstrV(L, L->base-LJ_FR2, lj_err_str(L, em));
return FFH_RES(2);
}
lj_state_growstack(co, (MSize)(L->top - L->base));
if (lj_state_cpgrowstack(co, (MSize)(L->top - L->base)) != LUA_OK) {
cTValue *msg = --co->top;
lj_err_callermsg(L, strVdata(msg));
}
return FFH_RETRY;
}

Expand Down
7 changes: 6 additions & 1 deletion src/luajit/src/lj_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ LUA_API int lua_checkstack(lua_State *L, int size)
if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) {
return 0; /* Stack overflow. */
} else if (size > 0) {
lj_state_checkstack(L, (MSize)size);
int avail = (int)(mref(L->maxstack, TValue) - L->top);
if (size > avail &&
lj_state_cpgrowstack(L, (MSize)(size - avail)) != LUA_OK) {
L->top--;
return 0; /* Out of memory. */
}
}
return 1;
}
Expand Down
32 changes: 16 additions & 16 deletions src/luajit/src/lj_asm_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ static uint32_t asm_fuseopm(ASMState *as, A64Ins ai, IRRef ref, RegSet allow)
return A64F_M(ir->r);
} else if (irref_isk(ref)) {
int64_t k = get_k64val(as, ref);
uint32_t m = logical ? emit_isk13(k, irt_is64(ir->t)) : emit_isk12(k);
uint32_t m = logical ? emit_isk13(k, irt_is64(ir->t)) :
emit_isk12(irt_is64(ir->t) ? k : (int32_t)k);
if (m)
return m;
} else if (mayfuse(as, ref)) {
Expand Down Expand Up @@ -786,7 +787,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
int destused = ra_used(ir);
Reg dest = ra_dest(as, ir, allow);
Reg tab = ra_alloc1(as, ir->op1, rset_clear(allow, dest));
Reg key = 0, tmp = RID_TMP, type = RID_NONE, tkey;
Reg tmp = RID_TMP, type = RID_NONE, key, tkey;
IRRef refkey = ir->op2;
IRIns *irkey = IR(refkey);
int isk = irref_isk(refkey);
Expand All @@ -796,26 +797,22 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
MCLabel l_end, l_loop;
rset_clear(allow, tab);

/* Allocate registers outside of the loop. */
if (irkey->o != IR_KNUM || !(k = emit_isk12((int64_t)ir_knum(irkey)->u64))) {
key = ra_alloc1(as, refkey, irt_isnum(kt) ? RSET_FPR : allow);
rset_clear(allow, key);
}
if (!isk) {
tkey = ra_scratch(as, allow);
rset_clear(allow, tkey);
} else if (irt_isnum(kt)) {
tkey = key; /* Assumes -0.0 is already canonicalized to +0.0. */
} else {
/* Allocate register for tkey outside of the loop. */
if (isk) {
int64_t kk;
if (irt_isaddr(kt)) {
kk = ((int64_t)irt_toitype(kt) << 47) | irkey[1].tv.u64;
} else if (irt_isnum(kt)) {
kk = (int64_t)ir_knum(irkey)->u64;
/* Assumes -0.0 is already canonicalized to +0.0. */
} else {
lj_assertA(irt_ispri(kt) && !irt_isnil(kt), "bad HREF key type");
kk = ~((int64_t)~irt_toitype(kt) << 47);
}
tkey = ra_allock(as, kk, allow);
rset_clear(allow, tkey);
k = emit_isk12(kk);
tkey = k ? 0 : ra_allock(as, kk, allow);
} else {
tkey = ra_scratch(as, allow);
}

/* Key not found in chain: jump to exit (if merged) or load niltv. */
Expand Down Expand Up @@ -848,10 +845,13 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
/* Construct tkey as canonicalized or tagged key. */
if (!isk) {
if (irt_isnum(kt)) {
key = ra_alloc1(as, refkey, RSET_FPR);
emit_dnm(as, A64I_CSELx | A64F_CC(CC_EQ), tkey, RID_ZERO, tkey);
/* A64I_FMOV_R_D from key to tkey done below. */
} else {
lj_assertA(irt_isaddr(kt), "bad HREF key type");
type = ra_allock(as, irt_toitype(kt) << 15, allow);
key = ra_alloc1(as, refkey, allow);
type = ra_allock(as, irt_toitype(kt) << 15, rset_clear(allow, key));
emit_dnm(as, A64I_ADDx | A64F_SH(A64SH_LSL, 32), tkey, key, type);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/luajit/src/lj_asm_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ static IRRef asm_fuseabase(ASMState *as, IRRef ref)
}
} else if (irb->o == IR_ADD && irref_isk(irb->op2)) {
/* Fuse base offset (vararg load). */
as->mrm.ofs = IR(irb->op2)->i;
IRIns *irk = IR(irb->op2);
as->mrm.ofs = irk->o == IR_KINT ? irk->i : (int32_t)ir_kint64(irk)->u64;
return irb->op1;
}
return ref; /* Otherwise use the given array base. */
Expand Down
2 changes: 1 addition & 1 deletion src/luajit/src/lj_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ typedef unsigned int uintptr_t;
#define LJ_MAX_UPVAL 60 /* Max. # of upvalues. */

#define LJ_MAX_IDXCHAIN 100 /* __index/__newindex chain limit. */
#define LJ_STACK_EXTRA (5+2*LJ_FR2) /* Extra stack space (metamethods). */
#define LJ_STACK_EXTRA (5+3*LJ_FR2) /* Extra stack space (metamethods). */

#define LJ_NUM_CBPAGE 1 /* Number of FFI callback pages. */

Expand Down
2 changes: 1 addition & 1 deletion src/luajit/src/lj_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ static int call_init(lua_State *L, GCfunc *fn)
int numparams = pt->numparams;
int gotparams = (int)(L->top - L->base);
int need = pt->framesize;
if ((pt->flags & PROTO_VARARG)) need += 1+gotparams;
if ((pt->flags & PROTO_VARARG)) need += 1+LJ_FR2+gotparams;
lj_state_checkstack(L, (MSize)need);
numparams -= gotparams;
return numparams >= 0 ? numparams : 0;
Expand Down
5 changes: 4 additions & 1 deletion src/luajit/src/lj_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,15 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode)
case FRAME_PCALL: /* FF pcall() frame. */
case FRAME_PCALLH: /* FF pcall() frame inside hook. */
if (errcode) {
global_State *g;
if (errcode == LUA_YIELD) {
frame = frame_prevd(frame);
break;
}
g = G(L);
setgcref(g->cur_L, obj2gco(L));
if (frame_typep(frame) == FRAME_PCALL)
hook_leave(G(L));
hook_leave(g);
L->base = frame_prevd(frame) + 1;
L->cframe = cf;
unwindstack(L, L->base);
Expand Down
23 changes: 11 additions & 12 deletions src/luajit/src/lj_ffrecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ static TRef recff_sbufx_check(jit_State *J, RecordFFData *rd, ptrdiff_t arg)
/* Emit BUFHDR for write to extended string buffer. */
static TRef recff_sbufx_write(jit_State *J, TRef ud)
{
TRef trbuf = emitir(IRT(IR_ADD, IRT_PGC), ud, lj_ir_kint(J, sizeof(GCudata)));
TRef trbuf = emitir(IRT(IR_ADD, IRT_PGC), ud, lj_ir_kintpgc(J, sizeof(GCudata)));
return emitir(IRT(IR_BUFHDR, IRT_PGC), trbuf, IRBUFHDR_WRITE);
}

Expand Down Expand Up @@ -1164,20 +1164,19 @@ static void LJ_FASTCALL recff_buffer_method_reset(jit_State *J, RecordFFData *rd
SBufExt *sbx = bufV(&rd->argv[0]);
int iscow = (int)sbufiscow(sbx);
TRef trl = recff_sbufx_get_L(J, ud);
TRef trcow = emitir(IRT(IR_BAND, IRT_IGC), trl, lj_ir_kint(J, SBUF_FLAG_COW));
TRef zero = lj_ir_kint(J, 0);
emitir(IRTG(iscow ? IR_NE : IR_EQ, IRT_IGC), trcow, zero);
TRef trcow = emitir(IRT(IR_BAND, IRT_IGC), trl, lj_ir_kintpgc(J, SBUF_FLAG_COW));
TRef zeropgc = lj_ir_kintpgc(J, 0);
emitir(IRTG(iscow ? IR_NE : IR_EQ, IRT_IGC), trcow, zeropgc);
if (iscow) {
trl = emitir(IRT(IR_BXOR, IRT_IGC), trl,
LJ_GC64 ? lj_ir_kint64(J, SBUF_FLAG_COW) :
lj_ir_kint(J, SBUF_FLAG_COW));
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_W, zero);
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_E, zero);
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_B, zero);
TRef zerop = lj_ir_kintp(J, 0);
trl = emitir(IRT(IR_BXOR, IRT_IGC), trl, lj_ir_kintpgc(J, SBUF_FLAG_COW));
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_W, zerop);
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_E, zerop);
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_B, zerop);
recff_sbufx_set_L(J, ud, trl);
emitir(IRT(IR_FSTORE, IRT_PGC),
emitir(IRT(IR_FREF, IRT_PGC), ud, IRFL_SBUF_REF), zero);
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_R, zero);
emitir(IRT(IR_FREF, IRT_PGC), ud, IRFL_SBUF_REF), zeropgc);
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_R, zerop);
} else {
TRef trb = recff_sbufx_get_ptr(J, ud, IRFL_SBUF_B);
recff_sbufx_set_ptr(J, ud, IRFL_SBUF_W, trb);
Expand Down
6 changes: 6 additions & 0 deletions src/luajit/src/lj_iropt.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ LJ_FUNC TRef lj_ir_ktrace(jit_State *J);
#define lj_ir_kintp(J, k) lj_ir_kint(J, (int32_t)(k))
#endif

#if LJ_GC64
#define lj_ir_kintpgc lj_ir_kintp
#else
#define lj_ir_kintpgc lj_ir_kint
#endif

static LJ_AINLINE TRef lj_ir_knum(jit_State *J, lua_Number n)
{
TValue tv;
Expand Down
14 changes: 9 additions & 5 deletions src/luajit/src/lj_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ static TRef rec_upvalue(jit_State *J, uint32_t uv, TRef val)
emitir(IRTG(IR_EQ, IRT_PGC),
REF_BASE,
emitir(IRT(IR_ADD, IRT_PGC), uref,
lj_ir_kint(J, (slot - 1 - LJ_FR2) * -8)));
lj_ir_kintpgc(J, (slot - 1 - LJ_FR2) * -8)));
slot -= (int32_t)J->baseslot; /* Note: slot number may be negative! */
if (val == 0) {
return getslot(J, slot);
Expand All @@ -1794,7 +1794,7 @@ static TRef rec_upvalue(jit_State *J, uint32_t uv, TRef val)
}
emitir(IRTG(IR_UGT, IRT_PGC),
emitir(IRT(IR_SUB, IRT_PGC), uref, REF_BASE),
lj_ir_kint(J, (J->baseslot + J->maxslot) * 8));
lj_ir_kintpgc(J, (J->baseslot + J->maxslot) * 8));
} else {
needbarrier = 1;
uref = tref_ref(emitir(IRTG(IR_UREFC, IRT_PGC), fn, uv));
Expand Down Expand Up @@ -1972,7 +1972,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
emitir(IRTGI(IR_EQ), fr,
lj_ir_kint(J, (int32_t)frame_ftsz(J->L->base-1)));
vbase = emitir(IRT(IR_SUB, IRT_IGC), REF_BASE, fr);
vbase = emitir(IRT(IR_ADD, IRT_PGC), vbase, lj_ir_kint(J, frofs-8*(1+LJ_FR2)));
vbase = emitir(IRT(IR_ADD, IRT_PGC), vbase,
lj_ir_kintpgc(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, (MSize)i, t);
Expand All @@ -1991,8 +1992,11 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
TRef tr = TREF_NIL;
ptrdiff_t idx = lj_ffrecord_select_mode(J, tridx, &J->L->base[dst-1]);
if (idx < 0) goto nyivarg;
if (idx != 0 && !tref_isinteger(tridx))
if (idx != 0 && !tref_isinteger(tridx)) {
if (tref_isstr(tridx))
tridx = emitir(IRTG(IR_STRTO, IRT_NUM), tridx, 0);
tridx = emitir(IRTGI(IR_CONV), tridx, IRCONV_INT_NUM|IRCONV_INDEX);
}
if (idx != 0 && tref_isk(tridx)) {
emitir(IRTGI(idx <= nvararg ? IR_GE : IR_LT),
fr, lj_ir_kint(J, frofs+8*(int32_t)idx));
Expand Down Expand Up @@ -2020,7 +2024,7 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
IRType t;
TRef aref, vbase = emitir(IRT(IR_SUB, IRT_IGC), REF_BASE, fr);
vbase = emitir(IRT(IR_ADD, IRT_PGC), vbase,
lj_ir_kint(J, frofs-(8<<LJ_FR2)));
lj_ir_kintpgc(J, frofs-(8<<LJ_FR2)));
t = itype2irt(&J->L->base[idx-2-LJ_FR2-nvararg]);
aref = emitir(IRT(IR_AREF, IRT_PGC), vbase, tridx);
tr = lj_record_vload(J, aref, 0, t);
Expand Down
Loading

0 comments on commit 3b9822a

Please sign in to comment.