Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Commit 97b8d00

Browse files
authored
Merge pull request #307 from ewasm/generator-cleanup-helper
Add stack cleanup helper
2 parents 0eb7f7b + d020c77 commit 97b8d00

File tree

5 files changed

+39
-30
lines changed

5 files changed

+39
-30
lines changed

include/wast-async.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace evm2wasm
2020
}
2121
},{
2222
opcodeEnum::GAS, {
23-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
23+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
2424
.imports = "(import \"ethereum\" \"getGasLeft\" (func $getGasLeft (result i64)))"
2525
}
2626
},{
@@ -95,12 +95,12 @@ namespace evm2wasm
9595
}
9696
},{
9797
opcodeEnum::TIMESTAMP, {
98-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
98+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
9999
.imports = "(import \"ethereum\" \"getBlockTimestamp\" (func $getBlockTimestamp (result i64)))"
100100
}
101101
},{
102102
opcodeEnum::NUMBER, {
103-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
103+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
104104
.imports = "(import \"ethereum\" \"getBlockNumber\" (func $getBlockNumber (result i64)))"
105105
}
106106
},{
@@ -110,7 +110,7 @@ namespace evm2wasm
110110
}
111111
},{
112112
opcodeEnum::GASLIMIT, {
113-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
113+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
114114
.imports = "(import \"ethereum\" \"getBlockGasLimit\" (func $getBlockGasLimit (result i64)))"
115115
}
116116
},{

include/wast.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace evm2wasm
2020
}
2121
},{
2222
opcodeEnum::GAS, {
23-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
23+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
2424
.imports = "(import \"ethereum\" \"getGasLeft\" (func $getGasLeft (result i64)))"
2525
}
2626
},{
@@ -95,12 +95,12 @@ namespace evm2wasm
9595
}
9696
},{
9797
opcodeEnum::TIMESTAMP, {
98-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
98+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
9999
.imports = "(import \"ethereum\" \"getBlockTimestamp\" (func $getBlockTimestamp (result i64)))"
100100
}
101101
},{
102102
opcodeEnum::NUMBER, {
103-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
103+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
104104
.imports = "(import \"ethereum\" \"getBlockNumber\" (func $getBlockNumber (result i64)))"
105105
}
106106
},{
@@ -110,7 +110,7 @@ namespace evm2wasm
110110
}
111111
},{
112112
opcodeEnum::GASLIMIT, {
113-
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
113+
.wast = ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
114114
.imports = "(import \"ethereum\" \"getBlockGasLimit\" (func $getBlockGasLimit (result i64)))"
115115
}
116116
},{

wasm/generateInterface.js

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,23 @@ function checkOverflowStackItem256 (spOffset) {
222222
(i64.load (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 3}))))`
223223
}
224224

225+
// assumes the stack contains 128 bits of value and clears the rest
226+
function cleanupStackItem128 (spOffset) {
227+
return `
228+
;; zero out mem
229+
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 3})) (i64.const 0))
230+
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 2})) (i64.const 0))`
231+
}
232+
233+
// assumes the stack contains 64 bits of value and clears the rest
234+
function cleanupStackItem64 (spOffset) {
235+
return `
236+
;; zero out mem
237+
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 3})) (i64.const 0))
238+
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 2})) (i64.const 0))
239+
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8})) (i64.const 0))`
240+
}
241+
225242
function generateManifest (interfaceManifest, opts) {
226243
const useAsyncAPI = opts.useAsyncAPI
227244
const json = {}
@@ -356,10 +373,8 @@ function generateManifest (interfaceManifest, opts) {
356373
call += '(get_local $callback)'
357374
}
358375

359-
call += `)
360-
;; zero out mem
361-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 3})) (i64.const 0))
362-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 2})) (i64.const 0))`
376+
call += ')'
377+
call += cleanupStackItem128(spOffset)
363378
} else if (output === 'address') {
364379
call =
365380
`${call} (i32.add (get_global $sp) (i32.const ${spOffset * 32}))`
@@ -368,6 +383,7 @@ function generateManifest (interfaceManifest, opts) {
368383
call += '(get_local $callback)'
369384
}
370385

386+
// FIXME: implement support in cleanupStackItem160
371387
call += `)
372388
;; zero out mem
373389
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 3})) (i64.const 0))
@@ -405,22 +421,15 @@ function generateManifest (interfaceManifest, opts) {
405421
${call})))`
406422
}
407423

408-
call += `
409-
;; zero out mem
410-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 3})) (i64.const 0))
411-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 2})) (i64.const 0))
412-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8})) (i64.const 0))`
424+
call += cleanupStackItem64(spOffset)
413425
} else if (output === 'i64') {
414426
if (useAsyncAPI && op.async) {
415427
call += '(get_local $callback)'
416428
}
417429
call =
418-
`(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32})) ${call}))
430+
`(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32})) ${call}))`
419431

