aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2024-08-19 16:22:55 +0200
committerMike Pall <mike>2024-08-19 16:22:55 +0200
commitfddc9650d85ec6021c4e3509753b9a88766c5ae1 (patch)
treeef6aea51539d66fedfe7ab6555a265b00f3d1a5d
parentae4735f621d89d84758769b76432d2319dda9827 (diff)
parentbcc6cbb188e5e2e76d4aef2d48778202f65079dc (diff)
downloadluajit-fddc9650d85ec6021c4e3509753b9a88766c5ae1.tar.gz
luajit-fddc9650d85ec6021c4e3509753b9a88766c5ae1.tar.bz2
luajit-fddc9650d85ec6021c4e3509753b9a88766c5ae1.zip
Merge branch 'master' into v2.1
-rw-r--r--src/lj_asm_mips.h2
-rw-r--r--src/lj_gc.c5
-rw-r--r--src/lj_load.c3
3 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index 5b83e34d..2f64f491 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -456,7 +456,7 @@ static void asm_retf(ASMState *as, IRIns *ir)
456 emit_addptr(as, base, -8*delta); 456 emit_addptr(as, base, -8*delta);
457 asm_guard(as, MIPSI_BNE, RID_TMP, 457 asm_guard(as, MIPSI_BNE, RID_TMP,
458 ra_allock(as, igcptr(pc), rset_exclude(RSET_GPR, base))); 458 ra_allock(as, igcptr(pc), rset_exclude(RSET_GPR, base)));
459 emit_tsi(as, MIPSI_AL, RID_TMP, base, -8); 459 emit_tsi(as, MIPSI_AL, RID_TMP, base, (LJ_BE || LJ_FR2) ? -8 : -4);
460} 460}
461 461
462/* -- Buffer operations --------------------------------------------------- */ 462/* -- Buffer operations --------------------------------------------------- */
diff --git a/src/lj_gc.c b/src/lj_gc.c
index 9cabdef0..69e78706 100644
--- a/src/lj_gc.c
+++ b/src/lj_gc.c
@@ -604,12 +604,11 @@ void lj_gc_finalize_cdata(lua_State *L)
604/* Free all remaining GC objects. */ 604/* Free all remaining GC objects. */
605void lj_gc_freeall(global_State *g) 605void lj_gc_freeall(global_State *g)
606{ 606{
607 MSize i, strmask; 607 MSize i;
608 /* Free everything, except super-fixed objects (the main thread). */ 608 /* Free everything, except super-fixed objects (the main thread). */
609 g->gc.currentwhite = LJ_GC_WHITES | LJ_GC_SFIXED; 609 g->gc.currentwhite = LJ_GC_WHITES | LJ_GC_SFIXED;
610 gc_fullsweep(g, &g->gc.root); 610 gc_fullsweep(g, &g->gc.root);
611 strmask = g->str.mask; 611 for (i = g->str.mask; i != ~(MSize)0; i--) /* Free all string hash chains. */
612 for (i = 0; i <= strmask; i++) /* Free all string hash chains. */
613 gc_sweepstr(g, &g->str.tab[i]); 612 gc_sweepstr(g, &g->str.tab[i]);
614} 613}
615 614
diff --git a/src/lj_load.c b/src/lj_load.c
index 152ef6da..fa6ed5bf 100644
--- a/src/lj_load.c
+++ b/src/lj_load.c
@@ -102,12 +102,13 @@ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename,
102 int status; 102 int status;
103 const char *chunkname; 103 const char *chunkname;
104 if (filename) { 104 if (filename) {
105 chunkname = lua_pushfstring(L, "@%s", filename);
105 ctx.fp = fopen(filename, "rb"); 106 ctx.fp = fopen(filename, "rb");
106 if (ctx.fp == NULL) { 107 if (ctx.fp == NULL) {
108 L->top--;
107 lua_pushfstring(L, "cannot open %s: %s", filename, strerror(errno)); 109 lua_pushfstring(L, "cannot open %s: %s", filename, strerror(errno));
108 return LUA_ERRFILE; 110 return LUA_ERRFILE;
109 } 111 }
110 chunkname = lua_pushfstring(L, "@%s", filename);
111 } else { 112 } else {
112 ctx.fp = stdin; 113 ctx.fp = stdin;
113 chunkname = "=stdin"; 114 chunkname = "=stdin";