mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add usingIdentity option to CompilerUtils::memoryCopy
This commit is contained in:
parent
d0542f0e36
commit
4abc8ab5a9
@ -298,9 +298,16 @@ void CompilerUtils::zeroInitialiseMemoryArray(ArrayType const& _type)
|
||||
m_context << Instruction::SWAP1 << Instruction::POP;
|
||||
}
|
||||
|
||||
void CompilerUtils::memoryCopy()
|
||||
void CompilerUtils::memoryCopy(bool _useIdentityPrecompile)
|
||||
{
|
||||
// Stack here: size target source
|
||||
|
||||
if (!_useIdentityPrecompile)
|
||||
{
|
||||
// FIXME
|
||||
return;
|
||||
}
|
||||
|
||||
// stack for call: outsize target size source value contract gas
|
||||
//@TODO do not use ::CALL if less than 32 bytes?
|
||||
m_context << Instruction::DUP3 << Instruction::SWAP1;
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
/// Uses a CALL to the identity contract to perform a memory-to-memory copy.
|
||||
/// Stack pre: <size> <target> <source>
|
||||
/// Stack post:
|
||||
void memoryCopy();
|
||||
void memoryCopy(bool _useIdentityPrecompile = true);
|
||||
|
||||
/// Converts the combined and left-aligned (right-aligned if @a _rightAligned is true)
|
||||
/// external function type <address><function identifier> into two stack slots:
|
||||
|
Loading…
Reference in New Issue
Block a user