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 A63BF58123F; Wed, 16 Aug 2023 19:08:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A63BF58123F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692202105; bh=v8UWM3MIXLRQMEHSf8nhE5qrSw+u93bfsBP0CRax+B0=; 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=Ga3uXOTJT4JCwUM2IwFRvh1CyCxec329n7kUwYvaYLfxzGpSLnG3I0YtinAOTCL93 PhSiFD3V47vHUt382Q5PRvjZnzVMgN36vxPHYH/XBuDgzwwKUswaZvME0jGGiLOhUu QXCByUCNDLSxNiRFBD8dpESSjD9TCGOI9fmVh9lI= Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [95.163.41.72]) (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 41ED4580F72 for ; Wed, 16 Aug 2023 19:08:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 41ED4580F72 Received: by smtp31.i.mail.ru with esmtpa (envelope-from ) id 1qWJ4J-00A9QV-1I; Wed, 16 Aug 2023 19:08:23 +0300 Message-ID: <3bf484cb-83c7-a1cd-2573-88c5e3175dc9@tarantool.org> Date: Wed, 16 Aug 2023 19:08:23 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Sergey Kaplun References: <67642b3989e440fb554bf60db140828653c59659.1691592488.git.skaplun@tarantool.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9700E0DCE2907754D065B653CA1E56B5DB3B38B4431605699182A05F5380850401D331DC264402A2A5948AD1E166FB6F436E3810D4FD28B19A4FDE9F9B481B6C3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7CE4525FFB91B9BBCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DC5B68A43B0CFEA28638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D80803396F4D69F739059C9DF6762F2A59117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC11A27A05CE189FECA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FCB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B19735652A29929C6C4AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C30AA277257C6A5E3D76E601842F6C81A1F004C906525384303E02D724532EE2C3F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB33AC447995A7AD18262FEC7FBD7D1F5BD5E8D9A59859A8B658CDF7FFE3EBBCC0089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5B354E4E4CB49E65C1781BBBF58BE7B1E89DBBB0D4373EFA9F87CCE6106E1FC07E67D4AC08A07B9B0A6C7FFFE744CA7FBCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFE3C6E47B722ABA6F624385386376A8C1A75C4ABEAE6ADDE72ECE466780C471749DCE6E1EBC7C769E24F7434E9608BF9F4CD96FE678A214FC3EBD32FABDA7A3F2A74DFFEFA5DC0E7F02C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojFRrmMqSMPxrEBFFnHZpSWQ== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F2588458BDB188EC1BB87FC2BF37BA343FE9381F18023E846E174D2C282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30B0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 02/19] test: introduce mcode generator for tests 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Ok, thanks. LGTM now On 8/16/23 18:20, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the review! > > On 16.08.23, Sergey Bronnikov wrote: >> Hi, Sergey >> >> >> Thanks for the patch! >> >> Sergey >> >> On 8/9/23 18:35, Sergey Kaplun wrote: >> >> >> >> >>> ls/frontend.lua b/test/tarantool-tests/utils/frontend.lua >>> index 2afebbb2..414257fd 100644 >>> --- a/test/tarantool-tests/utils/frontend.lua >>> +++ b/test/tarantool-tests/utils/frontend.lua >>> @@ -1,6 +1,10 @@ >>> local M = {} >>> >>> local bc = require('jit.bc') >>> +local jutil = require('jit.util') >>> +local vmdef = require('jit.vmdef') >>> +local bcnames = vmdef.bcnames >>> +local band, rshift = bit.band, bit.rshift >>> >>> function M.hasbc(f, bytecode) >>> assert(type(f) == 'function', 'argument #1 should be a function') >>> @@ -22,4 +26,24 @@ function M.hasbc(f, bytecode) >>> return hasbc >>> end >>> >>> +-- Get traceno of the trace assotiated for the given function. >>> +function M.gettraceno(func) >>> + assert(type(func) == 'function', 'argument #1 should be a function') >>> + >>> + -- The 0th BC is the header. >>> + local func_ins = jutil.funcbc(func, 0) >>> + local BC_NAME_LENGTH = 6 >>> + local RD_SHIFT = 16 >> >> Nit: AFAIK usually we left a comment with a source of constants. > Unfortunately, there is no any real sources for these constants, > but the code is similar to the . But, I don't sure > that is worth to be mentioned. > >> >>