Commit Graph

133 Commits

Author SHA1 Message Date
Daniel Kirchner
6f04664cfa Disallow array slicing for arrays with dyanmically encoded base types. 2020-05-13 15:52:22 +02:00
chriseth
f42dc70c9f
Merge pull request #8863 from ethereum/nonReversedEncoder
Introduce non-reversed version of tupleEncoder.
2020-05-07 15:47:32 +02:00
chriseth
e986fde0c1 Introduce non-reversed version of tupleEncoder. 2020-05-07 15:08:09 +02:00
chriseth
6fb112fa8e Remove some unneeded headers. 2020-05-07 01:49:46 +02:00
Alex Beregszaszi
327c75bc1b IR generation for shifts 2020-05-06 19:14:23 +02:00
Daniel Kirchner
c25a3eba14 Fix accessing memory reference types in yul codegen and clean up on memory reads. 2020-05-06 11:34:11 +02:00
Daniel Kirchner
4d739b16a4 Cleanup function for internal function pointers. 2020-05-05 13:07:10 +02:00
Daniel Kirchner
7ad319687d Sol->Yul: Add cleanup to operations. 2020-05-05 13:06:01 +02:00
Djordje Mijovic
f3f729549d [Sol->Yul] Enabling creation function call 2020-04-27 16:15:57 +02:00
Djordje Mijovic
5329da93fb [Sol2Yul] Adding support for constructors with parameters in case of inheritance 2020-04-22 14:47:08 +02:00
Daniel Kirchner
0c5c93f3c2 Fix tuple assignments for empty tuples in Yul IR. 2020-04-15 11:10:52 +02:00
Christian Parpart
d00d3c45b1 [Sol2Yul] Implements codegen part for try/catch statements. 2020-04-14 18:42:37 +02:00
Leonardo Alt
39ff0deb05 Zero initialize memory arrays 2020-04-02 15:55:18 +02:00
Djordje Mijovic
96d278b101 [Sol->Yul] Adding slicing for call data arrays 2020-03-13 13:40:38 +01:00
Christian Parpart
bb29a7e497
Merge pull request #8460 from ethereum/yulutil-convert-array
YulUtilFunctions: convertionFunction() to also handle array string/memory casts
2020-03-10 14:00:34 +01:00
Christian Parpart
5d7a370248 YulUtilFunctions: convertionFunction() to also handle array string/memory casts. 2020-03-10 11:21:12 +01:00
chriseth
b7c001eb7f
Merge pull request #8416 from ethereum/reuseYulCalldataTailAccess
Fix yul calldata tail access functions and reuse them for old codegen.
2020-03-09 15:10:48 +01:00
Christian Parpart
105d89bea8 Compilation fix. 2020-03-09 11:42:34 +01:00
Christian Parpart
988bd6780b
Merge pull request #8414 from ethereum/sol2yul-func-type-conversion
[Sol2Yul] Implements function-to-function cast.
2020-03-09 11:31:44 +01:00
Christian Parpart
e210026e74 [Sol2Yul] Implements function-to-function cast. 2020-03-09 10:40:57 +01:00
Daniel Kirchner
857ed12b05 Use plain members and references instead of shared pointers for MultiUseYulFunctionCollector 2020-03-04 16:16:34 +01:00
Daniel Kirchner
919888ddbc Use yul function for calldata tail access, fix checks and add additional revert reason. 2020-03-04 14:39:36 +01:00
Daniel Kirchner
df0873d138 Implement calldata arrays for Yul IR 2020-02-12 14:00:29 +01:00
Daniel Kirchner
3c9f18b749 Use IRVariable's in IR code generation and implement tuples. 2020-02-12 12:36:14 +01:00
Leonardo Alt
36928c7a35 Add reason string for internal reverts 2020-02-10 11:57:20 -03: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
Daniel Kirchner
7d1b0c6023 Fix Yul IR push 2019-11-28 18:11:38 +01:00
chriseth
b0db64ff5b Merge remote-tracking branch 'origin/develop' into develop_060 2019-11-26 16:19:35 +01:00
Leonardo Alt
ce83bfb088 [Yul] Format string literals back to quoted string literals 2019-11-26 15:28:39 +01:00
Daniel Kirchner
372df6b9e1 Implement array push and pop for yul and replace assignments in via yul tests. 2019-11-20 12:04:42 +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
Daniel Kirchner
4782c800ec Initial introduction of array slices with partial implementation for dynamic calldata arrays. 2019-09-13 10:57:53 +02:00
chriseth
9955c51769
Merge pull request #7077 from ethereum/sol-yul-delete-fixed-storage
[Sol->Yul] Implement delete for fixed-sized storage arrays
2019-08-08 16:47:16 +02:00
mingchuan
15631a7fbe Split calldataEncodedSize into calldataEncodedSize, calldataEncodedTailSize and calldataHeadSize and fix all usages. 2019-08-08 15:52:21 +02:00
Mathias Baumann
e072885031 [Sol->Yul] Implement delete for fixed-sized storage arrays 2019-08-07 18:28:52 +02:00
Mathias Baumann
d9addbcf49 Fix error in g++7 with -O2 flag 2019-07-29 16:17:41 +02:00
chriseth
15eb8fec50
Merge pull request #7015 from ethereum/sol-yul-arrays
[Sol->Yul] Implement uint256[] memory arrays
2019-07-09 17:34:46 +02:00
Mathias Baumann
0f24fcea17 [Sol->Yul] Implement uint256[] memory arrays 2019-07-09 15:36:02 +02:00
djudjuu
cafa01cbf6 moved SuffixHelper to StringUtils 2019-07-09 13:50:07 +02:00
Mathias Baumann
3e51d14c6d Fix missing int -> string conversion 2019-07-04 09:31:24 +02:00
chriseth
350631ae0d
Merge pull request #6940 from ethereum/sol-yul-storage-array-index
[Sol->Yul] Implement index access for storage arrays
2019-06-24 12:49:19 +02:00
Mathias Baumann
1dd63f416e [Sol->Yul] Implement index access for storage arrays 2019-06-20 16:14:51 +02:00
chriseth
9bb7160c4c
Merge pull request #6958 from sifmelcara/fix-abiencoderv2-codegen
Fix incorrect abi encoding of storage array of data type that occupy multiple storage slots
2019-06-20 13:08:42 +02:00
Daniel Kirchner
fcd3410f26 Implement checked mod for sol->yul code generation. 2019-06-20 12:30:32 +02:00
Daniel Kirchner
a5b9f634ef Implement signed multiplication for sol->yul code generation. 2019-06-20 12:30:30 +02:00
Daniel Kirchner
e4c884ae13 Unify style of checked integer division for sol->yul code generation. 2019-06-20 12:18:18 +02:00
Daniel Kirchner
5f6af8b374 Implement signed subtraction for sol->yul code generation. 2019-06-20 12:16:56 +02:00
Daniel Kirchner
88988af561 Implement signed addition for sol->yul code generation. 2019-06-20 11:42:50 +02:00
Mathias Baumann
910cb8d329 [Sol->Yul] Implement .length for storage arrays 2019-06-19 18:09:23 +02:00
mingchuan
bfe074b2b1
Fix storage array abi encoding
Fix incorrect abi encoding of storage array of data type that occupy multiple storage slots
2019-06-19 10:46:05 +08:00
Mathias Baumann
8ca27c2bb0 [Sol->Yul] Style fixes
addresses the points @chriseth mentioned in #6909
2019-06-17 15:26:40 +02:00
Mathias Baumann
6a0976ed5e [Sol->Yul] Refactor shift functions to be consistent 2019-06-11 17:44:36 +02:00
Mathias Baumann
89c435a167 [Sol->Yul] Make IRStorageItem work with dynamic offsets 2019-06-11 17:44:36 +02:00
chriseth
fbf189151d [SolYul] Division. 2019-05-27 17:53:46 +02:00
Mathias Baumann
981983089c [Sol -> Yul] Implement delete for function pointers 2019-05-23 15:51:59 +02:00
chriseth
e324deabd6
Merge pull request #6740 from ethereum/unary-ops
[Sol -> Yul] Implement Int/Bool Unary: ++, --, ~, !
2019-05-20 18:06:01 +02:00
Daniel Kirchner
b6f4d4e9bc [Sol - Yul] Implement checked multiplication. 2019-05-20 17:36:53 +02:00
Mathias Baumann
86000fdcce [Sol -> Yul] Implement unary -, + 2019-05-20 16:14:46 +02:00
Mathias Baumann
7dbcb80523 [Sol -> Yul] Implement Int/Bool Unary: ++, --, ~, ! 2019-05-20 11:43:12 +02:00
chriseth
8c232e8196
Merge pull request #6690 from ethereum/useConditionalWhiskers
Use conditional whiskers
2019-05-13 10:23:30 +02:00
chriseth
a28b6224a4
Merge pull request #6714 from ethereum/finishERC20
Finish ERC20
2019-05-13 10:00:38 +02:00
chriseth
e047c8d4d9 Code generator for external function calls. 2019-05-09 18:55:12 +02:00
chriseth
021b312264 Revert with reason. 2019-05-09 17:57:33 +02:00
chriseth
45ee3fc007 Subtraction for unsigned integers. 2019-05-09 17:57:30 +02:00
chriseth
b3e51bcae1 Some more compression. 2019-05-09 15:25:21 +02:00
chriseth
d3d205b6eb Some more compression. 2019-05-09 15:25:21 +02:00
chriseth
c6b9fa96ae Use conditional Whiskers. 2019-05-09 15:25:21 +02:00
chriseth
595544645e Mappings. 2019-05-08 15:54:52 +02:00
chriseth
b4d6f847b4 Events. 2019-05-08 13:29:11 +02:00
chriseth
b99ad2aaa3
Merge pull request #6639 from ethereum/yul-require-assert
Yul generation of "require" and "assert"
2019-05-07 16:59:37 +02:00
Mathias Baumann
7f14352bbf Yul generation of require and assert 2019-05-07 12:19:41 +02:00
chriseth
e6f8aaafa5 Conversion for string literals. 2019-05-07 11:55:17 +02:00
chriseth
aa4d4afcdc LValues and state variables of value type. 2019-05-02 17:03:22 +02:00
chriseth
31b7037749 Move storage access functions to utils. 2019-05-02 12:11:41 +02:00
Christian Parpart
721bf367a3
[libsolidity] TypeProvider: eliminate redundant "Type" suffix in provider function signatures. 2019-04-17 14:42:07 +02:00
Christian Parpart
bf43eebea9 libsolidity: Introducing TypeProvider API, for clear type system ownership. 2019-04-16 18:26:45 +02:00
chriseth
18ab8aeb85 Overflow-checked addition. 2019-04-11 15:45:14 +02:00
Mathias Baumann
b4380a2137 Move convert functions to Yul module 2019-04-09 15:31:46 +02:00
Daniel Kirchner
d82157d46a Refactor abi encoding functions to prepare implementing calldata arrays and structs. 2019-04-04 11:18:03 +02:00
chriseth
a1fe2562c4 Move suffixedVariableNameList to utils. 2019-03-27 17:14:17 +01:00
chriseth
d515d77bfe Extract utility functions from ABI encoder. 2019-03-05 22:13:55 +01:00