aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-01 18:06:37 +0800
committerGitHub <noreply@github.com>2017-08-01 18:06:37 +0800
commit7e07eb6eea5195213398e0b6e0d502f03bfb4f19 (patch)
tree12ee0efa9e80802f3ad82809e8495cefe2e526bb
parent93f90eb292de6396462dd244213457b948852168 (diff)
parent6d37f30d76cb8af83a292535bf2a736406b3f1c8 (diff)
downloaddexon-solidity-7e07eb6eea5195213398e0b6e0d502f03bfb4f19.tar.gz
dexon-solidity-7e07eb6eea5195213398e0b6e0d502f03bfb4f19.tar.zst
dexon-solidity-7e07eb6eea5195213398e0b6e0d502f03bfb4f19.zip
Merge pull request #2677 from ethereum/barecall
Rename Bare to Barecall
-rw-r--r--libsolidity/analysis/TypeChecker.cpp2
-rw-r--r--libsolidity/ast/Types.cpp10
-rw-r--r--libsolidity/ast/Types.h2
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp10
4 files changed, 12 insertions, 12 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 5419db2d..5fe03aa6 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1050,7 +1050,7 @@ void TypeChecker::endVisit(ExpressionStatement const& _statement)
{
auto kind = callType->kind();
if (
- kind == FunctionType::Kind::Bare ||
+ kind == FunctionType::Kind::BareCall ||
kind == FunctionType::Kind::BareCallCode ||
kind == FunctionType::Kind::BareDelegateCall
)
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 3f8da501..3712eb15 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -477,7 +477,7 @@ MemberList::MemberMap IntegerType::nativeMembers(ContractDefinition const*) cons
if (isAddress())
return {
{"balance", make_shared<IntegerType >(256)},
- {"call", make_shared<FunctionType>(strings(), strings{"bool"}, FunctionType::Kind::Bare, true, false, true)},
+ {"call", make_shared<FunctionType>(strings(), strings{"bool"}, FunctionType::Kind::BareCall, true, false, true)},
{"callcode", make_shared<FunctionType>(strings(), strings{"bool"}, FunctionType::Kind::BareCallCode, true, false, true)},
{"delegatecall", make_shared<FunctionType>(strings(), strings{"bool"}, FunctionType::Kind::BareDelegateCall, true)},
{"send", make_shared<FunctionType>(strings{"uint"}, strings{"bool"}, FunctionType::Kind::Send)},
@@ -2178,7 +2178,7 @@ string FunctionType::identifier() const
case Kind::External: id += "external"; break;
case Kind::CallCode: id += "callcode"; break;
case Kind::DelegateCall: id += "delegatecall"; break;
- case Kind::Bare: id += "bare"; break;
+ case Kind::BareCall: id += "barecall"; break;
case Kind::BareCallCode: id += "barecallcode"; break;
case Kind::BareDelegateCall: id += "baredelegatecall"; break;
case Kind::Creation: id += "creation"; break;
@@ -2346,7 +2346,7 @@ unsigned FunctionType::sizeOnStack() const
unsigned size = 0;
if (kind == Kind::External || kind == Kind::CallCode || kind == Kind::DelegateCall)
size = 2;
- else if (kind == Kind::Bare || kind == Kind::BareCallCode || kind == Kind::BareDelegateCall)
+ else if (kind == Kind::BareCall || kind == Kind::BareCallCode || kind == Kind::BareDelegateCall)
size = 1;
else if (kind == Kind::Internal)
size = 1;
@@ -2405,7 +2405,7 @@ MemberList::MemberMap FunctionType::nativeMembers(ContractDefinition const*) con
case Kind::ECRecover:
case Kind::SHA256:
case Kind::RIPEMD160:
- case Kind::Bare:
+ case Kind::BareCall:
case Kind::BareCallCode:
case Kind::BareDelegateCall:
{
@@ -2509,7 +2509,7 @@ bool FunctionType::isBareCall() const
{
switch (m_kind)
{
- case Kind::Bare:
+ case Kind::BareCall:
case Kind::BareCallCode:
case Kind::BareDelegateCall:
case Kind::ECRecover:
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index 1db46355..5d2bdca0 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -838,7 +838,7 @@ public:
External, ///< external call using CALL
CallCode, ///< external call using CALLCODE, i.e. not exchanging the storage
DelegateCall, ///< external call using DELEGATECALL, i.e. not exchanging the storage
- Bare, ///< CALL without function hash
+ BareCall, ///< CALL without function hash
BareCallCode, ///< CALLCODE without function hash
BareDelegateCall, ///< DELEGATECALL without function hash
Creation, ///< external call using CREATE
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 02cc62be..d661e1b1 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;
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()
)
{