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