aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-08 23:15:30 +0800
committerGitHub <noreply@github.com>2017-08-08 23:15:30 +0800
commitbbb8e64fbee632d1594f6c132b1174591b961207 (patch)
tree556d259098feea0494876b3ac8e7671bb3285579 /libsolidity/codegen/ExpressionCompiler.cpp
parentc2215d4605d1fbcef1366d6b822ec610fc031b3c (diff)
parent8b45bddb559d17250c8a5619efa1a21f296d4e03 (diff)
downloaddexon-solidity-bbb8e64fbee632d1594f6c132b1174591b961207.tar
dexon-solidity-bbb8e64fbee632d1594f6c132b1174591b961207.tar.gz
dexon-solidity-bbb8e64fbee632d1594f6c132b1174591b961207.tar.bz2
dexon-solidity-bbb8e64fbee632d1594f6c132b1174591b961207.tar.lz
dexon-solidity-bbb8e64fbee632d1594f6c132b1174591b961207.tar.xz
dexon-solidity-bbb8e64fbee632d1594f6c132b1174591b961207.tar.zst
dexon-solidity-bbb8e64fbee632d1594f6c132b1174591b961207.zip
Merge pull request #2710 from ethereum/develop
Merge develop into release for 0.4.15
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 02cc62be..521d485f 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -546,7 +546,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
case FunctionType::Kind::External:
case FunctionType::Kind::CallCode:
case FunctionType::Kind::DelegateCall:
- case FunctionType::Kind::Bare:
+ case FunctionType::Kind::BareCall:
case FunctionType::Kind::BareCallCode:
case FunctionType::Kind::BareDelegateCall:
_functionCall.expression().accept(*this);
@@ -642,7 +642,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
TypePointers{},
strings(),
strings(),
- FunctionType::Kind::Bare,
+ FunctionType::Kind::BareCall,
false,
nullptr,
false,
@@ -973,7 +973,7 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
case FunctionType::Kind::DelegateCall:
case FunctionType::Kind::CallCode:
case FunctionType::Kind::Send:
- case FunctionType::Kind::Bare:
+ case FunctionType::Kind::BareCall:
case FunctionType::Kind::BareCallCode:
case FunctionType::Kind::BareDelegateCall:
case FunctionType::Kind::Transfer:
@@ -1560,7 +1560,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
utils().moveToStackTop(gasValueSize, _functionType.selfType()->sizeOnStack());
auto funKind = _functionType.kind();
- bool returnSuccessCondition = funKind == FunctionType::Kind::Bare || funKind == FunctionType::Kind::BareCallCode;
+ bool returnSuccessCondition = funKind == FunctionType::Kind::BareCall || funKind == FunctionType::Kind::BareCallCode || funKind == FunctionType::Kind::BareDelegateCall;
bool isCallCode = funKind == FunctionType::Kind::BareCallCode || funKind == FunctionType::Kind::CallCode;
bool isDelegateCall = funKind == FunctionType::Kind::BareDelegateCall || funKind == FunctionType::Kind::DelegateCall;
@@ -1579,7 +1579,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
TypePointers parameterTypes = _functionType.parameterTypes();
bool manualFunctionId = false;
if (
- (funKind == FunctionType::Kind::Bare || funKind == FunctionType::Kind::BareCallCode || funKind == FunctionType::Kind::BareDelegateCall) &&
+ (funKind == FunctionType::Kind::BareCall || funKind == FunctionType::Kind::BareCallCode || funKind == FunctionType::Kind::BareDelegateCall) &&
!_arguments.empty()
)
{
@@ -1712,7 +1712,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
u256 gasNeededByCaller = eth::GasCosts::callGas + 10;
if (_functionType.valueSet())
gasNeededByCaller += eth::GasCosts::callValueTransferGas;
- if (!isCallCode && !isDelegateCall && !existenceChecked)
+ if (!existenceChecked)
gasNeededByCaller += eth::GasCosts::callNewAccountGas; // we never know
m_context << gasNeededByCaller << Instruction::GAS << Instruction::SUB;
}