Commit Graph
16450 Commits
Author SHA1 Message Date
chriseth 041b8a3180 Merge pull request #8517 from imapp-pl/yul-phaser-docs-and-defaults
[yul-phaser] Docs and defaults
2020-04-27 17:38:23 +02:00
chriseth aa3f74c61b Merge pull request #8558 from aarlt/ci_add_shellcheck
[ci] add chk_shellscripts
2020-04-27 17:33:47 +02:00
Alexander Arlt d0bed50260 [ci] add chk_shellscripts 2020-04-27 07:55:59 -05:00
Alex Beregszaszi 99aa821410 Merge pull request #8720 from ethereum/irSha256
IR generation for sha256.
2020-04-27 13:44:26 +01:00
chriseth 3828adbbbd Merge pull request #8761 from ethereum/conditonalStrings
Conditional strings for Whiskers.
2020-04-27 14:07:30 +02:00
chriseth 03ca9dcae4 Merge pull request #8784 from ethereum/ir-declaration
IRGenerator: include assertion for FunctionType::Kind::Declaration
2020-04-27 13:33:47 +02:00
Alex Beregszaszi 025daaada5 Merge pull request #8765 from ethereum/interfaceId-doc-miscellaneous-fix
docs/cheatsheet.rst: Add ``type(I).interfaceId`` description.
2020-04-27 12:26:53 +01:00
Alex Beregszaszi aa0a69b47f IRGenerator: include assertion for FunctionType::Kind::Declaration 2020-04-27 12:03:44 +01:00
chriseth 5b92dedeed Merge pull request #8753 from a3d4/fix-sourcereferenceformathuman-leftpad
Fix leftpad in SourceReferenceFormatterHuman
2020-04-27 11:22:14 +02:00
chriseth dda883b585 IR generation for sha256. 2020-04-27 11:10:20 +02:00
chriseth aa8107f45a Conditional strings for Whiskers. 2020-04-27 11:07:56 +02:00
chriseth 61b1369fc2 Merge pull request #8701 from ethereum/solc-yul-chromosome
solc option for selecting yul optimisations
2020-04-27 10:44:14 +02:00
chriseth 77a086bc32 Merge pull request #8778 from veox/use-yul-lexer-in-docs
Use Yul lexer in docs
2020-04-27 10:29:08 +02:00
Noel Maersk a481ea719f docs: use Yul lexer to highlight Yul code segments.
Many commits squashed; turns out that with the combination of:

* Python v2.7,
* Sphinx v1.8.5, and
* Pygments v2.3.1

versions (old!) used in the CI, the only viable approach is:

* to use `code-block` directives with explicit language specification,
* to provide no file-local default using `highlight`, and
* to set language as `none` for grammar specifications.

Underlying are the following issues (again, for the old versions
listed above):

* Generic RST `code` doesn't work when language is `none`:

    Warning, treated as error:
    /root/project/docs/yul.rst:430:Cannot analyze code. No Pygments lexer found for "none".

  Additionally, it might be trying to fall back to the default
  (Solidity) if left unspecified.

* If a file-local default is specified using `highlight`, then
  `code-block` _must_ also provide a language:

    Warning, treated as error:
    /root/project/docs/yul.rst:185:Error in "code-block" directive:
    1 argument(s) required, 0 supplied.

* Sphinx seems to try the file-local default "yul" (specified with
  `highlight`) on `code` marked having language `json`:

    Warning, treated as error:
    /root/project/docs/yul.rst:130:Could not lex literal_block as "yul". Highlighting skipped.

* The only well-lexed highlighter for two of the three grammar
  specifications is `peg`, but it was added in Pygments v2.6.
  One of the grammars - in the "Formal Specification" section,
  the one after "We will use a destructuring notation for the
  AST nodes." - _must_ be left unhighlighted, with language set
  to `none`: all lexers do really poorly.

... And one should never, ever start treating warnings as mere
warnings, without having exhausted all other options.

