Commit Graph

209 Commits

Author SHA1 Message Date
Harikrishnan Mulackal
fd02ccc68c Implemented events with indexed function as parameter in Yul 2020-09-30 12:11:39 +02:00
chriseth
2037b7d6b8
Merge pull request #9820 from ethereum/new-annotation-field-virtual
Add annotation field ``requiresVirtualLookup``
2020-09-29 15:33:54 +02:00
Mathias Baumann
8584c98b6a Add annotation field `requiresVirtualLookup` 2020-09-28 17:36:23 +02:00
chriseth
1e3596ec71 Use invalid opcode on internal errors. 2020-09-24 16:02:35 +02:00
Daniel Kirchner
976abf4715 Easy review fixes. 2020-09-17 22:13:27 +02:00
Daniel Kirchner
f4b42d1c72 Add stack limit evader. 2020-09-17 22:13:27 +02:00
chriseth
930646ba2b Report locations of unimplemented features. 2020-09-15 14:41:46 +02:00
chriseth
b1ccf73511 Store current source location in Yul IR generation. 2020-09-15 14:41:46 +02:00
Alex Beregszaszi
9aa9962f71 Add ContractDefinition::interfaceId() helper 2020-09-14 20:34:52 +01:00
chriseth
3a48be546d
Merge pull request #9602 from ethereum/structMemToStorageSol2Yul
[Sol->Yul] Implementing various copying of structs
2020-09-02 13:50:46 +02:00
Djordje Mijovic
1fab5b79fb Refactoring signature for updateStorageValueFunction 2020-09-02 12:28:53 +02:00
Djordje Mijovic
b89c863e11 [Sol->Yul] Implementing struct copying from memory to storage 2020-09-02 12:28:53 +02:00
chriseth
8f34ac472f Implement `super`. 2020-09-02 11:00:42 +02:00
Djordje Mijovic
d99b81ef02 [Sol->Yul] Enabling storage pointers to local vars in inline assembly. 2020-08-26 10:25:42 +02:00
chriseth
c34e349572 Implement checked exponentiation. 2020-08-18 12:42:53 +02:00
Jason Cobb
888d7037cd
Make FunctionCallAnnotation::kind a SetOnce 2020-08-12 11:57:01 -04:00
chriseth
147a80aa24 Rename external function slot to selector. 2020-07-23 14:19:15 +02:00
Djordje Mijovic
546e9af24d [Sol->Yul] Supporting .runtimeCode 2020-07-21 17:56:37 +02:00
chriseth
50a54fa8aa Implement inline arrays. 2020-07-20 17:06:32 +02:00
Sachin Grover
b7adb2aa42 Add SPDX license identifier if not present already in source file
Fixes: #9220
2020-07-17 20:24:12 +05:30
chriseth
0a0f578d7c Evaluate keccak256 of string literals at compile-time. 2020-07-08 16:14:14 +02:00
Mathias Baumann
50373ac1b0 Yul: Implement memory struct allocation 2020-07-02 16:37:20 +02:00
chriseth
d4e3491f35
Merge pull request #9177 from ethereum/fixYulStructMemberAccess
[Sol -> Yul] Fix struct member access for memory and implement for calldata.
2020-06-11 09:41:04 +02:00
Daniel Kirchner
90b66a7362 Fix struct member access for memory and implement for calldata. 2020-06-10 20:01:30 +02:00
Djordje Mijovic
c6e4943089 Adding fixes for signedness warnings in libsolidity
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2020-06-10 10:41:55 +02:00
chriseth
2724ce9511 Index access to fixed bytes and byte arrays. 2020-06-09 10:50:28 +02:00
chriseth
e7f3c042b6 Struct member access for storage and memory. 2020-06-03 10:37:39 +02:00
chriseth
37e8d78cff [Sol->Yul] Implement getters. 2020-06-03 10:33:37 +02:00
chriseth
0aa3fb5026
Merge pull request #9014 from ethereum/sol-yul-abidecode
[Sol - Yul] Add support for ABIDecode.
2020-05-27 11:44:13 +02:00
Kamil Śliwak
f574d8ec3a Don't assume that an expression cannot be associated with a function declaration 2020-05-27 00:05:18 +02:00
Alexander Arlt
118cb13476 [Sol - Yul] Add support for ABIDecode. 2020-05-26 13:30:37 -05:00
Kamil Śliwak
1a2e441bc5 Generate internal dispatch only for functions that might actually get called via pointers
- This also adds support for internal library calls as a side-effect since they'll now be pulled into the internal dispatch automatically.
2020-05-26 17:01:50 +02:00
Kamil Śliwak
2716b5ff83 Replace conditionally empty whiskers variables for punctuation with <?+> syntax in IRGenerator::generateInternalDispatchFunctions() 2020-05-26 16:33:40 +02:00
Kamil Śliwak
4a2ce57bed Add support for bound function calls in IR generator 2020-05-20 21:10:20 +02:00
Kamil Śliwak
a68b4ab7ed IRGeneratorForStatements: Slightly reorganize local variables in endVisit(MemberAccess)
- Add memberFunctionType accessible in the whole function to avoid declaring it multiple times
- Add objectCategory
2020-05-20 21:09:27 +02:00
Kamil Śliwak
87c598863f IRGeneratorForStatements: Remove unnecessary code for handling internal functions with arbitrary parameters
- Internal functions cannot have arbitrary parameters
2020-05-20 21:08:59 +02:00
Kamil Śliwak
0943333276 Simplify endVisit() for internal calls
- Define IRHelpers::referencedFunctionDeclaration() to avoid repeating the same dynamic_casts over and over again.
2020-05-20 21:07:37 +02:00
Kamil Śliwak
6c6a8a74e8 IRGenerationContext: Extract code for enumerating dispatchable functions from generateInternalDispatch() into a separate function 2020-05-20 13:16:08 +02:00
Kamil Śliwak
bd75543900 Add IRNames::internalDispatch() and use it in IRGenerationContext 2020-05-20 12:48:49 +02:00
Kamil Śliwak
22c0568d34 IRGenerationContext::internalDispatch(): Remove unused local YulUtilFunctions instance 2020-05-20 12:46:32 +02:00
Kamil Śliwak
7d2292fbaf Rename IRGenerationContext::internalDispatch() to generateInternalDispatchFunction() 2020-05-20 12:46:31 +02:00
Kamil Śliwak
1a521cc7ac Use YulArity in IR generator 2020-05-19 23:03:21 +02:00
Kamil Śliwak
16e58449ab ir/Common: Add YulArity struct 2020-05-19 23:03:15 +02:00
Kamil Śliwak
b0ae85b6b0 IRGenerationContext::internalDispatch(): Don't use asCallableFunction() to get internal function type 2020-05-19 18:00:50 +02:00
Djordje Mijovic
d235d0c166 [Sol->Yul] Implementing Byte array push() and pop() 2020-05-19 14:47:00 +02:00
Kamil Śliwak
465e4d4088 Extract more functions for generating function and variable names into IRNames 2020-05-15 14:51:00 +02:00
Kamil Śliwak
7af7273b60 Move static functions for constructing names from IRGenerationContext into the new Common module 2020-05-14 19:48:00 +02:00
Alexander Arlt
91e9d54c71 [Sol - Yul] Add support for ripemd160 & ecrecover. 2020-05-14 10:44:39 -05:00
Daniel Kirchner
c2f5a66a79 Implement .creationCode for Sol->Yul. 2020-05-11 18:51:51 +02:00
chriseth
c0bf529236 Support bare calls. 2020-05-11 15:11:46 +02:00