mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 22:13:25 +00:00
Merge remote-tracking branch 'upstream/v2.1' into v2.1
This commit is contained in:
commit
3a272e5e51
6
Makefile
6
Makefile
@ -33,7 +33,8 @@ DPREFIX= $(DESTDIR)$(PREFIX)
|
|||||||
INSTALL_BIN= $(DPREFIX)/bin
|
INSTALL_BIN= $(DPREFIX)/bin
|
||||||
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
|
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
|
||||||
INSTALL_SHARE= $(DPREFIX)/share
|
INSTALL_SHARE= $(DPREFIX)/share
|
||||||
INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
|
INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
|
||||||
|
INSTALL_INC= $(INSTALL_DEFINC)
|
||||||
|
|
||||||
INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
|
INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
|
||||||
INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
|
INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
|
||||||
@ -78,6 +79,9 @@ UNINSTALL= $(RM)
|
|||||||
LDCONFIG= ldconfig -n 2>/dev/null
|
LDCONFIG= ldconfig -n 2>/dev/null
|
||||||
SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
|
SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
|
||||||
-e "s|^multilib=.*|multilib=$(MULTILIB)|"
|
-e "s|^multilib=.*|multilib=$(MULTILIB)|"
|
||||||
|
ifneq ($(INSTALL_DEFINC),$(INSTALL_INC))
|
||||||
|
SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|"
|
||||||
|
endif
|
||||||
|
|
||||||
FILE_T= luajit
|
FILE_T= luajit
|
||||||
FILE_A= libluajit.a
|
FILE_A= libluajit.a
|
||||||
|
@ -50,8 +50,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,8 +61,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,8 +50,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,8 +50,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,8 +55,6 @@ td.abiparam { font-weight: bold; width: 6em; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,8 +55,6 @@ td.convop { font-style: italic; width: 40%; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,8 +57,6 @@ td.idiomlua b { font-weight: normal; color: #2142bf; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,8 +50,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,8 +50,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,8 +67,6 @@ td.excinterop {
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,8 +53,6 @@ dd { margin-left: 1.5em; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a class="current" href="faq.html">FAQ</a>
|
<a class="current" href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
@ -65,8 +63,6 @@ dd { margin-left: 1.5em; }
|
|||||||
<ul style="padding: 0;">
|
<ul style="padding: 0;">
|
||||||
<li>The <a href="https://luajit.org/list.html"><span class="ext">»</span> LuaJIT mailing list</a> focuses on topics
|
<li>The <a href="https://luajit.org/list.html"><span class="ext">»</span> LuaJIT mailing list</a> focuses on topics
|
||||||
related to LuaJIT.</li>
|
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
|
<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>.
|
<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
|
The mailing list archives are worth checking out for older postings
|
||||||
|
@ -73,8 +73,6 @@ td.compatx {
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -135,8 +135,6 @@ table.feature small {
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,8 +72,6 @@ td.param_default {
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
@ -111,6 +109,7 @@ are accepted:
|
|||||||
<li><tt>-t type</tt> — Set output file type (default: auto-detect from output name).</li>
|
<li><tt>-t type</tt> — Set output file type (default: auto-detect from output name).</li>
|
||||||
<li><tt>-a arch</tt> — Override architecture for object files (default: native).</li>
|
<li><tt>-a arch</tt> — Override architecture for object files (default: native).</li>
|
||||||
<li><tt>-o os</tt> — Override OS for object files (default: native).</li>
|
<li><tt>-o os</tt> — Override OS for object files (default: native).</li>
|
||||||
|
<li><tt>-F name</tt> — Override filename (default: input filename).</li>
|
||||||
<li><tt>-e chunk</tt> — Use chunk string as input.</li>
|
<li><tt>-e chunk</tt> — Use chunk string as input.</li>
|
||||||
<li><tt>-</tt> (a single minus sign) — Use stdin as input and/or stdout as output.</li>
|
<li><tt>-</tt> (a single minus sign) — Use stdin as input and/or stdout as output.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -53,8 +53,6 @@ ul li { padding-bottom: 0.3em; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="faq.html">FAQ</a>
|
<a href="faq.html">FAQ</a>
|
||||||
</li><li>
|
</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>
|
<a href="https://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,6 +34,7 @@ Save LuaJIT bytecode: luajit -b[options] input output
|
|||||||
-t type Set output file type (default: auto-detect from output name).
|
-t type Set output file type (default: auto-detect from output name).
|
||||||
-a arch Override architecture for object files (default: native).
|
-a arch Override architecture for object files (default: native).
|
||||||
-o os Override OS for object files (default: native).
|
-o os Override OS for object files (default: native).
|
||||||
|
-F name Override filename (default: input filename).
|
||||||
-e chunk Use chunk string as input.
|
-e chunk Use chunk string as input.
|
||||||
-- Stop handling options.
|
-- Stop handling options.
|
||||||
- Use stdin as input and/or stdout as output.
|
- Use stdin as input and/or stdout as output.
|
||||||
@ -50,13 +51,22 @@ local function check(ok, ...)
|
|||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function readfile(input, filename)
|
local function readfile(ctx, input)
|
||||||
if type(input) == "function" then return input end
|
if type(input) == "function" then return input end
|
||||||
|
if ctx.filename then
|
||||||
|
local data
|
||||||
|
if input == "-" then
|
||||||
|
data = io.stdin:read("*a")
|
||||||
|
else
|
||||||
|
local fp = assert(io.open(input, "rb"))
|
||||||
|
data = assert(fp:read("*a"))
|
||||||
|
assert(fp:close())
|
||||||
|
end
|
||||||
|
return check(load(data, ctx.filename))
|
||||||
|
else
|
||||||
if input == "-" then input = nil end
|
if input == "-" then input = nil end
|
||||||
local f = assert(io.open(input, "r"))
|
return check(loadfile(input))
|
||||||
local src = f:read("*all")
|
end
|
||||||
f:close()
|
|
||||||
return check(loadstring(src, filename))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function savefile(name, mode)
|
local function savefile(name, mode)
|
||||||
@ -608,13 +618,13 @@ end
|
|||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function bclist(input, output, filename)
|
local function bclist(ctx, input, output)
|
||||||
local f = readfile(input, filename)
|
local f = readfile(ctx, input)
|
||||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function bcsave(ctx, input, output, filename)
|
local function bcsave(ctx, input, output)
|
||||||
local f = readfile(input, filename)
|
local f = readfile(ctx, input)
|
||||||
local s = string.dump(f, ctx.strip)
|
local s = string.dump(f, ctx.strip)
|
||||||
local t = ctx.type
|
local t = ctx.type
|
||||||
if not t then
|
if not t then
|
||||||
@ -668,8 +678,8 @@ local function docmd(...)
|
|||||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||||
elseif opt == "o" then
|
elseif opt == "o" then
|
||||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||||
elseif opt == "f" then
|
elseif opt == "F" then
|
||||||
filename = tremove(arg, n)
|
ctx.filename = "@"..tremove(arg, n)
|
||||||
else
|
else
|
||||||
usage()
|
usage()
|
||||||
end
|
end
|
||||||
@ -681,7 +691,7 @@ local function docmd(...)
|
|||||||
end
|
end
|
||||||
if list then
|
if list then
|
||||||
if #arg == 0 or #arg > 2 then usage() end
|
if #arg == 0 or #arg > 2 then usage() end
|
||||||
bclist(arg[1], arg[2] or "-", filename or arg[1])
|
bclist(ctx, arg[1], arg[2] or "-")
|
||||||
else
|
else
|
||||||
if #arg ~= 2 then usage() end
|
if #arg ~= 2 then usage() end
|
||||||
bcsave(ctx, arg[1], arg[2], filename or arg[1])
|
bcsave(ctx, arg[1], arg[2], filename or arg[1])
|
||||||
|
@ -128,7 +128,7 @@ LJLIB_CF(buffer_method_put) LJLIB_REC(.)
|
|||||||
lj_strfmt_putfnum((SBuf *)sbx, STRFMT_G14, numV(o));
|
lj_strfmt_putfnum((SBuf *)sbx, STRFMT_G14, numV(o));
|
||||||
} else if (tvisbuf(o)) {
|
} else if (tvisbuf(o)) {
|
||||||
SBufExt *sbx2 = bufV(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));
|
lj_buf_putmem((SBuf *)sbx, sbx2->r, sbufxlen(sbx2));
|
||||||
} else if (!mo && !tvisnil(mo = lj_meta_lookup(L, o, MM_tostring))) {
|
} else if (!mo && !tvisnil(mo = lj_meta_lookup(L, o, MM_tostring))) {
|
||||||
/* Call __tostring metamethod inline. */
|
/* Call __tostring metamethod inline. */
|
||||||
@ -140,7 +140,7 @@ LJLIB_CF(buffer_method_put) LJLIB_REC(.)
|
|||||||
L->top = L->base + narg;
|
L->top = L->base + narg;
|
||||||
goto retry; /* Retry with the result. */
|
goto retry; /* Retry with the result. */
|
||||||
} else {
|
} 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. */
|
/* 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++) {
|
for (arg = 1; arg < narg; arg++) {
|
||||||
TValue *o = &L->base[arg];
|
TValue *o = &L->base[arg];
|
||||||
MSize n = tvisnil(o) ? LJ_MAX_BUF :
|
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);
|
MSize len = sbufxlen(sbx);
|
||||||
if (n > len) n = len;
|
if (n > len) n = len;
|
||||||
setstrV(L, o, lj_str_new(L, sbx->r, n));
|
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;
|
if (sbx->r == sbx->w && !sbufiscow(sbx)) sbx->r = sbx->w = sbx->b;
|
||||||
lj_gc_check(L);
|
lj_gc_check(L);
|
||||||
return narg-1;
|
return (int)(narg-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LJ_HASFFI
|
#if LJ_HASFFI
|
||||||
|
@ -93,6 +93,9 @@
|
|||||||
#elif defined(__CYGWIN__)
|
#elif defined(__CYGWIN__)
|
||||||
#define LJ_TARGET_CYGWIN 1
|
#define LJ_TARGET_CYGWIN 1
|
||||||
#define LUAJIT_OS LUAJIT_OS_POSIX
|
#define LUAJIT_OS LUAJIT_OS_POSIX
|
||||||
|
#elif defined(__QNX__)
|
||||||
|
#define LJ_TARGET_QNX 1
|
||||||
|
#define LUAJIT_OS LUAJIT_OS_POSIX
|
||||||
#else
|
#else
|
||||||
#define LUAJIT_OS LUAJIT_OS_OTHER
|
#define LUAJIT_OS LUAJIT_OS_OTHER
|
||||||
#endif
|
#endif
|
||||||
|
@ -1201,7 +1201,7 @@ dotypecheck:
|
|||||||
tmp = ra_scratch(as, allow);
|
tmp = ra_scratch(as, allow);
|
||||||
rset_clear(allow, tmp);
|
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);
|
emit_dn(as, A64I_FMOV_D_R, (dest & 31), tmp);
|
||||||
/* Need type check, even if the load result is unused. */
|
/* Need type check, even if the load result is unused. */
|
||||||
asm_guardcc(as, irt_isnum(t) ? CC_LS : CC_NE);
|
asm_guardcc(as, irt_isnum(t) ? CC_LS : CC_NE);
|
||||||
|
@ -1117,7 +1117,7 @@ static LJ_AINLINE TRef recff_sbufx_len(jit_State *J, TRef trr, TRef trw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Emit typecheck for string buffer. */
|
/* 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];
|
TRef trtype, ud = J->base[arg];
|
||||||
if (!tvisbuf(&rd->argv[arg])) lj_trace_err(J, LJ_TRERR_BADTYPE);
|
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. */
|
/* 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 tr = J->base[arg];
|
||||||
TRef trlim = lj_ir_kint(J, LJ_MAX_BUF);
|
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
|
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
|
||||||
#define LJ_TARGET_HAS_GETENTROPY 1
|
#define LJ_TARGET_HAS_GETENTROPY 1
|
||||||
#endif
|
#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
|
#define LJ_TARGET_HAS_GETENTROPY 1
|
||||||
#endif
|
#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_sec = tm.it_interval.tv_sec = interval / 1000;
|
||||||
tm.it_value.tv_usec = tm.it_interval.tv_usec = (interval % 1000) * 1000;
|
tm.it_value.tv_usec = tm.it_interval.tv_usec = (interval % 1000) * 1000;
|
||||||
setitimer(ITIMER_PROF, &tm, NULL);
|
setitimer(ITIMER_PROF, &tm, NULL);
|
||||||
|
#if LJ_TARGET_QNX
|
||||||
|
sa.sa_flags = 0;
|
||||||
|
#else
|
||||||
sa.sa_flags = SA_RESTART;
|
sa.sa_flags = SA_RESTART;
|
||||||
|
#endif
|
||||||
sa.sa_handler = profile_signal;
|
sa.sa_handler = profile_signal;
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
sigaction(SIGPROF, &sa, &ps->oldsa);
|
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)));
|
vbase = emitir(IRT(IR_ADD, IRT_PGC), vbase, lj_ir_kint(J, frofs-8*(1+LJ_FR2)));
|
||||||
for (i = 0; i < nload; i++) {
|
for (i = 0; i < nload; i++) {
|
||||||
IRType t = itype2irt(&J->L->base[i-1-LJ_FR2-nvararg]);
|
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 {
|
} else {
|
||||||
emitir(IRTGI(IR_LE), fr, lj_ir_kint(J, frofs));
|
emitir(IRTGI(IR_LE), fr, lj_ir_kint(J, frofs));
|
||||||
@ -2572,7 +2572,8 @@ void lj_record_ins(jit_State *J)
|
|||||||
break;
|
break;
|
||||||
case BC_JLOOP:
|
case BC_JLOOP:
|
||||||
rec_loop_jit(J, rc, rec_loop(J, ra,
|
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;
|
break;
|
||||||
|
|
||||||
case BC_IFORL:
|
case BC_IFORL:
|
||||||
|
Loading…
Reference in New Issue
Block a user