Daniel Kirchner
4782c800ec
Initial introduction of array slices with partial implementation for dynamic calldata arrays.
2019-09-13 10:57:53 +02:00
chriseth
ea0a952a69
Merge pull request #7362 from ethereum/develop
...
Merge develop into develop_060
2019-09-05 16:50:44 +02:00
Daniel Kirchner
7148792b8a
Refactor ExpressionCompiler with acceptAndConvert.
2019-09-05 15:05:59 +02:00
Daniel Kirchner
42f30981db
Add unimplemented assertion to IR generation when accessing address member of external function types.
2019-08-19 14:56:04 +02:00
Daniel Kirchner
9f6fff2120
Replace casting of external functions to address by a member named "address".
2019-08-19 14:56:04 +02:00
chriseth
74f16ef186
Refactor IRLValue so that it does not require IRGenerationContext.
2019-08-08 17:27:35 +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
chriseth
c8f04b88bf
Merge pull request #7176 from ethereum/decodeMemoryLocation
...
Always copy dynamically-sized memory arrays during CompilerUtils::abiDecode
2019-08-07 15:42:14 +02:00
Daniel Kirchner
efb34bdf22
Always copy dynamically-sized memory arrays during CompilerUtils::abiDecode.
2019-08-06 14:11:14 +02:00
Christian Parpart
235638b3fc
Implements constructor code for state variables.
2019-08-05 11:23:01 +02:00
Mathias Baumann
d9addbcf49
Fix error in g++7 with -O2 flag
2019-07-29 16:17:41 +02:00
chriseth
579bdaddb9
Merge pull request #7088 from ethereum/diffLegYul
...
Document differences between legacy Solidity and Solidity via Yul.
2019-07-11 17:59:01 +02:00
chriseth
76d7ea888b
Document differences between legacy Solidity and Solidity via Yul.
2019-07-11 17:48:06 +02:00
chriseth
869d69d293
Supply full object to stack compressor and Optimizer Suite.
2019-07-10 18:49:42 +02:00
Mathias Baumann
d264e3e0ba
[Sol->Yul] Implement getter functions
2019-07-10 13:42:39 +02:00
Mathias Baumann
37f04976a2
[Sol->Yul] Implement keccak256
2019-07-09 18:25:07 +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
cdd137e3d1
Support constant numbers in inline assembly.
2019-07-02 14:01:05 +02:00
chriseth
fe9aa59b8f
Fix conversion during storing.
2019-06-25 13:00:02 +02:00
Mathias Baumann
0e812b16c2
Minor indent fix
2019-06-24 14:51:04 +02:00
chriseth
9c129a4087
Merge pull request #6984 from ethereum/yul-reindent
...
yul: adds reindent() function to reindent yul source code and makes us of it in IRGenerator
2019-06-24 12:54:40 +02:00
Christian Parpart
0fd1db533e
yul: adds reindent() function to reindent yul source code and makes use of it in IRGenerator.
...
This function does count curly and round braces and reindents
accordingly the beginning of each line.
It does consider line-comments (// and ///) but not multiline comments (/* ... */).
2019-06-24 12:53:50 +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
Mathias Baumann
346c512cd7
[Sol->Yul] Implement _slot/_offset suffix for storage variables
2019-06-20 14:50:52 +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
b03cb2bce6
YulUtilFuncs: Add missing/adjust existing documentation
2019-06-19 18:09:23 +02:00
Mathias Baumann
910cb8d329
[Sol->Yul] Implement .length for storage arrays
2019-06-19 18:09:23 +02:00
Mathias Baumann
c5b50039d2
[Sol->Yul] Report error after Ir code
...
this way less scrolling is required
2019-06-19 18:09:23 +02:00
mingchuan
ae273ff3bd
Move code that access calldata array element to separate function
2019-06-19 17:26:35 +08:00
mingchuan
492f945973
Coding style fix
2019-06-19 17:26:34 +08:00
chriseth
cc5045a56e
[Yul] Run optimizer on all dialects.
2019-06-19 10:01:16 +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
chriseth
6cb6fe35ef
Make Yul optimizer not fail for wasm.
2019-06-17 18:42:47 +02: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
Daniel Kirchner
2dbdddc7e5
Fix argument count for require with message and string literals.
2019-06-06 13:17:08 +02:00
chriseth
c3cdae908d
Merge pull request #6767 from ethereum/constantOptimiserForYul
...
[Yul] Constant optimiser
2019-05-28 11:53:04 +02:00
chriseth
b95eebee1c
Merge pull request #6822 from ethereum/uninitializedLoadFromStorage
...
Explicitly turn uninitialized internal function pointers into invalid function when loaded from storage.
2019-05-28 11:48:56 +02:00
chriseth
1c16124a09
Constant optimiser for Yul.
2019-05-28 11:35:07 +02:00
chriseth
fbf189151d
[SolYul] Division.
2019-05-27 17:53:46 +02:00
chriseth
5b1a984882
Explicitly turn uninitialized internal function pointers into invalid function when loaded from storage.
2019-05-27 17:26:37 +02:00
chriseth
a600126703
Merge pull request #6833 from sifmelcara/fix-struct-array-mapping
...
Fix assignment of struct containing array of mappings
2019-05-27 11:14:28 +02:00
mingchuan
bf8af89bba
Fix assignment of struct containing array of mappings
2019-05-25 01:33:49 +08:00
chriseth
fb40063253
Compound assignment.
2019-05-23 21:32:30 +02:00
Mathias Baumann
981983089c
[Sol -> Yul] Implement delete for function pointers
2019-05-23 15:51:59 +02:00
Mathias Baumann
81702717b0
[Sol -> Yul] Enable function pointer comparison
2019-05-23 12:52:50 +02:00
chriseth
97fa21841d
Use different way to fall back to FunctionalInstruction for loose assembly.
2019-05-23 11:30:12 +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
f2ae30f620
Fix handling of structs of dynamic size as constructor parameters.
2019-05-16 17:10:54 +02:00
Mathias Baumann
f5980f08cc
Remove m_code from IRValue
...
Only one place to append to m_code avoids confusion and bugs
2019-05-14 11:15:04 +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
63a072f122
[SolYul] Partially implement constructor.
2019-05-09 17:57:33 +02:00
chriseth
021b312264
Revert with reason.
2019-05-09 17:57:33 +02:00
chriseth
60a42f58a0
Fix internal function calls.
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
Daniel Kirchner
b83f6d8d46
[Sol -> Yul] Implement if statements
2019-05-09 14:52:20 +02:00
Mathias Baumann
0abe00d393
[Sol -> Yul] Fix ForLoops and implement WhileLoops
2019-05-09 09:46:19 +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
acca390ef5
Most trivial members.
2019-05-07 17:19:45 +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
chriseth
f68c09272b
Simple tuple expressions.
2019-05-07 15:59:56 +02:00
chriseth
c604481cef
Logical operators.
2019-05-07 15:59:35 +02:00
chriseth
785b369b89
Add type helper function.
2019-05-07 12:36:54 +02:00
chriseth
3fa4c3da1e
Comparison operations.
2019-05-07 12:35:05 +02:00
chriseth
4069b19734
Unary operation for literals.
2019-05-07 12:35:04 +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
3365cb9b4a
Add type helper function.
2019-05-06 12:01:13 +02:00
chriseth
7c62193524
Change some AST elements to post visit.
2019-05-06 11:43:18 +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
chriseth
e66ab6c036
Helper function to define the value of expressions.
2019-04-30 13:10:37 +02:00
chriseth
0eef51ffa4
Conversion during binary operation.
2019-04-30 13:10:37 +02:00
chriseth
597d37b731
Implement for loops.
2019-04-30 13:10:37 +02:00
chriseth
c1ca16cd33
Implement return.
2019-04-30 13:10:36 +02:00
Erik Kundt
381ed5a302
Unifies behavior for member access of ABI functions.
2019-04-29 14:27:10 +02:00
Erik Kundt
c02257207b
Removes assert on magic ABI functions during codegen.
2019-04-26 15:01:35 +02:00
chriseth
309d3e65cf
Merge pull request #6585 from ethereum/fixInvalidFunctionTags
...
Fix invalid function tags
2019-04-25 16:30:37 +02:00
chriseth
5b991c1e59
Fix use of uninitialized functions stored in storage.
2019-04-25 15:40:48 +02:00