Otherwise, it's a slippery slope, - and look where that brought
Gandhi: to being a strawman in every lousy argument to be had!..
2020-04-26 20:48:07 +03:00
chriseth 721878d91f Merge pull request #8770 from ethereum/sol_yul_logN
[Sol - Yul] Add support for built-in logN().
2020-04-25 21:45:18 +02:00
Alexander Arlt 66edaf43f4 [Sol - Yul] Add support for built-in logN(). 2020-04-25 11:10:28 -05:00
chriseth ed6c6b3170 Merge pull request #8771 from ethereum/sol_yul_selfdestruct
[Sol - Yul] Add support for built-in selfdestruct(..).
2020-04-25 17:35:53 +02:00
Alexander Arlt 2fa26f4e92 [Sol - Yul] Add support for built-in selfdestruct(..). 2020-04-24 17:03:41 -05:00
Kamil Śliwak ee915008bd [yul-phaser] README 2020-04-24 17:31:50 +02:00
Kamil Śliwak 163e35dd23 [yul-phaser] Tweak default values according to experiment results
- Long chromosomes in the intial population are better. Set minimum and maximum to 100.
- The classic algorithm does not work well without elite. 50% performed better but I think it might be too large. Let's set it to 25%.
- Switch to uniform crossover since this is what was used in most experiments and performed well.
2020-04-24 17:31:50 +02:00
Kamil Śliwak 35395a4b9c [yul-phaser] Phaser: Missing word in --metric-aggregator option description 2020-04-24 17:31:50 +02:00
Kamil Śliwak 424edecd21 [yul-phaser] Phaser: List all available values of enum options in --help 2020-04-24 17:31:50 +02:00
Kamil Śliwak e19d8d1fa3 [yul-phaser] GeneticAlgorithm::runNextRound(): Fix outdated docstring 2020-04-24 17:31:50 +02:00
Kamil Śliwak c8b612536f Add yulDetails.optimizerSteps to the standard JSON interface 2020-04-24 17:30:56 +02:00
Kamil Śliwak 35cc64e33d Add --yul-optimizations option to the command-line interface 2020-04-24 17:30:56 +02:00
Kamil Śliwak c41a832f65 Move the default optimisation steps from OptimiserSuite to OptimiserSettings
- Now it's a mandatory parameter in OptimiserSuite::run()
2020-04-24 17:30:56 +02:00
Kamil Śliwak 69b79f848b OptimiserSuite: Allow validating the optimisation sequence without executing it
- Create a separate validateSequence() that can be used independently.
- Tweak the exception messages a bit to be usable as command-line errors
2020-04-24 17:30:56 +02:00
Kamil Śliwak e2c0e6331c OptimiserSuite: Define NonStepAbbreviations and use it for extra sanity checks 2020-04-24 17:30:56 +02:00
Kamil Śliwak 5a515240ac OptimiserSuite: Use brackets instead of parentheses as syntax for repeating abbreviation sequences
- We want to start accepting abbreviation sequences on the command line and parentheses would always have to be escaped in that context.
- There wasn't any important reason behind choosing () rather than [] or {} and it still isn't too late to switch.
2020-04-24 17:30:56 +02:00
chriseth dd7aebe7f1 Merge pull request #8769 from ethereum/fix-cmdlinetests-not-removing-tmp-all-files
Fix cmdlineTests.sh not removing all tmp.XXXXXX files
2020-04-24 15:35:17 +02:00
chriseth a85736d874 Merge pull request #8721 from ethereum/sol-yul-internal-library-calls
[Sol->Yul] Calls to internal library functions
2020-04-24 15:34:41 +02:00
Alexander Arlt 55eda85a30 docs/cheatsheet.rst: Add `type(I).interfaceId` description. 2020-04-24 08:09:45 -05:00
Kamil Śliwak 172b6c245f cmdlineTests.sh: Fix the script not removing all temporary files it creates in /tmp
- The script was leaving hundreds of loose `tmp.XXXXXX` and `tmp.XXXXXX.bak` files in `/tmp` after each run
- There's a trap handler that removes them but it's being registered multiple times in a loop and only the last one actually runs when the script exits. It's still useful because it removes the remaining files from the most recent iteration but on its own it's not enough to clean up everything.
2020-04-24 15:09:26 +02:00
Kamil Śliwak d3da878200 Enable internal library calls 2020-04-24 15:00:51 +02:00
Kamil Śliwak 64bce597a1 IRGenerator: Enable code generation for libraries 2020-04-24 15:00:17 +02:00
Kamil Śliwak 56a85d6cb3 IRGeneratorForStatements: Handle internal calls to functions from specific base contracts as static calls rather than calls via pointers 2020-04-24 15:00:16 +02:00
Kamil Śliwak 397ea18b78 IRVariable: Fix improperly wrapped docstring 2020-04-24 15:00:16 +02:00
chriseth 2b39f3b988 Merge pull request #8766 from ethereum/sol_yul_gasleft
[Sol - Yul] Add support for built-in gasleft().
2020-04-24 14:24:01 +02:00
chriseth cc1b339c96 Merge pull request #8715 from ethereum/improveTOC
Restructure documentation and improve TOC.
2020-04-24 14:21:13 +02:00
chriseth 3bbd89e8e1 Merge pull request #8768 from ethereum/smt_revert_option
Revert "Use Spacer option to improve performance of constant arrays"
2020-04-24 14:19:53 +02:00
Leonardo Alt 059d0bdebb Revert "Use Spacer option to improve performance of constant arrays"
This reverts commit 92059fa848.
2020-04-24 11:55:58 +02:00
a3d4 523460da07 Prevent coloring irrelevant whitespaces 2020-04-24 00:51:15 +02:00
chriseth 989d1da43c Merge pull request #8764 from ethereum/sol-yul-fix-pointers-to-functions-returning-nothing
[Sol->Yul] Fix pointers to functions returning nothing
2020-04-24 00:35:48 +02:00
a3d4 8717c073a6 Fix leftpad in SourceReferenceFormatterHuman 2020-04-24 00:34:24 +02:00
Alexander Arlt aafa4583df [Sol - Yul] Add support for built-in gasleft(). 2020-04-23 17:14:03 -05:00
Kamil Śliwak e65a5a562e IRGenerationContext::internalDispatch(): Fix code generated when the function called via pointer does not return anything 2020-04-23 21:16:41 +02:00
chriseth d429d20b0b Restructure documentation and improve TOC. 2020-04-23 19:05:42 +02:00
chriseth aa071af476 Merge pull request #8707 from ethereum/optimizeIdempotencies
Rules for optimizing idempotency for bitwise operations.
2020-04-23 14:42:32 +02:00
chriseth d136e7dc95 Rules for optimizing idempotency for bitwise operations. 2020-04-23 14:21:00 +02:00
chriseth ed2a42610b Merge pull request #8730 from ethereum/reduceMultipleConsecutiveLines
Yul formatting: Reduce multiple consecutive empty lines to a single one.
2020-04-23 14:11:09 +02:00