From 504e2e0ee8a7c981e82c6d348c1c3c09715b4022 Mon Sep 17 00:00:00 2001 From: Rerumu Date: Sat, 27 Nov 2021 03:13:48 -0500 Subject: [PATCH] Reorganize some code --- runtime/luajit.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/luajit.lua b/runtime/luajit.lua index 115a61c..36887aa 100644 --- a/runtime/luajit.lua +++ b/runtime/luajit.lua @@ -1,12 +1,8 @@ -local WASM_PAGE_SIZE = 65536 +local module = {} local bit = require('bit') local ffi = require('ffi') -local module = {} - -local vla_u8 = ffi.typeof('uint8_t[?]') - local u32 = ffi.typeof('uint32_t') local u64 = ffi.typeof('uint64_t') local i64 = ffi.typeof('int64_t') @@ -348,6 +344,10 @@ end do local memory = {} + local vla_u8 = ffi.typeof('uint8_t[?]') + + local WASM_PAGE_SIZE = 65536 + module.memory = memory local function grow_unchecked(memory, old, new)