aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-04-13 09:14:18 +0800
committerchriseth <chris@ethereum.org>2018-04-16 18:47:38 +0800
commit0201492bbfb18ecc73f34d10e76dc0ee8395de73 (patch)
treed4c1c57b46e54aece62c1f67042c4411908a6aff
parent4c1d39b7a2bc9e58436da0bf85edf5cd74d5a882 (diff)
downloaddexon-solidity-0201492bbfb18ecc73f34d10e76dc0ee8395de73.tar.gz
dexon-solidity-0201492bbfb18ecc73f34d10e76dc0ee8395de73.tar.zst
dexon-solidity-0201492bbfb18ecc73f34d10e76dc0ee8395de73.zip
Remove redundant cleanup for abi.encode.
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index ed5af42e..3cf46a9d 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -1023,7 +1023,6 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
solAssert(function.kind() == FunctionType::Kind::ABIEncodeWithSelector, "");
}
- // Cleanup actually does not clean on shrinking the type.
utils().convertType(*dataOnStack, FixedBytesType(4), true);
// stack: <memory pointer> <selector>
@@ -1034,7 +1033,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
let data_start := add(mem_ptr, 0x20)
let data := mload(data_start)
let mask := )" + mask + R"(
- mstore(data_start, or(and(data, mask), and(selector, not(mask))))
+ mstore(data_start, or(and(data, mask), selector))
})", {"mem_ptr", "selector"});
m_context << Instruction::POP;
}