-
Notifications
You must be signed in to change notification settings - Fork 38
Fix CALLs #264
Conversation
Commits regarding the "2300 call stipend" can be removed if ewasm/hera#219 is merged. |
31cc133
to
d753b23
Compare
This passes with ewasm/hera#219. |
wasm/generateInterface.js
Outdated
@@ -281,7 +338,7 @@ function generateManifest (interfaceManifest, opts) { | |||
(i64.store (i32.add (get_global $sp) (i32.const ${spOffset * 32 + 8 * 2})) (i64.const 0))` | |||
|
|||
if (!op.async) { | |||
call += '(drop (call $bswap_m128 (i32.add (i32.const 32)(get_global $sp))))' | |||
call += '(drop (i32.add (i32.const 32)(get_global $sp)))' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is useless, it is a no-op.
In the previous case bswap_m128
operates on memory, so it wasn't a no-op.
wasm/generateInterface.js
Outdated
@@ -292,7 +349,7 @@ function generateManifest (interfaceManifest, opts) { | |||
} | |||
|
|||
call += `) | |||
(drop (call $bswap_m160 (i32.add (get_global $sp) (i32.const ${spOffset * 32})))) | |||
(drop (i32.add (get_global $sp) (i32.const ${spOffset * 32}))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same applies here.
// add 2300 gas subsidy | ||
// for now this only works if the gas is a 64-bit value | ||
// TODO: use 256-bit arithmetic | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this kept as a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will be relevant when we simplify the EEI and move the ugly gas logic here into evm2wasm
Closes #246 (replaces).