Skip to content
This repository was archived by the owner on Mar 18, 2022. It is now read-only.

enable inline wasm code and safe buffer #22

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"presets": ["@babel/preset-env"]
"presets": ["@babel/preset-env"],
"plugins": [
["@chainsafe/babel-plugin-inline-binary-import", {
"extensions": [
".wasm"
]
}]
]
}

36 changes: 18 additions & 18 deletions build/optimized.wat
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
i32.shr_u
local.set $4
i32.const 0
else
else
local.get $2
i32.const 31
local.get $2
Expand Down Expand Up @@ -292,7 +292,7 @@
i32.shr_u
local.set $4
i32.const 0
else
else
local.get $2
i32.const 31
local.get $2
Expand Down Expand Up @@ -445,7 +445,7 @@
memory.grow
i32.const 0
i32.lt_s
else
else
i32.const 0
end
if
Expand Down Expand Up @@ -549,7 +549,7 @@
i32.shr_u
local.set $1
i32.const 0
else
else
local.get $1
i32.const 536870904
i32.lt_u
Expand Down Expand Up @@ -605,7 +605,7 @@
local.get $0
i32.add
i32.load offset=96
else
else
local.get $0
i32.load
i32.const -1
Expand Down Expand Up @@ -634,7 +634,7 @@
i32.shl
i32.add
i32.load offset=96
else
else
i32.const 0
end
end
Expand All @@ -657,7 +657,7 @@
i32.sub
local.get $1
i32.add
else
else
local.get $1
end
i32.const 16
Expand Down Expand Up @@ -739,7 +739,7 @@
local.get $0
local.get $1
call $~lib/rt/tlsf/insertBlock
else
else
local.get $1
local.get $3
i32.const -2
Expand Down Expand Up @@ -807,7 +807,7 @@
local.tee $2
if (result i32)
local.get $2
else
else
call $~lib/rt/tlsf/initializeRoot
global.get $~lib/rt/tlsf/ROOT
end
Expand Down Expand Up @@ -1840,7 +1840,7 @@
br $continue|2
end
end
else
else
local.get $1
i32.const 7
i32.and
Expand Down Expand Up @@ -2001,12 +2001,12 @@
local.get $0
i32.const -2147483648
i32.store offset=4
else
else
global.get $~lib/rt/tlsf/ROOT
local.get $0
call $~lib/rt/tlsf/freeBlock
end
else
else
local.get $0
i32.load offset=8
call $~lib/rt/__typeinfo
Expand All @@ -2022,7 +2022,7 @@
i32.and
i32.or
i32.store offset=4
else
else
local.get $0
local.get $2
i32.const 1
Expand Down Expand Up @@ -2107,7 +2107,7 @@
if
local.get $0
call $~lib/rt/pure/scanBlack
else
else
local.get $0
local.get $1
i32.const -1879048193
Expand Down Expand Up @@ -2137,7 +2137,7 @@
i32.const -2147483648
i32.and
i32.eqz
else
else
i32.const 0
end
if
Expand Down Expand Up @@ -2190,7 +2190,7 @@
i32.and
i32.const 0
i32.gt_u
else
else
i32.const 0
end
if
Expand All @@ -2203,7 +2203,7 @@
i32.const 4
i32.add
local.set $2
else
else
i32.const 0
local.get $1
i32.const 268435455
Expand All @@ -2217,7 +2217,7 @@
global.get $~lib/rt/tlsf/ROOT
local.get $4
call $~lib/rt/tlsf/freeBlock
else
else
local.get $4
local.get $1
i32.const 2147483647
Expand Down
Loading