From e1a9446f8767c74696a137d955c7a6afea2537a1 Mon Sep 17 00:00:00 2001 From: minaminao Date: Fri, 14 Apr 2023 20:24:50 +0900 Subject: [PATCH] fix(docs): fix missing backticks, remove latexpdfja, fix the missing help message of latexpdf, and remove unnecessary whitespace (#14101) * Fix missing backticks * Remove whitespace in the header of the optimizer step * Remove whitespace in directives * Remove `make latexpdfja` * Add the help message of latexpdf in make.bat * Fix missing backticks * Update docs/internals/optimizer.rst --------- Co-authored-by: Nuno Santos --- docs/080-breaking-changes.rst | 2 +- docs/Makefile | 7 ------- docs/contracts/inheritance.rst | 4 ++-- docs/contributing.rst | 4 ++-- docs/control-structures.rst | 2 +- docs/installing-solidity.rst | 2 +- docs/internals/layout_in_storage.rst | 2 +- docs/internals/optimizer.rst | 6 +++--- docs/internals/source_mappings.rst | 2 +- docs/ir-breaking-changes.rst | 2 +- docs/make.bat | 11 +---------- docs/yul.rst | 2 +- 12 files changed, 15 insertions(+), 31 deletions(-) diff --git a/docs/080-breaking-changes.rst b/docs/080-breaking-changes.rst index b322d2a48..bb558359e 100644 --- a/docs/080-breaking-changes.rst +++ b/docs/080-breaking-changes.rst @@ -173,4 +173,4 @@ How to update your code - Change ``msg.sender.transfer(x)`` to ``payable(msg.sender).transfer(x)`` or use a stored variable of ``address payable`` type. - Change ``x**y**z`` to ``(x**y)**z``. - Use inline assembly as a replacement for ``log0``, ..., ``log4``. -- Negate unsigned integers by subtracting them from the maximum value of the type and adding 1 (e.g. ``type(uint256).max - x + 1``, while ensuring that `x` is not zero) +- Negate unsigned integers by subtracting them from the maximum value of the type and adding 1 (e.g. ``type(uint256).max - x + 1``, while ensuring that ``x`` is not zero) diff --git a/docs/Makefile b/docs/Makefile index 3cc98f699..01660bd38 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -34,7 +34,6 @@ help: @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @@ -116,12 +115,6 @@ latexpdf: $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo diff --git a/docs/contracts/inheritance.rst b/docs/contracts/inheritance.rst index 4f310bd40..11a207929 100644 --- a/docs/contracts/inheritance.rst +++ b/docs/contracts/inheritance.rst @@ -436,11 +436,11 @@ You can use internal parameters in a constructor (for example storage pointers). the contract has to be marked :ref:`abstract `, because these parameters cannot be assigned valid values from outside but only through the constructors of derived contracts. -.. warning :: +.. warning:: Prior to version 0.4.22, constructors were defined as functions with the same name as the contract. This syntax was deprecated and is not allowed anymore in version 0.5.0. -.. warning :: +.. warning:: Prior to version 0.7.0, you had to specify the visibility of constructors as either ``internal`` or ``public``. diff --git a/docs/contributing.rst b/docs/contributing.rst index e120225e3..f19dc99fd 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -146,7 +146,7 @@ SMT tests by exporting ``SMT_FLAGS=--no-smt`` before running ``./scripts/tests.s running ``./scripts/soltest.sh --no-smt``. These tests are ``libsolidity/smtCheckerTests`` and ``libsolidity/smtCheckerTestsJSON``. -.. note :: +.. note:: To get a list of all unit tests run by Soltest, run ``./build/test/soltest --list_content=HRF``. @@ -167,7 +167,7 @@ See especially: - `run_test (-t) `_ to run specific tests cases, and - `report-level (-r) `_ give a more detailed report. -.. note :: +.. note:: Those working in a Windows environment wanting to run the above basic sets without libz3. Using Git Bash, you use: ``./build/test/Release/soltest.exe -- --no-smt``. diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 18a522217..510948b55 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -651,7 +651,7 @@ in the following situations: For the following cases, the error data from the external call (if provided) is forwarded. This means that it can either cause -an `Error` or a `Panic` (or whatever else was given): +an ``Error`` or a ``Panic`` (or whatever else was given): #. If a ``.transfer()`` fails. #. If you call a function via a message call but it does not finish diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst index c1caaec05..4aae53de4 100644 --- a/docs/installing-solidity.rst +++ b/docs/installing-solidity.rst @@ -527,7 +527,7 @@ If you are interested what CMake options are available run ``cmake .. -LH``. SMT Solvers ----------- Solidity can be built against SMT solvers and will do so by default if -they are found in the system. Each solver can be disabled by a `cmake` option. +they are found in the system. Each solver can be disabled by a ``cmake`` option. *Note: In some cases, this can also be a potential workaround for build failures.* diff --git a/docs/internals/layout_in_storage.rst b/docs/internals/layout_in_storage.rst index a492dea14..7afcfc2ac 100644 --- a/docs/internals/layout_in_storage.rst +++ b/docs/internals/layout_in_storage.rst @@ -208,7 +208,7 @@ of types), arrays have its ``base`` type, and structs list their ``members`` in the same format as the top-level ``storage`` (see :ref:`above `). -.. note :: +.. note:: The JSON output format of a contract's storage layout is still considered experimental and is subject to change in non-breaking releases of Solidity. diff --git a/docs/internals/optimizer.rst b/docs/internals/optimizer.rst index 99589db99..9ede5ef2a 100644 --- a/docs/internals/optimizer.rst +++ b/docs/internals/optimizer.rst @@ -826,10 +826,10 @@ if the common subexpression eliminator was run right before it. .. _expression-simplifier: -Expression Simplifier -^^^^^^^^^^^^^^^^^^^^^ +ExpressionSimplifier +^^^^^^^^^^^^^^^^^^^^ -The Expression Simplifier uses the Dataflow Analyzer and makes use +The ExpressionSimplifier uses the Dataflow Analyzer and makes use of a list of equivalence transforms on expressions like ``X + 0 -> X`` to simplify the code. diff --git a/docs/internals/source_mappings.rst b/docs/internals/source_mappings.rst index 11027b8ac..68c29d955 100644 --- a/docs/internals/source_mappings.rst +++ b/docs/internals/source_mappings.rst @@ -26,7 +26,7 @@ that are not part of the original input but are referenced from the source mappings. These source files together with their identifiers can be obtained via ``output['contracts'][sourceName][contractName]['evm']['bytecode']['generatedSources']``. -.. note :: +.. note:: In the case of instructions that are not associated with any particular source file, the source mapping assigns an integer identifier of ``-1``. This may happen for bytecode sections stemming from compiler-generated inline assembly statements. diff --git a/docs/ir-breaking-changes.rst b/docs/ir-breaking-changes.rst index f8a6cceb3..9cee46793 100644 --- a/docs/ir-breaking-changes.rst +++ b/docs/ir-breaking-changes.rst @@ -247,7 +247,7 @@ hiding new and different behavior in existing code. } } - The function `f()` behaves as follows: + The function ``f()`` behaves as follows: - Old code generator: runs out of gas while zeroing the array contents after the large memory allocation - New code generator: reverts due to free memory pointer overflow (does not run out of gas) diff --git a/docs/make.bat b/docs/make.bat index bc06e706e..d11deb3ff 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -28,6 +28,7 @@ if "%1" == "help" ( echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. latexpdf to make LaTeX files and run them through pdflatex echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files @@ -155,16 +156,6 @@ if "%1" == "latexpdf" ( goto end ) -if "%1" == "latexpdfja" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf-ja - cd %BUILDDIR%/.. - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 diff --git a/docs/yul.rst b/docs/yul.rst index 065dcefb7..502ee6f52 100644 --- a/docs/yul.rst +++ b/docs/yul.rst @@ -947,7 +947,7 @@ the ``dup`` and ``swap`` instructions as well as ``jump`` instructions, labels a The remaining bytes will retain their values as of before the call. .. note:: - The `difficulty()` instruction is disallowed in EVM version >= Paris. + The ``difficulty()`` instruction is disallowed in EVM version >= Paris. With the Paris network upgrade the semantics of the instruction that was previously called ``difficulty`` have been changed and the instruction was renamed to ``prevrandao``. It can now return arbitrary values in the full 256-bit range, whereas the highest recorded