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:
Sasha Gryaznov
2022-11-26 17:37:31 +02:00
committed by GitHub
parent b51701088e
commit 6a79d1d4b8
7 changed files with 49 additions and 14 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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