aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/GlobalContext.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-28 20:35:28 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-29 02:43:35 +0800
commitaa94000a91be455af7b9436db172ffa86cc57494 (patch)
treeeddf4760044af0ee25f7c6cff8f3fa4275358a52 /libsolidity/analysis/GlobalContext.cpp
parent3d228e98f1fe9dfdbebab2537eb1d8bcc1340d0b (diff)
downloaddexon-solidity-aa94000a91be455af7b9436db172ffa86cc57494.tar.gz
dexon-solidity-aa94000a91be455af7b9436db172ffa86cc57494.tar.zst
dexon-solidity-aa94000a91be455af7b9436db172ffa86cc57494.zip
Mark all built in functions with appropriate statemutability
Diffstat (limited to 'libsolidity/analysis/GlobalContext.cpp')
-rw-r--r--libsolidity/analysis/GlobalContext.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/libsolidity/analysis/GlobalContext.cpp b/libsolidity/analysis/GlobalContext.cpp
index a54b8c8d..62dbd394 100644
--- a/libsolidity/analysis/GlobalContext.cpp
+++ b/libsolidity/analysis/GlobalContext.cpp
@@ -43,13 +43,13 @@ m_magicVariables(vector<shared_ptr<MagicVariableDeclaration const>>{make_shared<
make_shared<MagicVariableDeclaration>("selfdestruct",
make_shared<FunctionType>(strings{"address"}, strings{}, FunctionType::Kind::Selfdestruct)),
make_shared<MagicVariableDeclaration>("addmod",
- make_shared<FunctionType>(strings{"uint256", "uint256", "uint256"}, strings{"uint256"}, FunctionType::Kind::AddMod)),
+ make_shared<FunctionType>(strings{"uint256", "uint256", "uint256"}, strings{"uint256"}, FunctionType::Kind::AddMod, false, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("mulmod",
- make_shared<FunctionType>(strings{"uint256", "uint256", "uint256"}, strings{"uint256"}, FunctionType::Kind::MulMod)),
+ make_shared<FunctionType>(strings{"uint256", "uint256", "uint256"}, strings{"uint256"}, FunctionType::Kind::MulMod, false, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("sha3",
- make_shared<FunctionType>(strings(), strings{"bytes32"}, FunctionType::Kind::SHA3, true)),
+ make_shared<FunctionType>(strings(), strings{"bytes32"}, FunctionType::Kind::SHA3, true, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("keccak256",
- make_shared<FunctionType>(strings(), strings{"bytes32"}, FunctionType::Kind::SHA3, true)),
+ make_shared<FunctionType>(strings(), strings{"bytes32"}, FunctionType::Kind::SHA3, true, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("log0",
make_shared<FunctionType>(strings{"bytes32"}, strings{}, FunctionType::Kind::Log0)),
make_shared<MagicVariableDeclaration>("log1",
@@ -61,17 +61,17 @@ m_magicVariables(vector<shared_ptr<MagicVariableDeclaration const>>{make_shared<
make_shared<MagicVariableDeclaration>("log4",
make_shared<FunctionType>(strings{"bytes32", "bytes32", "bytes32", "bytes32", "bytes32"}, strings{}, FunctionType::Kind::Log4)),
make_shared<MagicVariableDeclaration>("sha256",
- make_shared<FunctionType>(strings(), strings{"bytes32"}, FunctionType::Kind::SHA256, true)),
+ make_shared<FunctionType>(strings(), strings{"bytes32"}, FunctionType::Kind::SHA256, true, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("ecrecover",
- make_shared<FunctionType>(strings{"bytes32", "uint8", "bytes32", "bytes32"}, strings{"address"}, FunctionType::Kind::ECRecover)),
+ make_shared<FunctionType>(strings{"bytes32", "uint8", "bytes32", "bytes32"}, strings{"address"}, FunctionType::Kind::ECRecover, false, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("ripemd160",
- make_shared<FunctionType>(strings(), strings{"bytes20"}, FunctionType::Kind::RIPEMD160, true)),
+ make_shared<FunctionType>(strings(), strings{"bytes20"}, FunctionType::Kind::RIPEMD160, true, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("assert",
- make_shared<FunctionType>(strings{"bool"}, strings{}, FunctionType::Kind::Assert)),
+ make_shared<FunctionType>(strings{"bool"}, strings{}, FunctionType::Kind::Assert, false, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("require",
- make_shared<FunctionType>(strings{"bool"}, strings{}, FunctionType::Kind::Require)),
+ make_shared<FunctionType>(strings{"bool"}, strings{}, FunctionType::Kind::Require, false, StateMutability::Pure)),
make_shared<MagicVariableDeclaration>("revert",
- make_shared<FunctionType>(strings(), strings(), FunctionType::Kind::Revert))})
+ make_shared<FunctionType>(strings(), strings(), FunctionType::Kind::Revert, false, StateMutability::Pure))})
{
}