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 DDED7C6E78F; Thu, 22 Aug 2024 16:41:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DDED7C6E78F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1724334073; bh=mA/bWYjNWFl7/tWTHqkHI9bL6NBM+xHAGHf9As/dIfc=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=usvo8XeTQ7Hczc72Z9TkurDQhynMtAZvlNXEugpAeeZt/3Y/AMhxs2IMBwqON49WK 4GsS9/PESrvG8LhKIIvVIHv91sdNGLKseTNwJVx6d04BIdOjx/BmgSwHUqJgFvFkbv fKgWSy0dbssm2lUEBOodTjvGmLaA0JVJBNBnCfcw= Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [95.163.41.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id AC9DDC6E79E for ; Thu, 22 Aug 2024 16:41:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AC9DDC6E79E Received: by smtp59.i.mail.ru with esmtpa (envelope-from ) id 1sh83q-0000000EFl6-0dhR; Thu, 22 Aug 2024 16:41:10 +0300 Content-Type: multipart/alternative; boundary="------------vseqsLWU0mDH1c9y9xGYvSc0" Message-ID: <5cf1ec64-8bcb-4035-8987-79e037e04e23@tarantool.org> Date: Thu, 22 Aug 2024 16:41:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9A67092BE052B1D9E80479E83A5F5ECBCB411FF80AE7BBDAB182A05F5380850408FCCA4E8268E052803ED270C30F246C5876A35F142464C6682BBE18FB0487B48C90CEAAFAE53FB89 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B84F9009663064BD8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8F696973053B5BD3C2D1B9A261CFFC84D0157F9EF8E5B25A5CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F790063793270F7220657A0A389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F79006373D42D4F566CB30C1D81D268191BDAD3DBD4B6F7A4D31EC0BE2F48590F00D11D6D81D268191BDAD3D78DA827A17800CE7B41913284266F17EEC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3C8F21CEC4765490D35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A53D931E25D1D7A2E45002B1117B3ED69622B2F8594ED38D93BFF4097FFC9E796F823CB91A9FED034534781492E4B8EEADADEF88395FA75C5FBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF4E69DB8817D3E7B07F99DACA642DB43ABC15F1E4B34505AA261794DFB8C091E612B9ACBE231CC78A2FB0CAD32ADFBF8498BD1BECEC7DDEC5999190028C2BC241BFCDD902BA2E6D1D5F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbUwDRTee1Xpqli97a534UA== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D6140D3A110393C3D7E002F17F5DB3AE657C847CFE8B6418C7BC70152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 27/45] test: refactor LuaJIT test 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------vseqsLWU0mDH1c9y9xGYvSc0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sergey, On 21.08.2024 11:58, Sergey Kaplun wrote: > This patch refactors the aforementioned test to make its code style > closer to ours. > > Relates to tarantool/tarantool#9398 > --- thanks for the patch! LGTM > test/LuaJIT-tests/trace/phi/conv.lua | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/test/LuaJIT-tests/trace/phi/conv.lua b/test/LuaJIT-tests/trace/phi/conv.lua > index 267423c2..45383ed7 100644 > --- a/test/LuaJIT-tests/trace/phi/conv.lua > +++ b/test/LuaJIT-tests/trace/phi/conv.lua > @@ -15,7 +15,7 @@ local maskhuf = { 0x0002, 0x0003, 0x0004, 0x0005, } > local function decodeCode() > local lookup = get_bits() > local code = hufcodes[lookup] > - local z = {1,1,1,1} > + local z = {1, 1, 1, 1} > if not code then > for i = 1, 4 do > lookup = bit.bor(lookup, bit.lshift(get_bits(), i + 1)) > @@ -29,19 +29,19 @@ local function decodeCode() > end > > local function test() > - for i = 1, 6 do > + for _ = 1, 6 do > decodeCode() > end > end > > do --- PHI for CONV num.int before ASTORE. > local Rm = {} > - for i=0,16 do Rm[i] = 0 end > + for i = 0, 16 do Rm[i] = 0 end > > - for k=1,10 do > + for _ = 1, 10 do > local seed = 1 > - for i=16,0,-1 do > - seed = bit.band(seed*9069, 0x7fffffff) > + for i = 16, 0, -1 do > + seed = bit.band(seed * 9069, 0x7fffffff) > Rm[i] = seed > end > assert(seed == 1952688301) --------------vseqsLWU0mDH1c9y9xGYvSc0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Sergey,

On 21.08.2024 11:58, Sergey Kaplun wrote:
This patch refactors the aforementioned test to make its code style
closer to ours.

Relates to tarantool/tarantool#9398
---
thanks for the patch! LGTM
 test/LuaJIT-tests/trace/phi/conv.lua | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/LuaJIT-tests/trace/phi/conv.lua b/test/LuaJIT-tests/trace/phi/conv.lua
index 267423c2..45383ed7 100644
--- a/test/LuaJIT-tests/trace/phi/conv.lua
+++ b/test/LuaJIT-tests/trace/phi/conv.lua
@@ -15,7 +15,7 @@ local maskhuf = { 0x0002, 0x0003, 0x0004, 0x0005, }
 local function decodeCode()
   local lookup = get_bits()
   local code = hufcodes[lookup]
-  local z = {1,1,1,1}
+  local z = {1, 1, 1, 1}
   if not code then
     for i = 1, 4 do
       lookup = bit.bor(lookup, bit.lshift(get_bits(), i + 1))
@@ -29,19 +29,19 @@ local function decodeCode()
 end
 
 local function test()
-  for i = 1, 6 do
+  for _ = 1, 6 do
     decodeCode()
   end
 end
 
 do --- PHI for CONV num.int before ASTORE.
   local Rm = {}
-  for i=0,16 do Rm[i] = 0 end
+  for i = 0, 16 do Rm[i] = 0 end
 
-  for k=1,10 do
+  for _ = 1, 10 do
     local seed = 1
-    for i=16,0,-1 do
-      seed = bit.band(seed*9069, 0x7fffffff)
+    for i = 16, 0, -1 do
+      seed = bit.band(seed * 9069, 0x7fffffff)
       Rm[i] = seed
     end
     assert(seed == 1952688301)
--------------vseqsLWU0mDH1c9y9xGYvSc0--