Tarantool development patches archive
 help / color / mirror / Atom feed
From: Olga Arkhangelskaia <arkholga@tarantool.org>
To: tarantool-patches@dev.tarantool.org, gorcunov@tarantool.org
Subject: [Tarantool-patches] [PATCH] luajit: adde flag of partial comp. with Lua 5.2
Date: Tue, 19 Nov 2019 14:01:30 +0300	[thread overview]
Message-ID: <496cc305-1743-f47f-2014-90dc2da91143@tarantool.org> (raw)

--mail delivery test

Although we do not turn on full compatibility with Lua 5.2 we do need 
some of
its features (eg. __pairs/__ipairs).This functionality brakes existing 
code.
However, if the necessity is very high or is strongly demanded we should
have possibility to use it. We introduce LUAJIT_ENABLE_LUA52COMPAT_PART
flag.

Some of the Lua 5.2's features that are likely to break existing code 
can be
turned on under this flag. At the moment it is pirs/ipairs metmethod.
---
  src/Makefile    | 4 ++++
  src/lib_base.c  | 4 ++--
  src/lj_arch.h   | 6 ++++++
  src/lj_obj.h    | 2 +-
  src/vm_x86.dasc | 4 ++--
  5 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 827d4a4..e8fd91a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -101,6 +101,10 @@ XCFLAGS=
  # Note: this does not provide full compatibility with Lua 5.2 at this 
time.
  #XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT
  #
+#Features from Lua 5.2 that was demanded more than once or are 
essential for
+#for the project. At the moment only pairs/ipairs can be enabled via 
this flag.
+#XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT_PART
+#
  # Disable the JIT compiler, i.e. turn LuaJIT into a pure interpreter.
  #XCFLAGS+= -DLUAJIT_DISABLE_JIT
  #
diff --git a/src/lib_base.c b/src/lib_base.c
index 3a75787..6cc0fcc 100644
--- a/src/lib_base.c
+++ b/src/lib_base.c
@@ -81,12 +81,12 @@ LJLIB_ASM(next)
    return FFH_UNREACHABLE;
  }

             reply	other threads:[~2019-11-19 11:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 11:01 Olga Arkhangelskaia [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-11-19  9:31 Olga Arkhangelskaia
2019-11-19 12:03 ` Igor Munkin

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=496cc305-1743-f47f-2014-90dc2da91143@tarantool.org \
    --to=arkholga@tarantool.org \
    --cc=gorcunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] luajit: adde flag of partial comp. with Lua 5.2' \
    /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