Reorganize some code
This commit is contained in:
parent
e9642ef776
commit
504e2e0ee8
@ -1,12 +1,8 @@
|
|||||||
local WASM_PAGE_SIZE = 65536
|
local module = {}
|
||||||
|
|
||||||
local bit = require('bit')
|
local bit = require('bit')
|
||||||
local ffi = require('ffi')
|
local ffi = require('ffi')
|
||||||
|
|
||||||
local module = {}
|
|
||||||
|
|
||||||
local vla_u8 = ffi.typeof('uint8_t[?]')
|
|
||||||
|
|
||||||
local u32 = ffi.typeof('uint32_t')
|
local u32 = ffi.typeof('uint32_t')
|
||||||
local u64 = ffi.typeof('uint64_t')
|
local u64 = ffi.typeof('uint64_t')
|
||||||
local i64 = ffi.typeof('int64_t')
|
local i64 = ffi.typeof('int64_t')
|
||||||
@ -348,6 +344,10 @@ end
|
|||||||
do
|
do
|
||||||
local memory = {}
|
local memory = {}
|
||||||
|
|
||||||
|
local vla_u8 = ffi.typeof('uint8_t[?]')
|
||||||
|
|
||||||
|
local WASM_PAGE_SIZE = 65536
|
||||||
|
|
||||||
module.memory = memory
|
module.memory = memory
|
||||||
|
|
||||||
local function grow_unchecked(memory, old, new)
|
local function grow_unchecked(memory, old, new)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user