mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use shared_ptrs to enable shared_from_this.
This commit is contained in:
parent
cea020b89e
commit
82a00e7dc5
@ -572,7 +572,7 @@ void ArrayUtils::clearArray(ArrayType const& _typeIn) const
|
||||
ArrayUtils(_context).convertLengthToSize(_type);
|
||||
_context << Instruction::ADD << Instruction::SWAP1;
|
||||
if (_type.baseType()->storageBytes() < 32)
|
||||
ArrayUtils(_context).clearStorageLoop(IntegerType(256));
|
||||
ArrayUtils(_context).clearStorageLoop(*make_shared<IntegerType>(256));
|
||||
else
|
||||
ArrayUtils(_context).clearStorageLoop(*_type.baseType());
|
||||
_context << Instruction::POP;
|
||||
@ -613,7 +613,7 @@ void ArrayUtils::clearDynamicArray(ArrayType const& _type) const
|
||||
<< Instruction::SWAP1;
|
||||
// stack: data_pos_end data_pos
|
||||
if (_type.isByteArray() || _type.baseType()->storageBytes() < 32)
|
||||
clearStorageLoop(IntegerType(256));
|
||||
clearStorageLoop(*make_shared<IntegerType>(256));
|
||||
else
|
||||
clearStorageLoop(*_type.baseType());
|
||||
// cleanup
|
||||
@ -720,7 +720,7 @@ void ArrayUtils::resizeDynamicArray(ArrayType const& _typeIn) const
|
||||
ArrayUtils(_context).convertLengthToSize(_type);
|
||||
_context << Instruction::DUP2 << Instruction::ADD << Instruction::SWAP1;
|
||||
// stack: ref new_length current_length first_word data_location_end data_location
|
||||
ArrayUtils(_context).clearStorageLoop(IntegerType(256));
|
||||
ArrayUtils(_context).clearStorageLoop(*make_shared<IntegerType>(256));
|
||||
_context << Instruction::POP;
|
||||
// stack: ref new_length current_length first_word
|
||||
solAssert(_context.stackHeight() - stackHeightStart == 4 - 2, "3");
|
||||
@ -759,7 +759,7 @@ void ArrayUtils::resizeDynamicArray(ArrayType const& _typeIn) const
|
||||
_context << Instruction::SWAP2 << Instruction::ADD;
|
||||
// stack: ref new_length delete_end delete_start
|
||||
if (_type.isByteArray() || _type.baseType()->storageBytes() < 32)
|
||||
ArrayUtils(_context).clearStorageLoop(IntegerType(256));
|
||||
ArrayUtils(_context).clearStorageLoop(*make_shared<IntegerType>(256));
|
||||
else
|
||||
ArrayUtils(_context).clearStorageLoop(*_type.baseType());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user