mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
codegen: merge type conversion and cleaning up
This commit is contained in:
parent
3fb9625127
commit
9d25b5601e
@ -233,8 +233,7 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc
|
|||||||
m_context << Instruction::DUP2 << Instruction::SWAP1;
|
m_context << Instruction::DUP2 << Instruction::SWAP1;
|
||||||
|
|
||||||
m_context << Instruction::SWAP1;
|
m_context << Instruction::SWAP1;
|
||||||
utils.convertType(_sourceType, _sourceType, true);
|
utils.convertType(_sourceType, *m_dataType, true);
|
||||||
utils.convertType(*m_dataType, *m_dataType, true, true);
|
|
||||||
m_context << Instruction::SWAP1;
|
m_context << Instruction::SWAP1;
|
||||||
|
|
||||||
m_context << Instruction::SSTORE;
|
m_context << Instruction::SSTORE;
|
||||||
@ -244,7 +243,7 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc
|
|||||||
if (_sourceType.sizeOnStack() == 1)
|
if (_sourceType.sizeOnStack() == 1)
|
||||||
{
|
{
|
||||||
m_context << Instruction::SWAP2;
|
m_context << Instruction::SWAP2;
|
||||||
utils.convertType(_sourceType, _sourceType, true);
|
utils.convertType(_sourceType, *m_dataType, true);
|
||||||
m_context << Instruction::SWAP2;
|
m_context << Instruction::SWAP2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user