aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-23 00:05:13 +0800
committerchriseth <c@ethdev.com>2015-06-23 02:50:47 +0800
commit8639cf8e3df10bedf8ce808aa7146ac88624df44 (patch)
treeda2a0a835223c6d1adcce4e6b27ef7463eab338e /ExpressionCompiler.cpp
parent2eabaa4716997242856b0e33bbc34a4d7204c301 (diff)
downloaddexon-solidity-8639cf8e3df10bedf8ce808aa7146ac88624df44.tar
dexon-solidity-8639cf8e3df10bedf8ce808aa7146ac88624df44.tar.gz
dexon-solidity-8639cf8e3df10bedf8ce808aa7146ac88624df44.tar.bz2
dexon-solidity-8639cf8e3df10bedf8ce808aa7146ac88624df44.tar.lz
dexon-solidity-8639cf8e3df10bedf8ce808aa7146ac88624df44.tar.xz
dexon-solidity-8639cf8e3df10bedf8ce808aa7146ac88624df44.tar.zst
dexon-solidity-8639cf8e3df10bedf8ce808aa7146ac88624df44.zip
Remove dynamic return types.
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 4714b84e..7d6ed346 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -457,6 +457,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
strings(),
Location::Bare,
false,
+ nullptr,
true,
true
),
@@ -1004,9 +1005,14 @@ void ExpressionCompiler::appendExternalFunctionCall(
_functionType.getReturnParameterTypes().empty() ?
nullptr :
_functionType.getReturnParameterTypes().front().get();
- unsigned retSize = firstReturnType ? firstReturnType->getCalldataEncodedSize() : 0;
+ unsigned retSize = 0;
if (returnSuccessCondition)
retSize = 0; // return value actually is success condition
+ else if (firstReturnType)
+ {
+ retSize = firstReturnType->getCalldataEncodedSize();
+ solAssert(retSize > 0, "Unable to return dynamic type from external call.");
+ }
// Evaluate arguments.
TypePointers argumentTypes;
@@ -1123,6 +1129,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
//@todo manually update free memory pointer if we accept returning memory-stored objects
utils().fetchFreeMemoryPointer();
utils().loadFromMemoryDynamic(*firstReturnType, false, true, false);
+
}
}