Commit Graph

15731 Commits

Author SHA1 Message Date
cameel
c4f8df3272 Workaround for clang 5.0.0 on Ubuntu Trusty in Travis CI failing to compile a structural binding
clang fails with:

/home/travis/build/ethereum/solidity/libsolutil/CommonData.h:167:19: error: unused variable '' [-Werror,-Wunused-variable]
        for (auto const& [key, value]: originalMap)
2020-02-03 12:22:47 +01:00
cameel
5fbc4d4afa [yulopti] Automate printing of the usage banner
- This now displays internal step names rather than human-readable ones but the internal ones are readable enough and it's not something worth creating another map.
- Options in the banner are now aligned in columns and thus easier to read.
2020-02-03 12:22:47 +01:00
cameel
4129c27495 [yulopti] Replace hard-coded step list with OptimiserSuite's maps 2020-02-03 12:22:47 +01:00
cameel
4e7c1c7876 OptimiserSuite: Add two maps for converting between step names and abbreviations
- Abbreviations match those used in yulopti.
- I considered using boost::bimap but I think it would be an overkill. Two simple maps are good enough in a situation where data is constant and there isn't much of it.
- I could also use InvertibleMap from libsolutil but I don't even need any of its methods since my map is a constant. I also don't need the inverted map to store sets because my values are unique.
- The reverseMap() is generic enough to be moved to some global file with utilities but I don't sure if it's going to actually be useful to others in practice.
2020-02-03 12:22:47 +01:00
chriseth
93a41f7ade
Merge pull request #8226 from ethereum/enable-fuzz-build
Reenable ossfuzz builds (but not tests)
2020-02-03 12:22:19 +01:00
cameel
9c8187bd29 CommonData: Add invertMap() function 2020-02-03 12:06:26 +01:00
Mathias Baumann
9f0c59b3c6 Reenable ossfuzz builds (but not tests)
refs #8208
2020-02-03 11:55:53 +01:00
alex
e4b18e85e6 Replaced SourceLocation::isEmpty() with isValid() and hasText().
The function SourceLocation::isEmpty() had somewhat dual role.
Sometimes it indicates that the SourceLocation is invalid.
Sometimes it means that there is no corresponding source text.

Hence the proposal is to replace it with two functions, isValid() and hasText().

I also removed Scanner::sourceAt(). (Do we have a rule of thumb to remove unused code?)

