Commit Graph
6300 Commits
Author SHA1 Message Date
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