From 4994fcc32caa90eb25e9e7532c5ed195abb4bb95 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 13 Jun 2011 00:58:13 +0200 Subject: [PATCH] Add support for bytecode loading/saving. --- doc/status.html | 5 - src/Makefile | 2 +- src/Makefile.dep | 35 ++-- src/lib_string.c | 19 +- src/lj_api.c | 15 +- src/lj_bcdump.h | 66 +++++++ src/lj_bcread.c | 466 +++++++++++++++++++++++++++++++++++++++++++++++ src/lj_bcwrite.c | 388 +++++++++++++++++++++++++++++++++++++++ src/lj_errmsg.h | 7 +- src/lj_func.c | 37 +++- src/lj_func.h | 2 +- src/lj_gc.c | 2 +- src/lj_lex.c | 9 +- src/lj_lex.h | 2 +- src/lj_obj.h | 10 +- src/ljamalg.c | 2 + 16 files changed, 1019 insertions(+), 48 deletions(-) create mode 100644 src/lj_bcdump.h create mode 100644 src/lj_bcread.c create mode 100644 src/lj_bcwrite.c diff --git a/doc/status.html b/doc/status.html index 1048adc4..c8366488 100644 --- a/doc/status.html +++ b/doc/status.html @@ -114,11 +114,6 @@ hooks for non-Lua functions) and shows slightly different behavior (no per-coroutine hooks, no tail call counting).
  • -Bytecode currently cannot be loaded or dumped. Note that -the bytecode format differs from Lua 5.1 — loading foreign -bytecode is not supported at all. -
  • -
  • Some of the configuration options of Lua 5.1 are not supported: