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 0E615580F72; Wed, 16 Aug 2023 18:25:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0E615580F72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692199527; bh=1BXmrYkItQNVNPpMkmYMHCaaHQLTtJQFsr7RSwO1GLM=; 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=UjLbgRuX+nbzoviTXLaUapP3uBMSr7KGStRFn1PxLim14Ky7QBb+OhOl4meJwlIf4 K2yaxT4nA3KmTJlBGqc12sTxFAjdn/v8602ULJCbQp7KPKiEMeYiact2KwWO3whBLf 8VBGkdN3K8krm883jE9zwHGR9o0b+P0YkXxTx4dA= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 1E04F580F72 for ; Wed, 16 Aug 2023 18:25:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1E04F580F72 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1qWIOi-0004MM-8L; Wed, 16 Aug 2023 18:25:24 +0300 Date: Wed, 16 Aug 2023 18:20:37 +0300 To: Sergey Bronnikov Message-ID: References: <67642b3989e440fb554bf60db140828653c59659.1691592488.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9700E0DCE2907754D4D249011687940C6678A0DD020DA6E3B182A05F538085040DB0C82657EA5B65098309C2A0C56F8C87B8FB28BE92F2E8B44F84A36558B298F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AED985C8E545F588EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372338AE33E473C9B88638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D876666DD0A4A9E2960BE42DD0A3FFAE03117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC5BB9672376CF5DAA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8B8C7ADC89C2F0B2A5AAAE862A0553A39223F8577A6DFFEA7CC1948A84299AD5C643847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5BC972D508B2D9C69F16A825CBA2636DFEA57543F96E429C9F87CCE6106E1FC07E67D4AC08A07B9B06A1CB4668A9CA5FACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF47A4B0EB52B9615B5139C55226682E8FDD59823C446D54622E9E23EC507DBD7B9C8755E3AEA661EF24F7434E9608BF9FFCE26B659AABB5290C2056CDC1C9DB82A74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHVl7ekwB6hjxMcSxmAom/w== X-DA7885C5: 63C24132F9FC49C112162E161158CF4FE1B18E3D65B171D2BF727813771EE834262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986BDBB1B59A2EBB9A6D1F529DC2DACEED6C0FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 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 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, 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. > > > -- Best regards, Sergey Kaplun