Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/lua/dist/src Import Lua 5.4.4



details:   https://anonhg.NetBSD.org/src/rev/2f7b243cc8de
branches:  trunk
changeset: 372884:2f7b243cc8de
user:      nikita <nikita%NetBSD.org@localhost>
date:      Mon Jan 02 20:57:29 2023 +0000

description:
Import Lua 5.4.4

diffstat:

 external/mit/lua/dist/src/ljumptab.h |  114 +++++++++++++++++++++++++++++++++++
 external/mit/lua/dist/src/lopnames.h |  105 ++++++++++++++++++++++++++++++++
 2 files changed, 219 insertions(+), 0 deletions(-)

diffs (227 lines):

diff -r ecffe10d9b86 -r 2f7b243cc8de external/mit/lua/dist/src/ljumptab.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/lua/dist/src/ljumptab.h      Mon Jan 02 20:57:29 2023 +0000
@@ -0,0 +1,114 @@
+/*     $NetBSD: ljumptab.h,v 1.1.1.1 2023/01/02 20:57:29 nikita Exp $  */
+
+/*
+** Id: ljumptab.h 
+** Jump Table for the Lua interpreter
+** See Copyright Notice in lua.h
+*/
+
+
+#undef vmdispatch
+#undef vmcase
+#undef vmbreak
+
+#define vmdispatch(x)     goto *disptab[x];
+
+#define vmcase(l)     L_##l:
+
+#define vmbreak                vmfetch(); vmdispatch(GET_OPCODE(i));
+
+
+static const void *const disptab[NUM_OPCODES] = {
+
+#if 0
+** you can update the following list with this command:
+**
+**  sed -n '/^OP_/\!d; s/OP_/\&\&L_OP_/ ; s/,.*/,/ ; s/\/.*// ; p'  lopcodes.h
+**
+#endif
+
+&&L_OP_MOVE,
+&&L_OP_LOADI,
+&&L_OP_LOADF,
+&&L_OP_LOADK,
+&&L_OP_LOADKX,
+&&L_OP_LOADFALSE,
+&&L_OP_LFALSESKIP,
+&&L_OP_LOADTRUE,
+&&L_OP_LOADNIL,
+&&L_OP_GETUPVAL,
+&&L_OP_SETUPVAL,
+&&L_OP_GETTABUP,
+&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243cc8de external/mit/lua/dist/src/lopnames.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/lua/dist/src/lopnames.h      Mon Jan 02 20:57:29 2023 +0000
@@ -0,0 +1,105 @@
+/*     $NetBSD: lopnames.h,v 1.1.1.1 2023/01/02 20:57:29 nikita Exp $  */
+
+/*
+** Id: lopnames.h 
+** Opcode names
+** See Copyright Notice in lua.h
+*/
+
+#if !defined(lopnames_h)
+#define lopnames_h
+
+#include <stddef.h>
+
+
+/* ORDER OP */
+
+static const char *const opnames[] = {
+  "MOVE",
+  "LOADI",
+  "LOADF",
+  "LOADK",
+  "LOADKX",
+  "LOADFALSE",
+  "LFALSESKIP",
+  "LOADTRUE",
+  "LOADNIL",
+  "GETUPVAL",
+  "SETUPVAL",
+  "GETTABUP",
+  "GETTABLE",
+  "GETI",
+  "GETFIELD",
+  "SETTABUP",
+  "SETTABLE",
+  "SETI",
+  "SETFIELD",
+  "NEWTABLE",
+  "SELF",
+  "ADDI",
+  "ADDK",
+  "SUBK",
+  "MULK",
+  "MODK",
+  "POWK",
+  "DIVK",
+  "IDIVK",
+  "BANDK",
+  "BORK",
+  "BXORK",
+  "SHRI",
+  "SHLI",
+  "ADD",
+  "SUB",
+  "MUL",
+  "MOD",
+  "POW",
+  "DIV",
+  "IDIV",
+  "BAND",
+  "BOR",
+  "BXOR",
+  "SHL",
+  "SHR",
+  "MMBIN",
+  "MMBINI",
+  "MMBINK",
+  "UNM",
+  "BNOT",
+  "NOT",
+  "LEN",
+  "CONCAT",
+  "CLOSE",
+  "TBC",
+  "JMP",
+  "EQ",
+  "LT",
+  "LE",
+  "EQK",
+  "EQI",
+  "LTI",
+  "LEI",
+  "GTI",
+  "GEI",
+  "TEST",
+  "TESTSET",
+  "CALL",
+  "TAILCALL",
+  "RETURN",
+  "RETURN0",
+  "RETURN1",
+  "FORLOOP",
+  "FORPREP",
+  "TFORPREP",
+  "TFORCALL",
+  "TFORLOOP",
+  "SETLIST",
+  "CLOSURE",
+  "VARARG",
+  "VARARGPREP",
+  "EXTRAARG",
+  NULL
+};
+
+#endif
+



Home | Main Index | Thread Index | Old Index