mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-13 17:31:09 +00:00
Charge gas for local variables on the callee side (#38)
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
(import "env" "gas" (func (;0;) (type 1)))
|
||||
(func $fibonacci_with_break (;1;) (type 0) (result i32)
|
||||
(local i32 i32)
|
||||
i64.const 13
|
||||
i64.const 15
|
||||
call 0
|
||||
block ;; label = @1
|
||||
i32.const 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
(type (;1;) (func (param i64)))
|
||||
(func $fibonacci_with_break (;0;) (type 0) (result i32)
|
||||
(local $x i32) (local $y i32)
|
||||
i64.const 24
|
||||
i64.const 26
|
||||
call 1
|
||||
block ;; label = @1
|
||||
i32.const 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
(import "env" "gas" (func (;0;) (type 1)))
|
||||
(func $add_locals (;1;) (type 0) (param $x i32) (param $y i32) (result i32)
|
||||
(local i32)
|
||||
i64.const 5
|
||||
i64.const 6
|
||||
call 0
|
||||
local.get $x
|
||||
local.get $y
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
(type (;1;) (func (param i64)))
|
||||
(func $add_locals (;0;) (type 0) (param $x i32) (param $y i32) (result i32)
|
||||
(local $t i32)
|
||||
i64.const 16
|
||||
i64.const 17
|
||||
call 2
|
||||
local.get $x
|
||||
local.get $y
|
||||
|
||||
Reference in New Issue
Block a user