Commit Graph

15774 Commits

Author SHA1 Message Date
Mathias Baumann
3a4cb016ff Add codestyle rule to prevent include ".." 2020-02-11 13:03:46 +01:00
chriseth
e635121bad
Merge pull request #8232 from aarlt/cmdline-standard-json-from-file
Add support for reading standard-json from file
2020-02-11 12:57:10 +01:00
Daniel Kirchner
5214cb0e76
Merge pull request #8288 from ethereum/fix-8108
yul proto fuzzer: Refactor dataoffset/size specification
2020-02-11 10:45:55 +01:00
Bhargava Shastry
79f1917422 yul proto fuzzer: Refactor dataoffset/size specification 2020-02-11 13:58:36 +05:30
chriseth
d033c2f767
Merge pull request #8178 from ethereum/internal_revert_strings
Internal reverts with reason in debug mode
2020-02-10 17:35:41 +01:00
chriseth
db2eece7fc
Merge pull request #8273 from ethereum/fix-8271
yul proto fuzzer: Support boolean literal generation
2020-02-10 17:35:09 +01:00
Bhargava Shastry
59e7206c8f yul proto fuzzer: Support boolean literal generation 2020-02-10 20:48:29 +05:30
chriseth
64bb0d55e0
Merge pull request #8268 from a3d4/lineatposition-crlf
Avoided trailing '\r' in CharStream::lineAtPosition().
2020-02-10 15:58:52 +01:00
chriseth
6b99c46b43
Merge pull request #8261 from a3d4/fix-8020-source-spans-file
Fix printing source for missing pragma.
2020-02-10 15:57:34 +01:00
Leonardo Alt
36928c7a35 Add reason string for internal reverts 2020-02-10 11:57:20 -03:00
a3d4
be1d92c836 Avoided trailing \r in CharStream::lineAtPosition(). 2020-02-10 01:16:55 +01:00
a3d4
e3d6a3e44e Updated expectations. 2020-02-09 17:29:13 +01:00
a3d4
b3b8441aa4 Fix printing source for missing pragma. 2020-02-09 02:28:47 +01:00
chriseth
e8eb1f2d14
Merge pull request #8259 from brianmcmichael/brianmcmichael-patch-1
Conform constants to style guide
2020-02-07 11:59:44 +01:00
chriseth
462cd43207
Merge pull request #8258 from ethereum/someFixesToSyntaxTests
[Yul] Some fixes to syntax tests
2020-02-07 11:59:04 +01:00
Brian L. McMichael
b39814a4f8
Conform constants to style guide
Constants should conform to style guide at https://solidity.readthedocs.io/en/latest/style-guide.html#constants
2020-02-06 16:39:09 -05:00
chriseth
92c9b078b4 Use correct instance of EVMDialectTyped. 2020-02-06 19:46:37 +01:00
chriseth
4ae97f4563 Make dialect option lowercase. 2020-02-06 19:46:37 +01:00
chriseth
f0ebb26f29
Merge pull request #8223 from imapp-pl/yul-phaser-program-reuse
[yul-phaser] Program reuse
2020-02-06 13:29:44 +01:00
Daniel Kirchner
12edf28dd6
Merge pull request #8255 from ethereum/upgradeToolWindows
Fix upgrade tool build on windows.
2020-02-06 12:31:54 +01:00
Daniel Kirchner
9b8e3800bb Fix upgrade tool build on windows. 2020-02-06 10:49:15 +01:00
chriseth
a41f5e91f6
Merge pull request #8251 from a3d4/refactor-currentlocation
Refactor currentlocation
2020-02-06 09:57:41 +01:00
chriseth
93191cebee
Merge pull request #8254 from ethereum/librariesAsMappingKeys
Disallow libraries as mapping keys.
2020-02-06 09:45:51 +01:00
Daniel Kirchner
e07274a96f Disallow libraries as mapping keys. 2020-02-06 09:09:43 +01:00
cameel
e4c7b73897 [yul-phaser] Store already loaded program in Population and make copies when computing fitness
- Until now the source code was being parsed during every fitness computation. Now the parsed program is reused and only the optimisation steps are applied each time.
2020-02-06 09:01:10 +01:00
cameel
57fb64d467 [yul-phaser] Make Program copyable by doing a deep copy of the AST in the copy constructor 2020-02-06 09:01:10 +01:00
cameel
a189c8b6e2 [yul-phaser] Pass unique_ptr rather than a mutable reference to Program::applyOptimisationSteps()
- Giving the function ownership of an object and then receiving back another object is better than letting it implicitly modify data passed in an argument.
2020-02-06 09:01:10 +01:00
a3d4
4ec4d23886 Replaced ParserBase::position() and ParserBase::endPosition() with ParserBase::currentLocation().
It might be simpler to pass `SourceLocation` object instead of splitting it into `start` and `end`, and creating another SourceLocation object using the same `start` and `end` later.
2020-02-06 03:34:49 +01:00
a3d4
7fecab07a8 Simplified Parser::createWithLocation().
In all but one case the function was called with the default argument value.
And when it was location, the location should be valid (see Parser::parseElementaryOperation()).
2020-02-06 03:34:48 +01:00
Alexander Arlt
0ae3053618 Add support for reading standard-json from file.
Currently `--standard-json` only supports reading input from stdin,
reading input from a specified file may simplify debugging.
2020-02-05 17:34:24 -05:00
chriseth
dd7a5c3386
Merge pull request #8164 from imapp-pl/yul-phaser
[yul-phaser] Minimal application
2020-02-05 18:55:55 +01:00
cameel
33cf4e4769 [yul-phaser] Tests for Population class 2020-02-05 18:13:30 +01:00
cameel
ccaff1b08e [yul-phaser] Tests for random number generators 2020-02-05 18:13:30 +01:00
cameel
24d63a93cf [yul-phaser] Tests for Program class 2020-02-05 18:13:30 +01:00
cameel
bee62cdd9e [yul-phaser] Tests for Chromosome class 2020-02-05 18:13:30 +01:00
cameel
f8e397b487 [yul-phaser] Create test suite for Chromosome 2020-02-05 18:13:30 +01:00
cameel
785f65d0f5 [yul-phaser] Make Program and Population classes accept source code rather than file path
- I need some sample .yul files for testing but I see that existing tests generally have source code hard-coded in them rather than in standalone .yul files. There are lots of .yul files but they seem to be automatically processed by a special test case rather loaded ad-hoc by manually created tests.
- Program and Population required a file name until now. I'm making them accept loaded source code to be able to give them data hard-coded in a test.
2020-02-05 18:13:30 +01:00
cameel
7b7c88ae95 [yul-phaser] Add Population class 2020-02-05 18:13:30 +01:00
cameel
f0fb046038 [yul-phaser] Remove Chromosome::allStepNamesExcept() 2020-02-05 18:13:30 +01:00
cameel
f6d955db0b [yul-phaser] Add Chromosome class 2020-02-05 18:13:30 +01:00
cameel
57ab8922cd [yul-phaser] Add random number generators using Mersenne Twister from boost 2020-02-05 18:13:30 +01:00
cameel
21a2b69f74 [yul-phaser] Create OptimiserStepContext on demand instead of storing it in Program class
- This also lets us get rid of the static s_externallyUsedIdentifiers.
2020-02-05 18:13:30 +01:00
cameel
3baa191b94 [yul-phaser] Printing and JSON conversion for the Program class 2020-02-05 18:13:30 +01:00
cameel
2aa42b32e5 [yul-phaser] Make Program noncopyable
- Copying worked but resulted in OptimiserStepContext having a reference to NameDispenser instance of the other object.
2020-02-05 18:13:30 +01:00
cameel
14d726ff01 [yul-phaser] Program: Use unique_ptr rather than shared_ptr to hold a pointer to the AST root
- The class never shares the instance so unique_ptr makes more sense.
2020-02-05 18:13:30 +01:00
cameel
513d41c315 [yul-phaser] Add Program class 2020-02-05 18:13:30 +01:00
cameel
b75370d93e [yul-phaser] Printing help and accepting input file on the command line 2020-02-05 18:13:30 +01:00
cameel
e7d204383d [yul-phaser] An empty command-line application for the new tool 2020-02-05 18:13:29 +01:00
Mathias L. Baumann
bd54176c1a
Merge pull request #8248 from ethereum/functionCallOptionFollowUp
Fix function call option parsing and add to grammar.
2020-02-05 18:01:54 +01:00
chriseth
f44188abf5
Merge pull request #7914 from ethereum/solidity-upgrade-basic
[tools] Create solidity-upgrade
2020-02-05 17:05:26 +01:00