aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-05 22:05:58 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-06 16:38:04 +0800
commit337b952f53d4eb24e6ae28386f26b4f69a33d935 (patch)
treef9d5eb6b70a77d0ad4f55336e4bd951f29cb2b95
parentf09c6fffc9f55b5208560d6550134bf854970db8 (diff)
downloaddexon-solidity-337b952f53d4eb24e6ae28386f26b4f69a33d935.tar
dexon-solidity-337b952f53d4eb24e6ae28386f26b4f69a33d935.tar.gz
dexon-solidity-337b952f53d4eb24e6ae28386f26b4f69a33d935.tar.bz2
dexon-solidity-337b952f53d4eb24e6ae28386f26b4f69a33d935.tar.lz
dexon-solidity-337b952f53d4eb24e6ae28386f26b4f69a33d935.tar.xz
dexon-solidity-337b952f53d4eb24e6ae28386f26b4f69a33d935.tar.zst
dexon-solidity-337b952f53d4eb24e6ae28386f26b4f69a33d935.zip
Fixes after rebase
-rw-r--r--AST.cpp2
-rw-r--r--ExpressionCompiler.cpp4
-rw-r--r--ExpressionCompiler.h4
3 files changed, 7 insertions, 3 deletions
diff --git a/AST.cpp b/AST.cpp
index 39ba10f3..f2fbc528 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -487,7 +487,7 @@ void FunctionCall::checkTypeRequirements()
// and then ask if that is implicitly convertible to the struct represented by the
// function parameters
TypePointers const& parameterTypes = functionType->getParameterTypes();
- if (functionType->getLocation() !=FunctionType::Location::SHA3 && parameterTypes.size() != m_arguments.size())
+ if (functionType->getLocation() != FunctionType::Location::SHA3 && parameterTypes.size() != m_arguments.size())
BOOST_THROW_EXCEPTION(createTypeError("Wrong argument count for function call."));
if (m_names.empty()) // LTODO: Totally ignoring sha3 case for named arguments for now just for the rebase to work
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 0acc9c9e..e2c632a3 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -856,8 +856,8 @@ unsigned ExpressionCompiler::appendSameTypeArgumentsCopyToMemory(TypePointer con
return length;
}
-unsigned ExpressionCompiler::appendExpressionCopyToMemory(Type const& _expectedType,
- Expression const& _expression, unsigned _memoryOffset)
+unsigned ExpressionCompiler::appendTypeConversionAndMoveToMemory(Type const& _expectedType, Type const& _type,
+ Location const& _location, unsigned _memoryOffset)
{
appendTypeConversion(_type, _expectedType, true);
unsigned const c_numBytes = CompilerUtils::getPaddedSize(_expectedType.getCalldataEncodedSize());
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h
index 1f42d822..90a60afc 100644
--- a/ExpressionCompiler.h
+++ b/ExpressionCompiler.h
@@ -97,6 +97,10 @@ private:
unsigned appendArgumentsCopyToMemory(TypePointers const& _types,
std::vector<ASTPointer<Expression const>> const& _arguments,
unsigned _memoryOffset = 0);
+ /// Appends code that copies a type to memory.
+ /// @returns the number of bytes copied to memory
+ unsigned appendTypeConversionAndMoveToMemory(Type const& _expectedType, Type const& _type,
+ Location const& _location, 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