Since hasText() checks that start and end are valid indices for source, I adjusted a couple of tests to avoid empty source strings.
2020-02-03 08:04:21 +01:00
chriseth
b6190e06a5
Merge pull request #8176 from ethereum/docs-call-clar
[DOCS] Add return area clarification
2020-01-31 10:47:16 +01:00
Chris Chinchilla
1b1a0a6953 Add return area clarification 2020-01-31 10:37:12 +01:00
chriseth
2098dbade9
Merge pull request #7834 from ethereum/docstring-ast-node
[natspec] Introduce AST node for structured documentation
2020-01-30 19:04:52 +01:00
Erik Kundt
306f6d963d Adds changelog entry for structured AST node introduction. 2020-01-30 18:26:01 +01:00
Erik Kundt
4a179056ed Adds JSON import / export for structured documentation. 2020-01-30 18:26:01 +01:00
Erik Kundt
ec27c2e507 Introduce AST node for structured documentation. 2020-01-30 18:25:56 +01:00
chriseth
2afcfec77b
Merge pull request #8220 from ethereum/remove-var-name-cleaner-from-optimiser-suite-step-list
Remove var name cleaner from optimiser suite step list
2020-01-30 17:58:43 +01:00
cameel
ed5210490d [yulopti] Run disambiguator after VarNameCleaner
- This is a trivial change and it makes it safe to use in combination with other step.
2020-01-30 17:35:27 +01:00
cameel
2ee7e6042b OptimiserSuite: Remove VarNameCleaner from the list of available steps 2020-01-30 17:35:27 +01:00
chriseth
c34b381942
Merge pull request #8217 from ethereum/ossfuzztest
Disable ossfuzzing on circle ci
2020-01-30 15:14:02 +01:00
chriseth
ada0cef150
Merge pull request #8068 from ethereum/evmTypedDialect
[Yul] EVM typed dialect
2020-01-30 14:53:25 +01:00
chriseth
ad98bf0f6b
Merge pull request #8216 from imapp-pl/colorized-gcc-output-in-cmake
Colorized GCC output in CMake
2020-01-30 14:08:58 +01:00
Mathias Baumann
97e9ce9d0a Disable ossfuzzing on circle ci
It currently takes >5h. It is not known whether due to a bug or whether
it's normal.
2020-01-30 12:39:08 +01:00
cameel
af7139c19f Enable colorized compiler output when running gcc via cmake 2020-01-30 03:11:28 +01:00
chriseth
25a2fb2606
Merge pull request #8213 from imapp-pl/asm-parser-unique-ptr-from-factory-method
Return shared_ptr instead of unique_ptr from Parser::parse()
2020-01-29 23:58:47 +01:00
cameel
642653ea04 Make yul::Parser::parse() return unique_ptr rather than shared_ptr
- unique_ptr is more flexible and generally recommended for factory methods. It gets automatically converted to shared_ptr if necessary. Returning shared_ptr, on the other hand, forces the caller to use shared_ptr because a conversion to unique_ptr is not possible.
2020-01-29 20:07:08 +01:00
chriseth
d41e1db74a Adjust and add commandline tests for yul. 2020-01-29 19:10:53 +01:00
chriseth
2bcdb24ebe Cause failing assertion for invalid u256 to bool conversion. 2020-01-29 19:01:28 +01:00
chriseth
db33ff6408 Clean up built-in instructions. 2020-01-29 19:01:28 +01:00
chriseth
d3b53ee394 Make bool type optional for bool literals. 2020-01-29 19:01:28 +01:00
chriseth
a66782537a Use old yul dialect only in tests. 2020-01-29 19:01:28 +01:00
chriseth
d07dd55096 Update wasm tests. 2020-01-29 17:25:25 +01:00
chriseth
23667ce12d Update Yul optimizer tests. 2020-01-29 17:25:25 +01:00
chriseth
e7b95de315 Tests for default type parsing. 2020-01-29 17:25:25 +01:00
chriseth
fbe5bb0cce Parse default dialect and omit when printing. 2020-01-29 17:25:25 +01:00
chriseth
90c98a3289 Introduce typed EVM dialect. 2020-01-29 17:25:25 +01:00
chriseth
e41155cf48
Merge pull request #8062 from imapp-pl/polyfill-part-2
Arithmetic functions implementation for EVM->EWasm translator.
2020-01-29 17:22:27 +01:00
chriseth
457cdecf6f
Merge pull request #8135 from ethereum/fix-get-options-7112
TestFramework: Merge Options.h into Common.h
2020-01-29 16:05:55 +01:00
Mathias L. Baumann
5130a2b0ae
Merge pull request #8063 from ethereum/yulvisit-7656
Use yul::AstWalker for assembly reference resolving
2020-01-29 14:56:19 +01:00
chriseth
68fe55cb15
Merge pull request #8212 from ethereum/zeroOutMemoryFollowup
Changelog entry about zeroing out memory.
2020-01-29 13:50:20 +01:00
chriseth
abbedb0819
Update Changelog.md
Co-Authored-By: Erik K <erik@ethereum.org>
2020-01-29 13:49:45 +01:00
Mathias Baumann
00e4d13975 TestFramework: Merge Options.h into Common.h 2020-01-29 12:27:05 +01:00
chriseth
01eb9a5b0c
Merge pull request #8211 from nicos99/docs-breaking-changes-5.0-clarifications
Docs 'breaking changes 5.0' clarifications
2020-01-29 09:11:58 +01:00
chriseth
a6dfb6a4ef Changelog entry about zeroing out memory. 2020-01-29 09:10:09 +01:00
Nicolas
49514bc577
fix a logical contradiction in new version of § Example
"if (x > 100) throw;" --> "require(x <= 100);"
2020-01-29 08:21:48 +01:00
Nicolas
dc29888601
fix parenthesis error in § "Semantic and Syntactic Changes" of v0.5.0 Breaking Changes 2020-01-29 08:13:53 +01:00
chriseth
a788ba14f3
Merge pull request #8173 from ethereum/fix-7859
yul proto fuzzer: Add EVM version field
2020-01-28 22:14:25 +01:00
chriseth
8b3da371ed
Merge pull request #8194 from ethereum/json-ast-extract-fix
Remove binary mode from JSON AST extraction script
2020-01-28 18:08:32 +01:00
chriseth
35820398c2
Merge pull request #8179 from pinkiebell/codegen
libsolidity/codegen: Use calldatacopy to cheaply zero memory..
2020-01-28 18:07:30 +01:00
Mathias Baumann
b8e2baf5f4 Use yul::AstWalker to resolve assembly symbols 2020-01-28 17:57:48 +01:00
chriseth
e1139ce490
Merge pull request #8175 from ethereum/fix-7896
yul proto fuzzer: Make function call generation optional
2020-01-28 17:56:55 +01:00
Mathias Baumann
2f1f8e25c1 TestFramework: Remove headers from Options.h 2020-01-28 17:29:22 +01:00