<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;">sergos <sergos@tarantool.org><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;"><b>Re: [Tarantool-patches] [PATCH luajit v2] Don't compile math.modf() anymore.</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;">30 November 2022, 16:23:31 GMT+3<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);"><b>To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;">Maxim Kokryashkin <m.kokryashkin@tarantool.org><br></span></div><br><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>Hi!</div><div><br></div><div>The change looks like “I don’t know why it might not work, lets drop it”.</div><div>But since it just leads to a FUNCC and trace can be stiched thereafter</div><div>it LGTM.</div><div><br></div><div>Sergos</div><div><br></div><div><blockquote type="cite"><div><div><div>От кого: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org><br>Кому: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org<br>Дата: Пятница, 19 августа 2022, 0:21 +03:00<br>Тема: [Tarantool-patches] [PATCH luajit v2] Don't compile math.modf() anymore.<br> <div class="js-helper js-readmsg-msg"><div><div id="style_16608576720942281093_BODY">From: Mike Pall <mike><br><br>This commit disables compilation for the `math.modf` function since it's<br>rarely used and compiling it in a performant enough way would be<br>difficult.<br><br>Part of tarantool/tarantool#7230<br>---<br><br>There are no issues with correctenss of compilation<br>of math.modf whatsoever. There are no known issues with it, and all of<br>the possible edge cases are handled well both with active<br>and inactivve JIT. It's safe to assume that the `properly compiling`<br>in the original commit message refers to performance rather than<br>correctness.<br><br>PR: <a href="https://github.com/tarantool/tarantool/pull/7586" target="_blank">https://github.com/tarantool/tarantool/pull/7586</a><br>Branch: <a href="https://github.com/tarantool/luajit/tree/fckxorg/gh-7230-math-modf" target="_blank">https://github.com/tarantool/luajit/tree/fckxorg/gh-7230-math-modf</a><br><br> src/lib_math.c | 2 +-<br> src/lj_ffrecord.c | 16 ----------------<br> 2 files changed, 1 insertion(+), 17 deletions(-)<br><br>diff --git a/src/lib_math.c b/src/lib_math.c<br>index ef9dda2d..4e6d2458 100644<br>--- a/src/lib_math.c<br>+++ b/src/lib_math.c<br>@@ -45,7 +45,7 @@ LJLIB_ASM_(math_sinh) LJLIB_REC(math_htrig IRCALL_sinh)<br> LJLIB_ASM_(math_cosh) LJLIB_REC(math_htrig IRCALL_cosh)<br> LJLIB_ASM_(math_tanh) LJLIB_REC(math_htrig IRCALL_tanh)<br> LJLIB_ASM_(math_frexp)<br>-LJLIB_ASM_(math_modf) LJLIB_REC(.)<br>+LJLIB_ASM_(math_modf)<br><br> LJLIB_ASM(math_log) LJLIB_REC(math_log)<br> {<br>diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c<br>index be890a93..ac9c9ba1 100644<br>--- a/src/lj_ffrecord.c<br>+++ b/src/lj_ffrecord.c<br>@@ -601,22 +601,6 @@ static void LJ_FASTCALL recff_math_htrig(jit_State *J, RecordFFData *rd)<br> J->base[0] = emitir(IRTN(IR_CALLN), tr, rd->data);<br> }<br><br>-static void LJ_FASTCALL recff_math_modf(jit_State *J, RecordFFData *rd)<br>-{<br>- TRef tr = J->base[0];<br>- if (tref_isinteger(tr)) {<br>- J->base[0] = tr;<br>- J->base[1] = lj_ir_kint(J, 0);<br>- } else {<br>- TRef trt;<br>- tr = lj_ir_tonum(J, tr);<br>- trt = emitir(IRTN(IR_FPMATH), tr, IRFPM_TRUNC);<br>- J->base[0] = trt;<br>- J->base[1] = emitir(IRTN(IR_SUB), tr, trt);<br>- }<br>- rd->nres = 2;<br>-}<br>-<br> static void LJ_FASTCALL recff_math_pow(jit_State *J, RecordFFData *rd)<br> {<br> J->base[0] = lj_opt_narrow_pow(J, J->base[0], J->base[1],<br>--<br>2.36.1</div></div></div> <hr></div></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></body></html>