From a499ef16faf9a24bb5e73c90d8c7012c7e406bf9 Mon Sep 17 00:00:00 2001 From: a3d4 Date: Sun, 24 May 2020 19:41:15 +0200 Subject: [PATCH] Fix spelling errors --- docs/060-breaking-changes.rst | 2 +- libevmasm/Assembly.cpp | 6 +++--- libsolidity/ast/ASTAnnotations.h | 2 +- libsolidity/codegen/CompilerUtils.h | 2 +- libsolidity/codegen/ExpressionCompiler.cpp | 2 +- libsolidity/interface/StandardCompiler.cpp | 4 ++-- scripts/codespell_whitelist.txt | 1 + scripts/release_ppa.sh | 2 +- test/compilationTests/corion/ico.sol | 6 +++--- test/libevmasm/Optimiser.cpp | 20 ++++++++++---------- 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/docs/060-breaking-changes.rst b/docs/060-breaking-changes.rst index 99e969e07..a1ee96d95 100644 --- a/docs/060-breaking-changes.rst +++ b/docs/060-breaking-changes.rst @@ -166,7 +166,7 @@ This section gives detailed instructions on how to update prior code for every b documentation so long as the notices are in the order they appear in the tuple return type. * Choose unique identifiers for variable declarations in inline assembly that do not conflict - with declartions outside the inline assembly block. + with declarations outside the inline assembly block. * Add ``virtual`` to every non-interface function you intend to override. Add ``virtual`` to all functions without implementation outside interfaces. For single inheritance, add diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index fa6ea4f16..296a330ab 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -435,10 +435,10 @@ map Assembly::optimiseInternal( // This only modifies PushTags, we have to run again to actually remove code. if (_settings.runDeduplicate) { - BlockDeduplicator dedup{m_items}; - if (dedup.deduplicate()) + BlockDeduplicator deduplicator{m_items}; + if (deduplicator.deduplicate()) { - for (auto const& replacement: dedup.replacedTags()) + for (auto const& replacement: deduplicator.replacedTags()) { assertThrow( replacement.first <= size_t(-1) && replacement.second <= size_t(-1), diff --git a/libsolidity/ast/ASTAnnotations.h b/libsolidity/ast/ASTAnnotations.h index eb8f7a263..507559ca6 100644 --- a/libsolidity/ast/ASTAnnotations.h +++ b/libsolidity/ast/ASTAnnotations.h @@ -250,7 +250,7 @@ struct ExpressionAnnotation: ASTAnnotation bool lValueOfOrdinaryAssignment = false; /// Types and - if given - names of arguments if the expr. is a function - /// that is called, used for overload resoultion + /// that is called, used for overload resolution std::optional arguments; }; diff --git a/libsolidity/codegen/CompilerUtils.h b/libsolidity/codegen/CompilerUtils.h index 3d5d85825..a3c266bde 100644 --- a/libsolidity/codegen/CompilerUtils.h +++ b/libsolidity/codegen/CompilerUtils.h @@ -286,7 +286,7 @@ public: /// Appends code that computes the Keccak-256 hash of the topmost stack element of 32 byte type. void computeHashStatic(); - /// Apppends code that copies the code of the given contract to memory. + /// Appends code that copies the code of the given contract to memory. /// Stack pre: Memory position /// Stack post: Updated memory position /// @param creation if true, copies creation code, if false copies runtime code. diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index f05ffda8f..6397c7492 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -1912,7 +1912,7 @@ void ExpressionCompiler::endVisit(Identifier const& _identifier) // If the identifier is called right away, this code is executed in visit(FunctionCall...), because // we want to avoid having a reference to the runtime function entry point in the // constructor context, since this would force the compiler to include unreferenced - // internal functions in the runtime contex. + // internal functions in the runtime context. utils().pushCombinedFunctionEntryLabel(functionDef->resolveVirtual(m_context.mostDerivedContract())); else if (auto variable = dynamic_cast(declaration)) appendVariable(*variable, static_cast(_identifier)); diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index feda8fc53..e04b0b2f1 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -178,7 +178,7 @@ bool isArtifactRequested(Json::Value const& _outputSelection, string const& _art } /// -/// @a _outputSelection is a JSON object containining a two-level hashmap, where the first level is the filename, +/// @a _outputSelection is a JSON object containing a two-level hashmap, where the first level is the filename, /// the second level is the contract name and the value is an array of artifact names to be requested for that contract. /// @a _file is the current file /// @a _contract is the current contract @@ -229,7 +229,7 @@ bool isBinaryRequested(Json::Value const& _outputSelection) if (!_outputSelection.isObject()) return false; - // This does not inculde "evm.methodIdentifiers" on purpose! + // This does not include "evm.methodIdentifiers" on purpose! static vector const outputsThatRequireBinaries{ "*", "ir", "irOptimized", diff --git a/scripts/codespell_whitelist.txt b/scripts/codespell_whitelist.txt index 0409dc1a2..f1111719f 100644 --- a/scripts/codespell_whitelist.txt +++ b/scripts/codespell_whitelist.txt @@ -11,3 +11,4 @@ compilability errorstring hist otion +keypair diff --git a/scripts/release_ppa.sh b/scripts/release_ppa.sh index 6d50e0066..267346e41 100755 --- a/scripts/release_ppa.sh +++ b/scripts/release_ppa.sh @@ -6,7 +6,7 @@ ## You can pass a branch name as argument to this script (which, if no argument is given, ## will default to "develop"). ## -## If the gien branch is "release", the resulting package will be uplaoded to +## If the given branch is "release", the resulting package will be uploaded to ## ethereum/ethereum PPA, or ethereum/ethereum-dev PPA otherwise. ## ## The gnupg key for "builds@ethereum.org" has to be present in order to sign diff --git a/test/compilationTests/corion/ico.sol b/test/compilationTests/corion/ico.sol index 26858e9d6..a8804fd4c 100644 --- a/test/compilationTests/corion/ico.sol +++ b/test/compilationTests/corion/ico.sol @@ -193,7 +193,7 @@ contract ico is safeMath { function setICOEthPrice(uint256 value) external { /* - Setting of the ICO ETC USD rates which can only be calle by a pre-defined address. + Setting of the ICO ETC USD rates which can only be called by a pre-defined address. After this function is completed till the call of the next function (which is at least an exchangeRateDelay array) this rate counts. With this process avoiding the sudden rate changes. @@ -221,8 +221,8 @@ contract ico is safeMath { /* Closing the ICO. It is only possible when the ICO period passed and only by the owner. - The 96% of the whole amount of the token is generated to the address of the fundation. - Ethers which are situated in this contract will be sent to the address of the fundation. + The 96% of the whole amount of the token is generated to the address of the foundation. + Ethers which are situated in this contract will be sent to the address of the foundation. */ require( msg.sender == owner ); require( block.number > icoDelay ); diff --git a/test/libevmasm/Optimiser.cpp b/test/libevmasm/Optimiser.cpp index 782b687fc..536eaa951 100644 --- a/test/libevmasm/Optimiser.cpp +++ b/test/libevmasm/Optimiser.cpp @@ -826,8 +826,8 @@ BOOST_AUTO_TEST_CASE(block_deduplicator) Instruction::JUMP, AssemblyItem(Tag, 3) }; - BlockDeduplicator dedup(input); - dedup.deduplicate(); + BlockDeduplicator deduplicator(input); + deduplicator.deduplicate(); set pushTags; for (AssemblyItem const& item: input) @@ -857,8 +857,8 @@ BOOST_AUTO_TEST_CASE(block_deduplicator_assign_immutable_same) AssemblyItem(PushTag, 1), AssemblyItem(PushTag, 1), } + blocks; - BlockDeduplicator dedup(input); - dedup.deduplicate(); + BlockDeduplicator deduplicator(input); + deduplicator.deduplicate(); BOOST_CHECK_EQUAL_COLLECTIONS(input.begin(), input.end(), output.begin(), output.end()); } @@ -876,8 +876,8 @@ BOOST_AUTO_TEST_CASE(block_deduplicator_assign_immutable_different_value) AssemblyItem{AssignImmutable, 0x1234}, Instruction::JUMP }; - BlockDeduplicator dedup(input); - BOOST_CHECK(!dedup.deduplicate()); + BlockDeduplicator deduplicator(input); + BOOST_CHECK(!deduplicator.deduplicate()); } BOOST_AUTO_TEST_CASE(block_deduplicator_assign_immutable_different_hash) @@ -894,8 +894,8 @@ BOOST_AUTO_TEST_CASE(block_deduplicator_assign_immutable_different_hash) AssemblyItem{AssignImmutable, 0xABCD}, Instruction::JUMP }; - BlockDeduplicator dedup(input); - BOOST_CHECK(!dedup.deduplicate()); + BlockDeduplicator deduplicator(input); + BOOST_CHECK(!deduplicator.deduplicate()); } BOOST_AUTO_TEST_CASE(block_deduplicator_loops) @@ -920,8 +920,8 @@ BOOST_AUTO_TEST_CASE(block_deduplicator_loops) AssemblyItem(PushTag, 2), Instruction::JUMP, }; - BlockDeduplicator dedup(input); - dedup.deduplicate(); + BlockDeduplicator deduplicator(input); + deduplicator.deduplicate(); set pushTags; for (AssemblyItem const& item: input)