mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make most of the parameters mandatory in encodeToMemory
This commit is contained in:
parent
9c62647f19
commit
a657d3b1a1
@ -102,10 +102,10 @@ public:
|
|||||||
/// @note the locations of target reference types are ignored, because it will always be
|
/// @note the locations of target reference types are ignored, because it will always be
|
||||||
/// memory.
|
/// memory.
|
||||||
void encodeToMemory(
|
void encodeToMemory(
|
||||||
TypePointers const& _givenTypes = {},
|
TypePointers const& _givenTypes,
|
||||||
TypePointers const& _targetTypes = {},
|
TypePointers const& _targetTypes,
|
||||||
bool _padToWords = true,
|
bool _padToWords,
|
||||||
bool _copyDynamicDataInPlace = false,
|
bool _copyDynamicDataInPlace,
|
||||||
bool _encodeAsLibraryTypes = false
|
bool _encodeAsLibraryTypes = false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
|||||||
_context << Instruction::ADD;
|
_context << Instruction::ADD;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
utils().encodeToMemory(argumentTypes, function.parameterTypes());
|
utils().encodeToMemory(argumentTypes, function.parameterTypes(), true, false);
|
||||||
// now on stack: memory_end_ptr
|
// now on stack: memory_end_ptr
|
||||||
// need: size, offset, endowment
|
// need: size, offset, endowment
|
||||||
utils().toSizeAfterFreeMemoryPointer();
|
utils().toSizeAfterFreeMemoryPointer();
|
||||||
@ -751,7 +751,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
|||||||
nonIndexedParamTypes.push_back(function.parameterTypes()[arg]);
|
nonIndexedParamTypes.push_back(function.parameterTypes()[arg]);
|
||||||
}
|
}
|
||||||
utils().fetchFreeMemoryPointer();
|
utils().fetchFreeMemoryPointer();
|
||||||
utils().encodeToMemory(nonIndexedArgTypes, nonIndexedParamTypes);
|
utils().encodeToMemory(nonIndexedArgTypes, nonIndexedParamTypes, true, false);
|
||||||
// need: topic1 ... topicn memsize memstart
|
// need: topic1 ... topicn memsize memstart
|
||||||
utils().toSizeAfterFreeMemoryPointer();
|
utils().toSizeAfterFreeMemoryPointer();
|
||||||
m_context << logInstruction(numIndexed);
|
m_context << logInstruction(numIndexed);
|
||||||
|
Loading…
Reference in New Issue
Block a user