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 2E7776ECC0; Thu, 14 Apr 2022 11:55:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2E7776ECC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1649926558; bh=c6XKYrR2ro66bGUubDsoMRyZYLhqmqcFz/IhowVmxN4=; 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=s0Zz8TZcuDAtnDjOLKRxrFefFRKopaFxIXL8XU5aAr/oJapTkzMwkSqBJ/GaI51gG S7hNQ9Vcg3uEsrrMYfUrPNP660X6hOnQE8U3J1amLXgCgGS3bRpLEl3d6myf0myDee T1aDXHzGgrdSY4UCqXETopz7+I53FGqKWaWZl7HM= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 DF3C96ECC0 for ; Thu, 14 Apr 2022 11:55:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DF3C96ECC0 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1nevGU-0005Zx-A1; Thu, 14 Apr 2022 11:55:46 +0300 Date: Thu, 14 Apr 2022 11:53:36 +0300 To: Maxim Kokryashkin Message-ID: References: <316197b3f4c529a0a5249e69e8f352fef25e0ab8.1648597663.git.m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <316197b3f4c529a0a5249e69e8f352fef25e0ab8.1648597663.git.m.kokryashkin@tarantool.org> X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD916C41472748AFA0408FA01488F86E1C20208C06BFEC1AAE200894C459B0CD1B99D472F430CB81C874EF3C32FA6836E908E9A4E6000B476CBDC3326C543D49E8D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78CA034C6BC350CB3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637BC4B0F5721B555078638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8FE5C47CF0E80F36C061FB73D6C93FFB5117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18BDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A45692FFBBD75A6A089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A55619FBB4340AD99F7F54EDEEAC3DA5F444A72E10CDF4C314D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7584C0BDCF4101A75D410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3416EA6E382A5BB176F5F9F335BC9F1C3C76F2B85E5E6FC16AD98261BEBE05FEB1933ED8F6FA492C781D7E09C32AA3244C71DC8B9EA41E5A81012ECE06B0D6BBCF33C9DC155518937FFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojixb2kBKhBtrjGWhhpnANGw== X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D6F1097A2F4A31F4721ED1FA1ED8299C130FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v4 2/3] Don't compile math.modf() anymore. 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, Maxim! Thanks for the patch. It generally LGTM, except the following concerns: 1) The tests kinda useless since they check that `modf()` just not compiled instead checking incorrect behaviour of `modf()` -- the reason for disabling compilation. 2) These tests are not related to min/max functions, so they should be moved to the separate test file. On 30.03.22, Maxim Kokryashkin wrote: > From: Mike Pall > > This commit disables compilation for the `math.modf` function since it's > rarely used and properly compiling it would be difficult. > > Part of tarantool/tarantool#6163 > --- > src/lib_math.c | 2 +- > src/lj_ffrecord.c | 16 ------------- > .../gh-6163-jit-min-max.test.lua | 23 +++++++++++++++---- > 3 files changed, 20 insertions(+), 21 deletions(-) > > diff --git a/src/lib_math.c b/src/lib_math.c > index ef9dda2d..4e6d2458 100644 > --- a/src/lib_math.c > +++ b/src/lib_math.c > diff --git a/test/tarantool-tests/gh-6163-jit-min-max.test.lua b/test/tarantool-tests/gh-6163-jit-min-max.test.lua > index d6eb3f3b..4594b968 100644 > --- a/test/tarantool-tests/gh-6163-jit-min-max.test.lua > +++ b/test/tarantool-tests/gh-6163-jit-min-max.test.lua > @@ -1,12 +1,12 @@ > local tap = require('tap') > +local jutil = require('jit.util') > jit.off() > jit.flush() > > local test = tap.test("gh-6163-jit-min-max") > -test:plan(2) > --- > --- gh-6163: math.min/math.max success with no args > --- > +test:plan(6) > + > +-- `math.min`/`math.max` success with no args. > local pcall = pcall > > jit.opt.start(0, 'hotloop=1') > @@ -17,4 +17,19 @@ test:ok(false == r) > r, _ = pcall(function() math.min() end) > test:ok(false == r) > > +jit.off() > +jit.flush() > +jit.on() > + > +-- `math.modf` shouldn't be compiled. > +for _ = 1, 3 do math.modf(5.32) end > + > +local tr1_info = jutil.traceinfo(1) > +local tr2_info = jutil.traceinfo(2) > + > +test:ok(tr1_info ~= nil) > +test:ok(tr2_info ~= nil) > +test:ok(tr1_info.link == 2) > +test:ok(tr1_info.linktype == "stitch") > + > os.exit(test:check() and 0 or 1) > -- > 2.35.1 > -- Best regards, Sergey Kaplun