Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove redundant cleanup for abi.encode.
  • Loading branch information
axic authored and chriseth committed Apr 16, 2018
commit 0201492bbfb18ecc73f34d10e76dc0ee8395de73
3 changes: 1 addition & 2 deletions libsolidity/codegen/ExpressionCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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;
}
Expand Down