aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-09-16 17:47:36 +0000
committerbloodstalker <thabogre@gmail.com>2018-09-16 17:47:36 +0000
commit46e361aa3c52368d09f41028e1359d58fba80aee (patch)
tree2063762651987457280282fdd98b267edaa200d1 /bruiser
parent[skip ci] (diff)
downloadmutator-46e361aa3c52368d09f41028e1359d58fba80aee.tar.gz
mutator-46e361aa3c52368d09f41028e1359d58fba80aee.zip
[skip ci]
Diffstat (limited to 'bruiser')
-rw-r--r--bruiser/luatablegen/W_Code_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Code_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Data_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Data_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Data_Segment_tablegen.c138
-rw-r--r--bruiser/luatablegen/W_Data_Segment_tablegen.h37
-rw-r--r--bruiser/luatablegen/W_Elem_Segment_tablegen.c138
-rw-r--r--bruiser/luatablegen/W_Elem_Segment_tablegen.h37
-rw-r--r--bruiser/luatablegen/W_Element_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Element_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Export_Entry_tablegen.c138
-rw-r--r--bruiser/luatablegen/W_Export_Entry_tablegen.h37
-rw-r--r--bruiser/luatablegen/W_Export_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Export_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Function_Body_tablegen.c138
-rw-r--r--bruiser/luatablegen/W_Function_Body_tablegen.h37
-rw-r--r--bruiser/luatablegen/W_Function_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Function_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Global_Entry_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Global_Entry_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Global_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Global_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Import_Section_Entry_tablegen.c172
-rw-r--r--bruiser/luatablegen/W_Import_Section_Entry_tablegen.h41
-rw-r--r--bruiser/luatablegen/W_Import_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Import_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Local_Entry_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Local_Entry_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Memory_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Memory_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Start_Section_tablegen.c87
-rw-r--r--bruiser/luatablegen/W_Start_Section_tablegen.h31
-rw-r--r--bruiser/luatablegen/W_Table_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Table_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/W_Type_Section_Entry_tablegen.c155
-rw-r--r--bruiser/luatablegen/W_Type_Section_Entry_tablegen.h39
-rw-r--r--bruiser/luatablegen/W_Type_Section_tablegen.c104
-rw-r--r--bruiser/luatablegen/W_Type_Section_tablegen.h33
-rw-r--r--bruiser/luatablegen/Wasm_Module_tablegen.c291
-rw-r--r--bruiser/luatablegen/Wasm_Module_tablegen.h55
-rw-r--r--bruiser/luatablegen/global_type_t_tablegen.c104
-rw-r--r--bruiser/luatablegen/global_type_t_tablegen.h33
-rw-r--r--bruiser/luatablegen/init_expr_t_tablegen.c104
-rw-r--r--bruiser/luatablegen/init_expr_t_tablegen.h33
-rw-r--r--bruiser/luatablegen/makefile51
-rw-r--r--bruiser/luatablegen/memory_type_t_tablegen.c87
-rw-r--r--bruiser/luatablegen/memory_type_t_tablegen.h31
-rw-r--r--bruiser/luatablegen/resizable_limit_t_tablegen.c121
-rw-r--r--bruiser/luatablegen/resizable_limit_t_tablegen.h35
-rw-r--r--bruiser/luatablegen/table_type_t_tablegen.c104
-rw-r--r--bruiser/luatablegen/table_type_t_tablegen.h33
-rw-r--r--bruiser/luatablegen/wasm_tables.c82
-rw-r--r--bruiser/luatablegen/wasm_tables.h38
-rw-r--r--bruiser/luatablegen/wasmheader.txt1
-rw-r--r--bruiser/makefile12
55 files changed, 7 insertions, 4077 deletions
diff --git a/bruiser/luatablegen/W_Code_Section_tablegen.c b/bruiser/luatablegen/W_Code_Section_tablegen.c
deleted file mode 100644
index b4bd190..0000000
--- a/bruiser/luatablegen/W_Code_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Code_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Code_Section* convert_W_Code_Section (lua_State* __ls, int index) {
- W_Code_Section* dummy = (W_Code_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Code_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Code_Section* check_W_Code_Section(lua_State* __ls, int index) {
- W_Code_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Code_Section*)luaL_checkudata(__ls, index, "W_Code_Section");
- if (dummy == NULL) printf("W_Code_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Code_Section* push_W_Code_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Code_Section* dummy = lua_newuserdata(__ls, sizeof(W_Code_Section));
- luaL_getmetatable(__ls, "W_Code_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Code_Section_push_args(lua_State* __ls, W_Code_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->bodies);
- return 0;
-}
-
-int new_W_Code_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- W_Function_Body** bodies = lua_touserdata(__ls,-1);
- W_Code_Section* dummy = push_W_Code_Section(__ls);
- dummy->count = count;
- dummy->bodies = bodies;
- return 1;
-}
-
-static int getter_W_Code_Section_count(lua_State* __ls) {
- W_Code_Section* dummy = check_W_Code_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Code_Section_bodies(lua_State* __ls) {
- W_Code_Section* dummy = check_W_Code_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->bodies);
- return 1;
-}
-
-static int setter_W_Code_Section_count(lua_State* __ls) {
- W_Code_Section* dummy = check_W_Code_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Code_Section_bodies(lua_State* __ls) {
- W_Code_Section* dummy = check_W_Code_Section(__ls, 1);
- dummy->bodies = luaL_checkudata(__ls, 2, "bodies_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Code_Section_methods[] = {
- {"new", new_W_Code_Section},
- {"set_count", setter_W_Code_Section_count},
- {"set_bodies", setter_W_Code_Section_bodies},
- {"count", getter_W_Code_Section_count},
- {"bodies", getter_W_Code_Section_bodies},
- {0,0}
-};
-
-static const luaL_Reg W_Code_Section_meta[] = {
- {0, 0}
-};
-
-int W_Code_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Code_Section", W_Code_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Code_Section");
- luaL_openlib(__ls, 0, W_Code_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Code_Section_tablegen.h b/bruiser/luatablegen/W_Code_Section_tablegen.h
deleted file mode 100644
index 5c39e0c..0000000
--- a/bruiser/luatablegen/W_Code_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Code_Section_H
-#define _W_Code_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Code_Section* convert_W_Code_Section (lua_State* __ls, int index);
-static W_Code_Section* check_W_Code_Section(lua_State* __ls, int index);
-W_Code_Section* push_W_Code_Section(lua_State* __ls);
-int W_Code_Section_push_args(lua_State* __ls, W_Code_Section* _st);
-int new_W_Code_Section(lua_State* __ls);
-static int getter_W_Code_Section_count(lua_State* __ls);
-static int getter_W_Code_Section_bodies(lua_State* __ls);
-static int setter_W_Code_Section_count(lua_State* __ls);
-static int setter_W_Code_Section_bodies(lua_State* __ls);
-int W_Code_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Data_Section_tablegen.c b/bruiser/luatablegen/W_Data_Section_tablegen.c
deleted file mode 100644
index 9426e71..0000000
--- a/bruiser/luatablegen/W_Data_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Data_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Data_Section* convert_W_Data_Section (lua_State* __ls, int index) {
- W_Data_Section* dummy = (W_Data_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Data_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Data_Section* check_W_Data_Section(lua_State* __ls, int index) {
- W_Data_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Data_Section*)luaL_checkudata(__ls, index, "W_Data_Section");
- if (dummy == NULL) printf("W_Data_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Data_Section* push_W_Data_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Data_Section* dummy = lua_newuserdata(__ls, sizeof(W_Data_Section));
- luaL_getmetatable(__ls, "W_Data_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Data_Section_push_args(lua_State* __ls, W_Data_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->entries);
- return 0;
-}
-
-int new_W_Data_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- W_Data_Segment** entries = lua_touserdata(__ls,-1);
- W_Data_Section* dummy = push_W_Data_Section(__ls);
- dummy->count = count;
- dummy->entries = entries;
- return 1;
-}
-
-static int getter_W_Data_Section_count(lua_State* __ls) {
- W_Data_Section* dummy = check_W_Data_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Data_Section_entries(lua_State* __ls) {
- W_Data_Section* dummy = check_W_Data_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->entries);
- return 1;
-}
-
-static int setter_W_Data_Section_count(lua_State* __ls) {
- W_Data_Section* dummy = check_W_Data_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Data_Section_entries(lua_State* __ls) {
- W_Data_Section* dummy = check_W_Data_Section(__ls, 1);
- dummy->entries = luaL_checkudata(__ls, 2, "entries_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Data_Section_methods[] = {
- {"new", new_W_Data_Section},
- {"set_count", setter_W_Data_Section_count},
- {"set_entries", setter_W_Data_Section_entries},
- {"count", getter_W_Data_Section_count},
- {"entries", getter_W_Data_Section_entries},
- {0,0}
-};
-
-static const luaL_Reg W_Data_Section_meta[] = {
- {0, 0}
-};
-
-int W_Data_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Data_Section", W_Data_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Data_Section");
- luaL_openlib(__ls, 0, W_Data_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Data_Section_tablegen.h b/bruiser/luatablegen/W_Data_Section_tablegen.h
deleted file mode 100644
index 6275d39..0000000
--- a/bruiser/luatablegen/W_Data_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Data_Section_H
-#define _W_Data_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Data_Section* convert_W_Data_Section (lua_State* __ls, int index);
-static W_Data_Section* check_W_Data_Section(lua_State* __ls, int index);
-W_Data_Section* push_W_Data_Section(lua_State* __ls);
-int W_Data_Section_push_args(lua_State* __ls, W_Data_Section* _st);
-int new_W_Data_Section(lua_State* __ls);
-static int getter_W_Data_Section_count(lua_State* __ls);
-static int getter_W_Data_Section_entries(lua_State* __ls);
-static int setter_W_Data_Section_count(lua_State* __ls);
-static int setter_W_Data_Section_entries(lua_State* __ls);
-int W_Data_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Data_Segment_tablegen.c b/bruiser/luatablegen/W_Data_Segment_tablegen.c
deleted file mode 100644
index 1fbac4d..0000000
--- a/bruiser/luatablegen/W_Data_Segment_tablegen.c
+++ /dev/null
@@ -1,138 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Data_Segment_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Data_Segment* convert_W_Data_Segment (lua_State* __ls, int index) {
- W_Data_Segment* dummy = (W_Data_Segment*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Data_Segment:bad user data type.\n");
- return dummy;
-}
-
-static W_Data_Segment* check_W_Data_Segment(lua_State* __ls, int index) {
- W_Data_Segment* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Data_Segment*)luaL_checkudata(__ls, index, "W_Data_Segment");
- if (dummy == NULL) printf("W_Data_Segment:bad user data type.\n");
- return dummy;
-}
-
-W_Data_Segment* push_W_Data_Segment(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Data_Segment* dummy = lua_newuserdata(__ls, sizeof(W_Data_Segment));
- luaL_getmetatable(__ls, "W_Data_Segment");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Data_Segment_push_args(lua_State* __ls, W_Data_Segment* _st) {
- lua_checkstack(__ls, 4);
- lua_pushinteger(__ls, _st->index);
- lua_pushlightuserdata(__ls, _st->offset);
- lua_pushinteger(__ls, _st->size);
- lua_pushstring(__ls, _st->data);
- return 0;
-}
-
-int new_W_Data_Segment(lua_State* __ls) {
- lua_checkstack(__ls, 4);
- varuint32 index = luaL_optinteger(__ls,-4,0);
- init_expr_t* offset = lua_touserdata(__ls,-3);
- varuint32 size = luaL_optinteger(__ls,-2,0);
- char* data = lua_tostring(__ls,-1);
- W_Data_Segment* dummy = push_W_Data_Segment(__ls);
- dummy->index = index;
- dummy->offset = offset;
- dummy->size = size;
- dummy->data = data;
- return 1;
-}
-
-static int getter_W_Data_Segment_index(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->index);
- return 1;
-}
-static int getter_W_Data_Segment_offset(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->offset);
- return 1;
-}
-static int getter_W_Data_Segment_size(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->size);
- return 1;
-}
-static int getter_W_Data_Segment_data(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushstring(__ls, dummy->data);
- return 1;
-}
-
-static int setter_W_Data_Segment_index(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- dummy->index = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Data_Segment_offset(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- dummy->offset = luaL_checkudata(__ls, 2, "offset_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Data_Segment_size(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- dummy->size = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Data_Segment_data(lua_State* __ls) {
- W_Data_Segment* dummy = check_W_Data_Segment(__ls, 1);
- dummy->data = luaL_checkstring(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Data_Segment_methods[] = {
- {"new", new_W_Data_Segment},
- {"set_index", setter_W_Data_Segment_index},
- {"set_offset", setter_W_Data_Segment_offset},
- {"set_size", setter_W_Data_Segment_size},
- {"set_data", setter_W_Data_Segment_data},
- {"index", getter_W_Data_Segment_index},
- {"offset", getter_W_Data_Segment_offset},
- {"size", getter_W_Data_Segment_size},
- {"data", getter_W_Data_Segment_data},
- {0,0}
-};
-
-static const luaL_Reg W_Data_Segment_meta[] = {
- {0, 0}
-};
-
-int W_Data_Segment_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Data_Segment", W_Data_Segment_methods, 0);
- luaL_newmetatable(__ls, "W_Data_Segment");
- luaL_openlib(__ls, 0, W_Data_Segment_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Data_Segment_tablegen.h b/bruiser/luatablegen/W_Data_Segment_tablegen.h
deleted file mode 100644
index c80428b..0000000
--- a/bruiser/luatablegen/W_Data_Segment_tablegen.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Data_Segment_H
-#define _W_Data_Segment_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Data_Segment* convert_W_Data_Segment (lua_State* __ls, int index);
-static W_Data_Segment* check_W_Data_Segment(lua_State* __ls, int index);
-W_Data_Segment* push_W_Data_Segment(lua_State* __ls);
-int W_Data_Segment_push_args(lua_State* __ls, W_Data_Segment* _st);
-int new_W_Data_Segment(lua_State* __ls);
-static int getter_W_Data_Segment_index(lua_State* __ls);
-static int getter_W_Data_Segment_offset(lua_State* __ls);
-static int getter_W_Data_Segment_size(lua_State* __ls);
-static int getter_W_Data_Segment_data(lua_State* __ls);
-static int setter_W_Data_Segment_index(lua_State* __ls);
-static int setter_W_Data_Segment_offset(lua_State* __ls);
-static int setter_W_Data_Segment_size(lua_State* __ls);
-static int setter_W_Data_Segment_data(lua_State* __ls);
-int W_Data_Segment_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Elem_Segment_tablegen.c b/bruiser/luatablegen/W_Elem_Segment_tablegen.c
deleted file mode 100644
index a9ae97d..0000000
--- a/bruiser/luatablegen/W_Elem_Segment_tablegen.c
+++ /dev/null
@@ -1,138 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Elem_Segment_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Elem_Segment* convert_W_Elem_Segment (lua_State* __ls, int index) {
- W_Elem_Segment* dummy = (W_Elem_Segment*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Elem_Segment:bad user data type.\n");
- return dummy;
-}
-
-static W_Elem_Segment* check_W_Elem_Segment(lua_State* __ls, int index) {
- W_Elem_Segment* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Elem_Segment*)luaL_checkudata(__ls, index, "W_Elem_Segment");
- if (dummy == NULL) printf("W_Elem_Segment:bad user data type.\n");
- return dummy;
-}
-
-W_Elem_Segment* push_W_Elem_Segment(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Elem_Segment* dummy = lua_newuserdata(__ls, sizeof(W_Elem_Segment));
- luaL_getmetatable(__ls, "W_Elem_Segment");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Elem_Segment_push_args(lua_State* __ls, W_Elem_Segment* _st) {
- lua_checkstack(__ls, 4);
- lua_pushinteger(__ls, _st->index);
- lua_pushlightuserdata(__ls, _st->offset);
- lua_pushinteger(__ls, _st->num_length);
- lua_pushinteger(__ls, _st->elems);
- return 0;
-}
-
-int new_W_Elem_Segment(lua_State* __ls) {
- lua_checkstack(__ls, 4);
- varuint32 index = luaL_optinteger(__ls,-4,0);
- init_expr_t* offset = lua_touserdata(__ls,-3);
- varuint32 num_length = luaL_optinteger(__ls,-2,0);
- varuint32* elems = luaL_optinteger(__ls,-1,0);
- W_Elem_Segment* dummy = push_W_Elem_Segment(__ls);
- dummy->index = index;
- dummy->offset = offset;
- dummy->num_length = num_length;
- dummy->elems = elems;
- return 1;
-}
-
-static int getter_W_Elem_Segment_index(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->index);
- return 1;
-}
-static int getter_W_Elem_Segment_offset(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->offset);
- return 1;
-}
-static int getter_W_Elem_Segment_num_length(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->num_length);
- return 1;
-}
-static int getter_W_Elem_Segment_elems(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->elems);
- return 1;
-}
-
-static int setter_W_Elem_Segment_index(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- dummy->index = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Elem_Segment_offset(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- dummy->offset = luaL_checkudata(__ls, 2, "offset_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Elem_Segment_num_length(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- dummy->num_length = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Elem_Segment_elems(lua_State* __ls) {
- W_Elem_Segment* dummy = check_W_Elem_Segment(__ls, 1);
- dummy->elems = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Elem_Segment_methods[] = {
- {"new", new_W_Elem_Segment},
- {"set_index", setter_W_Elem_Segment_index},
- {"set_offset", setter_W_Elem_Segment_offset},
- {"set_num_length", setter_W_Elem_Segment_num_length},
- {"set_elems", setter_W_Elem_Segment_elems},
- {"index", getter_W_Elem_Segment_index},
- {"offset", getter_W_Elem_Segment_offset},
- {"num_length", getter_W_Elem_Segment_num_length},
- {"elems", getter_W_Elem_Segment_elems},
- {0,0}
-};
-
-static const luaL_Reg W_Elem_Segment_meta[] = {
- {0, 0}
-};
-
-int W_Elem_Segment_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Elem_Segment", W_Elem_Segment_methods, 0);
- luaL_newmetatable(__ls, "W_Elem_Segment");
- luaL_openlib(__ls, 0, W_Elem_Segment_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Elem_Segment_tablegen.h b/bruiser/luatablegen/W_Elem_Segment_tablegen.h
deleted file mode 100644
index 46fded5..0000000
--- a/bruiser/luatablegen/W_Elem_Segment_tablegen.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Elem_Segment_H
-#define _W_Elem_Segment_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Elem_Segment* convert_W_Elem_Segment (lua_State* __ls, int index);
-static W_Elem_Segment* check_W_Elem_Segment(lua_State* __ls, int index);
-W_Elem_Segment* push_W_Elem_Segment(lua_State* __ls);
-int W_Elem_Segment_push_args(lua_State* __ls, W_Elem_Segment* _st);
-int new_W_Elem_Segment(lua_State* __ls);
-static int getter_W_Elem_Segment_index(lua_State* __ls);
-static int getter_W_Elem_Segment_offset(lua_State* __ls);
-static int getter_W_Elem_Segment_num_length(lua_State* __ls);
-static int getter_W_Elem_Segment_elems(lua_State* __ls);
-static int setter_W_Elem_Segment_index(lua_State* __ls);
-static int setter_W_Elem_Segment_offset(lua_State* __ls);
-static int setter_W_Elem_Segment_num_length(lua_State* __ls);
-static int setter_W_Elem_Segment_elems(lua_State* __ls);
-int W_Elem_Segment_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Element_Section_tablegen.c b/bruiser/luatablegen/W_Element_Section_tablegen.c
deleted file mode 100644
index b00b7fc..0000000
--- a/bruiser/luatablegen/W_Element_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Element_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Element_Section* convert_W_Element_Section (lua_State* __ls, int index) {
- W_Element_Section* dummy = (W_Element_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Element_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Element_Section* check_W_Element_Section(lua_State* __ls, int index) {
- W_Element_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Element_Section*)luaL_checkudata(__ls, index, "W_Element_Section");
- if (dummy == NULL) printf("W_Element_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Element_Section* push_W_Element_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Element_Section* dummy = lua_newuserdata(__ls, sizeof(W_Element_Section));
- luaL_getmetatable(__ls, "W_Element_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Element_Section_push_args(lua_State* __ls, W_Element_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->entries);
- return 0;
-}
-
-int new_W_Element_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- W_Elem_Segment** entries = lua_touserdata(__ls,-1);
- W_Element_Section* dummy = push_W_Element_Section(__ls);
- dummy->count = count;
- dummy->entries = entries;
- return 1;
-}
-
-static int getter_W_Element_Section_count(lua_State* __ls) {
- W_Element_Section* dummy = check_W_Element_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Element_Section_entries(lua_State* __ls) {
- W_Element_Section* dummy = check_W_Element_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->entries);
- return 1;
-}
-
-static int setter_W_Element_Section_count(lua_State* __ls) {
- W_Element_Section* dummy = check_W_Element_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Element_Section_entries(lua_State* __ls) {
- W_Element_Section* dummy = check_W_Element_Section(__ls, 1);
- dummy->entries = luaL_checkudata(__ls, 2, "entries_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Element_Section_methods[] = {
- {"new", new_W_Element_Section},
- {"set_count", setter_W_Element_Section_count},
- {"set_entries", setter_W_Element_Section_entries},
- {"count", getter_W_Element_Section_count},
- {"entries", getter_W_Element_Section_entries},
- {0,0}
-};
-
-static const luaL_Reg W_Element_Section_meta[] = {
- {0, 0}
-};
-
-int W_Element_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Element_Section", W_Element_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Element_Section");
- luaL_openlib(__ls, 0, W_Element_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Element_Section_tablegen.h b/bruiser/luatablegen/W_Element_Section_tablegen.h
deleted file mode 100644
index 9123bb8..0000000
--- a/bruiser/luatablegen/W_Element_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Element_Section_H
-#define _W_Element_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Element_Section* convert_W_Element_Section (lua_State* __ls, int index);
-static W_Element_Section* check_W_Element_Section(lua_State* __ls, int index);
-W_Element_Section* push_W_Element_Section(lua_State* __ls);
-int W_Element_Section_push_args(lua_State* __ls, W_Element_Section* _st);
-int new_W_Element_Section(lua_State* __ls);
-static int getter_W_Element_Section_count(lua_State* __ls);
-static int getter_W_Element_Section_entries(lua_State* __ls);
-static int setter_W_Element_Section_count(lua_State* __ls);
-static int setter_W_Element_Section_entries(lua_State* __ls);
-int W_Element_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Export_Entry_tablegen.c b/bruiser/luatablegen/W_Export_Entry_tablegen.c
deleted file mode 100644
index 68f40c2..0000000
--- a/bruiser/luatablegen/W_Export_Entry_tablegen.c
+++ /dev/null
@@ -1,138 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Export_Entry_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Export_Entry* convert_W_Export_Entry (lua_State* __ls, int index) {
- W_Export_Entry* dummy = (W_Export_Entry*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Export_Entry:bad user data type.\n");
- return dummy;
-}
-
-static W_Export_Entry* check_W_Export_Entry(lua_State* __ls, int index) {
- W_Export_Entry* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Export_Entry*)luaL_checkudata(__ls, index, "W_Export_Entry");
- if (dummy == NULL) printf("W_Export_Entry:bad user data type.\n");
- return dummy;
-}
-
-W_Export_Entry* push_W_Export_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Export_Entry* dummy = lua_newuserdata(__ls, sizeof(W_Export_Entry));
- luaL_getmetatable(__ls, "W_Export_Entry");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Export_Entry_push_args(lua_State* __ls, W_Export_Entry* _st) {
- lua_checkstack(__ls, 4);
- lua_pushinteger(__ls, _st->field_len);
- lua_pushstring(__ls, _st->field_str);
- lua_pushinteger(__ls, _st->kind);
- lua_pushinteger(__ls, _st->index);
- return 0;
-}
-
-int new_W_Export_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 4);
- varuint32 field_len = luaL_optinteger(__ls,-4,0);
- char* field_str = lua_tostring(__ls,-3);
- enum external_kind_t kind = luaL_optinteger(__ls,-2,0);
- varuint32 index = luaL_optinteger(__ls,-1,0);
- W_Export_Entry* dummy = push_W_Export_Entry(__ls);
- dummy->field_len = field_len;
- dummy->field_str = field_str;
- dummy->kind = kind;
- dummy->index = index;
- return 1;
-}
-
-static int getter_W_Export_Entry_field_len(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->field_len);
- return 1;
-}
-static int getter_W_Export_Entry_field_str(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushstring(__ls, dummy->field_str);
- return 1;
-}
-static int getter_W_Export_Entry_kind(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->kind);
- return 1;
-}
-static int getter_W_Export_Entry_index(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->index);
- return 1;
-}
-
-static int setter_W_Export_Entry_field_len(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- dummy->field_len = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Export_Entry_field_str(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- dummy->field_str = luaL_checkstring(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Export_Entry_kind(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- dummy->kind = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Export_Entry_index(lua_State* __ls) {
- W_Export_Entry* dummy = check_W_Export_Entry(__ls, 1);
- dummy->index = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Export_Entry_methods[] = {
- {"new", new_W_Export_Entry},
- {"set_field_len", setter_W_Export_Entry_field_len},
- {"set_field_str", setter_W_Export_Entry_field_str},
- {"set_kind", setter_W_Export_Entry_kind},
- {"set_index", setter_W_Export_Entry_index},
- {"field_len", getter_W_Export_Entry_field_len},
- {"field_str", getter_W_Export_Entry_field_str},
- {"kind", getter_W_Export_Entry_kind},
- {"index", getter_W_Export_Entry_index},
- {0,0}
-};
-
-static const luaL_Reg W_Export_Entry_meta[] = {
- {0, 0}
-};
-
-int W_Export_Entry_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Export_Entry", W_Export_Entry_methods, 0);
- luaL_newmetatable(__ls, "W_Export_Entry");
- luaL_openlib(__ls, 0, W_Export_Entry_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Export_Entry_tablegen.h b/bruiser/luatablegen/W_Export_Entry_tablegen.h
deleted file mode 100644
index c4fcdbd..0000000
--- a/bruiser/luatablegen/W_Export_Entry_tablegen.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Export_Entry_H
-#define _W_Export_Entry_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Export_Entry* convert_W_Export_Entry (lua_State* __ls, int index);
-static W_Export_Entry* check_W_Export_Entry(lua_State* __ls, int index);
-W_Export_Entry* push_W_Export_Entry(lua_State* __ls);
-int W_Export_Entry_push_args(lua_State* __ls, W_Export_Entry* _st);
-int new_W_Export_Entry(lua_State* __ls);
-static int getter_W_Export_Entry_field_len(lua_State* __ls);
-static int getter_W_Export_Entry_field_str(lua_State* __ls);
-static int getter_W_Export_Entry_kind(lua_State* __ls);
-static int getter_W_Export_Entry_index(lua_State* __ls);
-static int setter_W_Export_Entry_field_len(lua_State* __ls);
-static int setter_W_Export_Entry_field_str(lua_State* __ls);
-static int setter_W_Export_Entry_kind(lua_State* __ls);
-static int setter_W_Export_Entry_index(lua_State* __ls);
-int W_Export_Entry_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Export_Section_tablegen.c b/bruiser/luatablegen/W_Export_Section_tablegen.c
deleted file mode 100644
index 3ec02c8..0000000
--- a/bruiser/luatablegen/W_Export_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Export_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Export_Section* convert_W_Export_Section (lua_State* __ls, int index) {
- W_Export_Section* dummy = (W_Export_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Export_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Export_Section* check_W_Export_Section(lua_State* __ls, int index) {
- W_Export_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Export_Section*)luaL_checkudata(__ls, index, "W_Export_Section");
- if (dummy == NULL) printf("W_Export_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Export_Section* push_W_Export_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Export_Section* dummy = lua_newuserdata(__ls, sizeof(W_Export_Section));
- luaL_getmetatable(__ls, "W_Export_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Export_Section_push_args(lua_State* __ls, W_Export_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->entries);
- return 0;
-}
-
-int new_W_Export_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- W_Export_Entry** entries = lua_touserdata(__ls,-1);
- W_Export_Section* dummy = push_W_Export_Section(__ls);
- dummy->count = count;
- dummy->entries = entries;
- return 1;
-}
-
-static int getter_W_Export_Section_count(lua_State* __ls) {
- W_Export_Section* dummy = check_W_Export_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Export_Section_entries(lua_State* __ls) {
- W_Export_Section* dummy = check_W_Export_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->entries);
- return 1;
-}
-
-static int setter_W_Export_Section_count(lua_State* __ls) {
- W_Export_Section* dummy = check_W_Export_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Export_Section_entries(lua_State* __ls) {
- W_Export_Section* dummy = check_W_Export_Section(__ls, 1);
- dummy->entries = luaL_checkudata(__ls, 2, "entries_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Export_Section_methods[] = {
- {"new", new_W_Export_Section},
- {"set_count", setter_W_Export_Section_count},
- {"set_entries", setter_W_Export_Section_entries},
- {"count", getter_W_Export_Section_count},
- {"entries", getter_W_Export_Section_entries},
- {0,0}
-};
-
-static const luaL_Reg W_Export_Section_meta[] = {
- {0, 0}
-};
-
-int W_Export_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Export_Section", W_Export_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Export_Section");
- luaL_openlib(__ls, 0, W_Export_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Export_Section_tablegen.h b/bruiser/luatablegen/W_Export_Section_tablegen.h
deleted file mode 100644
index ded408e..0000000
--- a/bruiser/luatablegen/W_Export_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Export_Section_H
-#define _W_Export_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Export_Section* convert_W_Export_Section (lua_State* __ls, int index);
-static W_Export_Section* check_W_Export_Section(lua_State* __ls, int index);
-W_Export_Section* push_W_Export_Section(lua_State* __ls);
-int W_Export_Section_push_args(lua_State* __ls, W_Export_Section* _st);
-int new_W_Export_Section(lua_State* __ls);
-static int getter_W_Export_Section_count(lua_State* __ls);
-static int getter_W_Export_Section_entries(lua_State* __ls);
-static int setter_W_Export_Section_count(lua_State* __ls);
-static int setter_W_Export_Section_entries(lua_State* __ls);
-int W_Export_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Function_Body_tablegen.c b/bruiser/luatablegen/W_Function_Body_tablegen.c
deleted file mode 100644
index 59a6a10..0000000
--- a/bruiser/luatablegen/W_Function_Body_tablegen.c
+++ /dev/null
@@ -1,138 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Function_Body_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Function_Body* convert_W_Function_Body (lua_State* __ls, int index) {
- W_Function_Body* dummy = (W_Function_Body*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Function_Body:bad user data type.\n");
- return dummy;
-}
-
-static W_Function_Body* check_W_Function_Body(lua_State* __ls, int index) {
- W_Function_Body* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Function_Body*)luaL_checkudata(__ls, index, "W_Function_Body");
- if (dummy == NULL) printf("W_Function_Body:bad user data type.\n");
- return dummy;
-}
-
-W_Function_Body* push_W_Function_Body(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Function_Body* dummy = lua_newuserdata(__ls, sizeof(W_Function_Body));
- luaL_getmetatable(__ls, "W_Function_Body");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Function_Body_push_args(lua_State* __ls, W_Function_Body* _st) {
- lua_checkstack(__ls, 4);
- lua_pushinteger(__ls, _st->body_size);
- lua_pushinteger(__ls, _st->local_count);
- lua_pushlightuserdata(__ls, _st->locals);
- lua_pushstring(__ls, _st->code);
- return 0;
-}
-
-int new_W_Function_Body(lua_State* __ls) {
- lua_checkstack(__ls, 4);
- varuint32 body_size = luaL_optinteger(__ls,-4,0);
- varuint32 local_count = luaL_optinteger(__ls,-3,0);
- W_Local_Entry** locals = lua_touserdata(__ls,-2);
- char* code = lua_tostring(__ls,-1);
- W_Function_Body* dummy = push_W_Function_Body(__ls);
- dummy->body_size = body_size;
- dummy->local_count = local_count;
- dummy->locals = locals;
- dummy->code = code;
- return 1;
-}
-
-static int getter_W_Function_Body_body_size(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->body_size);
- return 1;
-}
-static int getter_W_Function_Body_local_count(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->local_count);
- return 1;
-}
-static int getter_W_Function_Body_locals(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->locals);
- return 1;
-}
-static int getter_W_Function_Body_code(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushstring(__ls, dummy->code);
- return 1;
-}
-
-static int setter_W_Function_Body_body_size(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- dummy->body_size = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Function_Body_local_count(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- dummy->local_count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Function_Body_locals(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- dummy->locals = luaL_checkudata(__ls, 2, "locals_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Function_Body_code(lua_State* __ls) {
- W_Function_Body* dummy = check_W_Function_Body(__ls, 1);
- dummy->code = luaL_checkstring(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Function_Body_methods[] = {
- {"new", new_W_Function_Body},
- {"set_body_size", setter_W_Function_Body_body_size},
- {"set_local_count", setter_W_Function_Body_local_count},
- {"set_locals", setter_W_Function_Body_locals},
- {"set_code", setter_W_Function_Body_code},
- {"body_size", getter_W_Function_Body_body_size},
- {"local_count", getter_W_Function_Body_local_count},
- {"locals", getter_W_Function_Body_locals},
- {"code", getter_W_Function_Body_code},
- {0,0}
-};
-
-static const luaL_Reg W_Function_Body_meta[] = {
- {0, 0}
-};
-
-int W_Function_Body_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Function_Body", W_Function_Body_methods, 0);
- luaL_newmetatable(__ls, "W_Function_Body");
- luaL_openlib(__ls, 0, W_Function_Body_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Function_Body_tablegen.h b/bruiser/luatablegen/W_Function_Body_tablegen.h
deleted file mode 100644
index bb9bf13..0000000
--- a/bruiser/luatablegen/W_Function_Body_tablegen.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Function_Body_H
-#define _W_Function_Body_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Function_Body* convert_W_Function_Body (lua_State* __ls, int index);
-static W_Function_Body* check_W_Function_Body(lua_State* __ls, int index);
-W_Function_Body* push_W_Function_Body(lua_State* __ls);
-int W_Function_Body_push_args(lua_State* __ls, W_Function_Body* _st);
-int new_W_Function_Body(lua_State* __ls);
-static int getter_W_Function_Body_body_size(lua_State* __ls);
-static int getter_W_Function_Body_local_count(lua_State* __ls);
-static int getter_W_Function_Body_locals(lua_State* __ls);
-static int getter_W_Function_Body_code(lua_State* __ls);
-static int setter_W_Function_Body_body_size(lua_State* __ls);
-static int setter_W_Function_Body_local_count(lua_State* __ls);
-static int setter_W_Function_Body_locals(lua_State* __ls);
-static int setter_W_Function_Body_code(lua_State* __ls);
-int W_Function_Body_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Function_Section_tablegen.c b/bruiser/luatablegen/W_Function_Section_tablegen.c
deleted file mode 100644
index a2de6b6..0000000
--- a/bruiser/luatablegen/W_Function_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Function_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Function_Section* convert_W_Function_Section (lua_State* __ls, int index) {
- W_Function_Section* dummy = (W_Function_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Function_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Function_Section* check_W_Function_Section(lua_State* __ls, int index) {
- W_Function_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Function_Section*)luaL_checkudata(__ls, index, "W_Function_Section");
- if (dummy == NULL) printf("W_Function_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Function_Section* push_W_Function_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Function_Section* dummy = lua_newuserdata(__ls, sizeof(W_Function_Section));
- luaL_getmetatable(__ls, "W_Function_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Function_Section_push_args(lua_State* __ls, W_Function_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->types);
- return 0;
-}
-
-int new_W_Function_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- varuint32* types = lua_touserdata(__ls,-1);
- W_Function_Section* dummy = push_W_Function_Section(__ls);
- dummy->count = count;
- dummy->types = types;
- return 1;
-}
-
-static int getter_W_Function_Section_count(lua_State* __ls) {
- W_Function_Section* dummy = check_W_Function_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Function_Section_types(lua_State* __ls) {
- W_Function_Section* dummy = check_W_Function_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->types);
- return 1;
-}
-
-static int setter_W_Function_Section_count(lua_State* __ls) {
- W_Function_Section* dummy = check_W_Function_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Function_Section_types(lua_State* __ls) {
- W_Function_Section* dummy = check_W_Function_Section(__ls, 1);
- dummy->types = luaL_checkudata(__ls, 2, "types_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Function_Section_methods[] = {
- {"new", new_W_Function_Section},
- {"set_count", setter_W_Function_Section_count},
- {"set_types", setter_W_Function_Section_types},
- {"count", getter_W_Function_Section_count},
- {"types", getter_W_Function_Section_types},
- {0,0}
-};
-
-static const luaL_Reg W_Function_Section_meta[] = {
- {0, 0}
-};
-
-int W_Function_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Function_Section", W_Function_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Function_Section");
- luaL_openlib(__ls, 0, W_Function_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Function_Section_tablegen.h b/bruiser/luatablegen/W_Function_Section_tablegen.h
deleted file mode 100644
index 328e2c3..0000000
--- a/bruiser/luatablegen/W_Function_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Function_Section_H
-#define _W_Function_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Function_Section* convert_W_Function_Section (lua_State* __ls, int index);
-static W_Function_Section* check_W_Function_Section(lua_State* __ls, int index);
-W_Function_Section* push_W_Function_Section(lua_State* __ls);
-int W_Function_Section_push_args(lua_State* __ls, W_Function_Section* _st);
-int new_W_Function_Section(lua_State* __ls);
-static int getter_W_Function_Section_count(lua_State* __ls);
-static int getter_W_Function_Section_types(lua_State* __ls);
-static int setter_W_Function_Section_count(lua_State* __ls);
-static int setter_W_Function_Section_types(lua_State* __ls);
-int W_Function_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Global_Entry_tablegen.c b/bruiser/luatablegen/W_Global_Entry_tablegen.c
deleted file mode 100644
index 0259cd6..0000000
--- a/bruiser/luatablegen/W_Global_Entry_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Global_Entry_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Global_Entry* convert_W_Global_Entry (lua_State* __ls, int index) {
- W_Global_Entry* dummy = (W_Global_Entry*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Global_Entry:bad user data type.\n");
- return dummy;
-}
-
-static W_Global_Entry* check_W_Global_Entry(lua_State* __ls, int index) {
- W_Global_Entry* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Global_Entry*)luaL_checkudata(__ls, index, "W_Global_Entry");
- if (dummy == NULL) printf("W_Global_Entry:bad user data type.\n");
- return dummy;
-}
-
-W_Global_Entry* push_W_Global_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Global_Entry* dummy = lua_newuserdata(__ls, sizeof(W_Global_Entry));
- luaL_getmetatable(__ls, "W_Global_Entry");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Global_Entry_push_args(lua_State* __ls, W_Global_Entry* _st) {
- lua_checkstack(__ls, 2);
- lua_pushlightuserdata(__ls, _st->type);
- lua_pushlightuserdata(__ls, _st->init);
- return 0;
-}
-
-int new_W_Global_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- global_type_t* type = lua_touserdata(__ls,-2);
- init_expr_t* init = lua_touserdata(__ls,-1);
- W_Global_Entry* dummy = push_W_Global_Entry(__ls);
- dummy->type = type;
- dummy->init = init;
- return 1;
-}
-
-static int getter_W_Global_Entry_type(lua_State* __ls) {
- W_Global_Entry* dummy = check_W_Global_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->type);
- return 1;
-}
-static int getter_W_Global_Entry_init(lua_State* __ls) {
- W_Global_Entry* dummy = check_W_Global_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->init);
- return 1;
-}
-
-static int setter_W_Global_Entry_type(lua_State* __ls) {
- W_Global_Entry* dummy = check_W_Global_Entry(__ls, 1);
- dummy->type = luaL_checkudata(__ls, 2, "type_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Global_Entry_init(lua_State* __ls) {
- W_Global_Entry* dummy = check_W_Global_Entry(__ls, 1);
- dummy->init = luaL_checkudata(__ls, 2, "init_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Global_Entry_methods[] = {
- {"new", new_W_Global_Entry},
- {"set_type", setter_W_Global_Entry_type},
- {"set_init", setter_W_Global_Entry_init},
- {"type", getter_W_Global_Entry_type},
- {"init", getter_W_Global_Entry_init},
- {0,0}
-};
-
-static const luaL_Reg W_Global_Entry_meta[] = {
- {0, 0}
-};
-
-int W_Global_Entry_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Global_Entry", W_Global_Entry_methods, 0);
- luaL_newmetatable(__ls, "W_Global_Entry");
- luaL_openlib(__ls, 0, W_Global_Entry_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Global_Entry_tablegen.h b/bruiser/luatablegen/W_Global_Entry_tablegen.h
deleted file mode 100644
index 7432095..0000000
--- a/bruiser/luatablegen/W_Global_Entry_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Global_Entry_H
-#define _W_Global_Entry_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Global_Entry* convert_W_Global_Entry (lua_State* __ls, int index);
-static W_Global_Entry* check_W_Global_Entry(lua_State* __ls, int index);
-W_Global_Entry* push_W_Global_Entry(lua_State* __ls);
-int W_Global_Entry_push_args(lua_State* __ls, W_Global_Entry* _st);
-int new_W_Global_Entry(lua_State* __ls);
-static int getter_W_Global_Entry_type(lua_State* __ls);
-static int getter_W_Global_Entry_init(lua_State* __ls);
-static int setter_W_Global_Entry_type(lua_State* __ls);
-static int setter_W_Global_Entry_init(lua_State* __ls);
-int W_Global_Entry_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Global_Section_tablegen.c b/bruiser/luatablegen/W_Global_Section_tablegen.c
deleted file mode 100644
index 0bb2056..0000000
--- a/bruiser/luatablegen/W_Global_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Global_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Global_Section* convert_W_Global_Section (lua_State* __ls, int index) {
- W_Global_Section* dummy = (W_Global_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Global_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Global_Section* check_W_Global_Section(lua_State* __ls, int index) {
- W_Global_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Global_Section*)luaL_checkudata(__ls, index, "W_Global_Section");
- if (dummy == NULL) printf("W_Global_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Global_Section* push_W_Global_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Global_Section* dummy = lua_newuserdata(__ls, sizeof(W_Global_Section));
- luaL_getmetatable(__ls, "W_Global_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Global_Section_push_args(lua_State* __ls, W_Global_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->globals);
- return 0;
-}
-
-int new_W_Global_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- W_Global_Entry** globals = lua_touserdata(__ls,-1);
- W_Global_Section* dummy = push_W_Global_Section(__ls);
- dummy->count = count;
- dummy->globals = globals;
- return 1;
-}
-
-static int getter_W_Global_Section_count(lua_State* __ls) {
- W_Global_Section* dummy = check_W_Global_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Global_Section_globals(lua_State* __ls) {
- W_Global_Section* dummy = check_W_Global_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->globals);
- return 1;
-}
-
-static int setter_W_Global_Section_count(lua_State* __ls) {
- W_Global_Section* dummy = check_W_Global_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Global_Section_globals(lua_State* __ls) {
- W_Global_Section* dummy = check_W_Global_Section(__ls, 1);
- dummy->globals = luaL_checkudata(__ls, 2, "globals_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Global_Section_methods[] = {
- {"new", new_W_Global_Section},
- {"set_count", setter_W_Global_Section_count},
- {"set_globals", setter_W_Global_Section_globals},
- {"count", getter_W_Global_Section_count},
- {"globals", getter_W_Global_Section_globals},
- {0,0}
-};
-
-static const luaL_Reg W_Global_Section_meta[] = {
- {0, 0}
-};
-
-int W_Global_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Global_Section", W_Global_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Global_Section");
- luaL_openlib(__ls, 0, W_Global_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Global_Section_tablegen.h b/bruiser/luatablegen/W_Global_Section_tablegen.h
deleted file mode 100644
index 52ab0c5..0000000
--- a/bruiser/luatablegen/W_Global_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Global_Section_H
-#define _W_Global_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Global_Section* convert_W_Global_Section (lua_State* __ls, int index);
-static W_Global_Section* check_W_Global_Section(lua_State* __ls, int index);
-W_Global_Section* push_W_Global_Section(lua_State* __ls);
-int W_Global_Section_push_args(lua_State* __ls, W_Global_Section* _st);
-int new_W_Global_Section(lua_State* __ls);
-static int getter_W_Global_Section_count(lua_State* __ls);
-static int getter_W_Global_Section_globals(lua_State* __ls);
-static int setter_W_Global_Section_count(lua_State* __ls);
-static int setter_W_Global_Section_globals(lua_State* __ls);
-int W_Global_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Import_Section_Entry_tablegen.c b/bruiser/luatablegen/W_Import_Section_Entry_tablegen.c
deleted file mode 100644
index 97ee26b..0000000
--- a/bruiser/luatablegen/W_Import_Section_Entry_tablegen.c
+++ /dev/null
@@ -1,172 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Import_Section_Entry_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Import_Section_Entry* convert_W_Import_Section_Entry (lua_State* __ls, int index) {
- W_Import_Section_Entry* dummy = (W_Import_Section_Entry*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Import_Section_Entry:bad user data type.\n");
- return dummy;
-}
-
-static W_Import_Section_Entry* check_W_Import_Section_Entry(lua_State* __ls, int index) {
- W_Import_Section_Entry* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Import_Section_Entry*)luaL_checkudata(__ls, index, "W_Import_Section_Entry");
- if (dummy == NULL) printf("W_Import_Section_Entry:bad user data type.\n");
- return dummy;
-}
-
-W_Import_Section_Entry* push_W_Import_Section_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Import_Section_Entry* dummy = lua_newuserdata(__ls, sizeof(W_Import_Section_Entry));
- luaL_getmetatable(__ls, "W_Import_Section_Entry");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Import_Section_Entry_push_args(lua_State* __ls, W_Import_Section_Entry* _st) {
- lua_checkstack(__ls, 6);
- lua_pushinteger(__ls, _st->module_length);
- lua_pushstring(__ls, _st->module_str);
- lua_pushinteger(__ls, _st->field_len);
- lua_pushstring(__ls, _st->field_str);
- lua_pushinteger(__ls, _st->kind);
- lua_pushlightuserdata(__ls, _st->type);
- return 0;
-}
-
-int new_W_Import_Section_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 6);
- varuint32 module_length = luaL_optinteger(__ls,-6,0);
- char* module_str = lua_tostring(__ls,-5);
- varuint32 field_len = luaL_optinteger(__ls,-4,0);
- char* field_str = lua_tostring(__ls,-3);
- enum external_kind_t kind = luaL_optinteger(__ls,-2,0);
- void* type = lua_touserdata(__ls,-1);
- W_Import_Section_Entry* dummy = push_W_Import_Section_Entry(__ls);
- dummy->module_length = module_length;
- dummy->module_str = module_str;
- dummy->field_len = field_len;
- dummy->field_str = field_str;
- dummy->kind = kind;
- dummy->type = type;
- return 1;
-}
-
-static int getter_W_Import_Section_Entry_module_length(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->module_length);
- return 1;
-}
-static int getter_W_Import_Section_Entry_module_str(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushstring(__ls, dummy->module_str);
- return 1;
-}
-static int getter_W_Import_Section_Entry_field_len(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->field_len);
- return 1;
-}
-static int getter_W_Import_Section_Entry_field_str(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushstring(__ls, dummy->field_str);
- return 1;
-}
-static int getter_W_Import_Section_Entry_kind(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->kind);
- return 1;
-}
-static int getter_W_Import_Section_Entry_type(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->type);
- return 1;
-}
-
-static int setter_W_Import_Section_Entry_module_length(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- dummy->module_length = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Import_Section_Entry_module_str(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- dummy->module_str = luaL_checkstring(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Import_Section_Entry_field_len(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- dummy->field_len = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Import_Section_Entry_field_str(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- dummy->field_str = luaL_checkstring(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Import_Section_Entry_kind(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- dummy->kind = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Import_Section_Entry_type(lua_State* __ls) {
- W_Import_Section_Entry* dummy = check_W_Import_Section_Entry(__ls, 1);
- dummy->type = luaL_checkudata(__ls, 2, "type_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Import_Section_Entry_methods[] = {
- {"new", new_W_Import_Section_Entry},
- {"set_module_length", setter_W_Import_Section_Entry_module_length},
- {"set_module_str", setter_W_Import_Section_Entry_module_str},
- {"set_field_len", setter_W_Import_Section_Entry_field_len},
- {"set_field_str", setter_W_Import_Section_Entry_field_str},
- {"set_kind", setter_W_Import_Section_Entry_kind},
- {"set_type", setter_W_Import_Section_Entry_type},
- {"module_length", getter_W_Import_Section_Entry_module_length},
- {"module_str", getter_W_Import_Section_Entry_module_str},
- {"field_len", getter_W_Import_Section_Entry_field_len},
- {"field_str", getter_W_Import_Section_Entry_field_str},
- {"kind", getter_W_Import_Section_Entry_kind},
- {"type", getter_W_Import_Section_Entry_type},
- {0,0}
-};
-
-static const luaL_Reg W_Import_Section_Entry_meta[] = {
- {0, 0}
-};
-
-int W_Import_Section_Entry_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Import_Section_Entry", W_Import_Section_Entry_methods, 0);
- luaL_newmetatable(__ls, "W_Import_Section_Entry");
- luaL_openlib(__ls, 0, W_Import_Section_Entry_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Import_Section_Entry_tablegen.h b/bruiser/luatablegen/W_Import_Section_Entry_tablegen.h
deleted file mode 100644
index 6086ae1..0000000
--- a/bruiser/luatablegen/W_Import_Section_Entry_tablegen.h
+++ /dev/null
@@ -1,41 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Import_Section_Entry_H
-#define _W_Import_Section_Entry_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Import_Section_Entry* convert_W_Import_Section_Entry (lua_State* __ls, int index);
-static W_Import_Section_Entry* check_W_Import_Section_Entry(lua_State* __ls, int index);
-W_Import_Section_Entry* push_W_Import_Section_Entry(lua_State* __ls);
-int W_Import_Section_Entry_push_args(lua_State* __ls, W_Import_Section_Entry* _st);
-int new_W_Import_Section_Entry(lua_State* __ls);
-static int getter_W_Import_Section_Entry_module_length(lua_State* __ls);
-static int getter_W_Import_Section_Entry_module_str(lua_State* __ls);
-static int getter_W_Import_Section_Entry_field_len(lua_State* __ls);
-static int getter_W_Import_Section_Entry_field_str(lua_State* __ls);
-static int getter_W_Import_Section_Entry_kind(lua_State* __ls);
-static int getter_W_Import_Section_Entry_type(lua_State* __ls);
-static int setter_W_Import_Section_Entry_module_length(lua_State* __ls);
-static int setter_W_Import_Section_Entry_module_str(lua_State* __ls);
-static int setter_W_Import_Section_Entry_field_len(lua_State* __ls);
-static int setter_W_Import_Section_Entry_field_str(lua_State* __ls);
-static int setter_W_Import_Section_Entry_kind(lua_State* __ls);
-static int setter_W_Import_Section_Entry_type(lua_State* __ls);
-int W_Import_Section_Entry_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Import_Section_tablegen.c b/bruiser/luatablegen/W_Import_Section_tablegen.c
deleted file mode 100644
index b56c81b..0000000
--- a/bruiser/luatablegen/W_Import_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Import_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Import_Section* convert_W_Import_Section (lua_State* __ls, int index) {
- W_Import_Section* dummy = (W_Import_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Import_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Import_Section* check_W_Import_Section(lua_State* __ls, int index) {
- W_Import_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Import_Section*)luaL_checkudata(__ls, index, "W_Import_Section");
- if (dummy == NULL) printf("W_Import_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Import_Section* push_W_Import_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Import_Section* dummy = lua_newuserdata(__ls, sizeof(W_Import_Section));
- luaL_getmetatable(__ls, "W_Import_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Import_Section_push_args(lua_State* __ls, W_Import_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->entries);
- return 0;
-}
-
-int new_W_Import_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- W_Import_Section_Entry** entries = lua_touserdata(__ls,-1);
- W_Import_Section* dummy = push_W_Import_Section(__ls);
- dummy->count = count;
- dummy->entries = entries;
- return 1;
-}
-
-static int getter_W_Import_Section_count(lua_State* __ls) {
- W_Import_Section* dummy = check_W_Import_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Import_Section_entries(lua_State* __ls) {
- W_Import_Section* dummy = check_W_Import_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->entries);
- return 1;
-}
-
-static int setter_W_Import_Section_count(lua_State* __ls) {
- W_Import_Section* dummy = check_W_Import_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Import_Section_entries(lua_State* __ls) {
- W_Import_Section* dummy = check_W_Import_Section(__ls, 1);
- dummy->entries = luaL_checkudata(__ls, 2, "entries_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Import_Section_methods[] = {
- {"new", new_W_Import_Section},
- {"set_count", setter_W_Import_Section_count},
- {"set_entries", setter_W_Import_Section_entries},
- {"count", getter_W_Import_Section_count},
- {"entries", getter_W_Import_Section_entries},
- {0,0}
-};
-
-static const luaL_Reg W_Import_Section_meta[] = {
- {0, 0}
-};
-
-int W_Import_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Import_Section", W_Import_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Import_Section");
- luaL_openlib(__ls, 0, W_Import_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Import_Section_tablegen.h b/bruiser/luatablegen/W_Import_Section_tablegen.h
deleted file mode 100644
index 5d51bf2..0000000
--- a/bruiser/luatablegen/W_Import_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Import_Section_H
-#define _W_Import_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Import_Section* convert_W_Import_Section (lua_State* __ls, int index);
-static W_Import_Section* check_W_Import_Section(lua_State* __ls, int index);
-W_Import_Section* push_W_Import_Section(lua_State* __ls);
-int W_Import_Section_push_args(lua_State* __ls, W_Import_Section* _st);
-int new_W_Import_Section(lua_State* __ls);
-static int getter_W_Import_Section_count(lua_State* __ls);
-static int getter_W_Import_Section_entries(lua_State* __ls);
-static int setter_W_Import_Section_count(lua_State* __ls);
-static int setter_W_Import_Section_entries(lua_State* __ls);
-int W_Import_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Local_Entry_tablegen.c b/bruiser/luatablegen/W_Local_Entry_tablegen.c
deleted file mode 100644
index db10c46..0000000
--- a/bruiser/luatablegen/W_Local_Entry_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Local_Entry_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Local_Entry* convert_W_Local_Entry (lua_State* __ls, int index) {
- W_Local_Entry* dummy = (W_Local_Entry*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Local_Entry:bad user data type.\n");
- return dummy;
-}
-
-static W_Local_Entry* check_W_Local_Entry(lua_State* __ls, int index) {
- W_Local_Entry* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Local_Entry*)luaL_checkudata(__ls, index, "W_Local_Entry");
- if (dummy == NULL) printf("W_Local_Entry:bad user data type.\n");
- return dummy;
-}
-
-W_Local_Entry* push_W_Local_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Local_Entry* dummy = lua_newuserdata(__ls, sizeof(W_Local_Entry));
- luaL_getmetatable(__ls, "W_Local_Entry");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Local_Entry_push_args(lua_State* __ls, W_Local_Entry* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushinteger(__ls, _st->type);
- return 0;
-}
-
-int new_W_Local_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- enum value_type_t type = luaL_optinteger(__ls,-1,0);
- W_Local_Entry* dummy = push_W_Local_Entry(__ls);
- dummy->count = count;
- dummy->type = type;
- return 1;
-}
-
-static int getter_W_Local_Entry_count(lua_State* __ls) {
- W_Local_Entry* dummy = check_W_Local_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Local_Entry_type(lua_State* __ls) {
- W_Local_Entry* dummy = check_W_Local_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->type);
- return 1;
-}
-
-static int setter_W_Local_Entry_count(lua_State* __ls) {
- W_Local_Entry* dummy = check_W_Local_Entry(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Local_Entry_type(lua_State* __ls) {
- W_Local_Entry* dummy = check_W_Local_Entry(__ls, 1);
- dummy->type = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Local_Entry_methods[] = {
- {"new", new_W_Local_Entry},
- {"set_count", setter_W_Local_Entry_count},
- {"set_type", setter_W_Local_Entry_type},
- {"count", getter_W_Local_Entry_count},
- {"type", getter_W_Local_Entry_type},
- {0,0}
-};
-
-static const luaL_Reg W_Local_Entry_meta[] = {
- {0, 0}
-};
-
-int W_Local_Entry_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Local_Entry", W_Local_Entry_methods, 0);
- luaL_newmetatable(__ls, "W_Local_Entry");
- luaL_openlib(__ls, 0, W_Local_Entry_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Local_Entry_tablegen.h b/bruiser/luatablegen/W_Local_Entry_tablegen.h
deleted file mode 100644
index d29b5b9..0000000
--- a/bruiser/luatablegen/W_Local_Entry_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Local_Entry_H
-#define _W_Local_Entry_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Local_Entry* convert_W_Local_Entry (lua_State* __ls, int index);
-static W_Local_Entry* check_W_Local_Entry(lua_State* __ls, int index);
-W_Local_Entry* push_W_Local_Entry(lua_State* __ls);
-int W_Local_Entry_push_args(lua_State* __ls, W_Local_Entry* _st);
-int new_W_Local_Entry(lua_State* __ls);
-static int getter_W_Local_Entry_count(lua_State* __ls);
-static int getter_W_Local_Entry_type(lua_State* __ls);
-static int setter_W_Local_Entry_count(lua_State* __ls);
-static int setter_W_Local_Entry_type(lua_State* __ls);
-int W_Local_Entry_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Memory_Section_tablegen.c b/bruiser/luatablegen/W_Memory_Section_tablegen.c
deleted file mode 100644
index 78cd664..0000000
--- a/bruiser/luatablegen/W_Memory_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Memory_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Memory_Section* convert_W_Memory_Section (lua_State* __ls, int index) {
- W_Memory_Section* dummy = (W_Memory_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Memory_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Memory_Section* check_W_Memory_Section(lua_State* __ls, int index) {
- W_Memory_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Memory_Section*)luaL_checkudata(__ls, index, "W_Memory_Section");
- if (dummy == NULL) printf("W_Memory_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Memory_Section* push_W_Memory_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Memory_Section* dummy = lua_newuserdata(__ls, sizeof(W_Memory_Section));
- luaL_getmetatable(__ls, "W_Memory_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Memory_Section_push_args(lua_State* __ls, W_Memory_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->entries);
- return 0;
-}
-
-int new_W_Memory_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- memory_type_t** entries = lua_touserdata(__ls,-1);
- W_Memory_Section* dummy = push_W_Memory_Section(__ls);
- dummy->count = count;
- dummy->entries = entries;
- return 1;
-}
-
-static int getter_W_Memory_Section_count(lua_State* __ls) {
- W_Memory_Section* dummy = check_W_Memory_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Memory_Section_entries(lua_State* __ls) {
- W_Memory_Section* dummy = check_W_Memory_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->entries);
- return 1;
-}
-
-static int setter_W_Memory_Section_count(lua_State* __ls) {
- W_Memory_Section* dummy = check_W_Memory_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Memory_Section_entries(lua_State* __ls) {
- W_Memory_Section* dummy = check_W_Memory_Section(__ls, 1);
- dummy->entries = luaL_checkudata(__ls, 2, "entries_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Memory_Section_methods[] = {
- {"new", new_W_Memory_Section},
- {"set_count", setter_W_Memory_Section_count},
- {"set_entries", setter_W_Memory_Section_entries},
- {"count", getter_W_Memory_Section_count},
- {"entries", getter_W_Memory_Section_entries},
- {0,0}
-};
-
-static const luaL_Reg W_Memory_Section_meta[] = {
- {0, 0}
-};
-
-int W_Memory_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Memory_Section", W_Memory_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Memory_Section");
- luaL_openlib(__ls, 0, W_Memory_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Memory_Section_tablegen.h b/bruiser/luatablegen/W_Memory_Section_tablegen.h
deleted file mode 100644
index 37bffcf..0000000
--- a/bruiser/luatablegen/W_Memory_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Memory_Section_H
-#define _W_Memory_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Memory_Section* convert_W_Memory_Section (lua_State* __ls, int index);
-static W_Memory_Section* check_W_Memory_Section(lua_State* __ls, int index);
-W_Memory_Section* push_W_Memory_Section(lua_State* __ls);
-int W_Memory_Section_push_args(lua_State* __ls, W_Memory_Section* _st);
-int new_W_Memory_Section(lua_State* __ls);
-static int getter_W_Memory_Section_count(lua_State* __ls);
-static int getter_W_Memory_Section_entries(lua_State* __ls);
-static int setter_W_Memory_Section_count(lua_State* __ls);
-static int setter_W_Memory_Section_entries(lua_State* __ls);
-int W_Memory_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Start_Section_tablegen.c b/bruiser/luatablegen/W_Start_Section_tablegen.c
deleted file mode 100644
index b598e1b..0000000
--- a/bruiser/luatablegen/W_Start_Section_tablegen.c
+++ /dev/null
@@ -1,87 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Start_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Start_Section* convert_W_Start_Section (lua_State* __ls, int index) {
- W_Start_Section* dummy = (W_Start_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Start_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Start_Section* check_W_Start_Section(lua_State* __ls, int index) {
- W_Start_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Start_Section*)luaL_checkudata(__ls, index, "W_Start_Section");
- if (dummy == NULL) printf("W_Start_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Start_Section* push_W_Start_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Start_Section* dummy = lua_newuserdata(__ls, sizeof(W_Start_Section));
- luaL_getmetatable(__ls, "W_Start_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Start_Section_push_args(lua_State* __ls, W_Start_Section* _st) {
- lua_checkstack(__ls, 1);
- lua_pushinteger(__ls, _st->index);
- return 0;
-}
-
-int new_W_Start_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- varuint32 index = luaL_optinteger(__ls,-1,0);
- W_Start_Section* dummy = push_W_Start_Section(__ls);
- dummy->index = index;
- return 1;
-}
-
-static int getter_W_Start_Section_index(lua_State* __ls) {
- W_Start_Section* dummy = check_W_Start_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->index);
- return 1;
-}
-
-static int setter_W_Start_Section_index(lua_State* __ls) {
- W_Start_Section* dummy = check_W_Start_Section(__ls, 1);
- dummy->index = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Start_Section_methods[] = {
- {"new", new_W_Start_Section},
- {"set_index", setter_W_Start_Section_index},
- {"index", getter_W_Start_Section_index},
- {0,0}
-};
-
-static const luaL_Reg W_Start_Section_meta[] = {
- {0, 0}
-};
-
-int W_Start_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Start_Section", W_Start_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Start_Section");
- luaL_openlib(__ls, 0, W_Start_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Start_Section_tablegen.h b/bruiser/luatablegen/W_Start_Section_tablegen.h
deleted file mode 100644
index cf0c1e1..0000000
--- a/bruiser/luatablegen/W_Start_Section_tablegen.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Start_Section_H
-#define _W_Start_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Start_Section* convert_W_Start_Section (lua_State* __ls, int index);
-static W_Start_Section* check_W_Start_Section(lua_State* __ls, int index);
-W_Start_Section* push_W_Start_Section(lua_State* __ls);
-int W_Start_Section_push_args(lua_State* __ls, W_Start_Section* _st);
-int new_W_Start_Section(lua_State* __ls);
-static int getter_W_Start_Section_index(lua_State* __ls);
-static int setter_W_Start_Section_index(lua_State* __ls);
-int W_Start_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Table_Section_tablegen.c b/bruiser/luatablegen/W_Table_Section_tablegen.c
deleted file mode 100644
index c536fd3..0000000
--- a/bruiser/luatablegen/W_Table_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Table_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Table_Section* convert_W_Table_Section (lua_State* __ls, int index) {
- W_Table_Section* dummy = (W_Table_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Table_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Table_Section* check_W_Table_Section(lua_State* __ls, int index) {
- W_Table_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Table_Section*)luaL_checkudata(__ls, index, "W_Table_Section");
- if (dummy == NULL) printf("W_Table_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Table_Section* push_W_Table_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Table_Section* dummy = lua_newuserdata(__ls, sizeof(W_Table_Section));
- luaL_getmetatable(__ls, "W_Table_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Table_Section_push_args(lua_State* __ls, W_Table_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->entries);
- return 0;
-}
-
-int new_W_Table_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- table_type_t** entries = lua_touserdata(__ls,-1);
- W_Table_Section* dummy = push_W_Table_Section(__ls);
- dummy->count = count;
- dummy->entries = entries;
- return 1;
-}
-
-static int getter_W_Table_Section_count(lua_State* __ls) {
- W_Table_Section* dummy = check_W_Table_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Table_Section_entries(lua_State* __ls) {
- W_Table_Section* dummy = check_W_Table_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->entries);
- return 1;
-}
-
-static int setter_W_Table_Section_count(lua_State* __ls) {
- W_Table_Section* dummy = check_W_Table_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Table_Section_entries(lua_State* __ls) {
- W_Table_Section* dummy = check_W_Table_Section(__ls, 1);
- dummy->entries = luaL_checkudata(__ls, 2, "entries_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Table_Section_methods[] = {
- {"new", new_W_Table_Section},
- {"set_count", setter_W_Table_Section_count},
- {"set_entries", setter_W_Table_Section_entries},
- {"count", getter_W_Table_Section_count},
- {"entries", getter_W_Table_Section_entries},
- {0,0}
-};
-
-static const luaL_Reg W_Table_Section_meta[] = {
- {0, 0}
-};
-
-int W_Table_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Table_Section", W_Table_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Table_Section");
- luaL_openlib(__ls, 0, W_Table_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Table_Section_tablegen.h b/bruiser/luatablegen/W_Table_Section_tablegen.h
deleted file mode 100644
index 9793e6b..0000000
--- a/bruiser/luatablegen/W_Table_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Table_Section_H
-#define _W_Table_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Table_Section* convert_W_Table_Section (lua_State* __ls, int index);
-static W_Table_Section* check_W_Table_Section(lua_State* __ls, int index);
-W_Table_Section* push_W_Table_Section(lua_State* __ls);
-int W_Table_Section_push_args(lua_State* __ls, W_Table_Section* _st);
-int new_W_Table_Section(lua_State* __ls);
-static int getter_W_Table_Section_count(lua_State* __ls);
-static int getter_W_Table_Section_entries(lua_State* __ls);
-static int setter_W_Table_Section_count(lua_State* __ls);
-static int setter_W_Table_Section_entries(lua_State* __ls);
-int W_Table_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Type_Section_Entry_tablegen.c b/bruiser/luatablegen/W_Type_Section_Entry_tablegen.c
deleted file mode 100644
index 5462a41..0000000
--- a/bruiser/luatablegen/W_Type_Section_Entry_tablegen.c
+++ /dev/null
@@ -1,155 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Type_Section_Entry_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Type_Section_Entry* convert_W_Type_Section_Entry (lua_State* __ls, int index) {
- W_Type_Section_Entry* dummy = (W_Type_Section_Entry*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Type_Section_Entry:bad user data type.\n");
- return dummy;
-}
-
-static W_Type_Section_Entry* check_W_Type_Section_Entry(lua_State* __ls, int index) {
- W_Type_Section_Entry* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Type_Section_Entry*)luaL_checkudata(__ls, index, "W_Type_Section_Entry");
- if (dummy == NULL) printf("W_Type_Section_Entry:bad user data type.\n");
- return dummy;
-}
-
-W_Type_Section_Entry* push_W_Type_Section_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Type_Section_Entry* dummy = lua_newuserdata(__ls, sizeof(W_Type_Section_Entry));
- luaL_getmetatable(__ls, "W_Type_Section_Entry");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Type_Section_Entry_push_args(lua_State* __ls, W_Type_Section_Entry* _st) {
- lua_checkstack(__ls, 5);
- lua_pushinteger(__ls, _st->form);
- lua_pushinteger(__ls, _st->param_count);
- lua_pushlightuserdata(__ls, _st->param_types);
- lua_pushinteger(__ls, _st->return_count);
- lua_pushlightuserdata(__ls, _st->return_types);
- return 0;
-}
-
-int new_W_Type_Section_Entry(lua_State* __ls) {
- lua_checkstack(__ls, 5);
- varint7 form = luaL_optinteger(__ls,-5,0);
- varuint32 param_count = luaL_optinteger(__ls,-4,0);
- varint7* param_types = lua_touserdata(__ls,-3);
- varuint1 return_count = luaL_optinteger(__ls,-2,0);
- varint7* return_types = lua_touserdata(__ls,-1);
- W_Type_Section_Entry* dummy = push_W_Type_Section_Entry(__ls);
- dummy->form = form;
- dummy->param_count = param_count;
- dummy->param_types = param_types;
- dummy->return_count = return_count;
- dummy->return_types = return_types;
- return 1;
-}
-
-static int getter_W_Type_Section_Entry_form(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->form);
- return 1;
-}
-static int getter_W_Type_Section_Entry_param_count(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->param_count);
- return 1;
-}
-static int getter_W_Type_Section_Entry_param_types(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->param_types);
- return 1;
-}
-static int getter_W_Type_Section_Entry_return_count(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->return_count);
- return 1;
-}
-static int getter_W_Type_Section_Entry_return_types(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->return_types);
- return 1;
-}
-
-static int setter_W_Type_Section_Entry_form(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- dummy->form = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Type_Section_Entry_param_count(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- dummy->param_count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Type_Section_Entry_param_types(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- dummy->param_types = luaL_checkudata(__ls, 2, "param_types_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Type_Section_Entry_return_count(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- dummy->return_count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Type_Section_Entry_return_types(lua_State* __ls) {
- W_Type_Section_Entry* dummy = check_W_Type_Section_Entry(__ls, 1);
- dummy->return_types = luaL_checkudata(__ls, 2, "return_types_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Type_Section_Entry_methods[] = {
- {"new", new_W_Type_Section_Entry},
- {"set_form", setter_W_Type_Section_Entry_form},
- {"set_param_count", setter_W_Type_Section_Entry_param_count},
- {"set_param_types", setter_W_Type_Section_Entry_param_types},
- {"set_return_count", setter_W_Type_Section_Entry_return_count},
- {"set_return_types", setter_W_Type_Section_Entry_return_types},
- {"form", getter_W_Type_Section_Entry_form},
- {"param_count", getter_W_Type_Section_Entry_param_count},
- {"param_types", getter_W_Type_Section_Entry_param_types},
- {"return_count", getter_W_Type_Section_Entry_return_count},
- {"return_types", getter_W_Type_Section_Entry_return_types},
- {0,0}
-};
-
-static const luaL_Reg W_Type_Section_Entry_meta[] = {
- {0, 0}
-};
-
-int W_Type_Section_Entry_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Type_Section_Entry", W_Type_Section_Entry_methods, 0);
- luaL_newmetatable(__ls, "W_Type_Section_Entry");
- luaL_openlib(__ls, 0, W_Type_Section_Entry_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Type_Section_Entry_tablegen.h b/bruiser/luatablegen/W_Type_Section_Entry_tablegen.h
deleted file mode 100644
index dec22ae..0000000
--- a/bruiser/luatablegen/W_Type_Section_Entry_tablegen.h
+++ /dev/null
@@ -1,39 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Type_Section_Entry_H
-#define _W_Type_Section_Entry_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Type_Section_Entry* convert_W_Type_Section_Entry (lua_State* __ls, int index);
-static W_Type_Section_Entry* check_W_Type_Section_Entry(lua_State* __ls, int index);
-W_Type_Section_Entry* push_W_Type_Section_Entry(lua_State* __ls);
-int W_Type_Section_Entry_push_args(lua_State* __ls, W_Type_Section_Entry* _st);
-int new_W_Type_Section_Entry(lua_State* __ls);
-static int getter_W_Type_Section_Entry_form(lua_State* __ls);
-static int getter_W_Type_Section_Entry_param_count(lua_State* __ls);
-static int getter_W_Type_Section_Entry_param_types(lua_State* __ls);
-static int getter_W_Type_Section_Entry_return_count(lua_State* __ls);
-static int getter_W_Type_Section_Entry_return_types(lua_State* __ls);
-static int setter_W_Type_Section_Entry_form(lua_State* __ls);
-static int setter_W_Type_Section_Entry_param_count(lua_State* __ls);
-static int setter_W_Type_Section_Entry_param_types(lua_State* __ls);
-static int setter_W_Type_Section_Entry_return_count(lua_State* __ls);
-static int setter_W_Type_Section_Entry_return_types(lua_State* __ls);
-int W_Type_Section_Entry_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/W_Type_Section_tablegen.c b/bruiser/luatablegen/W_Type_Section_tablegen.c
deleted file mode 100644
index d7e9f7e..0000000
--- a/bruiser/luatablegen/W_Type_Section_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./W_Type_Section_tablegen.h"
-
-#include "../wasm.h"
-
-static W_Type_Section* convert_W_Type_Section (lua_State* __ls, int index) {
- W_Type_Section* dummy = (W_Type_Section*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("W_Type_Section:bad user data type.\n");
- return dummy;
-}
-
-static W_Type_Section* check_W_Type_Section(lua_State* __ls, int index) {
- W_Type_Section* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (W_Type_Section*)luaL_checkudata(__ls, index, "W_Type_Section");
- if (dummy == NULL) printf("W_Type_Section:bad user data type.\n");
- return dummy;
-}
-
-W_Type_Section* push_W_Type_Section(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- W_Type_Section* dummy = lua_newuserdata(__ls, sizeof(W_Type_Section));
- luaL_getmetatable(__ls, "W_Type_Section");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int W_Type_Section_push_args(lua_State* __ls, W_Type_Section* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->count);
- lua_pushlightuserdata(__ls, _st->entries);
- return 0;
-}
-
-int new_W_Type_Section(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 count = luaL_optinteger(__ls,-2,0);
- W_Type_Section_Entry** entries = lua_touserdata(__ls,-1);
- W_Type_Section* dummy = push_W_Type_Section(__ls);
- dummy->count = count;
- dummy->entries = entries;
- return 1;
-}
-
-static int getter_W_Type_Section_count(lua_State* __ls) {
- W_Type_Section* dummy = check_W_Type_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->count);
- return 1;
-}
-static int getter_W_Type_Section_entries(lua_State* __ls) {
- W_Type_Section* dummy = check_W_Type_Section(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->entries);
- return 1;
-}
-
-static int setter_W_Type_Section_count(lua_State* __ls) {
- W_Type_Section* dummy = check_W_Type_Section(__ls, 1);
- dummy->count = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_W_Type_Section_entries(lua_State* __ls) {
- W_Type_Section* dummy = check_W_Type_Section(__ls, 1);
- dummy->entries = luaL_checkudata(__ls, 2, "entries_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg W_Type_Section_methods[] = {
- {"new", new_W_Type_Section},
- {"set_count", setter_W_Type_Section_count},
- {"set_entries", setter_W_Type_Section_entries},
- {"count", getter_W_Type_Section_count},
- {"entries", getter_W_Type_Section_entries},
- {0,0}
-};
-
-static const luaL_Reg W_Type_Section_meta[] = {
- {0, 0}
-};
-
-int W_Type_Section_register(lua_State* __ls) {
- luaL_openlib(__ls, "W_Type_Section", W_Type_Section_methods, 0);
- luaL_newmetatable(__ls, "W_Type_Section");
- luaL_openlib(__ls, 0, W_Type_Section_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/W_Type_Section_tablegen.h b/bruiser/luatablegen/W_Type_Section_tablegen.h
deleted file mode 100644
index fd2fd12..0000000
--- a/bruiser/luatablegen/W_Type_Section_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _W_Type_Section_H
-#define _W_Type_Section_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static W_Type_Section* convert_W_Type_Section (lua_State* __ls, int index);
-static W_Type_Section* check_W_Type_Section(lua_State* __ls, int index);
-W_Type_Section* push_W_Type_Section(lua_State* __ls);
-int W_Type_Section_push_args(lua_State* __ls, W_Type_Section* _st);
-int new_W_Type_Section(lua_State* __ls);
-static int getter_W_Type_Section_count(lua_State* __ls);
-static int getter_W_Type_Section_entries(lua_State* __ls);
-static int setter_W_Type_Section_count(lua_State* __ls);
-static int setter_W_Type_Section_entries(lua_State* __ls);
-int W_Type_Section_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/Wasm_Module_tablegen.c b/bruiser/luatablegen/Wasm_Module_tablegen.c
deleted file mode 100644
index 99b603c..0000000
--- a/bruiser/luatablegen/Wasm_Module_tablegen.c
+++ /dev/null
@@ -1,291 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./Wasm_Module_tablegen.h"
-
-#include "../wasm.h"
-
-static Wasm_Module* convert_Wasm_Module (lua_State* __ls, int index) {
- Wasm_Module* dummy = (Wasm_Module*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("Wasm_Module:bad user data type.\n");
- return dummy;
-}
-
-static Wasm_Module* check_Wasm_Module(lua_State* __ls, int index) {
- Wasm_Module* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (Wasm_Module*)luaL_checkudata(__ls, index, "Wasm_Module");
- if (dummy == NULL) printf("Wasm_Module:bad user data type.\n");
- return dummy;
-}
-
-Wasm_Module* push_Wasm_Module(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- Wasm_Module* dummy = lua_newuserdata(__ls, sizeof(Wasm_Module));
- luaL_getmetatable(__ls, "Wasm_Module");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int Wasm_Module_push_args(lua_State* __ls, Wasm_Module* _st) {
- lua_checkstack(__ls, 13);
- lua_pushlightuserdata(__ls, _st->type_section);
- lua_pushlightuserdata(__ls, _st->import_section);
- lua_pushlightuserdata(__ls, _st->function_section);
- lua_pushlightuserdata(__ls, _st->table_section);
- lua_pushlightuserdata(__ls, _st->memory_section);
- lua_pushlightuserdata(__ls, _st->global_section);
- lua_pushlightuserdata(__ls, _st->export_section);
- lua_pushlightuserdata(__ls, _st->start_section);
- lua_pushlightuserdata(__ls, _st->element_section);
- lua_pushlightuserdata(__ls, _st->code_section);
- lua_pushlightuserdata(__ls, _st->data_section);
- lua_pushlightuserdata(__ls, _st->W_Custom_Sections);
- lua_pushstring(__ls, _st->name);
- return 0;
-}
-
-int new_Wasm_Module(lua_State* __ls) {
- lua_checkstack(__ls, 13);
- W_Type_Section* type_section = lua_touserdata(__ls,-13);
- W_Import_Section* import_section = lua_touserdata(__ls,-12);
- W_Function_Section* function_section = lua_touserdata(__ls,-11);
- W_Table_Section* table_section = lua_touserdata(__ls,-10);
- W_Memory_Section* memory_section = lua_touserdata(__ls,-9);
- W_Global_Section* global_section = lua_touserdata(__ls,-8);
- W_Export_Section* export_section = lua_touserdata(__ls,-7);
- W_Start_Section* start_section = lua_touserdata(__ls,-6);
- W_Element_Section* element_section = lua_touserdata(__ls,-5);
- W_Code_Section* code_section = lua_touserdata(__ls,-4);
- W_Data_Section* data_section = lua_touserdata(__ls,-3);
- void** W_Custom_Sections = lua_touserdata(__ls,-2);
- char* name = lua_tostring(__ls,-1);
- Wasm_Module* dummy = push_Wasm_Module(__ls);
- dummy->type_section = type_section;
- dummy->import_section = import_section;
- dummy->function_section = function_section;
- dummy->table_section = table_section;
- dummy->memory_section = memory_section;
- dummy->global_section = global_section;
- dummy->export_section = export_section;
- dummy->start_section = start_section;
- dummy->element_section = element_section;
- dummy->code_section = code_section;
- dummy->data_section = data_section;
- dummy->W_Custom_Sections = W_Custom_Sections;
- dummy->name = name;
- return 1;
-}
-
-static int getter_Wasm_Module_type_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->type_section);
- return 1;
-}
-static int getter_Wasm_Module_import_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->import_section);
- return 1;
-}
-static int getter_Wasm_Module_function_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->function_section);
- return 1;
-}
-static int getter_Wasm_Module_table_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->table_section);
- return 1;
-}
-static int getter_Wasm_Module_memory_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->memory_section);
- return 1;
-}
-static int getter_Wasm_Module_global_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->global_section);
- return 1;
-}
-static int getter_Wasm_Module_export_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->export_section);
- return 1;
-}
-static int getter_Wasm_Module_start_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->start_section);
- return 1;
-}
-static int getter_Wasm_Module_element_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->element_section);
- return 1;
-}
-static int getter_Wasm_Module_code_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->code_section);
- return 1;
-}
-static int getter_Wasm_Module_data_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->data_section);
- return 1;
-}
-static int getter_Wasm_Module_W_Custom_Sections(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->W_Custom_Sections);
- return 1;
-}
-static int getter_Wasm_Module_name(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushstring(__ls, dummy->name);
- return 1;
-}
-
-static int setter_Wasm_Module_type_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->type_section = luaL_checkudata(__ls, 2, "type_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_import_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->import_section = luaL_checkudata(__ls, 2, "import_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_function_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->function_section = luaL_checkudata(__ls, 2, "function_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_table_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->table_section = luaL_checkudata(__ls, 2, "table_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_memory_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->memory_section = luaL_checkudata(__ls, 2, "memory_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_global_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->global_section = luaL_checkudata(__ls, 2, "global_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_export_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->export_section = luaL_checkudata(__ls, 2, "export_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_start_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->start_section = luaL_checkudata(__ls, 2, "start_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_element_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->element_section = luaL_checkudata(__ls, 2, "element_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_code_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->code_section = luaL_checkudata(__ls, 2, "code_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_data_section(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->data_section = luaL_checkudata(__ls, 2, "data_section_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_W_Custom_Sections(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->W_Custom_Sections = luaL_checkudata(__ls, 2, "W_Custom_Sections_t");
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_Wasm_Module_name(lua_State* __ls) {
- Wasm_Module* dummy = check_Wasm_Module(__ls, 1);
- dummy->name = luaL_checkstring(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg Wasm_Module_methods[] = {
- {"new", new_Wasm_Module},
- {"set_type_section", setter_Wasm_Module_type_section},
- {"set_import_section", setter_Wasm_Module_import_section},
- {"set_function_section", setter_Wasm_Module_function_section},
- {"set_table_section", setter_Wasm_Module_table_section},
- {"set_memory_section", setter_Wasm_Module_memory_section},
- {"set_global_section", setter_Wasm_Module_global_section},
- {"set_export_section", setter_Wasm_Module_export_section},
- {"set_start_section", setter_Wasm_Module_start_section},
- {"set_element_section", setter_Wasm_Module_element_section},
- {"set_code_section", setter_Wasm_Module_code_section},
- {"set_data_section", setter_Wasm_Module_data_section},
- {"set_W_Custom_Sections", setter_Wasm_Module_W_Custom_Sections},
- {"set_name", setter_Wasm_Module_name},
- {"type_section", getter_Wasm_Module_type_section},
- {"import_section", getter_Wasm_Module_import_section},
- {"function_section", getter_Wasm_Module_function_section},
- {"table_section", getter_Wasm_Module_table_section},
- {"memory_section", getter_Wasm_Module_memory_section},
- {"global_section", getter_Wasm_Module_global_section},
- {"export_section", getter_Wasm_Module_export_section},
- {"start_section", getter_Wasm_Module_start_section},
- {"element_section", getter_Wasm_Module_element_section},
- {"code_section", getter_Wasm_Module_code_section},
- {"data_section", getter_Wasm_Module_data_section},
- {"W_Custom_Sections", getter_Wasm_Module_W_Custom_Sections},
- {"name", getter_Wasm_Module_name},
- {0,0}
-};
-
-static const luaL_Reg Wasm_Module_meta[] = {
- {0, 0}
-};
-
-int Wasm_Module_register(lua_State* __ls) {
- luaL_openlib(__ls, "Wasm_Module", Wasm_Module_methods, 0);
- luaL_newmetatable(__ls, "Wasm_Module");
- luaL_openlib(__ls, 0, Wasm_Module_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/Wasm_Module_tablegen.h b/bruiser/luatablegen/Wasm_Module_tablegen.h
deleted file mode 100644
index 7c9aaae..0000000
--- a/bruiser/luatablegen/Wasm_Module_tablegen.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _Wasm_Module_H
-#define _Wasm_Module_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static Wasm_Module* convert_Wasm_Module (lua_State* __ls, int index);
-static Wasm_Module* check_Wasm_Module(lua_State* __ls, int index);
-Wasm_Module* push_Wasm_Module(lua_State* __ls);
-int Wasm_Module_push_args(lua_State* __ls, Wasm_Module* _st);
-int new_Wasm_Module(lua_State* __ls);
-static int getter_Wasm_Module_type_section(lua_State* __ls);
-static int getter_Wasm_Module_import_section(lua_State* __ls);
-static int getter_Wasm_Module_function_section(lua_State* __ls);
-static int getter_Wasm_Module_table_section(lua_State* __ls);
-static int getter_Wasm_Module_memory_section(lua_State* __ls);
-static int getter_Wasm_Module_global_section(lua_State* __ls);
-static int getter_Wasm_Module_export_section(lua_State* __ls);
-static int getter_Wasm_Module_start_section(lua_State* __ls);
-static int getter_Wasm_Module_element_section(lua_State* __ls);
-static int getter_Wasm_Module_code_section(lua_State* __ls);
-static int getter_Wasm_Module_data_section(lua_State* __ls);
-static int getter_Wasm_Module_W_Custom_Sections(lua_State* __ls);
-static int getter_Wasm_Module_name(lua_State* __ls);
-static int setter_Wasm_Module_type_section(lua_State* __ls);
-static int setter_Wasm_Module_import_section(lua_State* __ls);
-static int setter_Wasm_Module_function_section(lua_State* __ls);
-static int setter_Wasm_Module_table_section(lua_State* __ls);
-static int setter_Wasm_Module_memory_section(lua_State* __ls);
-static int setter_Wasm_Module_global_section(lua_State* __ls);
-static int setter_Wasm_Module_export_section(lua_State* __ls);
-static int setter_Wasm_Module_start_section(lua_State* __ls);
-static int setter_Wasm_Module_element_section(lua_State* __ls);
-static int setter_Wasm_Module_code_section(lua_State* __ls);
-static int setter_Wasm_Module_data_section(lua_State* __ls);
-static int setter_Wasm_Module_W_Custom_Sections(lua_State* __ls);
-static int setter_Wasm_Module_name(lua_State* __ls);
-int Wasm_Module_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/global_type_t_tablegen.c b/bruiser/luatablegen/global_type_t_tablegen.c
deleted file mode 100644
index a2a8675..0000000
--- a/bruiser/luatablegen/global_type_t_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./global_type_t_tablegen.h"
-
-#include "../wasm.h"
-
-static global_type_t* convert_global_type_t (lua_State* __ls, int index) {
- global_type_t* dummy = (global_type_t*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("global_type_t:bad user data type.\n");
- return dummy;
-}
-
-static global_type_t* check_global_type_t(lua_State* __ls, int index) {
- global_type_t* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (global_type_t*)luaL_checkudata(__ls, index, "global_type_t");
- if (dummy == NULL) printf("global_type_t:bad user data type.\n");
- return dummy;
-}
-
-global_type_t* push_global_type_t(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- global_type_t* dummy = lua_newuserdata(__ls, sizeof(global_type_t));
- luaL_getmetatable(__ls, "global_type_t");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int global_type_t_push_args(lua_State* __ls, global_type_t* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->value_type);
- lua_pushinteger(__ls, _st->mutability);
- return 0;
-}
-
-int new_global_type_t(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- enum value_type_t value_type = luaL_optinteger(__ls,-2,0);
- varuint1 mutability = luaL_optinteger(__ls,-1,0);
- global_type_t* dummy = push_global_type_t(__ls);
- dummy->value_type = value_type;
- dummy->mutability = mutability;
- return 1;
-}
-
-static int getter_global_type_t_value_type(lua_State* __ls) {
- global_type_t* dummy = check_global_type_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->value_type);
- return 1;
-}
-static int getter_global_type_t_mutability(lua_State* __ls) {
- global_type_t* dummy = check_global_type_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->mutability);
- return 1;
-}
-
-static int setter_global_type_t_value_type(lua_State* __ls) {
- global_type_t* dummy = check_global_type_t(__ls, 1);
- dummy->value_type = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_global_type_t_mutability(lua_State* __ls) {
- global_type_t* dummy = check_global_type_t(__ls, 1);
- dummy->mutability = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg global_type_t_methods[] = {
- {"new", new_global_type_t},
- {"set_value_type", setter_global_type_t_value_type},
- {"set_mutability", setter_global_type_t_mutability},
- {"value_type", getter_global_type_t_value_type},
- {"mutability", getter_global_type_t_mutability},
- {0,0}
-};
-
-static const luaL_Reg global_type_t_meta[] = {
- {0, 0}
-};
-
-int global_type_t_register(lua_State* __ls) {
- luaL_openlib(__ls, "global_type_t", global_type_t_methods, 0);
- luaL_newmetatable(__ls, "global_type_t");
- luaL_openlib(__ls, 0, global_type_t_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/global_type_t_tablegen.h b/bruiser/luatablegen/global_type_t_tablegen.h
deleted file mode 100644
index 9fbbc60..0000000
--- a/bruiser/luatablegen/global_type_t_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _global_type_t_H
-#define _global_type_t_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static global_type_t* convert_global_type_t (lua_State* __ls, int index);
-static global_type_t* check_global_type_t(lua_State* __ls, int index);
-global_type_t* push_global_type_t(lua_State* __ls);
-int global_type_t_push_args(lua_State* __ls, global_type_t* _st);
-int new_global_type_t(lua_State* __ls);
-static int getter_global_type_t_value_type(lua_State* __ls);
-static int getter_global_type_t_mutability(lua_State* __ls);
-static int setter_global_type_t_value_type(lua_State* __ls);
-static int setter_global_type_t_mutability(lua_State* __ls);
-int global_type_t_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/init_expr_t_tablegen.c b/bruiser/luatablegen/init_expr_t_tablegen.c
deleted file mode 100644
index ff05e0c..0000000
--- a/bruiser/luatablegen/init_expr_t_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./init_expr_t_tablegen.h"
-
-#include "../wasm.h"
-
-static init_expr_t* convert_init_expr_t (lua_State* __ls, int index) {
- init_expr_t* dummy = (init_expr_t*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("init_expr_t:bad user data type.\n");
- return dummy;
-}
-
-static init_expr_t* check_init_expr_t(lua_State* __ls, int index) {
- init_expr_t* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (init_expr_t*)luaL_checkudata(__ls, index, "init_expr_t");
- if (dummy == NULL) printf("init_expr_t:bad user data type.\n");
- return dummy;
-}
-
-init_expr_t* push_init_expr_t(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- init_expr_t* dummy = lua_newuserdata(__ls, sizeof(init_expr_t));
- luaL_getmetatable(__ls, "init_expr_t");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int init_expr_t_push_args(lua_State* __ls, init_expr_t* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->size);
- lua_pushstring(__ls, _st->code);
- return 0;
-}
-
-int new_init_expr_t(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varuint32 size = luaL_optinteger(__ls,-2,0);
- char* code = lua_tostring(__ls,-1);
- init_expr_t* dummy = push_init_expr_t(__ls);
- dummy->size = size;
- dummy->code = code;
- return 1;
-}
-
-static int getter_init_expr_t_size(lua_State* __ls) {
- init_expr_t* dummy = check_init_expr_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->size);
- return 1;
-}
-static int getter_init_expr_t_code(lua_State* __ls) {
- init_expr_t* dummy = check_init_expr_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushstring(__ls, dummy->code);
- return 1;
-}
-
-static int setter_init_expr_t_size(lua_State* __ls) {
- init_expr_t* dummy = check_init_expr_t(__ls, 1);
- dummy->size = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_init_expr_t_code(lua_State* __ls) {
- init_expr_t* dummy = check_init_expr_t(__ls, 1);
- dummy->code = luaL_checkstring(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg init_expr_t_methods[] = {
- {"new", new_init_expr_t},
- {"set_size", setter_init_expr_t_size},
- {"set_code", setter_init_expr_t_code},
- {"size", getter_init_expr_t_size},
- {"code", getter_init_expr_t_code},
- {0,0}
-};
-
-static const luaL_Reg init_expr_t_meta[] = {
- {0, 0}
-};
-
-int init_expr_t_register(lua_State* __ls) {
- luaL_openlib(__ls, "init_expr_t", init_expr_t_methods, 0);
- luaL_newmetatable(__ls, "init_expr_t");
- luaL_openlib(__ls, 0, init_expr_t_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/init_expr_t_tablegen.h b/bruiser/luatablegen/init_expr_t_tablegen.h
deleted file mode 100644
index aabcc64..0000000
--- a/bruiser/luatablegen/init_expr_t_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _init_expr_t_H
-#define _init_expr_t_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static init_expr_t* convert_init_expr_t (lua_State* __ls, int index);
-static init_expr_t* check_init_expr_t(lua_State* __ls, int index);
-init_expr_t* push_init_expr_t(lua_State* __ls);
-int init_expr_t_push_args(lua_State* __ls, init_expr_t* _st);
-int new_init_expr_t(lua_State* __ls);
-static int getter_init_expr_t_size(lua_State* __ls);
-static int getter_init_expr_t_code(lua_State* __ls);
-static int setter_init_expr_t_size(lua_State* __ls);
-static int setter_init_expr_t_code(lua_State* __ls);
-int init_expr_t_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/makefile b/bruiser/luatablegen/makefile
deleted file mode 100644
index b59a216..0000000
--- a/bruiser/luatablegen/makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-CC=clang
-CC?=clang
-CC_FLAGS=-fpic
-CC_EXTRA?=
-CC_FLAGS+=$(CC_EXTRA)
-SRCS=$(wildcard *.c)
-TBG_OBJLIST=$(patsubst %.c, %.o , $(wildcard *.c))
-TBG_OBJLIST_DBG=$(patsubst %.c, %.odbg , $(wildcard *.c))
-TBG_OBJLIST_COV=$(patsubst %.c, %.ocov , $(wildcard *.c))
-ADD_SANITIZERS_CC= -g -fsanitize=address -fno-omit-frame-pointer
-ADD_SANITIZERS_LD= -g -fsanitize=address
-MEM_SANITIZERS_CC= -g -fsanitize=memory -fno-omit-frame-pointer
-MEM_SANITIZERS_LD= -g -fsanitize=memory
-UB_SANITIZERS_CC= -g -fsanitize=undefined -fno-omit-frame-pointer
-UB_SANITIZERS_LD= -g -fsanitize=undefined
-COV_CC= -fprofile-instr-generate -fcoverage-mapping
-
-.DEFAULT:all
-
-.PHONY:all clean help
-
-all:$(TBG_OBJLIST) $(TBG_OBJLIST_DBG) $(TBG_OBJLIST_COV)
- @echo $(TBG_OBJLIST)
- @echo $(TBG_OBJLIST_INC)
-
-depend:.depend
-
-.depend:$(SRCS)
- rm -rf .depend
- $(CC) -MM $(CC_FLAGS) $^ > ./.depend
- echo $(patsubst %.o:, %.odbg:, $(shell $(CC) -MM $(CC_FLAGS) $^)) | sed -r 's/[A-Za-z0-9\-\_]+\.odbg/\n&/g' >> ./.depend
- echo $(patsubst %.o:, %.ocov:, $(shell $(CC) -MM $(CC_FLAGS) $^)) | sed -r 's/[A-Za-z0-9\-\_]+\.ocov/\n&/g' >> ./.depend
-
--include ./.depend
-
-.c.o:
- $(CC) $(CC_FLAGS) -c $< -o $@
-
-%.odbg:%.c
- $(CC) $(CC_FLAGS) -g -c $< -o $@
-
-%.ocov:%.c
- $(CC) $(CC_FLAGS) $(COV_CC) -c $< -o $@
-
-clean:
- rm -f *.o *~ $(TARGET) *.ocov *.odbg
- rm .depend
-
-help:
- @echo "all is the default target"
- @echo "there is clean."
diff --git a/bruiser/luatablegen/memory_type_t_tablegen.c b/bruiser/luatablegen/memory_type_t_tablegen.c
deleted file mode 100644
index 3914732..0000000
--- a/bruiser/luatablegen/memory_type_t_tablegen.c
+++ /dev/null
@@ -1,87 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./memory_type_t_tablegen.h"
-
-#include "../wasm.h"
-
-static memory_type_t* convert_memory_type_t (lua_State* __ls, int index) {
- memory_type_t* dummy = (memory_type_t*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("memory_type_t:bad user data type.\n");
- return dummy;
-}
-
-static memory_type_t* check_memory_type_t(lua_State* __ls, int index) {
- memory_type_t* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (memory_type_t*)luaL_checkudata(__ls, index, "memory_type_t");
- if (dummy == NULL) printf("memory_type_t:bad user data type.\n");
- return dummy;
-}
-
-memory_type_t* push_memory_type_t(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- memory_type_t* dummy = lua_newuserdata(__ls, sizeof(memory_type_t));
- luaL_getmetatable(__ls, "memory_type_t");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int memory_type_t_push_args(lua_State* __ls, memory_type_t* _st) {
- lua_checkstack(__ls, 1);
- lua_pushlightuserdata(__ls, _st->resizable_limit);
- return 0;
-}
-
-int new_memory_type_t(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- resizable_limit_t* resizable_limit = lua_touserdata(__ls,-1);
- memory_type_t* dummy = push_memory_type_t(__ls);
- dummy->resizable_limit = resizable_limit;
- return 1;
-}
-
-static int getter_memory_type_t_resizable_limit(lua_State* __ls) {
- memory_type_t* dummy = check_memory_type_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->resizable_limit);
- return 1;
-}
-
-static int setter_memory_type_t_resizable_limit(lua_State* __ls) {
- memory_type_t* dummy = check_memory_type_t(__ls, 1);
- dummy->resizable_limit = luaL_checkudata(__ls, 2, "resizable_limit_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg memory_type_t_methods[] = {
- {"new", new_memory_type_t},
- {"set_resizable_limit", setter_memory_type_t_resizable_limit},
- {"resizable_limit", getter_memory_type_t_resizable_limit},
- {0,0}
-};
-
-static const luaL_Reg memory_type_t_meta[] = {
- {0, 0}
-};
-
-int memory_type_t_register(lua_State* __ls) {
- luaL_openlib(__ls, "memory_type_t", memory_type_t_methods, 0);
- luaL_newmetatable(__ls, "memory_type_t");
- luaL_openlib(__ls, 0, memory_type_t_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/memory_type_t_tablegen.h b/bruiser/luatablegen/memory_type_t_tablegen.h
deleted file mode 100644
index 2a63963..0000000
--- a/bruiser/luatablegen/memory_type_t_tablegen.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _memory_type_t_H
-#define _memory_type_t_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static memory_type_t* convert_memory_type_t (lua_State* __ls, int index);
-static memory_type_t* check_memory_type_t(lua_State* __ls, int index);
-memory_type_t* push_memory_type_t(lua_State* __ls);
-int memory_type_t_push_args(lua_State* __ls, memory_type_t* _st);
-int new_memory_type_t(lua_State* __ls);
-static int getter_memory_type_t_resizable_limit(lua_State* __ls);
-static int setter_memory_type_t_resizable_limit(lua_State* __ls);
-int memory_type_t_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/resizable_limit_t_tablegen.c b/bruiser/luatablegen/resizable_limit_t_tablegen.c
deleted file mode 100644
index f777510..0000000
--- a/bruiser/luatablegen/resizable_limit_t_tablegen.c
+++ /dev/null
@@ -1,121 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./resizable_limit_t_tablegen.h"
-
-#include "../wasm.h"
-
-static resizable_limit_t* convert_resizable_limit_t (lua_State* __ls, int index) {
- resizable_limit_t* dummy = (resizable_limit_t*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("resizable_limit_t:bad user data type.\n");
- return dummy;
-}
-
-static resizable_limit_t* check_resizable_limit_t(lua_State* __ls, int index) {
- resizable_limit_t* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (resizable_limit_t*)luaL_checkudata(__ls, index, "resizable_limit_t");
- if (dummy == NULL) printf("resizable_limit_t:bad user data type.\n");
- return dummy;
-}
-
-resizable_limit_t* push_resizable_limit_t(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- resizable_limit_t* dummy = lua_newuserdata(__ls, sizeof(resizable_limit_t));
- luaL_getmetatable(__ls, "resizable_limit_t");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int resizable_limit_t_push_args(lua_State* __ls, resizable_limit_t* _st) {
- lua_checkstack(__ls, 3);
- lua_pushinteger(__ls, _st->flags);
- lua_pushinteger(__ls, _st->initial);
- lua_pushinteger(__ls, _st->maximum);
- return 0;
-}
-
-int new_resizable_limit_t(lua_State* __ls) {
- lua_checkstack(__ls, 3);
- varuint1 flags = luaL_optinteger(__ls,-3,0);
- varuint32 initial = luaL_optinteger(__ls,-2,0);
- varuint32 maximum = luaL_optinteger(__ls,-1,0);
- resizable_limit_t* dummy = push_resizable_limit_t(__ls);
- dummy->flags = flags;
- dummy->initial = initial;
- dummy->maximum = maximum;
- return 1;
-}
-
-static int getter_resizable_limit_t_flags(lua_State* __ls) {
- resizable_limit_t* dummy = check_resizable_limit_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->flags);
- return 1;
-}
-static int getter_resizable_limit_t_initial(lua_State* __ls) {
- resizable_limit_t* dummy = check_resizable_limit_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->initial);
- return 1;
-}
-static int getter_resizable_limit_t_maximum(lua_State* __ls) {
- resizable_limit_t* dummy = check_resizable_limit_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->maximum);
- return 1;
-}
-
-static int setter_resizable_limit_t_flags(lua_State* __ls) {
- resizable_limit_t* dummy = check_resizable_limit_t(__ls, 1);
- dummy->flags = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_resizable_limit_t_initial(lua_State* __ls) {
- resizable_limit_t* dummy = check_resizable_limit_t(__ls, 1);
- dummy->initial = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_resizable_limit_t_maximum(lua_State* __ls) {
- resizable_limit_t* dummy = check_resizable_limit_t(__ls, 1);
- dummy->maximum = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg resizable_limit_t_methods[] = {
- {"new", new_resizable_limit_t},
- {"set_flags", setter_resizable_limit_t_flags},
- {"set_initial", setter_resizable_limit_t_initial},
- {"set_maximum", setter_resizable_limit_t_maximum},
- {"flags", getter_resizable_limit_t_flags},
- {"initial", getter_resizable_limit_t_initial},
- {"maximum", getter_resizable_limit_t_maximum},
- {0,0}
-};
-
-static const luaL_Reg resizable_limit_t_meta[] = {
- {0, 0}
-};
-
-int resizable_limit_t_register(lua_State* __ls) {
- luaL_openlib(__ls, "resizable_limit_t", resizable_limit_t_methods, 0);
- luaL_newmetatable(__ls, "resizable_limit_t");
- luaL_openlib(__ls, 0, resizable_limit_t_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/resizable_limit_t_tablegen.h b/bruiser/luatablegen/resizable_limit_t_tablegen.h
deleted file mode 100644
index b987261..0000000
--- a/bruiser/luatablegen/resizable_limit_t_tablegen.h
+++ /dev/null
@@ -1,35 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _resizable_limit_t_H
-#define _resizable_limit_t_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static resizable_limit_t* convert_resizable_limit_t (lua_State* __ls, int index);
-static resizable_limit_t* check_resizable_limit_t(lua_State* __ls, int index);
-resizable_limit_t* push_resizable_limit_t(lua_State* __ls);
-int resizable_limit_t_push_args(lua_State* __ls, resizable_limit_t* _st);
-int new_resizable_limit_t(lua_State* __ls);
-static int getter_resizable_limit_t_flags(lua_State* __ls);
-static int getter_resizable_limit_t_initial(lua_State* __ls);
-static int getter_resizable_limit_t_maximum(lua_State* __ls);
-static int setter_resizable_limit_t_flags(lua_State* __ls);
-static int setter_resizable_limit_t_initial(lua_State* __ls);
-static int setter_resizable_limit_t_maximum(lua_State* __ls);
-int resizable_limit_t_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/table_type_t_tablegen.c b/bruiser/luatablegen/table_type_t_tablegen.c
deleted file mode 100644
index c37af75..0000000
--- a/bruiser/luatablegen/table_type_t_tablegen.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-#include "./table_type_t_tablegen.h"
-
-#include "../wasm.h"
-
-static table_type_t* convert_table_type_t (lua_State* __ls, int index) {
- table_type_t* dummy = (table_type_t*)lua_touserdata(__ls, index);
- if (dummy == NULL) printf("table_type_t:bad user data type.\n");
- return dummy;
-}
-
-static table_type_t* check_table_type_t(lua_State* __ls, int index) {
- table_type_t* dummy;
- luaL_checktype(__ls, index, LUA_TUSERDATA);
- dummy = (table_type_t*)luaL_checkudata(__ls, index, "table_type_t");
- if (dummy == NULL) printf("table_type_t:bad user data type.\n");
- return dummy;
-}
-
-table_type_t* push_table_type_t(lua_State* __ls) {
- lua_checkstack(__ls, 1);
- table_type_t* dummy = lua_newuserdata(__ls, sizeof(table_type_t));
- luaL_getmetatable(__ls, "table_type_t");
- lua_setmetatable(__ls, -2);
- return dummy;
-}
-
-int table_type_t_push_args(lua_State* __ls, table_type_t* _st) {
- lua_checkstack(__ls, 2);
- lua_pushinteger(__ls, _st->element_type);
- lua_pushlightuserdata(__ls, _st->resizable_limit);
- return 0;
-}
-
-int new_table_type_t(lua_State* __ls) {
- lua_checkstack(__ls, 2);
- varint7 element_type = luaL_optinteger(__ls,-2,0);
- resizable_limit_t* resizable_limit = lua_touserdata(__ls,-1);
- table_type_t* dummy = push_table_type_t(__ls);
- dummy->element_type = element_type;
- dummy->resizable_limit = resizable_limit;
- return 1;
-}
-
-static int getter_table_type_t_element_type(lua_State* __ls) {
- table_type_t* dummy = check_table_type_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushinteger(__ls, dummy->element_type);
- return 1;
-}
-static int getter_table_type_t_resizable_limit(lua_State* __ls) {
- table_type_t* dummy = check_table_type_t(__ls, 1);
- lua_pop(__ls, -1);
- lua_pushlightuserdata(__ls, dummy->resizable_limit);
- return 1;
-}
-
-static int setter_table_type_t_element_type(lua_State* __ls) {
- table_type_t* dummy = check_table_type_t(__ls, 1);
- dummy->element_type = luaL_checkinteger(__ls, 2);
- lua_settop(__ls, 1);
- return 1;
-}
-static int setter_table_type_t_resizable_limit(lua_State* __ls) {
- table_type_t* dummy = check_table_type_t(__ls, 1);
- dummy->resizable_limit = luaL_checkudata(__ls, 2, "resizable_limit_t");
- lua_settop(__ls, 1);
- return 1;
-}
-
-static const luaL_Reg table_type_t_methods[] = {
- {"new", new_table_type_t},
- {"set_element_type", setter_table_type_t_element_type},
- {"set_resizable_limit", setter_table_type_t_resizable_limit},
- {"element_type", getter_table_type_t_element_type},
- {"resizable_limit", getter_table_type_t_resizable_limit},
- {0,0}
-};
-
-static const luaL_Reg table_type_t_meta[] = {
- {0, 0}
-};
-
-int table_type_t_register(lua_State* __ls) {
- luaL_openlib(__ls, "table_type_t", table_type_t_methods, 0);
- luaL_newmetatable(__ls, "table_type_t");
- luaL_openlib(__ls, 0, table_type_t_meta, 0);
- lua_pushliteral(__ls, "__index");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pushliteral(__ls, "__metatable");
- lua_pushvalue(__ls, -3);
- lua_rawset(__ls, -3);
- lua_pop(__ls, 1);
-return 1;
-}
-
-
diff --git a/bruiser/luatablegen/table_type_t_tablegen.h b/bruiser/luatablegen/table_type_t_tablegen.h
deleted file mode 100644
index 9999c40..0000000
--- a/bruiser/luatablegen/table_type_t_tablegen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-
-// automatically generated by luatablegen
-#include "../lua-5.3.4/src/lua.h"
-#include "../lua-5.3.4/src/lauxlib.h"
-#include "../lua-5.3.4/src/lualib.h"
-#include <inttypes.h>
-#include <stdbool.h>
-
-#ifndef _table_type_t_H
-#define _table_type_t_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../wasm.h"
-
-static table_type_t* convert_table_type_t (lua_State* __ls, int index);
-static table_type_t* check_table_type_t(lua_State* __ls, int index);
-table_type_t* push_table_type_t(lua_State* __ls);
-int table_type_t_push_args(lua_State* __ls, table_type_t* _st);
-int new_table_type_t(lua_State* __ls);
-static int getter_table_type_t_element_type(lua_State* __ls);
-static int getter_table_type_t_resizable_limit(lua_State* __ls);
-static int setter_table_type_t_element_type(lua_State* __ls);
-static int setter_table_type_t_resizable_limit(lua_State* __ls);
-int table_type_t_register(lua_State* __ls);
-
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
-
diff --git a/bruiser/luatablegen/wasm_tables.c b/bruiser/luatablegen/wasm_tables.c
deleted file mode 100644
index 3ab2ec4..0000000
--- a/bruiser/luatablegen/wasm_tables.c
+++ /dev/null
@@ -1,82 +0,0 @@
-// automatically generated by luatablegen
-
-#include "./init_expr_t_tablegen.h"
-#include "./resizable_limit_t_tablegen.h"
-#include "./global_type_t_tablegen.h"
-#include "./table_type_t_tablegen.h"
-#include "./memory_type_t_tablegen.h"
-#include "./W_Type_Section_Entry_tablegen.h"
-#include "./W_Type_Section_tablegen.h"
-#include "./W_Import_Section_Entry_tablegen.h"
-#include "./W_Import_Section_tablegen.h"
-#include "./W_Function_Section_tablegen.h"
-#include "./W_Table_Section_tablegen.h"
-#include "./W_Memory_Section_tablegen.h"
-#include "./W_Global_Entry_tablegen.h"
-#include "./W_Global_Section_tablegen.h"
-#include "./W_Export_Entry_tablegen.h"
-#include "./W_Export_Section_tablegen.h"
-#include "./W_Start_Section_tablegen.h"
-#include "./W_Elem_Segment_tablegen.h"
-#include "./W_Element_Section_tablegen.h"
-#include "./W_Local_Entry_tablegen.h"
-#include "./W_Function_Body_tablegen.h"
-#include "./W_Code_Section_tablegen.h"
-#include "./W_Data_Segment_tablegen.h"
-#include "./W_Data_Section_tablegen.h"
-#include "./Wasm_Module_tablegen.h"
-#include "./wasm_tables.h"
-
-void reg_tablegen_tables(lua_State* __ls) {
- init_expr_t_register(__ls);
- lua_pop(__ls, 1);
- resizable_limit_t_register(__ls);
- lua_pop(__ls, 1);
- global_type_t_register(__ls);
- lua_pop(__ls, 1);
- table_type_t_register(__ls);
- lua_pop(__ls, 1);
- memory_type_t_register(__ls);
- lua_pop(__ls, 1);
- W_Type_Section_Entry_register(__ls);
- lua_pop(__ls, 1);
- W_Type_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Import_Section_Entry_register(__ls);
- lua_pop(__ls, 1);
- W_Import_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Function_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Table_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Memory_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Global_Entry_register(__ls);
- lua_pop(__ls, 1);
- W_Global_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Export_Entry_register(__ls);
- lua_pop(__ls, 1);
- W_Export_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Start_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Elem_Segment_register(__ls);
- lua_pop(__ls, 1);
- W_Element_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Local_Entry_register(__ls);
- lua_pop(__ls, 1);
- W_Function_Body_register(__ls);
- lua_pop(__ls, 1);
- W_Code_Section_register(__ls);
- lua_pop(__ls, 1);
- W_Data_Segment_register(__ls);
- lua_pop(__ls, 1);
- W_Data_Section_register(__ls);
- lua_pop(__ls, 1);
- Wasm_Module_register(__ls);
- lua_pop(__ls, 1);
-}
-
diff --git a/bruiser/luatablegen/wasm_tables.h b/bruiser/luatablegen/wasm_tables.h
deleted file mode 100644
index eef67e1..0000000
--- a/bruiser/luatablegen/wasm_tables.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// automatically generated by luatablegen
-
-#ifndef _WASM_TABLES_AGGR_H
-#define _WASM_TABLES_AGGR_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include "./init_expr_t_tablegen.h"
-#include "./resizable_limit_t_tablegen.h"
-#include "./global_type_t_tablegen.h"
-#include "./table_type_t_tablegen.h"
-#include "./memory_type_t_tablegen.h"
-#include "./W_Type_Section_Entry_tablegen.h"
-#include "./W_Type_Section_tablegen.h"
-#include "./W_Import_Section_Entry_tablegen.h"
-#include "./W_Import_Section_tablegen.h"
-#include "./W_Function_Section_tablegen.h"
-#include "./W_Table_Section_tablegen.h"
-#include "./W_Memory_Section_tablegen.h"
-#include "./W_Global_Entry_tablegen.h"
-#include "./W_Global_Section_tablegen.h"
-#include "./W_Export_Entry_tablegen.h"
-#include "./W_Export_Section_tablegen.h"
-#include "./W_Start_Section_tablegen.h"
-#include "./W_Elem_Segment_tablegen.h"
-#include "./W_Element_Section_tablegen.h"
-#include "./W_Local_Entry_tablegen.h"
-#include "./W_Function_Body_tablegen.h"
-#include "./W_Code_Section_tablegen.h"
-#include "./W_Data_Segment_tablegen.h"
-#include "./W_Data_Section_tablegen.h"
-#include "./Wasm_Module_tablegen.h"
-void reg_tablegen_tables(lua_State* __ls);
-#ifdef __cplusplus
-}
-#endif //end of extern c
-#endif //end of inclusion guard
-
diff --git a/bruiser/luatablegen/wasmheader.txt b/bruiser/luatablegen/wasmheader.txt
deleted file mode 100644
index 4c20d66..0000000
--- a/bruiser/luatablegen/wasmheader.txt
+++ /dev/null
@@ -1 +0,0 @@
-#include "../wasm.h"
diff --git a/bruiser/makefile b/bruiser/makefile
index 8b23606..3b7b2ae 100644
--- a/bruiser/makefile
+++ b/bruiser/makefile
@@ -145,20 +145,22 @@ linenoise.ocov: ./linenoise/linenoise.c
$(LIB_LUA):
$(MAKE) -C lua-5.3.4/src linux
+CODE_GEN: $(FT_WASM_A) $(LTG_WASM_A)
+
$(FT_WASM_SO): ./autogen/wasm/ft/wasm.xml
- @$(shell if [[ $$(ls -l ./autogen/wasm/ft/ | wc -l) == 4 ]];then ./autogen/wasm/ft.sh;else :;fi)
+ - $(shell if [[ $$(ls -l ./autogen/wasm/ft/ | wc -l) == 4 ]];then ./autogen/wasm/ft.sh;else :;fi)
$(MAKE) -C ./autogen/wasm/ft SO
$(FT_WASM_A): ./autogen/wasm/ft/wasm.xml
- @$(shell if [[ $$(ls -l ./autogen/wasm/ft/ | wc -l) == 4 ]];then ./autogen/wasm/ft.sh;else :;fi)
+ - $(shell if [[ $$(ls -l ./autogen/wasm/ft/ | wc -l) == 4 ]];then ./autogen/wasm/ft.sh;else :;fi)
$(MAKE) -C ./autogen/wasm/ft A
$(LTG_WASM_SO): ./autogen/wasm/ltg/wasm.xml
- @$(shell if [[ $$(ls -l ./autogen/wasm/ltg/ | wc -l) == 3 ]];then ./autogen/wasm/ltg.sh;else :;fi)
+ - $(shell if [[ $$(ls -l ./autogen/wasm/ltg/ | wc -l) == 3 ]];then ./autogen/wasm/ltg.sh;else :;fi)
$(MAKE) -C ./autogen/wasm/ltg SO
$(LTG_WASM_A): ./autogen/wasm/ltg/wasm.xml
- @$(shell if [[ $$(ls -l ./autogen/wasm/ltg/ | wc -l) == 3 ]];then ./autogen/wasm/ltg.sh;else :;fi)
+ - $(shell if [[ $$(ls -l ./autogen/wasm/ltg/ | wc -l) == 3 ]];then ./autogen/wasm/ltg.sh;else :;fi)
$(MAKE) -C ./autogen/wasm/ltg A
%.odbg:%.cpp
@@ -167,7 +169,7 @@ $(LTG_WASM_A): ./autogen/wasm/ltg/wasm.xml
%.ocov:%.cpp
$(CXX) $(CXX_FLAGS) $(COV_CXX) -c $< -o $@
-$(TARGET): $(FT_WASM_A) $(LTG_WASM_A) $(TARGET).o ../m0/mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA)
+$(TARGET): CODE_GEN $(TARGET).o $(FT_WASM_A) $(LTG_WASM_A) ../m0/mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA)
$(CXX) $^ $(LD_FLAGS) -o $@
# currently broken since it needs a static libpython