-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c21f6c8
commit fc02536
Showing
2 changed files
with
178 additions
and
37 deletions.
There are no files selected for viewing
Binary file modified
BIN
+346 Bytes
(200%)
test/contracts/counter/output/counter.wasm
100755 → 100644
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,197 @@ | ||
(module | ||
(type $t0 (func (param i32 i32 i64) (result i32))) | ||
(type $t1 (func (param i32 i32) (result i64))) | ||
(type $t2 (func (param i64))) | ||
(type $t3 (func)) | ||
(import "env" "int64storageStore" (func $env.int64storageStore (type $t0))) | ||
(import "env" "int64storageLoad" (func $env.int64storageLoad (type $t1))) | ||
(import "env" "int64finish" (func $env.int64finish (type $t2))) | ||
(func $init (type $t3) | ||
(type (;0;) (func (param i32 i32 i64) (result i32))) | ||
(type (;1;) (func (param i32 i32) (result i64))) | ||
(type (;2;) (func (param i64))) | ||
(type (;3;) (func)) | ||
(import "env" "int64storageStore" (func (;0;) (type 0))) | ||
(import "env" "int64storageLoad" (func (;1;) (type 1))) | ||
(import "env" "int64finish" (func (;2;) (type 2))) | ||
(func (;3;) (type 3) | ||
(local i32 i32 i64) | ||
i32.const 1024 | ||
local.set 0 | ||
i32.const 7 | ||
local.set 1 | ||
i64.const 1 | ||
call $env.int64storageStore | ||
drop) | ||
(func $increment (type $t3) | ||
(local $l0 i64) | ||
local.set 2 | ||
local.get 0 | ||
local.get 1 | ||
local.get 2 | ||
call 0 | ||
drop | ||
return) | ||
(func (;4;) (type 3) | ||
(local i32 i32 i64) | ||
i32.const 1024 | ||
local.set 0 | ||
i32.const 7 | ||
local.set 1 | ||
i64.const 1 | ||
local.set 2 | ||
local.get 0 | ||
local.get 1 | ||
local.get 2 | ||
call 0 | ||
drop | ||
return) | ||
(func (;5;) (type 3) | ||
(local i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32) | ||
global.get 0 | ||
local.set 0 | ||
i32.const 16 | ||
local.set 1 | ||
local.get 0 | ||
local.get 1 | ||
i32.sub | ||
local.set 2 | ||
local.get 2 | ||
global.set 0 | ||
i32.const 1024 | ||
local.set 3 | ||
i32.const 7 | ||
call $env.int64storageLoad | ||
local.set 4 | ||
local.get 3 | ||
local.get 4 | ||
call 1 | ||
local.set 5 | ||
local.get 2 | ||
local.get 5 | ||
i64.store offset=8 | ||
local.get 2 | ||
i64.load offset=8 | ||
local.set 6 | ||
i64.const 1 | ||
local.set 7 | ||
local.get 6 | ||
local.get 7 | ||
i64.add | ||
local.tee $l0 | ||
call $env.int64storageStore | ||
local.set 8 | ||
local.get 2 | ||
local.get 8 | ||
i64.store offset=8 | ||
local.get 2 | ||
i64.load offset=8 | ||
local.set 9 | ||
local.get 3 | ||
local.get 4 | ||
local.get 9 | ||
call 0 | ||
drop | ||
local.get $l0 | ||
call $env.int64finish) | ||
(func $decrement (type $t3) | ||
(local $l0 i64) | ||
i32.const 1024 | ||
i32.const 7 | ||
local.get 2 | ||
i64.load offset=8 | ||
local.set 10 | ||
local.get 10 | ||
call 2 | ||
i32.const 16 | ||
local.set 11 | ||
local.get 2 | ||
local.get 11 | ||
i32.add | ||
local.set 12 | ||
local.get 12 | ||
global.set 0 | ||
return) | ||
(func (;6;) (type 3) | ||
(local i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32) | ||
global.get 0 | ||
local.set 0 | ||
i32.const 16 | ||
local.set 1 | ||
local.get 0 | ||
local.get 1 | ||
i32.sub | ||
local.set 2 | ||
local.get 2 | ||
global.set 0 | ||
i32.const 1024 | ||
local.set 3 | ||
i32.const 7 | ||
call $env.int64storageLoad | ||
local.set 4 | ||
local.get 3 | ||
local.get 4 | ||
call 1 | ||
local.set 5 | ||
local.get 2 | ||
local.get 5 | ||
i64.store offset=8 | ||
local.get 2 | ||
i64.load offset=8 | ||
local.set 6 | ||
i64.const -1 | ||
local.set 7 | ||
local.get 6 | ||
local.get 7 | ||
i64.add | ||
local.tee $l0 | ||
call $env.int64storageStore | ||
local.set 8 | ||
local.get 2 | ||
local.get 8 | ||
i64.store offset=8 | ||
local.get 2 | ||
i64.load offset=8 | ||
local.set 9 | ||
local.get 3 | ||
local.get 4 | ||
local.get 9 | ||
call 0 | ||
drop | ||
local.get $l0 | ||
call $env.int64finish) | ||
(func $get (type $t3) | ||
local.get 2 | ||
i64.load offset=8 | ||
local.set 10 | ||
local.get 10 | ||
call 2 | ||
i32.const 16 | ||
local.set 11 | ||
local.get 2 | ||
local.get 11 | ||
i32.add | ||
local.set 12 | ||
local.get 12 | ||
global.set 0 | ||
return) | ||
(func (;7;) (type 3) | ||
(local i32 i32 i32 i32 i32 i64 i64 i32 i32) | ||
global.get 0 | ||
local.set 0 | ||
i32.const 16 | ||
local.set 1 | ||
local.get 0 | ||
local.get 1 | ||
i32.sub | ||
local.set 2 | ||
local.get 2 | ||
global.set 0 | ||
i32.const 1024 | ||
local.set 3 | ||
i32.const 7 | ||
call $env.int64storageLoad | ||
call $env.int64finish) | ||
(table $T0 1 1 funcref) | ||
(memory $memory 2) | ||
(global $g0 (mut i32) (i32.const 66576)) | ||
local.set 4 | ||
local.get 3 | ||
local.get 4 | ||
call 1 | ||
local.set 5 | ||
local.get 2 | ||
local.get 5 | ||
i64.store offset=8 | ||
local.get 2 | ||
i64.load offset=8 | ||
local.set 6 | ||
local.get 6 | ||
call 2 | ||
i32.const 16 | ||
local.set 7 | ||
local.get 2 | ||
local.get 7 | ||
i32.add | ||
local.set 8 | ||
local.get 8 | ||
global.set 0 | ||
return) | ||
(table (;0;) 1 1 funcref) | ||
(memory (;0;) 2) | ||
(global (;0;) (mut i32) (i32.const 66576)) | ||
(export "memory" (memory 0)) | ||
(export "init" (func $init)) | ||
(export "increment" (func $increment)) | ||
(export "decrement" (func $decrement)) | ||
(export "get" (func $get)) | ||
(data $d0 (i32.const 1024) "COUNTER\00")) | ||
(export "init" (func 3)) | ||
(export "upgrade" (func 4)) | ||
(export "increment" (func 5)) | ||
(export "decrement" (func 6)) | ||
(export "get" (func 7)) | ||
(data (;0;) (i32.const 1024) "COUNTER\00")) |