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 Nov 30, 2024
1 parent b63bff4 commit 151a855
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 41 deletions.
30 changes: 15 additions & 15 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(VERBOSE "verifying file...
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz'")
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz'")

file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz" actual_value)
file("SHA256" "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz" actual_value)

if(NOT "${actual_value}" STREQUAL "92325f209b21aaf0a67b099bc73cf9bbac5789a9749bdc3898d4a990abb4f36e")
if(NOT "${actual_value}" STREQUAL "e91acbe181cf6ffa3ef15870b8e620131002240ba24c5c779fd0131db021517f")
set("${hash_is_good}" FALSE PARENT_SCOPE)
message(VERBOSE "SHA256 hash of
/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz
/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz
does not match expected value
expected: '92325f209b21aaf0a67b099bc73cf9bbac5789a9749bdc3898d4a990abb4f36e'
expected: 'e91acbe181cf6ffa3ef15870b8e620131002240ba24c5c779fd0131db021517f'
actual: '${actual_value}'")
else()
set("${hash_is_good}" TRUE PARENT_SCOPE)
Expand Down Expand Up @@ -71,32 +71,32 @@ function(sleep_before_download attempt)
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep "${sleep_seconds}")
endfunction()

if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz")
if(EXISTS "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz")
check_file_hash(has_hash hash_is_good)
if(has_hash)
if(hash_is_good)
message(VERBOSE "File already exists and hash match (skip download):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz'
SHA256='92325f209b21aaf0a67b099bc73cf9bbac5789a9749bdc3898d4a990abb4f36e'"
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz'
SHA256='e91acbe181cf6ffa3ef15870b8e620131002240ba24c5c779fd0131db021517f'"
)
return()
else()
message(VERBOSE "File already exists but hash mismatch. Removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz")
endif()
else()
message(VERBOSE "File already exists but no hash specified (use URL_HASH):
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz'
file='/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.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/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz")
endif()
endif()

set(retry_number 5)

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

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

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

# no TIMEOUT
# no INACTIVITY_TIMEOUT
Expand All @@ -136,7 +136,7 @@ foreach(i RANGE ${retry_number})
check_file_hash(has_hash hash_is_good)
if(has_hash AND NOT hash_is_good)
message(VERBOSE "Hash mismatch, removing...")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz")
file(REMOVE "/home/runner/work/deps/deps/neovim/deps/build/downloads/luajit/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz")
else()
message(VERBOSE "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 ${CMAKE_VERSION}) # this file comes with cmake

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

message(VERBOSE "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;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/download-luajit.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-P;/home/runner/work/deps/deps/neovim/deps/build/src/luajit-stamp/verify-luajit.cmake;COMMAND;/usr/local/bin/cmake;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-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/fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059.tar.gz
hash=SHA256=92325f209b21aaf0a67b099bc73cf9bbac5789a9749bdc3898d4a990abb4f36e
url(s)=https://github.com/LuaJIT/LuaJIT/archive/19878ec05c239ccaf5f3d17af27670a963e25b8b.tar.gz
hash=SHA256=e91acbe181cf6ffa3ef15870b8e620131002240ba24c5c779fd0131db021517f
no_extract=

2 changes: 1 addition & 1 deletion src/luajit/.relver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1731601260
1732813678
4 changes: 2 additions & 2 deletions src/luajit/src/lj_asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,11 @@ static int asm_sunk_store(ASMState *as, IRIns *ira, IRIns *irs)
static void asm_snap_alloc1(ASMState *as, IRRef ref)
{
IRIns *ir = IR(ref);
if (!irref_isk(ref) && ir->r != RID_SUNK) {
if (!irref_isk(ref)) {
bloomset(as->snapfilt1, ref);
bloomset(as->snapfilt2, hashrot(ref, ref + HASH_BIAS));
if (ra_used(ir)) return;
if (ir->r == RID_SINK) {
if (ir->r == RID_SINK || ir->r == RID_SUNK) {
ir->r = RID_SUNK;
#if LJ_HASFFI
if (ir->o == IR_CNEWI) { /* Allocate CNEWI value. */
Expand Down
51 changes: 33 additions & 18 deletions src/luajit/src/lj_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,25 +2080,19 @@ static TRef rec_tnew(jit_State *J, uint32_t ah)

typedef struct RecCatDataCP {
jit_State *J;
RecordIndex *ix;
BCReg baseslot, topslot;
TRef tr;
} RecCatDataCP;

static TValue *rec_mm_concat_cp(lua_State *L, lua_CFunction dummy, void *ud)
{
RecCatDataCP *rcd = (RecCatDataCP *)ud;
UNUSED(L); UNUSED(dummy);
rec_mm_arith(rcd->J, rcd->ix, MM_concat); /* Call __concat metamethod. */
return NULL;
}

static TRef rec_cat(jit_State *J, BCReg baseslot, BCReg topslot)
{
jit_State *J = rcd->J;
BCReg baseslot = rcd->baseslot, topslot = rcd->topslot;
TRef *top = &J->base[topslot];
TValue savetv[5+LJ_FR2];
BCReg s;
RecordIndex ix;
RecCatDataCP rcd;
int errcode;
UNUSED(L); UNUSED(dummy);
lj_assertJ(baseslot < topslot, "bad CAT arg");
for (s = baseslot; s <= topslot; s++)
(void)getslot(J, s); /* Ensure all arguments have a reference. */
Expand All @@ -2120,7 +2114,10 @@ static TRef rec_cat(jit_State *J, BCReg baseslot, BCReg topslot)
} while (trp <= top);
tr = emitir(IRTG(IR_BUFSTR, IRT_STR), tr, hdr);
J->maxslot = (BCReg)(xbase - J->base);
if (xbase == base) return tr; /* Return simple concatenation result. */
if (xbase == base) {
rcd->tr = tr; /* Return simple concatenation result. */
return NULL;
}
/* Pass partial result. */
topslot = J->maxslot--;
*xbase = tr;
Expand All @@ -2133,13 +2130,31 @@ static TRef rec_cat(jit_State *J, BCReg baseslot, BCReg topslot)
copyTV(J->L, &ix.tabv, &J->L->base[topslot-1]);
ix.tab = top[-1];
ix.key = top[0];
memcpy(savetv, &J->L->base[topslot-1], sizeof(savetv)); /* Save slots. */
rec_mm_arith(J, &ix, MM_concat); /* Call __concat metamethod. */
rcd->tr = 0; /* No result yet. */
return NULL;
}

static TRef rec_cat(jit_State *J, BCReg baseslot, BCReg topslot)
{
lua_State *L = J->L;
ptrdiff_t delta = L->top - L->base;
TValue savetv[5+LJ_FR2], errobj;
RecCatDataCP rcd;
int errcode;
rcd.J = J;
rcd.ix = &ix;
errcode = lj_vm_cpcall(J->L, NULL, &rcd, rec_mm_concat_cp);
memcpy(&J->L->base[topslot-1], savetv, sizeof(savetv)); /* Restore slots. */
if (errcode) return (TRef)(-errcode);
return 0; /* No result yet. */
rcd.baseslot = baseslot;
rcd.topslot = topslot;
memcpy(savetv, &L->base[topslot-1], sizeof(savetv)); /* Save slots. */
errcode = lj_vm_cpcall(L, NULL, &rcd, rec_mm_concat_cp);
if (errcode) copyTV(L, &errobj, L->top-1);
memcpy(&L->base[topslot-1], savetv, sizeof(savetv)); /* Restore slots. */
if (errcode) {
L->top = L->base + delta;
copyTV(L, L->top++, &errobj);
return (TRef)(-errcode);
}
return rcd.tr;
}

/* -- Record bytecode ops ------------------------------------------------- */
Expand Down
5 changes: 3 additions & 2 deletions src/luajit/src/vm_mips64.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -1420,9 +1420,10 @@ static void build_subroutines(BuildCtx *ctx)
| sltu AT, TMP1, TMP2
| bnez AT, ->fff_fallback
|. lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH)
| daddiu NARGS8:RC, NARGS8:RC, -8
| bltz NARGS8:RC, ->fff_fallback
| daddiu NARGS8:TMP0, NARGS8:RC, -8
| bltz NARGS8:TMP0, ->fff_fallback
|. move TMP2, BASE
| move NARGS8:RC, NARGS8:TMP0
| daddiu BASE, BASE, 16
| // Remember active hook before pcall.
| srl TMP3, TMP3, HOOK_ACTIVE_SHIFT
Expand Down

0 comments on commit 151a855

Please sign in to comment.