aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AST.cpp2
-rw-r--r--ExpressionCompiler.cpp10
-rw-r--r--ExpressionCompiler.h6
3 files changed, 9 insertions, 9 deletions
diff --git a/AST.cpp b/AST.cpp
index c4fd7e2d..39ba10f3 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -502,7 +502,7 @@ void FunctionCall::checkTypeRequirements()
#endif
if (!m_arguments[i]->getType()->isImplicitlyConvertibleTo(*parameterTypes[0]))
BOOST_THROW_EXCEPTION(createTypeError(std::string("SHA3 argument ") +
- boost::lexical_cast<std::string>(i) +
+ boost::lexical_cast<std::string>(i + 1) +
std::string("can't be converted to hash")));
} else if (!m_arguments[i]->getType()->isImplicitlyConvertibleTo(*parameterTypes[i]))
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 8672611a..0acc9c9e 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -275,7 +275,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
m_context << u256(0) << eth::Instruction::CODECOPY;
unsigned length = bytecode.size();
- length += appendArgumentCopyToMemory(function.getParameterTypes(), arguments, length);
+ length += appendArgumentsCopyToMemory(function.getParameterTypes(), arguments, length);
// size, offset, endowment
m_context << u256(length) << u256(0);
if (function.valueSet())
@@ -800,7 +800,7 @@ void ExpressionCompiler::appendExternalFunctionCall(FunctionType const& _functio
// reserve space for the function identifier
unsigned dataOffset = bare ? 0 : CompilerUtils::dataStartOffset;
- dataOffset += appendArgumentCopyToMemory(_functionType.getParameterTypes(), _arguments, dataOffset);
+ dataOffset += appendArgumentsCopyToMemory(_functionType.getParameterTypes(), _arguments, dataOffset);
//@todo only return the first return value for now
Type const* firstType = _functionType.getReturnParameterTypes().empty() ? nullptr :
@@ -836,9 +836,9 @@ void ExpressionCompiler::appendExternalFunctionCall(FunctionType const& _functio
}
}
-unsigned ExpressionCompiler::appendArgumentCopyToMemory(TypePointers const& _types,
- vector<ASTPointer<Expression const>> const& _arguments,
- unsigned _memoryOffset)
+unsigned ExpressionCompiler::appendArgumentsCopyToMemory(TypePointers const& _types,
+ vector<ASTPointer<Expression const>> const& _arguments,
+ unsigned _memoryOffset)
{
unsigned length = 0;
for (unsigned i = 0; i < _arguments.size(); ++i)
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h
index b977657b..1f42d822 100644
--- a/ExpressionCompiler.h
+++ b/ExpressionCompiler.h
@@ -94,9 +94,9 @@ private:
bool bare = false);
/// Appends code that copies the given arguments to memory (with optional offset).
/// @returns the number of bytes copied to memory
- unsigned appendArgumentCopyToMemory(TypePointers const& _types,
- std::vector<ASTPointer<Expression const>> const& _arguments,
- unsigned _memoryOffset = 0);
+ unsigned appendArgumentsCopyToMemory(TypePointers const& _types,
+ std::vector<ASTPointer<Expression const>> const& _arguments,
+ unsigned _memoryOffset = 0);
/// Appends code that copies the given arguments that should all have the
/// same @a _type to memory (with optional offset).
/// @returns the number of bytes copied to memory