From df278295f7287ed5b140956ccb89cda4c8ba2bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 26 Jul 2021 14:43:28 +0800 Subject: fix #620 --- meta/template/basic.lua | 4 ++-- meta/template/debug.lua | 16 ++++++++-------- meta/template/math.lua | 2 +- meta/template/string.lua | 2 +- meta/template/table.lua | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 7a42ab74..6768f3e6 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -77,7 +77,7 @@ function ipairs(t) end ---| '"t"' # ---#DESTAIL 'loadmode.t' ---|>'"bt"' # ---#DESTAIL 'loadmode.bt' ----#if VERSION <= 5.1 then +---#if VERSION <= 5.1 and not JIT then ---#DES 'load<5.1' ---@param func function ---@param chunkname? string @@ -95,7 +95,7 @@ function load(func, chunkname) end function load(chunk, chunkname, mode, env) end ---#end ----#if VERSION <= 5.1 then +---#if VERSION <= 5.1 and not JIT then ---#DES 'loadfile' ---@param filename? string ---@return function diff --git a/meta/template/debug.lua b/meta/template/debug.lua index 67da98b1..408fb518 100644 --- a/meta/template/debug.lua +++ b/meta/template/debug.lua @@ -47,10 +47,10 @@ function debug.gethook(co) end ---|+'"S"' # ---#DESTAIL 'infowhat.S' ---|+'"l"' # ---#DESTAIL 'infowhat.l' ---|+'"t"' # ---#DESTAIL 'infowhat.t' ----#if VERSION <= 5.1 then ----|+'"u<5.1"' # ---#DESTAIL 'infowhat.u<5.1' +---#if VERSION <= 5.1 and not JIT then +---|+'"u"' # ---#DESTAIL 'infowhat.u<5.1' ---#else ----|+'"u>5.2"' # ---#DESTAIL 'infowhat.u>5.2' +---|+'"u"' # ---#DESTAIL 'infowhat.u>5.2' ---#end ---|+'"f"' # ---#DESTAIL 'infowhat.f' ---#if VERSION >= 5.4 then @@ -66,7 +66,7 @@ function debug.gethook(co) end ---@return debuginfo function debug.getinfo(thread, f, what) end ----#if VERSION <= 5.1 then +---#if VERSION <= 5.1 and not JIT then ---#DES 'debug.getlocal<5.1' ---@overload fun(level: integer, index: integer):string, any ---@param thread thread @@ -109,7 +109,7 @@ function debug.getupvalue(f, up) end ---@return any ---@return boolean function debug.getuservalue(u, n) end ----#elseif VERSION >= 5.2 then +---#elseif VERSION >= 5.2 or JIT then ---#DES 'debug.getuservalue<5.3' ---@param u userdata ---@return any @@ -173,7 +173,7 @@ function debug.setupvalue(f, up, value) end ---@param n integer ---@return userdata udata function debug.setuservalue(udata, value, n) end ----#elseif VERSION >= 5.2 then +---#elseif VERSION >= 5.2 or JIT then ---#DES 'debug.setuservalue<5.3' ---@param udata userdata ---@param value any @@ -188,14 +188,14 @@ function debug.setuservalue(udata, value) end ---@return string message function debug.traceback(thread, message, level) end ----@version >5.2 +---@version >5.2, JIT ---#DES 'debug.upvalueid' ---@param f function ---@param n integer ---@return lightuserdata id function debug.upvalueid(f, n) end ----@version >5.2 +---@version >5.2, JIT ---#DES 'debug.upvaluejoin' ---@param f1 function ---@param n1 integer diff --git a/meta/template/math.lua b/meta/template/math.lua index dc895bb7..e415bae6 100644 --- a/meta/template/math.lua +++ b/meta/template/math.lua @@ -99,7 +99,7 @@ function math.frexp(x) end ---@return number function math.ldexp(m, e) end ----#if VERSION <= 5.1 then +---#if VERSION <= 5.1 and not JIT then ---#DES 'math.log<5.1' ---@param x number ---@return number diff --git a/meta/template/string.lua b/meta/template/string.lua index 81bd1996..a2c80908 100644 --- a/meta/template/string.lua +++ b/meta/template/string.lua @@ -96,7 +96,7 @@ function string.pack(fmt, v1, v2, ...) end ---@return integer function string.packsize(fmt) end ----#if VERSION <= 5.1 then +---#if VERSION <= 5.1 and not JIT then ---#DES 'string.rep<5.1' ---@param s string ---@param n integer diff --git a/meta/template/table.lua b/meta/template/table.lua index c0bdac14..12d69c43 100644 --- a/meta/template/table.lua +++ b/meta/template/table.lua @@ -35,7 +35,7 @@ function table.maxn(table) end ---@return table a2 function table.move(a1, f, e, t, a2) end ----@version >5.2 +---@version >5.2, JIT ---#DES 'table.pack' ---@return table function table.pack(...) end @@ -51,7 +51,7 @@ function table.remove(list, pos) end ---@param comp fun(a: any, b: any):boolean function table.sort(list, comp) end ----@version >5.2 +---@version >5.2, JIT ---#DES 'table.unpack' ---@param list table ---@param i? integer -- cgit v1.2.3