Commit Graph

756 Commits

Author SHA1 Message Date
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
90f4ca1048 Do not store immutables packed. 2021-09-29 10:12:05 +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
hrkrshnn
e24083a298 UserDefinedValueType: test for reading from dirty storage slots 2021-09-28 11:27:43 +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
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
Daniel Kirchner
d1c0b428fc Improve abi decoding functions for arrays. 2021-09-15 13:50:19 +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
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
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
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
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
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
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
5f393d1694 Semantic tests for User Defined Value types 2021-09-08 21:19:30 +02:00
chriseth
4b0cd6cc8c Update gas costs. 2021-09-08 12:25:56 +02:00
Marenz
2b28f87abf Add type().min/max for enums 2021-09-01 15:02:02 +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
704820cc6e Update tests. 2021-08-16 22:24:06 +02:00
chriseth
a4c94a1b5b Fixed inline assembly external identifier access. 2021-08-11 18:18:29 +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
43605d9299 Tests and Changelog for basefee. 2021-08-11 09:51:12 +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
chriseth
0112fed73b Yul: Fix cleanup for left shift of bytes types. 2021-08-05 10:54:48 +02:00
Daniel Kirchner
0a6fc89da2 Fix negation function name collision. 2021-07-08 10:47:29 +02:00
Kamil Śliwak
105b4b4c8b Update tests 2021-07-05 13:46:53 +02:00
hrkrshnn
b628b115ae Manually enabled gas statistics for erc20 token test. 2021-06-30 16:35:53 +02:00
chriseth
54b1c667f1
Merge pull request #11595 from ethereum/issue-11526
Fix yul codegen bug when using binary negation.
2021-06-30 11:55:42 +02:00
Mathias Baumann
c47d02066c Fix yul codegen bug when using binary negatition. 2021-06-29 17:41:03 +02:00
chriseth
eaac16c779
Merge pull request #11590 from ethereum/disallow-non-hex-zero-and-fix-bytes32-literals-in-bytes-concat
Disallow non-hex zero literals and fix 32-byte hex literals in `bytes.concat()`
2021-06-29 16:34:26 +02:00