mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix implementation of getCodeSize in Ewasm
This commit is contained in:
parent
b3caf35e88
commit
7d3ccee921
@ -401,8 +401,7 @@ function calldatacopy(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4) {
|
||||
|
||||
// Needed?
|
||||
function codesize() -> z1, z2, z3, z4 {
|
||||
eth.getCodeSize(0)
|
||||
z1, z2, z3, z4 := mload_internal(0)
|
||||
z4 := eth.getCodeSize()
|
||||
}
|
||||
function codecopy(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4) {
|
||||
eth.codeCopy(
|
||||
|
@ -120,7 +120,7 @@ void WasmDialect::addEthereumExternals()
|
||||
{"getCaller", {i32ptr}, {}},
|
||||
{"getCallValue", {i32ptr}, {}},
|
||||
{"codeCopy", {i32ptr, i32, i32}, {}},
|
||||
{"getCodeSize", {i32ptr}, {}},
|
||||
{"getCodeSize", {}, {i32}},
|
||||
{"getBlockCoinbase", {i32ptr}, {}},
|
||||
{"create", {i32ptr, i32ptr, i32, i32ptr}, {i32}},
|
||||
{"getBlockDifficulty", {i32ptr}, {}},
|
||||
|
@ -7,6 +7,5 @@
|
||||
// Trace:
|
||||
// INVALID()
|
||||
// Memory dump:
|
||||
// 0: 0000000000000000000000000000000000000000000000000000000000000014
|
||||
// 40: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000
|
||||
// Storage dump:
|
||||
|
@ -9,6 +9,5 @@
|
||||
// Trace:
|
||||
// INVALID()
|
||||
// Memory dump:
|
||||
// 0: 0000000000000000000000000000000000000000000000000000000000000014
|
||||
// 80: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000
|
||||
// Storage dump:
|
||||
|
Loading…
Reference in New Issue
Block a user