420-
;; zero out mem
421-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 3})) (i64.const 0))
422-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 2})) (i64.const 0))
423-
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8})) (i64.const 0))`
432+
call += cleanupStackItem64(spOffset)
424433
} else if (!output) {
425434
if (useAsyncAPI && op.async) {
426435
call += '(get_local $callback)'

wasm/wast-async.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"imports": "(import \"ethereum\" \"callDataCopy\" (func $callDataCopy (param i32 i32 i32) ))"
99
},
1010
"GAS": {
11-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
11+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
1212
"imports": "(import \"ethereum\" \"getGasLeft\" (func $getGasLeft (result i64)))"
1313
},
1414
"ADDRESS": {
@@ -68,19 +68,19 @@
6868
"imports": "(import \"ethereum\" \"getBlockCoinbase\" (func $getBlockCoinbase (param i32) ))"
6969
},
7070
"TIMESTAMP": {
71-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
71+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
7272
"imports": "(import \"ethereum\" \"getBlockTimestamp\" (func $getBlockTimestamp (result i64)))"
7373
},
7474
"NUMBER": {
75-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
75+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
7676
"imports": "(import \"ethereum\" \"getBlockNumber\" (func $getBlockNumber (result i64)))"
7777
},
7878
"DIFFICULTY": {
7979
"wast": ";; generated by ./wasm/generateInterface.js\n(func $DIFFICULTY (call $getBlockDifficulty(i32.add (get_global $sp) (i32.const 32))))",
8080
"imports": "(import \"ethereum\" \"getBlockDifficulty\" (func $getBlockDifficulty (param i32) ))"
8181
},
8282
"GASLIMIT": {
83-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
83+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
8484
"imports": "(import \"ethereum\" \"getBlockGasLimit\" (func $getBlockGasLimit (result i64)))"
8585
},
8686
"CREATE": {

wasm/wast.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"imports": "(import \"ethereum\" \"callDataCopy\" (func $callDataCopy (param i32 i32 i32) ))"
99
},
1010
"GAS": {
11-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
11+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GAS (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getGasLeft))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
1212
"imports": "(import \"ethereum\" \"getGasLeft\" (func $getGasLeft (result i64)))"
1313
},
1414
"ADDRESS": {
@@ -68,19 +68,19 @@
6868
"imports": "(import \"ethereum\" \"getBlockCoinbase\" (func $getBlockCoinbase (param i32) ))"
6969
},
7070
"TIMESTAMP": {
71-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
71+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $TIMESTAMP (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockTimestamp))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
7272
"imports": "(import \"ethereum\" \"getBlockTimestamp\" (func $getBlockTimestamp (result i64)))"
7373
},
7474
"NUMBER": {
75-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
75+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $NUMBER (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockNumber))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
7676
"imports": "(import \"ethereum\" \"getBlockNumber\" (func $getBlockNumber (result i64)))"
7777
},
7878
"DIFFICULTY": {
7979
"wast": ";; generated by ./wasm/generateInterface.js\n(func $DIFFICULTY (call $getBlockDifficulty(i32.add (get_global $sp) (i32.const 32))))",
8080
"imports": "(import \"ethereum\" \"getBlockDifficulty\" (func $getBlockDifficulty (param i32) ))"
8181
},
8282
"GASLIMIT": {
83-
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
83+
"wast": ";; generated by ./wasm/generateInterface.js\n(func $GASLIMIT (i64.store (i32.add (get_global $sp) (i32.const 32)) (call $getBlockGasLimit))\n ;; zero out mem\n (i64.store (i32.add (get_global $sp) (i32.const 56)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 48)) (i64.const 0))\n (i64.store (i32.add (get_global $sp) (i32.const 40)) (i64.const 0)))",
8484
"imports": "(import \"ethereum\" \"getBlockGasLimit\" (func $getBlockGasLimit (result i64)))"
8585
},
8686
"CREATE": {

0 commit comments

Comments
 (0)