From 66c01301fe5cb71a2bf66af2f7170043f088815c Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 13 Sep 2017 17:18:22 +0200 Subject: Rename to invalidInPureFunctions --- libevmasm/SemanticInformation.cpp | 2 +- libevmasm/SemanticInformation.h | 2 +- libsolidity/analysis/ViewPureChecker.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libevmasm/SemanticInformation.cpp b/libevmasm/SemanticInformation.cpp index e277a08d..ceb3fbdd 100644 --- a/libevmasm/SemanticInformation.cpp +++ b/libevmasm/SemanticInformation.cpp @@ -189,7 +189,7 @@ bool SemanticInformation::invalidatesStorage(Instruction _instruction) } } -bool SemanticInformation::readsFromState(Instruction _instruction) +bool SemanticInformation::invalidInPureFunctions(Instruction _instruction) { switch (_instruction) { diff --git a/libevmasm/SemanticInformation.h b/libevmasm/SemanticInformation.h index 963088d9..e5ea7c18 100644 --- a/libevmasm/SemanticInformation.h +++ b/libevmasm/SemanticInformation.h @@ -53,7 +53,7 @@ struct SemanticInformation static bool invalidatesMemory(solidity::Instruction _instruction); /// @returns true if the given instruction modifies storage (even indirectly). static bool invalidatesStorage(solidity::Instruction _instruction); - static bool readsFromState(solidity::Instruction _instruction); + static bool invalidInPureFunctions(solidity::Instruction _instruction); static bool invalidInViewFunctions(solidity::Instruction _instruction); }; diff --git a/libsolidity/analysis/ViewPureChecker.cpp b/libsolidity/analysis/ViewPureChecker.cpp index d4a6e96f..40ad6828 100644 --- a/libsolidity/analysis/ViewPureChecker.cpp +++ b/libsolidity/analysis/ViewPureChecker.cpp @@ -41,7 +41,7 @@ public: { if (eth::SemanticInformation::invalidInViewFunctions(_instruction.instruction)) m_reportMutability(StateMutability::NonPayable, _instruction.location); - else if (eth::SemanticInformation::readsFromState(_instruction.instruction)) + else if (eth::SemanticInformation::invalidInPureFunctions(_instruction.instruction)) m_reportMutability(StateMutability::View, _instruction.location); } void operator()(assembly::Literal const&) {} -- cgit v1.2.3