[Tarantool-patches] [PATCH luajit] Handle table unsinking in the presence of IRFL_TAB_NOMM.

Sergey Kaplun skaplun at tarantool.org
Mon Sep 18 10:56:52 MSK 2023


Hi, Sergey!
Thanks for the review!
Fixed your comment below.

On 16.09.23, Sergey Bronnikov wrote:
> Hi, Sergey
> 
> 
> Thanks for the patch! LGTM
> 
> See a minor comment below.

<snipped>

> > +jit.opt.start('hotloop=1')
> > +
> > +local counter = 0
> > +local slot = 'slot'
> > +while true do
> 
> You are using endless loop here, but loop is limited by 3 iterations 
> (break after counter > 2).
> 
> Why "while true do end" is used here? Should we left a comment here?
> 

Added the following comment, as you suggested. Branch is force-pushed.

===================================================================
diff --git a/test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua b/test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua
index aaf5349f..eaf89501 100644
--- a/test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua
+++ b/test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua
@@ -16,6 +16,9 @@ jit.opt.start('hotloop=1')
 
 local counter = 0
 local slot = 'slot'
+-- XXX: The loop is limited to 3 iterations to compile a trace and
+-- start to execute it. Use the `while true do` loop format to see
+-- the side effects on the restoration from the snapshot.
 while true do
   counter = counter + 1
   -- Use a non-constant slot to emit `FREF` with `IRFL_TAB_NOMM`.
===================================================================

<snipped>

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list