From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 2E2B76F3C7; Fri, 26 Mar 2021 17:53:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2E2B76F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616770425; bh=YZ+lzs2gGbl3dnGkn3+QqXPYZP2e8N3feO7/SpXPN1c=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XSbObjjzfcE7za93x80IfyEKoMcmkHrR8uppdz3D8jtcGeh3gcsqAAOYMCc/xMnye B9uOlyuhKr1V6xgyPeDSh+M6Dj2pac8WRB6+tRUV36KEJevmBt666PPZyD5FON/crf vjfhaBWR/KJZHZ8SXT4d+XIOw2ZIFAlSDiwUZnfc= Received: from smtp30.i.mail.ru (smtp30.i.mail.ru [94.100.177.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4F0B96F3C7 for ; Fri, 26 Mar 2021 17:53:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4F0B96F3C7 Received: by smtp30.i.mail.ru with esmtpa (envelope-from ) id 1lPnqJ-0003fs-Ix; Fri, 26 Mar 2021 17:53:43 +0300 Date: Fri, 26 Mar 2021 17:52:50 +0300 To: Sergey Ostanevich Message-ID: References: <0bf0dc418d1095fc5c8d3901469662c853fb93de.1616743343.git.skaplun@tarantool.org> <9A6CD2DD-6FFC-448B-9873-C320F7AA0D49@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9A6CD2DD-6FFC-448B-9873-C320F7AA0D49@tarantool.org> X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E3294294B90A37D0C277F3D6300B1E29D1C98182A05F538085040FB2CC6B90C5D59C5DCC64E7BB5CFE2FD86CCC2C263E2FBE4B4A141AA88F7E734 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7CE4525FFB91B9BBCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637328FC23D015AFE6E8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D7186240574E2CDA32399C8B02841C4D4A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7328B01A8D746D8839FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C327ED053E960B195E117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E73528A6D463EDFD0DBBC4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A514E07A39689470E78B4E54DBB8EE79F3C49BF2326A70D820D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3473688ED311681BF0F1C2D56BBE796CD2848E78AFA2C7FCD78A5D0C940B5BFBBB3FE8B6982B1B79CC1D7E09C32AA3244CB6DF20BF9CB893AD7CFE7C3BAFE4B394F26BFA4C8A6946B8FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAgS9YgMFWjvKg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4A6AC572D7B7F18923664FDD6D8B726B92A405623B4F16E0BF2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 11/30] test: adapt getlocal PUC test for vararg func X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, thanks for the review! I've changed s/first/local/ in the commit message and the comment, considering your comment for the previous patch. Also, I've added link to the issue to close. =================================================================== test: adapt getlocal PUC test for vararg func Lua 5.1 interprets `...` in the vararg functions like an additional local argument unlike LuaJIT does. So, `a:f()` function will not set corresponding table `arg`, as test expects. Implicit `arg` parameter for old-style vararg functions was finally removed in Lua 5.2. The test is adapted from PUC-Rio Lua 5.2 test suite by removing additional check for amountt of arguments via `arg.n`. Lua 5.2 test suite is taken from https://www.lua.org/tests/lua-5.2.0-tests.tar.gz. Closes tarantool/tarantool#5694 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 =================================================================== =================================================================== diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua index 8ea6af7..69e19b6 100644 --- a/test/PUC-Lua-5.1-tests/db.lua +++ b/test/PUC-Lua-5.1-tests/db.lua @@ -302,7 +302,7 @@ end, "c") a:f(1,2,3,4,5) -- LuaJIT: Lua 5.1 interprets `...` in the vararg functions like --- an additional first argument unlike LuaJIT does. +-- an additional local argument unlike LuaJIT does. -- So, `a:f()` function will not set corresponding table `arg`, -- as test expects. -- Implicit `arg` parameter for old-style vararg functions was =================================================================== On 26.03.21, Sergey Ostanevich wrote: > LGTM > > Sergos > > > On 26 Mar 2021, at 10:42, Sergey Kaplun wrote: > > > > Lua 5.1 interprets `...` in the vararg functions like an additional > > first argument unlike LuaJIT does. So, `a:f()` function will not set > > corresponding table `arg`, as test expects. > > > > Implicit `arg` parameter for old-style vararg functions was finally > > removed in Lua 5.2. The test is adapted from PUC-Rio Lua 5.2 test suite > > by removing additional check for amountt of arguments via `arg.n`. > > Lua 5.2 test suite is taken from > > https://www.lua.org/tests/lua-5.2.0-tests.tar.gz. > > > > Part of tarantool/tarantool#5845 > > Part of tarantool/tarantool#4473 > > --- > > test/PUC-Lua-5.1-tests/db.lua | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua > > index e5d8885..6985c29 100644 > > --- a/test/PUC-Lua-5.1-tests/db.lua > > +++ b/test/PUC-Lua-5.1-tests/db.lua > > @@ -300,7 +300,16 @@ debug.sethook(function (e) > > end, "c") > > > > a:f(1,2,3,4,5) > > -assert(X.self == a and X.a == 1 and X.b == 2 and X.arg.n == 3 and X.c == nil) > > + > > +-- LuaJIT: Lua 5.1 interprets `...` in the vararg functions like > > +-- an additional first argument unlike LuaJIT does. > > +-- So, `a:f()` function will not set corresponding table `arg`, > > +-- as test expects. > > +-- Implicit `arg` parameter for old-style vararg functions was > > +-- finally removed in Lua 5.2 > > +-- The test is adapted from PUC-Rio Lua 5.2 test suite by removing > > +-- additional `arg.n == 3` check. > > +assert(X.self == a and X.a == 1 and X.b == 2 and X.c == nil) > > assert(XX == 12) > > assert(debug.gethook() == nil) > > > > -- > > 2.31.0 > > > -- Best regards, Sergey Kaplun