diff options
author | chriseth <chris@ethereum.org> | 2018-03-06 16:26:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 16:26:14 +0800 |
commit | f6c0daec14a047d753c2e501c500995bc7e6dc54 (patch) | |
tree | fa9b30b3c5d4f5a318f29d4ad382e57db82c897a /libsolidity/ast | |
parent | a9e02accb96fb1eb39942fa3a68f1904df7ae41d (diff) | |
parent | 91b13b734d34e6bb5a76fb53624588d035946237 (diff) | |
download | dexon-solidity-f6c0daec14a047d753c2e501c500995bc7e6dc54.tar.gz dexon-solidity-f6c0daec14a047d753c2e501c500995bc7e6dc54.tar.zst dexon-solidity-f6c0daec14a047d753c2e501c500995bc7e6dc54.zip |
Merge pull request #3652 from ethereum/gasleft_v2
Use StaticAnalyzer to deprecate msg.gas instead of conditionally remo…
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 26bde1c4..771ae643 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -3000,10 +3000,8 @@ bool MagicType::operator==(Type const& _other) const return other.m_kind == m_kind; } -MemberList::MemberMap MagicType::nativeMembers(ContractDefinition const* _contract) const +MemberList::MemberMap MagicType::nativeMembers(ContractDefinition const*) const { - solAssert(_contract, ""); - const bool v050 = _contract->sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050); switch (m_kind) { case Kind::Block: @@ -3016,17 +3014,13 @@ MemberList::MemberMap MagicType::nativeMembers(ContractDefinition const* _contra {"gaslimit", make_shared<IntegerType>(256)} }); case Kind::Message: - { - std::vector<MemberList::Member> members = { + return MemberList::MemberMap({ {"sender", make_shared<IntegerType>(160, IntegerType::Modifier::Address)}, + {"gas", make_shared<IntegerType>(256)}, {"value", make_shared<IntegerType>(256)}, {"data", make_shared<ArrayType>(DataLocation::CallData)}, {"sig", make_shared<FixedBytesType>(4)} - }; - if (!v050) - members.emplace_back("gas", make_shared<IntegerType>(256)); - return members; - } + }); case Kind::Transaction: return MemberList::MemberMap({ {"origin", make_shared<IntegerType>(160, IntegerType::Modifier::Address)}, |