Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit] Limit CSE for IR_CARG to fix loop optimizations.
Date: Thu, 17 Oct 2024 10:16:22 +0300	[thread overview]
Message-ID: <ZxC5xsLVbI8UrivM@root> (raw)
In-Reply-To: <17fd3424-51f8-42ed-8c28-143c99876ce7@tarantool.org>

Sergey,

On 11.10.24, Sergey Bronnikov wrote:
> Hi, Sergey!
> 
> On 08.10.2024 16:25, Sergey Kaplun wrote:
> 
> <snipped>
> 
> >>> +ffi.cdef[[
> >>> +  double sin(double, ...);
> >>> +  double cos(double, ...);
> >> Why do you use sin/cos with wrong function prototypes if you can take
> >>
> >> a function with varargs. (printf for example)?
> > I suppose this hack is well suited for our testing purposes:
> > 1) We don't need to create custom vararg functions and the corresponding
> >     C libary.
> > 2) Functions usage is obvious. Also, the vararg part will be silently
> >     ignored.
> >
> > Be aware that we need the result of the function's call.
> >
> Got it. I would add this as a comment. Feel free to ignore.

I've added the following comment:

===================================================================
diff --git a/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua b/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua
index 865cdd26..d4981299 100644
--- a/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua
+++ b/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua
@@ -17,6 +17,9 @@ local NTESTS = 6
 
 test:plan(NTESTS)
 
+-- XXX: Hack with function's prototypes to avoid creation of
+-- custom functions to be loaded via FFI (vararg part will be just
+-- ignored).
 ffi.cdef[[
   double sin(double, ...);
   double cos(double, ...);
===================================================================

Branch is rebased on the current master and force-pushed.

> 
> LGTM

-- 
Best regards,
Sergey Kaplun

  reply	other threads:[~2024-10-17  7:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 10:36 Sergey Kaplun via Tarantool-patches
2024-10-08 12:39 ` Sergey Bronnikov via Tarantool-patches
2024-10-08 13:25   ` Sergey Kaplun via Tarantool-patches
2024-10-11 14:02     ` Sergey Bronnikov via Tarantool-patches
2024-10-17  7:16       ` Sergey Kaplun via Tarantool-patches [this message]
2024-10-11 18:58 ` Maxim Kokryashkin via Tarantool-patches
2024-10-18 15:19 ` Sergey Kaplun via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZxC5xsLVbI8UrivM@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] Limit CSE for IR_CARG to fix loop optimizations.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox