Make most of the parameters mandatory in encodeToMemory

This commit is contained in:
Alex Beregszaszi 2017-09-26 18:50:43 +01:00
parent 9c62647f19
commit a657d3b1a1
2 changed files with 6 additions and 6 deletions

View File

@ -102,10 +102,10 @@ public:
/// @note the locations of target reference types are ignored, because it will always be
/// memory.
void encodeToMemory(
TypePointers const& _givenTypes = {},
TypePointers const& _targetTypes = {},
bool _padToWords = true,
bool _copyDynamicDataInPlace = false,
TypePointers const& _givenTypes,
TypePointers const& _targetTypes,
bool _padToWords,
bool _copyDynamicDataInPlace,
bool _encodeAsLibraryTypes = false
);

View File

@ -581,7 +581,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
_context << Instruction::ADD;
}
);
utils().encodeToMemory(argumentTypes, function.parameterTypes());
utils().encodeToMemory(argumentTypes, function.parameterTypes(), true, false);
// now on stack: memory_end_ptr
// need: size, offset, endowment
utils().toSizeAfterFreeMemoryPointer();
@ -751,7 +751,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
nonIndexedParamTypes.push_back(function.parameterTypes()[arg]);
}
utils().fetchFreeMemoryPointer();
utils().encodeToMemory(nonIndexedArgTypes, nonIndexedParamTypes);
utils().encodeToMemory(nonIndexedArgTypes, nonIndexedParamTypes, true, false);
// need: topic1 ... topicn memsize memstart
utils().toSizeAfterFreeMemoryPointer();
m_context << logInstruction(numIndexed);