Commit Graph

445 Commits

Author SHA1 Message Date
ssi91
b5dc62c47b do not serialize fields abi, devdoc, userdoc and storage-layout
add changelogs

Apply suggestions from code review

Co-authored-by: Kamil Śliwak <cameel2@gmail.com>
2020-11-28 17:51:06 +07:00
Alex Beregszaszi
3bce2a2294 Remove the legacy AST JSON output 2020-11-25 11:40:33 +00:00
Kamil Śliwak
2a8cff626b CommandLineInterface::link(): Print invalid link references to stderr 2020-11-23 20:29:45 +01:00
Kamil Śliwak
f099d48b34 CommandLineInterface::link(): Report an error if a placeholder does not have exactly four underscores 2020-11-23 20:29:45 +01:00
Kamil Śliwak
bd1989bd0b CommandLineInterface::link(): Rename confusingly named "name" to "foundPlaceholder" 2020-11-23 20:29:45 +01:00
chriseth
a97521bff1
Merge pull request #10293 from ethereum/fix-output-dir-creation-with-trailing-slash
[CLI] Fix --output-dir failure for paths with a trailing slash
2020-11-17 00:49:16 +01:00
Kamil Śliwak
1a4d38c0ac CommandLineInterface: Report an error if library appears multiple times in the --libraries option 2020-11-16 21:22:47 +01:00
Kamil Śliwak
9f67d26a1a CommandLineInterface: Fix output directory creation for paths ending with a slash and equivalent but not equal to dot or double dot 2020-11-14 04:29:05 +01:00
Alex Beregszaszi
e074582bf1 Add --experimental-via-ir option to solc 2020-11-12 22:34:31 +00:00
chriseth
eaba9a680a
Merge pull request #10199 from ethereum/readfile
[CLI] Improve error handling of missing/unwriteable files
2020-11-10 13:50:40 +01:00
chriseth
b981a2a74a
Merge pull request #10229 from ethereum/linking-in-assembly-mode
Linking in assembly mode
2020-11-10 13:21:57 +01:00
Alex Beregszaszi
3246d0f9a9 [solc] Handle exceptions in AssemblyStack.translate() gracefully 2020-11-09 18:19:20 +00:00
Kamil Śliwak
df8e182b46 Link binaries produced in assembly mode 2020-11-09 17:17:43 +01:00
Alex Beregszaszi
d115c30dde [CLI] Report error nicely if writing a file failed 2020-11-04 16:35:19 +00:00
Alex Beregszaszi
9ebd3da3ff [CLI] Report error on missing file for --standard-json 2020-11-04 16:35:19 +00:00
Alex Beregszaszi
3c7f642227 Change readFile/readFileAsString to throw FileNotFound exception 2020-11-04 16:35:19 +00:00
Leonardo Alt
d03ddeb0fa [SMTChecker] User timeout option 2020-11-03 10:46:11 +00:00
Leonardo Alt
4e49135318 Add CLI option to choose model checker engine 2020-10-16 15:01:47 +01:00
Christian Parpart
04079bff6f Eliminates dead code around GasEstimator
- structuralEstimation()
- breakToStatementLevel()
2020-10-07 13:31:40 +02:00
chriseth
fda8bde2d7 Stop after parsing. 2020-09-30 16:57:49 +02:00
chriseth
e7e9b03bd8 Store generated sources in standard-json output. 2020-09-15 11:22:16 +02:00
chriseth
9be5ed1220 Merge remote-tracking branch 'origin/develop' into breaking 2020-07-21 11:35:28 +02:00
Sachin Grover
b7adb2aa42 Add SPDX license identifier if not present already in source file
Fixes: #9220
2020-07-17 20:24:12 +05:30
chriseth
3e3f9a472f Merge remote-tracking branch 'origin/develop' into breaking 2020-06-30 18:56:51 +02:00
Kamil Śliwak
3f3f8adcb8 CommandLineInterface: In error message about options disallowed in assembly mode only include the names of actually used options 2020-06-29 15:23:13 +02:00
chriseth
71cb7551f4
Merge pull request #9208 from ethereum/develop
Merge develop into breaking.
2020-06-16 16:11:41 +02:00
Kamil Śliwak
4bd078ed7e CommandLineInterface: Disallow --output-dir, --gas and --combined-json in assembly mode 2020-06-15 17:12:51 +02:00
Kamil Śliwak
0d7b3ae503 CommandLineInterface: Disallow --yul-dialect and --machine when not in assembly mode 2020-06-15 17:12:51 +02:00
Kamil Śliwak
8396002fe7 CommandLineInterface: Disallow using --assemble, --strict-assembly, --yul, --link, --standard-json and --import-ast at the same time 2020-06-15 17:12:51 +02:00
Kamil Śliwak
a806d48ad5 CommandLineInterface: Add countEnabledOptions() and joinOptionNames() helpers 2020-06-15 17:12:51 +02:00
chriseth
8155ad2187 Merge remote-tracking branch 'origin/develop' into breaking 2020-06-15 17:11:41 +02:00
a3d4
51e64fe0b1 Add error IDs to console output 2020-06-10 13:27:25 +02:00
chriseth
6b3171c38b Merge remote-tracking branch 'origin/develop' into breaking 2020-06-10 11:30:50 +02:00
Kamil Śliwak
d303bb24f0 CommandLineInterface: Add a note that --old-reporter is a legacy option 2020-06-06 00:27:43 +02:00
Kamil Śliwak
7bd7ff3d7d CommandLineInterface: Group and reorder command-line options 2020-06-06 00:25:53 +02:00
Kamil Śliwak
5333e35cd7 CommandLineInterface: Reformat command-line option definitions for better readability
- Don't mix single-line and multi-line formatting in the same group. The single-line options get visually "lost" between the multi-line ones.
- Put semicolons on separate lines. This makes it easier to move options around without having to fix them constantly and also should make diffs a bit nicer.
2020-06-06 00:13:01 +02:00
chriseth
259292c884
Merge pull request #9118 from ethereum/develop
Merge develop into breaking.
2020-06-04 10:18:46 +02:00
chriseth
5024985708
Merge pull request #9074 from ethereum/commandline-fix-wasm-crash-if-no-dialect
Fix ICE when selecting assembly variant with no Ewasm translation
2020-06-03 14:24:41 +02:00
chriseth
c8b9d24eba
Merge pull request #9106 from ethereum/develop
Merge develop into breaking.
2020-06-03 13:51:28 +02:00
Djordje Mijovic
4b6c322279 Fixing various signedness warnings 2020-06-03 10:37:18 +02:00
Kamil Śliwak
ef133aa670 CommandLineInterface: Display an error instead of crashing when assembly variant has no Ewasm translation 2020-05-30 03:09:42 +02:00
Christian Parpart
09485058d8 Adds `--base-path to solc when compiling in --standard-json mode for resolving relative paths. 2020-05-27 16:23:03 +02:00
chriseth
74b9b094c0 Merge remote-tracking branch 'origin/develop' into HEAD 2020-05-20 17:22:47 +02:00
hrkrshnn
4a001d568e Removed null members from JSON output 2020-05-20 16:56:33 +05:30
Leonardo Alt
0eb067ae4f Add SMTLogicError exception catches 2020-05-20 13:18:33 +02:00
Kamil Śliwak
6a58227830 CommandLineInterface: Make --yul-optimizations work in strict assembly mode 2020-05-08 22:29:57 +02:00
Kamil Śliwak
d932c58b56 CommandLineInterface: Replace hard-coded option names with constants where available 2020-05-08 22:05:04 +02:00
ssi91
3d772edc7a handle file prefix
add the description to the changelog

fix: use the right method to search in string

follow the codestyle

using tabs

delete redundant declaration

implement the handling inline

Update Changelog.md

Co-Authored-By: Leonardo <leo@ethereum.org>
2020-04-27 21:02:39 +07:00
Kamil Śliwak
35cc64e33d Add --yul-optimizations option to the command-line interface 2020-04-24 17:30:56 +02:00
Kamil Śliwak
56af85ef39 command-line help: Minor whitespace and text tweaks 2020-04-16 18:20:28 +02:00
Kamil Śliwak
004be1788f command-line help: Move optimizer options to a separate section 2020-04-16 18:12:53 +02:00
Kamil Śliwak
1e38985fef command-line help: Clarify that --optimize-yul no longer does anything 2020-04-16 18:10:18 +02:00
Martin Lundfall
5b4ea1eb89 CommandLineInterface: add storage-layout option to --combined-json 2020-03-26 11:38:28 +01:00
chriseth
bc32619364 Enable optimized IR output via the commandline. 2020-02-27 15:48:38 +01:00
Djordje Mijovic
18dea6b69c Assembly: Added missing source field to legacy assembly json output to complete the source reference 2020-02-18 10:22:34 +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
Leonardo Alt
36928c7a35 Add reason string for internal reverts 2020-02-10 11:57:20 -03: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
b69664e7fd Only activate Yul optimizer if `--optimize` is given. 2020-01-15 18:35:10 +01:00
djudjuu
e8556fa1b2 Ast-Import from standard-json 2020-01-14 17:15:53 +01:00
Christian Parpart
345f9928ab Library libdevcore renamed to libsolutil. 2020-01-07 15:51:50 +01:00
Christian Parpart
6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +01:00
Alex Beregszaszi
65e59ecd06 Rename EWasm/ewasm/eWasm to Ewasm 2019-12-19 11:36:08 +00:00
chriseth
42d9a8e962 Merge remote-tracking branch 'origin/develop' into develop_060 2019-12-04 17:01:44 +01:00
chriseth
dc79274871 Set default EVM version to Istanbul. 2019-12-04 10:42:14 +01:00
chriseth
e3ee67da6c
Merge pull request #7792 from ethereum/enableYulOptimizer
Enable yul optimizer by default.
2019-12-03 21:24:22 +01:00
chriseth
19a6f09cc8 Merge commit '4d2f20570' into develop_060 2019-12-03 21:01:31 +01:00
Daniel Kirchner
77a9e91443 Enable yul optimizer by default. 2019-12-02 19:30:14 +01:00
chriseth
ccfc1840a9 Allow assembly stack to translate its source. 2019-11-28 16:15:15 +01:00
Alex Beregszaszi
c1db89161b Allow enabling optimisations for Yul + Wasm 2019-11-28 16:15:15 +01:00
chriseth
f7d7c97b8f Allow EVM to EWasm translation in assembly mode. 2019-11-28 16:15:15 +01:00
chriseth
1ebcc757e1 Merge remote-tracking branch 'origin/develop' into develop_060 2019-11-27 19:14:08 +01:00
chriseth
0bb88dabb7 Restrict usage of plain "new". 2019-11-27 17:55:11 +01:00
Leonardo Alt
ddc478e3e4 Add CallbackKind and use it for the SMT solver 2019-11-21 22:10:21 +00:00
chriseth
a00f824479
Merge pull request #7773 from ethereum/develop
Merge develop into develop_060
2019-11-21 21:49:22 +01:00
chriseth
a26dd5a428 Remove trailing spaces in output. 2019-11-21 20:09:03 +01:00
chriseth
138ee647f1 Provide different options for reason strings. 2019-11-07 14:13:53 +01:00
chriseth
21e65076b3
Merge pull request #7650 from ethereum/develop
Merge develop into develop_060
2019-11-06 21:56:55 +01:00
chriseth
587c87b15b Commandline interface additions for webassembly binary. 2019-11-05 20:05:57 +01:00
chriseth
42b8c98567 Merge remote-tracking branch 'origin/develop' into develop_060 2019-10-31 18:03:25 +01:00
chriseth
5d906cd58d
Merge pull request #7568 from ethereum/fixtest
Fix failing tests on ArchLinux and potentially MacOS
2019-10-29 12:37:51 +01:00
Mathias Baumann
b3a5c9c9c0 Fix failing tests on ArchLinux and potentially MacOS 2019-10-29 12:02:50 +01:00
chriseth
edf1e83fda Merge remote-tracking branch 'origin/develop' into develop_060 2019-10-28 15:21:49 +01:00
Christian Parpart
df729b3084 Make use of C++17 std::optional<> instead of boost::optional<>. 2019-10-28 11:39:30 +01:00
Leonardo Alt
d685554980 Create option for metadata hash 2019-09-13 18:59:12 +02:00
chriseth
9c72f25cce
Merge pull request #7368 from ethereum/errorReporter
Switch to new error reporter.
2019-09-06 15:53:29 +02:00
Daniel Kirchner
5d69bdf81e Remove ASTPrinter. 2019-09-06 12:38:55 +02:00
Daniel Kirchner
90d5c98272 Switch to new error reporter. 2019-09-06 11:28:36 +02:00
Alex Beregszaszi
5749a5d7c9 Introduce istanbul and berlin versions 2019-08-26 13:15:01 +01:00
rocky
7fd7cc1e76 Produce AST even when there are parser errors 2019-08-07 15:25:53 +02:00
chriseth
c6f7f5b2b0 Enable EWasm output. 2019-06-25 19:07:38 +02:00
Christian Parpart
7b3aba81fb Adds a test to check_style.sh to check for spaces before colon (:) in range based for loops. 2019-06-24 17:32:58 +02:00
chriseth
05a67c486e Use "what" in exception reports. 2019-06-18 17:34:10 +02:00
rocky
ca3afea1d7 Add Steve Johnson-style parser recovery rules:
SourceUnit = Error $
    Block = '{' Error '}'
    ContractDefinition = '{' Error '}'
    Statement = Error ';'

Co-Authored-By: chriseth <chris@ethereum.org>
2019-06-17 14:47:07 +02:00
Daniel Kirchner
226f8bb64d Use imported cmake targets for boost. 2019-06-06 18:49:34 +02:00
chriseth
4ee703e6e5 Revert "Add Steve Johnson-style parser recovery rules:"
This reverts commit 97f8ee0d1b.
2019-05-28 18:09:24 +02:00
rocky
97f8ee0d1b Add Steve Johnson-style parser recovery rules:
SourceUnit = Error $
    Block = '{' Error '}'
    ContractDefinition = '{' Error '}'
    Statement = Error ';'

Co-Authored-By: chriseth <chris@ethereum.org>
2019-05-28 15:06:34 +02:00
chriseth
61e36cbfaa Activate ewasm dialect in commandline interface. 2019-05-02 18:36:48 +02:00
Grant Wuerker
69b4ce36de Some move semantics improvements. 2019-04-17 14:19:48 +02:00
mingchuan
f1374066af
Add shortcuts for formatting error information 2019-04-10 18:44:45 +08:00
chriseth
420a7dc3d6 Initial IR generator. 2019-04-04 15:02:42 +02:00
chriseth
3264e9abf0 Make optimiser settings available to assembly stack. 2019-03-28 18:24:13 +01:00
chriseth
30da62aa2c
Merge pull request #6408 from ethereum/includeCleanup
Include cleanup
2019-03-28 15:31:07 +01:00
chriseth
f2cee9ec0c Include cleanup. 2019-03-28 14:32:48 +01:00
chriseth
2308904f68 Remove "using namespace" from header and move Instruction to dev::eth. 2019-03-28 13:48:11 +01:00
chriseth
72c0e44907
Merge pull request #6338 from ethereum/compilerstack-setsource
Introduce setSources in CompilerStack
2019-03-26 15:31:57 +01:00
Alex Beregszaszi
e211b5b1e1 Add warning that Yul is still experimental 2019-03-25 20:17:11 +00:00
Alex Beregszaszi
0d6d0f476c Use setSources 2019-03-25 15:11:00 +00:00
chriseth
d381e26fc8 Rename "enabled" optimizer setting stage to "standard". 2019-03-21 11:04:40 +01:00
chriseth
49d914a391 Fix and test yul stack optimization flag for commandline interface. 2019-03-14 15:34:23 +01:00
chriseth
6d1ed93247 Use stack optimizations. 2019-03-14 15:34:23 +01:00
chriseth
9a949c1bda Set default EVM version to Petersburg. 2019-03-04 14:53:00 +01:00
Alex Beregszaszi
cc4598a5ed
Merge pull request #6144 from ethereum/petersburg
Support petersburg in evmVersion
2019-03-04 13:50:50 +00:00
chriseth
0045950924 State that yul optimizer is experimental. 2019-03-04 14:27:52 +01:00
Alex Beregszaszi
ecd246aeb6 Support petersburg in evmVersion 2019-03-04 14:10:41 +01:00
chriseth
5ddbc434d6 Provide commandline option to activate yul optimizer. 2019-03-04 11:40:28 +01:00
Leonardo Alt
2405b2151a EVMVersion in langutil namespace instead of solidity 2019-02-25 15:29:57 +01:00
chriseth
1a823f0bf8 Fix tabs/spaces. 2019-02-13 17:05:48 +01:00
chriseth
0bd049c849 Adapet uses of AssemblyStack. 2019-02-13 12:23:07 +01:00
Bhargava Shastry
7751fa740f Ensure we fail gracefully when user tries to optimize Yul code 2019-02-12 11:21:02 +01:00
Christian Parpart
cebeb4076c Fixes compilation on Windows where STDERR_FILENO seems not to be present. 2019-02-11 15:27:08 +01:00
Christian Parpart
3d4b0f45da liblangutil: refactors SourceReferenceFormatter error formatting for pretty and colored output.
* Refactors output format in a way it is (or should at least be) more readable.
  (NB.: As source of inspiration, I chose the rustc compiler output.)
* Adds color support to the stream output.
* Also improves multiline source formatting
  (i.e. truncating too long lines, like done with single lines already)
* solc: adds flags --color (force terminal colors) and --no-color (disable autodetection)
* solc: adds --new-reporter to give output in *new* formatting (colored or not)
* Changelog adapted accordingly.
2019-02-07 12:55:14 +01:00
Alex Beregszaszi
8c97fb1688 Remove boost::filesystem::weakly_canonical workaround 2019-01-18 17:59:32 +00:00
Christian Parpart
62fe57479e
make use of C++ = default constructor declarations as well as more non-static member initialization syntax. 2018-12-19 11:26:42 +01:00
Christian Parpart
073b03d90c liblangutil: refactor SourceReferenceFormatter, splitting out retrieval and making use of new SourceLocation's CharStream knowledge 2018-12-06 14:01:01 +01:00
chriseth
6c44c5f0c9 Apply the optimize commandline parameter to assembly mode. 2018-11-30 23:39:05 +01:00
Erik Kundt
50351fb8e2 Fixes crash on empty runtime code. 2018-11-28 14:41:16 +01:00
Christian Parpart
aeb66905de
Moving SourceReferenceFormatter into langutil namespace. 2018-11-24 12:33:36 +01:00
liangdzou
87d1276dc8 Notify user on successful run without output. 2018-11-22 18:06:29 +01:00
Christian Parpart
d67322a186 Introduce namespace langutil in liblangutil directory.
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
2018-11-21 19:13:44 +00:00
Christian Parpart
87821c53c3 Isolating files shared between Yul- and Solidity language frontend. 2018-11-21 18:58:12 +00:00
chriseth
0690aae09d Remove mostly unused writeFile implementation. 2018-10-18 12:50:06 +02:00
mestorlx
9f9d6fdcc4 fix issue##5007 2018-10-15 14:26:15 -03:00
chriseth
95d3e7feb3 More helpful error messages for linker. 2018-10-12 15:15:02 +02:00
chriseth
6daeb39ecc Use hash for library placeholders. 2018-10-12 15:15:01 +02:00
liangdzou
6f7ff2dcd4 fix format issue for source files 2018-09-20 17:41:59 +08:00
liangdzou
24e5dcc352 fix code format problems 2018-09-19 00:18:49 +08:00
Daniel Kirchner
954d7433bd Disallow remappings with empty prefix. 2018-08-10 19:26:48 +02:00
chriseth
8e93b729a4
Merge pull request #4703 from ethereum/solc-fix-double-quoting-path-names
solc: Fixes double-quoting path names on stderr.
2018-08-07 21:46:00 +02:00
Christian Parpart
39ffd7500e
solc: Fixes double-quoting path names on stderr and adds tests for it.
Before it was possible to get a failure message, such as:

    ""notfound.sol"" is not found

whereas it should be:

    "notfound.sol" is not found.
2018-08-07 14:55:22 +02:00
Alex Beregszaszi
21ceac090a
Merge pull request #4592 from asifmallik/fixBackslashBugFinal
Fix backslash bug
2018-08-07 12:47:37 +01:00
chriseth
71e26f6adb Remove clone feature. 2018-08-07 11:10:50 +01:00
Asif Mallik
fba7b7c204 Fix backslash bug 2018-08-06 18:17:56 +02:00
chriseth
236284a264
Merge pull request #4166 from alibabe/fix-3718-ret
Fix the Heisenbug
2018-07-16 13:38:42 +02:00
Cryptomental
140dbfdbd8 Code, Changelog, ReleaseChecklist: Fix typos.
Refs: #4442
2018-07-11 00:26:23 +02:00
Alex Beregszaszi
782bc41dbd Rename JULIA/IULIA to Yul in assembly interface 2018-06-14 09:31:28 +01:00
Alex Beregszaszi
ba2a7294d8 Renamed the --julia CLI option to --yul 2018-06-14 00:09:00 +01:00
Alex Beregszaszi
2625f282b9 Remove obsolete --formal option from CLI 2018-06-13 01:00:51 +01:00
alibabe
53eafff4bb Fixes #3718 by creating a local variable for the result of
`GasEstimator::breakToStatementLevel` and then assign it back to
gasCoast.
2018-05-29 04:58:03 +00:00
Leonardo Alt
db5ea8ec03 Read from stdin only if - is explicitly given 2018-05-07 09:32:46 +02:00