Commit Graph

6615 Commits

Author SHA1 Message Date
chriseth
a79120fece
Merge pull request #12124 from ethereum/fixTests
Fix tests.
2021-10-12 20:26:28 +02:00
chriseth
59d8f50518 Fix tests. 2021-10-12 18:08:33 +02:00
Christian Parpart
b1dd0d0d02 Properly compute source mappings for immutables. 2021-10-12 17:56:17 +02:00
chriseth
49d7b78466
Merge pull request #12123 from ethereum/empty-switch-12068
CodeGen: Only output switch when it has cases
2021-10-12 17:42:49 +02:00
Mathias Baumann
454860d1f5 CodeGen: Only output switch when it has cases 2021-10-12 17:40:31 +02:00
chriseth
adc58c67b4
Merge pull request #11944 from ethereum/debug-info-selection
Debug info selection
2021-10-12 16:39:50 +02:00
Christian Parpart
591ba184e9 Adds some more version pragma test cases. 2021-10-12 15:15:54 +02:00
Kamil Śliwak
a9e794c872 Expose --debug-info/settings.debug.debugInfo option 2021-10-11 20:34:48 +02:00
Kamil Śliwak
bcfefc79d9 Pass DebugInfoSelection down to the code handling assembly printing 2021-10-11 20:34:48 +02:00
Kamil Śliwak
2cd1c644b6 Remove unused includes and sort existing includes in a few places 2021-10-11 20:34:48 +02:00
Kamil Śliwak
b0a5b92fe9
Merge pull request #12071 from ethereum/cli-validate-output-selection
Validate selected compiler outputs on the CLI
2021-10-11 17:52:32 +02:00
Christian Parpart
3f08b2269a Adds fmtlib as 3rdparty dependency for easier string composition. 2021-10-11 13:35:08 +02:00
Kamil Śliwak
a30348715b Use boost::current_exception_diagnostic_information() to print extra info about exceptions caught by (...) 2021-10-07 17:41:25 +02:00
chriseth
298af55cc5
Merge pull request #12102 from v-sreekesh/Nested_Brackets_Optimization
Nested brackets optimization
2021-10-07 10:48:19 +02:00
chriseth
75ccb4d41f
Merge pull request #12098 from ethereum/reformat-standard-optimizer-cmdline-tests
Reformat `standard_optimizer` command-line tests for readability
2021-10-07 10:22:43 +02:00
Kamil Śliwak
b9b2c69d24 CommandLineParser: Validate compiler output selection 2021-10-06 20:09:33 +02:00
Kamil Śliwak
620ec47efb OptimizerSuite: Rewrite runSequence() with support for nested brackets 2021-10-06 19:15:02 +02:00
Kamil Śliwak
b415e94e19 Reformat standard_optimizer command-line tests for readability 2021-10-06 18:46:53 +02:00
Kamil Śliwak
476c76b54e compileFull(): Use find instead of /*/*, which requires ignoring missing files 2021-10-06 18:46:42 +02:00
Marenz
4368da0201 Fix ICE when printing an error message related to mappings 2021-10-06 17:02:36 +02:00
chriseth
a709216e37
Merge pull request #11641 from TerranCivilian/src-hash-CommonIO-fix
Fix newline error in solidity::util::readUntilEnd
2021-10-06 11:47:02 +02:00
TerranCivilian
020ecc2131 Preserve original newlines in solidity::util::readUntilEnd() 2021-10-05 20:24:24 +02:00
chriseth
9c6ca4f439
Merge pull request #12076 from ethereum/cmdline-test-error-helpers
Error helpers + small refactors in `cmdlineTests.sh`
2021-10-05 17:20:49 +02:00
Leo Alt
4c2b661eaa [SMTChecker] Report values for block, msg and tx variables in counterexamples 2021-10-05 15:19:10 +02:00
chriseth
ecfcca1a27
Merge pull request #12016 from ethereum/external-fp-10358
Add ``.address`` and ``.selector`` in inside assembly for external function pointers
2021-10-05 14:48:58 +02:00
Marenz
98dd78362e Add `.address and .selector` in inside assembly for external function pointers 2021-10-04 18:05:57 +02:00
Kamil Śliwak
b4073179d7 cmdlineTests.sh: Add msg_on_error helper that automatically prints stderr and stdout of a failed command 2021-10-04 14:30:30 +02:00
Kamil Śliwak
26f9a554fb cmdlineTests.sh: Add fail helper to make exiting on an error more convenient 2021-10-04 14:30:30 +02:00
Kamil Śliwak
ce61a2bf28 cmdlineTests.sh: Add missing rm SOLTMPDIR and remove stray set -e 2021-10-04 14:29:57 +02:00
Kamil Śliwak
05ba53ecc3 cmdlineTests.sh: Don't use --force with rm unless actually needed 2021-10-04 14:29:57 +02:00
Kamil Śliwak
9662e9a8df cmdlineTests.sh: Enable set -o pipefail 2021-10-04 14:29:57 +02:00
Kamil Śliwak
7f7107405f Try out the new assertion macro variants with less arguments 2021-10-04 12:05:00 +02:00
chriseth
529087be6c
Merge pull request #12036 from ethereum/smt_fix_magic
[SMTChecker] Fix magic access
2021-10-04 11:01:39 +02:00
Kamil Śliwak
d10e668f4f
Merge pull request #12069 from ethereum/remove-combined-json-compact-format-leftovers
Remove leftovers of `compact-format` and `interface` from `--combined-json`
2021-10-01 14:40:17 +02:00
Kamil Śliwak
7915f32852 Remove leftovers of compact-format and interface from --combined-json 2021-10-01 13:05:30 +02:00
Leo Alt
d81ebe97c3 Fix magic access 2021-10-01 12:57:06 +02:00
Leo Alt
d25fb29178 Add isoltest option to ignore OS 2021-10-01 12:45:36 +02:00
hrkrshnn
14a678eb67 Fix gas stats 2021-09-29 13:50:51 +02:00
chriseth
e347c983b5 Update gas costs. 2021-09-29 13:25:37 +02:00
chriseth
78a1c1ca6d Add one more test case. 2021-09-29 13:22:13 +02:00
chriseth
df9721f869
Merge pull request #12047 from ethereum/fixFixedBytesCompilerUtils
Properly handle fixed-byte-like types.
2021-09-29 12:23:15 +02:00
chriseth
13354c0b9a
Merge pull request #12050 from ethereum/signedImmutablesBug
Fix signed immutables bug.
2021-09-29 11:46:58 +02:00
chriseth
090a46c2a5 New tests. 2021-09-29 11:44:17 +02:00
hrkrshnn
7b7e38768c Update tests. 2021-09-29 11:44:13 +02:00
hrkrshnn
6109b5c3a1 UserDefinedValueType.storageBytes() is correctly set
Previously it returned 32 bytes for all types, which was wasteful. This commit changes it to return
the storage bytes of the underlying type.
2021-09-29 11:41:47 +02:00
chriseth
8f7ba99e30
Merge pull request #12045 from ethereum/arrayTestsForUDFT
Fix array copying check.
2021-09-29 10:39:34 +02:00
chriseth
90f4ca1048 Do not store immutables packed. 2021-09-29 10:12:05 +02:00
chriseth
ed7884e341
Merge pull request #12043 from ethereum/exportCanonicalName
Export canonicalName
2021-09-29 10:11:30 +02:00
chriseth
bb4e3e191d Fix array copying check. 2021-09-29 10:00:14 +02:00
hrkrshnn
41f9aab219 Tests for assembly access of user defined value types. 2021-09-28 14:50:08 +02:00
chriseth
b6e62d61ec Export canonicalName 2021-09-28 12:00:30 +02:00
hrkrshnn
e24083a298 UserDefinedValueType: test for reading from dirty storage slots 2021-09-28 11:27:43 +02:00
chriseth
321e362789
Merge pull request #12024 from ethereum/require-boost-1.77-on-windows
Require Boost 1.77 on Windows
2021-09-27 15:41:21 +02:00
chriseth
8bcbf891e5
Merge pull request #12007 from ethereum/include-path-option
`--include-path` option (revived)
2021-09-27 15:40:14 +02:00
chriseth
39eb182ccc
Merge pull request #11688 from ethereum/fix-and-document-allow-paths
Fix and document `--allow-paths`
2021-09-27 15:39:14 +02:00
Kamil Śliwak
23f7b7781f cmdlineTests.sh: Skip empty test directories 2021-09-27 13:17:17 +02:00
Kamil Śliwak
77aa1707e1 Revert "Disable tests that fail on Windows due to a bug in Boost <= 1.76"
This reverts commit a801c12a8b89a7353a4339510aedc94739e9c46f.
2021-09-27 13:15:57 +02:00
Kamil Śliwak
f909555022 Treat ambiguous imports as errors 2021-09-27 13:14:23 +02:00
Kamil Śliwak
9975b5e26b Detect source unit name collisions between paths specified on the command line 2021-09-27 13:14:23 +02:00
Kamil Śliwak
c8a7a1da7c Add --include-path option 2021-09-27 13:14:23 +02:00
Kamil Śliwak
a61a950861 createFilesWithParentDirs(): Use binary mode to preserve original newlines on Windows 2021-09-27 13:14:23 +02:00
Kamil Śliwak
d4d778de77 Disable tests that fail on Windows due to a bug in Boost <= 1.76 2021-09-27 13:14:10 +02:00
Kamil Śliwak
c0b8378782 Do not whitelist any paths if remapping target is empty 2021-09-27 13:14:10 +02:00
Kamil Śliwak
8a8471d9cc Interpret remapping targets ending with /.. as directories 2021-09-27 13:14:10 +02:00
Kamil Śliwak
479ba7c523 Handle allowing empty paths correctly 2021-09-27 13:14:10 +02:00
Kamil Śliwak
3ac3612767 Whitelist base path 2021-09-27 13:14:10 +02:00
Kamil Śliwak
52dd39212d Normalize allowed paths before comparing them with imports 2021-09-27 13:14:10 +02:00
Kamil Śliwak
a436abfb25 normalizeCLIPathForVFS(): Add an option for resolving symlinks 2021-09-27 13:14:10 +02:00
Kamil Śliwak
b9b35a0def Tests for allowed paths (current state) 2021-09-27 13:14:10 +02:00
Kamil Śliwak
226f040e25 Ensure that native path separators are always used in symlink targets on Windows 2021-09-27 13:14:10 +02:00
Alex Beregszaszi
3c8846e669
Merge pull request #11976 from ethereum/json-cleanup
Some cleanup and testing for JSON
2021-09-24 19:03:45 +01:00
chriseth
1531863835 Split Common.h into Numeric.h. 2021-09-23 15:27:29 +02:00
Kamil Śliwak
11fdcc5159
Merge pull request #11996 from hawkess/isoltest-validation
Isoltest validation
2021-09-22 17:43:44 +02:00
Harikrishnan Mulackal
55d609d354
Merge pull request #11990 from ethereum/smt_user_types
[SMTChecker] Support user types
2021-09-22 15:40:49 +02:00
Kamil Śliwak
d23754eafd AsmParser: Don't use locationOverride as current location when location from comments is selected 2021-09-22 13:11:39 +02:00
Kamil Śliwak
ce4420f857 Separate DebugData fields for Solidity and Yul source locations 2021-09-22 13:11:39 +02:00
Kamil Śliwak
84ca67c283 Yul syntax tests showing broken behavior 2021-09-22 13:11:39 +02:00
chriseth
7726f37946 Update tests. 2021-09-22 11:33:02 +02:00
chriseth
d9ad047c21
Merge pull request #12001 from ethereum/cmdline-test-for-asm-json
Command-line test for `--asm-json`
2021-09-22 11:09:02 +02:00
hawkess
4fd5093d94 Removed pointer to external editor resource in IsolTestOptions, changed TestTool::handleResponse() to get editor value from m_options member variable 2021-09-21 14:12:26 -05:00
Marenz
7a51acc5fe Correct wrong error message referencing .slot and .offset when .length was used 2021-09-21 18:28:38 +02:00
Kamil Śliwak
b1351f4807 Fix typo in test name: leave_items_on_tack.sol -> leave_items_on_stack.sol 2021-09-21 16:28:16 +02:00
Kamil Śliwak
7bd1d1cf20 Command-line test for --asm-json 2021-09-21 16:28:16 +02:00
Leo Alt
e74f853c6b [SMTChecker] Support user types 2021-09-21 13:23:17 +02:00
Alex Beregszaszi
69e9531181 Add JSON tests for unicode, all types, and conformance to ECMA-262/ECMA-404
Also avoid using toStyledString
2021-09-21 10:49:13 +01:00
Kamil Śliwak
d86347cf7e Rename existing debug info tests to match the naming convention 2021-09-21 11:07:46 +02:00
hawkess
5edabc014d Changed enforce-gas-cost and enforce-via-yul to accept explicit arguments 2021-09-20 13:17:35 -05:00
Sean Hawkes
a875d1225a Explicity set default values for program options based on initialized values from constructor 2021-09-20 08:34:28 -05:00
chriseth
2c3322cbf6
Merge pull request #11993 from ethereum/remove-trailing-whitespace-after-location-with-no-snippet
Don't include whitespace after `@src` tag if there's no snippet
2021-09-20 14:10:59 +02:00
Sean Hawkes
f2e59923ab Added call to CommonOptions base class validate method to derived IsolTestOptions validate method to validate against both common and extended options 2021-09-18 06:59:37 -05:00
Sean Hawkes
76fa00abed Added invocation of base class addOptions in derived to populate list with common and derived options, fixed errors with editor member variable type mismatch 2021-09-18 06:22:27 -05:00
Sean Hawkes
ae7c617711 Added call to addOptions virtual helper in CommonOptions::parse to add options from base/derived classes, modified interface of IsolTestOptions to include editor member variable set based on provided parameter in constructor as it is now needed by addOptions helper function 2021-09-18 05:43:09 -05:00
Sean Hawkes
f47e918caa Moved program_options add_options to a helper function to allow defaults to be set by derived class constructor before immutable options are created by parent 2021-09-18 04:55:50 -05:00
Kamil Śliwak
a9b5835e5d AsmPrinter: Don't include whitespace after @src if there's no code snippet 2021-09-17 21:46:12 +02:00
Kamil Śliwak
fc8c4b046c StandardCompiler: Do not discard non-fatal errors that happened before a fatal error 2021-09-16 20:29:03 +02:00
Kamil Śliwak
1a9ba1baca Failing test: standard_yul_single_file_via_urls 2021-09-16 20:29:03 +02:00
chriseth
a141589adf Update tests. 2021-09-16 17:19:17 +02:00
chriseth
cedf68365b Move test. 2021-09-16 17:19:17 +02:00
chriseth
3e429ab231 Update commandline tests. 2021-09-16 17:19:17 +02:00
chriseth
63993387d6 Add test for invalid ast id. 2021-09-16 17:18:48 +02:00
chriseth
05d20446bb Parse @ast-id annotation. 2021-09-16 17:18:48 +02:00
Leo Alt
a1bea368cb [SMTChecker] Support constants via modules 2021-09-16 14:35:05 +02:00
chriseth
4284499180
Merge pull request #11888 from ethereum/spdx-license-handling-10145
Properly detect multiple licenses and validate them.
2021-09-16 14:18:17 +02:00
chriseth
91ef1ceb51
Merge pull request #11954 from ethereum/userdefinedvaluetype-multisource-test
Added a multisource test for UserDefinedValueTypes and imports
2021-09-16 13:59:22 +02:00
chriseth
ff0e433635
Merge pull request #11965 from ethereum/userdefined-changed-toString
User defined value types changed toString()
2021-09-16 13:58:55 +02:00
Marenz
c81814915c Properly detect multiple licenses and validate them. 2021-09-16 11:18:26 +02:00
Alex Beregszaszi
c1070fabc0
Merge pull request #11906 from ethereum/smt_fix_bmc
[SMTChecker] Fix BMCs constraints on internal functions
2021-09-15 21:01:29 +01:00
hrkrshnn
15fb427a99 Added a multisource test for UserDefinedValueTypes and imports
Testing if `import {MyType} from "source";` works
2021-09-15 17:48:53 +02:00
hrkrshnn
48e16ceb88 Changing the UserDefinedValueType::toString to userdefined <name> 2021-09-15 17:25:23 +02:00
Kamil Śliwak
b077ef46e2 cmdlineTests.sh: More descriptive message about used binary path 2021-09-15 16:49:25 +02:00
Kamil Śliwak
67eed76aac cmdlineTests.sh: Fix running only tests matching patterns given on the command line 2021-09-15 16:49:25 +02:00
chriseth
34e516ea1b
Merge pull request #11963 from ethereum/slightABIDecodeImprovement
Improve abi decoding functions for arrays.
2021-09-15 15:42:13 +02:00
Leo Alt
b731957e65 Fix BMCs constraints on internal functions 2021-09-15 14:42:39 +02:00
Daniel Kirchner
d1c0b428fc Improve abi decoding functions for arrays. 2021-09-15 13:50:19 +02:00
hrkrshnn
42c8310a63 Updated tests. 2021-09-15 12:56:29 +02:00
Daniel Kirchner
0fa24c786b
Merge pull request #11956 from ethereum/userDefinedTypesContractAccess
Allow accessing user defined value type members via contract name.
2021-09-14 17:14:04 +02:00
Daniel Kirchner
be29ef70a7 Allow accessing user defined value type members via contract name. 2021-09-14 16:24:14 +02:00
chriseth
8735d3fb6c
Merge pull request #11930 from ethereum/calldataStructInlineAssembly
Fix inline assembly assignments to calldata structs and statically-sized calldata arrays.
2021-09-14 16:16:48 +02:00
chriseth
8188ea7d66
Merge pull request #11931 from ethereum/different-metadata-via-ir
Different metadata for IR
2021-09-14 15:48:08 +02:00
Leonardo
e45083f319
Merge pull request #11606 from ethereum/info_message
Add new info severity
2021-09-14 14:30:07 +02:00
chriseth
cb218fe018
Merge pull request #11947 from ethereum/abicodec-test-userdefined
Added an abi function test for UserDefinedValueType
2021-09-14 13:49:45 +02:00
Kamil Śliwak
405a9e9971 Generate separate metadata for the old and the new codegen 2021-09-14 13:44:04 +02:00
Kamil Śliwak
83b3bd0227 Add a version of isValidMetadata() that accepts already parsed metadata 2021-09-14 13:44:04 +02:00
Kamil Śliwak
14639efc5d Print code snippets next to source locations in IR output 2021-09-14 12:09:59 +02:00
Kamil Śliwak
d78522b08b AsmParser: Accept optional code snippets after the @src tags 2021-09-14 12:09:59 +02:00
Leo Alt
e72fa7fc10 Add new info severity 2021-09-13 22:48:22 +02:00
chriseth
f957820351
Merge pull request #11913 from ethereum/source-location-parsing-extra-tests-and-regex-refactor
More generic source location parsing + more errors
2021-09-13 19:06:29 +02:00
Harikrishnan Mulackal
c8c6d30808
Merge pull request #11946 from ethereum/tests-userdefinedvaluetypes
UserDefinedValueType: test to validate zero-cost-abstraction claim.
2021-09-13 18:54:36 +02:00
hrkrshnn
4871017aae Added an abi function test for UserDefinedValueType
A test to see if `abi.encode*(..., (CustomType))` and `abi.decode(..., (CustomType))` works as
intended.
2021-09-13 18:12:42 +02:00
hrkrshnn
00bfed4d8b UserDefinedValueType: test to validate zero-cost-abstraction claim.
Seems that the optimizer can indeed make it a zero-cost-abstraction!
2021-09-13 16:49:52 +02:00
Kamil Śliwak
0727e5c756
Merge pull request #11933 from soroosh-sdi/scripts-no-smt
Add switch for command line & test.sh to skip smt
2021-09-13 16:24:00 +02:00
Kamil Śliwak
7a36a1d1db Reject optimizer options as invalid in linker and Standard JSON modes 2021-09-13 15:35:11 +02:00
Daniel Kirchner
ab7b1625ac Tests for unassigned calldata returns. 2021-09-13 15:22:46 +02:00
Daniel Kirchner
fc37b18e88 Fix inline assembly assignments to calldata structs and statically-sized arrays. 2021-09-13 15:22:46 +02:00
Harikrishnan Mulackal
8fafdeacac
Merge pull request #11939 from ethereum/userdefined-types-mapping-key
Allow Mapping keys to have type UserDefinedValueType.
2021-09-13 15:06:14 +02:00
hrkrshnn
2ead3f469e Added a user defined type mapping into the ASTJSON test. 2021-09-13 14:06:31 +02:00
hrkrshnn
a1d4d0125d Allow UserDefinedValueType.uwrap (and wrap) as RHS of constant decl
Needed to make `MyType.unwrap` and `MyType.unwrap` as pure in the process. This change affected some
existing tests ("statement has no effect").
2021-09-13 11:53:05 +02:00
hrkrshnn
1fa6c71bd0 Allow Mapping keys to have type UserDefinedValueType.
Also added syntax and semantic test.
2021-09-13 10:03:49 +02:00
soroosh-sdi
f5e8f5246c Add switch for command line & test.sh to skip smt
- add --no-smt in scripts/tests.sh and test/cmdlineTests.sh

Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
2021-09-10 23:35:17 +04:30
Kamil Śliwak
fbdfc6bb7a AsmParser: Require whitespace before tags in location comments 2021-09-09 18:27:29 +02:00
Daniel Kirchner
dea1b9ec79
Merge pull request #11920 from ethereum/update-comment-fixedpoint-example
User defined value type: changes in documentation and test case
2021-09-09 17:38:37 +02:00
Kamil Śliwak
14396c207c AsmParser: Generalize location comment parsing to make it easier to add support for more tags 2021-09-09 17:12:59 +02:00
Kamil Śliwak
33ac5478de More tests for @src in AsmParser 2021-09-09 17:12:58 +02:00
Kamil Śliwak
066c2a4699 Check expected errors in existing AsmParser tests 2021-09-09 17:12:58 +02:00
hrkrshnn
952540c3b5 User defined value type: changes in documentation and test case
Changed the name of a function from `truncate` to `floor`, since that is more appropriate; updated
the inaccurate description on the rounding behaviour. Also modified the respective semantic test.
2021-09-09 16:57:03 +02:00
Leo Alt
d91f75deb8 Fix ICE on unique errors 2021-09-09 16:37:43 +02:00
chriseth
3e2e3d1baa
Merge pull request #11915 from ethereum/fix-out-of-sync-gas-costs
Fix breakage on `develop` caused by gas costs that went out of sync
2021-09-09 15:42:08 +02:00
Kamil Śliwak
f6eecb8c6f Fix gas costs that went out of sync in some tests due to a recent merge 2021-09-09 13:26:45 +02:00
hrkrshnn
a03fbf7061 User defined value types: moved a syntax test to semantic test. 2021-09-09 12:07:51 +02:00
Harikrishnan Mulackal
8a37f56e98
Merge pull request #11806 from ethereum/user-defined-types
User defined value types
2021-09-09 10:28:35 +02:00
hrkrshnn
d67391531e Implemented ASTJson import export for UserDefinedValueType
Also added a test.
2021-09-08 21:19:30 +02:00
hrkrshnn
5f393d1694 Semantic tests for User Defined Value types 2021-09-08 21:19:30 +02:00
hrkrshnn
229f50eef1 Syntax checks for user defined value types 2021-09-08 19:56:48 +02:00
chriseth
dae6b53c84
Merge pull request #11910 from ethereum/deterministicOptimizer
Sort yul functions by creation time.
2021-09-08 19:15:58 +02:00
Daniel Kirchner
c499f27a63 Change RematCandidateSelector to not depend on variable name sorting. 2021-09-08 15:41:40 +02:00
chriseth
4b0cd6cc8c Update gas costs. 2021-09-08 12:25:56 +02:00
chriseth
1304080a77 Update commandline tests. 2021-09-08 12:25:56 +02:00
hrkrshnn
ce75790e8d TypeChecker: added checks for wrap and unwrap
For user defined value types and also added a test case.
2021-09-07 19:42:51 +02:00
hrkrshnn
0647039864 DeclarationTypeChecker for UserDefinedValueTypes
- Checks for repetitions.
- Assigns types.
- Checks if the 'actual type' is an elementary type name.
- Checks if the 'actual type' is a value type.

Also added tests.
2021-09-07 19:42:51 +02:00
hrkrshnn
9f7426b4a9 Implemented parsing for UserDefinedValueType
Also added parsing tests.
2021-09-07 19:42:51 +02:00
Leo Alt
6e2fe1e340 [SMTChecker] Cleanup spurious messages about TypeTypes 2021-09-07 16:55:25 +02:00
chriseth
f14b7598c7 Only list used source names. 2021-09-06 18:33:05 +02:00
hrkrshnn
2cdd3b2081 Resolving Keccak-256: check if arguments are identifiers early.
Previously, the check on whether the optimization was useful gas wise was done before checking if
the keccak256 opcode had identifier as arguments. Since the gas meter crashes when encountering
certain Yul opcodes (create, dataoffset, etc.), this optimizer step crashed.
2021-09-06 13:48:07 +02:00
Daniel Kirchner
8447b32d52
Merge pull request #11861 from ethereum/smt_value
[SMTChecker] Support `value` in CHC for external function calls
2021-09-03 14:00:21 +02:00
Daniel Kirchner
d384664dcb
Merge pull request #11615 from ethereum/yulStackLayoutGenerator
Yul Stack Layout Generator (New Code Transform Step 2)
2021-09-03 13:13:18 +02:00
chriseth
7f137d352a
Merge pull request #11869 from ethereum/remodelUseSrc
Allow and require use-src to be repeated for each object.
2021-09-02 18:34:07 +02:00
Daniel Kirchner
f881409ea4 Stack layout generator for new code generation. 2021-09-02 17:47:19 +02:00
chriseth
9c2ab1ff2f
Merge pull request #11881 from ethereum/unsuable-symbol-11855
Properly export symbols from aliased imports.
2021-09-02 16:39:16 +02:00
chriseth
5caa15879b Allow and require use-src to be repeated for each object. 2021-09-02 11:29:42 +02:00
Leo Alt
106c591dde Support the external call option 2021-09-01 20:18:37 +02:00
Marenz
4700c2b973 Properly export symbols from aliased imports. 2021-09-01 19:55:30 +02:00
Marenz
2b28f87abf Add type().min/max for enums 2021-09-01 15:02:02 +02:00
Harikrishnan Mulackal
1e334a8993
Merge pull request #11799 from benldrmn/increase_use_of_constexpr
Increase use of C++ constexpr
2021-08-31 17:23:36 +02:00
Kamil Śliwak
5e5f49df93
Merge pull request #11839 from priyansh786/develop
Don't create empty expectation files when updating test expectations
2021-08-31 16:46:14 +02:00
Kamil Śliwak
d07b796675 Disallow modifier declarations and definitions in interfaces 2021-08-31 15:25:08 +02:00
benldrmn
58e4cc62e0 Increase use of C++ constexpr constant expressions in code base as described in issue #7720 2021-08-31 15:03:59 +02:00
chriseth
f7916f2940 Add override exception for interface functions. 2021-08-31 10:45:31 +02:00
priyansh786
803901fa7e Don't create empty expectation files when updating test expectations 2021-08-30 22:55:37 +05:30
Leonardo
78afd71ab7
Merge pull request #11860 from ethereum/smt_static_array
[SMTChecker] Add static array length constraint
2021-08-30 19:07:21 +02:00
Kamil Śliwak
525b4c70e7
Merge pull request #11853 from Midhun07/develop
Disallow `--experimental-via-ir` in Standard JSON, assembler and linker modes
2021-08-30 19:02:36 +02:00
Leo Alt
ac528cfd1b add static array length constraint 2021-08-30 17:15:16 +02:00
Midhun07
11065c6e79 Disallowed option --experimental-via-ir in Assembler, Linker and StandardJson input modes 2021-08-30 19:58:55 +05:30
Leo Alt
16bc15acac Fix false negative on storage array references returned by internal functions 2021-08-28 09:30:53 +02:00
Leo Alt
60b866f9d8 Fix ICE on multi-source use of abi.* 2021-08-27 18:55:36 +02:00
Leo Alt
0cc9162fb5 Update SMTChecker tests 2021-08-27 16:25:09 +02:00
Leo Alt
4d414a6d58 Update commandline tests 2021-08-27 16:25:09 +02:00
Kamil Śliwak
92446cbcab TemporaryDirectory: Add an alternative constructor that can create subdirectories 2021-08-27 15:11:20 +02:00
Kamil Śliwak
9dc7360903 TemporaryDirectory: Add automatic conversions to boost::filesystem::path 2021-08-27 15:11:20 +02:00
Kamil Śliwak
5a0a0af48f TemporaryDirectory: Use soltestAssert() instead of assert() and remove filesystem namespace alias 2021-08-27 15:11:20 +02:00
Kamil Śliwak
fb6a25715d TemporaryDirectory: Automatically add a dash after the prefix 2021-08-27 15:11:20 +02:00
Kamil Śliwak
251de730ed CommonIO: Use a macro to construct TemporaryDirectory prefix 2021-08-27 15:11:20 +02:00
Kamil Śliwak
13f46ebb1e FileReader: Normalize base path and strip it from normalized source paths 2021-08-27 15:10:46 +02:00
Kamil Śliwak
2d3ec69a05 CLI tests for FileReader 2021-08-27 15:10:46 +02:00
Kamil Śliwak
618ba2fb9a createSymlinkIfSupportedByFilesystem(): Add support for directory symlinks used on Windows 2021-08-27 15:10:46 +02:00
Leonardo
6e6bbb2f83
Merge pull request #11837 from soroosh-sdi/use-range-v3-part2
Using range-v3 instead of boost
2021-08-26 09:38:27 +02:00
Leo Alt
a9af63187e Adjust tests for nondeterminism 2021-08-25 21:10:43 +02:00
Leo Alt
facc66997b Update existing CLI tests 2021-08-25 21:10:08 +02:00
Leo Alt
4cf4ccafd7 New tests 2021-08-25 21:10:08 +02:00
Leo Alt
85378b1770 Update existing tests 2021-08-25 21:10:08 +02:00
Leo Alt
718f392849 Don't erase things for BMC if function call is staticcall 2021-08-25 14:09:46 +02:00
Leo Alt
a55685c04f Erase balances when delegatecall is seen 2021-08-25 12:39:26 +02:00
soroosh-sdi
b0ce98bcb2 Using range-v3 instead of boost
Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
2021-08-24 23:50:23 +04:30
Kamil Śliwak
6b7857d56b
Merge pull request #11650 from ethereum/boost-path-in-read-file-as-string
Use `boost::filesystem::path` in `readFileAsString()`
2021-08-20 19:45:54 +02:00
Leo Alt
9ea4576664 Update tests 2021-08-19 16:34:01 +02:00
chriseth
45a910c2ca
Merge pull request #11750 from ethereum/immutables-10463
Allow reading of immutables during construction time
2021-08-19 14:39:03 +02:00
Marenz
121fd40f74 Allow reading of immutables during construction time 2021-08-19 13:59:05 +02:00
chriseth
2165c0d3d9 Update gas costs. 2021-08-19 13:26:52 +02:00
chriseth
c6473ff32b Proof for rules. 2021-08-19 12:51:54 +02:00
chriseth
a467f3205c Tests for knowledge base. 2021-08-19 12:51:54 +02:00
chriseth
4b038e3f02 Extend knowledge base. 2021-08-18 12:42:46 +02:00
chriseth
063d481bb3 Fix parsing fixed point values. 2021-08-17 14:46:11 +02:00
chriseth
948665ff89
Merge pull request #11749 from ethereum/simplifyConvertEvenMOre
Simplify yul conversion function even more.
2021-08-17 14:39:59 +02:00
chriseth
5015284c3a
Merge pull request #11748 from ethereum/optimize_signextend
Optimizer rules for signextend.
2021-08-17 14:39:16 +02:00
Kamil Śliwak
cb1a0f08ca readFileAsString(): Accept path as boost::filesystem::path instead of string 2021-08-17 12:58:33 +02:00
chriseth
704820cc6e Update tests. 2021-08-16 22:24:06 +02:00
chriseth
b62bb0a0b2
Merge pull request #11804 from ethereum/fixedPointTypes
[isoltest] Leading zero for fixed point types.
2021-08-16 22:17:48 +02:00
chriseth
4480662a58 Test. 2021-08-16 18:54:33 +02:00
hrkrshnn
59db0f1537 An equivalence check for SIGNEXTEND opcode
Checking the implementation of SIGNEXTEND using Z3's native SignExt and Extract
2021-08-16 18:54:33 +02:00
chriseth
5906d25a39 Formalization of SIGNEXTEND and rule proofs 2021-08-16 18:54:33 +02:00
Daniel Kirchner
9f2885e173 Disabling of prepublish hook is no longer needed in setup_solcjs
See https://github.com/ethereum/solc-js/pull/542
2021-08-16 16:50:31 +02:00
Alexander Arlt
866617b353 [isoltest] Add support for fixed point types. 2021-08-16 13:07:22 +02:00
chriseth
d7a802e4bf
Merge pull request #11682 from ethereum/fixedPointTypes
Fixed point types for isoltest
2021-08-13 09:37:29 +02:00
Leo Alt
937af7d722 Fix SMT test 2021-08-12 22:34:18 +02:00
Alexander Arlt
d6b9b4175b [isoltest] Add support for fixed point types. 2021-08-12 21:27:51 +02:00
chriseth
fe0d027d45
Merge pull request #11785 from ethereum/someMoreBaseFees
Some more base fees.
2021-08-12 19:48:10 +02:00
Leo Alt
6ee60aa628 Fix false positive on external calls from constructors 2021-08-12 18:51:55 +02:00
chriseth
c87c0f02bd Test updates. 2021-08-12 16:56:12 +02:00
chriseth
90c4623460 Some more base fees. 2021-08-12 16:37:21 +02:00
chriseth
ccdc11ea5b
Merge pull request #11741 from ethereum/shadowing_inlineasm_fix_yul_codegen
Fixed inline assembly external identifier access.
2021-08-12 14:38:24 +02:00
Leo Alt
10397e440c Fix ICE in constants 2021-08-12 10:53:01 +02:00
chriseth
a4c94a1b5b Fixed inline assembly external identifier access. 2021-08-11 18:18:29 +02:00
Daniel Kirchner
e28d00a76d
Merge pull request #11763 from ethereum/basefee-hasOpcode
Allow basefee as Yul identifier for EVMVersion < london
2021-08-11 14:14:21 +02:00
Leo Alt
8ce878621a Make show unproved CLI a flag 2021-08-11 10:54:03 +02:00
hrkrshnn
892700d769 Tests for basefee as identifier in inline assembly
Also added basefee to `EVMVersion::hasOpcode(...)`
2021-08-11 10:46:40 +02:00
hrkrshnn
7f1a2be0fe Allow basefee as Yul identifier for EVMVersion < london
This was done to prevent basefee from being a breaking change. This change will be removed in 0.9.0.

TODO revert this commit in breaking.
2021-08-11 10:46:08 +02:00
Harikrishnan Mulackal
74ec3c1983
Merge pull request #11760 from ethereum/default-evmversion-london
Set default EVM version to London.
2021-08-11 10:42:41 +02:00
Harikrishnan Mulackal
0fc3e2dfb3
Merge pull request #11647 from ethereum/basefee
Implement London EVMVersion and the BASEFEE opcode
2021-08-11 10:31:22 +02:00
hrkrshnn
79733fca48 Set default EVM version to London. 2021-08-11 09:54:14 +02:00
hrkrshnn
43605d9299 Tests and Changelog for basefee. 2021-08-11 09:51:12 +02:00
hrkrshnn
a54addc2cb An equivalence check for the Byte opcode
Checks that the byte opcode (implemented using shift) is equivalent to a
canonical definition of byte using extract.
2021-08-10 11:00:29 +02:00
chriseth
f6789de9f8 Fix implementation of BYTE 2021-08-09 19:14:14 +02:00
hrkrshnn
af1dabb555 Added EVMVersion london.
Also set the value of `block_base_fee` for testing to 7 wei.
2021-08-09 16:18:08 +02:00
hrkrshnn
543ccf5287 Added the basefee instruction in YulInterpreter 2021-08-09 16:18:08 +02:00
Leo Alt
ee6285d6d7 Do not create VCs for underoverflow by default for Sol >=0.8 2021-08-09 14:12:31 +02:00
Leo Alt
08c065ee04 Add option divModWithSlacks 2021-08-06 15:50:25 +02:00
Kamil Śliwak
506cc20fe8 Remove empty exit files from command-line tests 2021-08-05 17:41:33 +02:00
Kamil Śliwak
2803dba980 Add pragmas and SPDX comments to command-line tests to get cleaner error output 2021-08-05 17:41:30 +02:00
Kamil Śliwak
dc4620d2be cmdlineTests.sh: Suppress message about empty output to get consistent output on release and pre-release builds 2021-08-05 17:11:58 +02:00
chriseth
db85849648
Merge pull request #11737 from ethereum/fix_shift_cleanup
Yul: Fix cleanup for left shift of bytes types.
2021-08-05 12:55:42 +02:00
chriseth
6b888b531b Refactor conversion function. 2021-08-05 11:48:35 +02:00