Daniel Kirchner
bc288aacf5
Have the stack optimization in the code transform only reuse slots that are reachable and fix argument slot reuse on functions without return variables.
2021-06-28 18:11:57 +02:00
chriseth
0df8a38e55
Support metadata via IR.
2021-06-21 18:20:31 +02:00
chriseth
fe35512feb
Remove EVMAssembly.
2021-06-08 18:41:22 +02:00
TerranCivilian
c15501eea9
Remove unneeded include files
2021-06-07 12:53:18 -04:00
chriseth
f9c94d7c42
Note function entry points.
2021-05-04 17:15:13 +02:00
Djordje Mijovic
e404b6e7a6
Refactoring yul source locations.
2021-05-04 16:05:23 +02:00
Alex Beregszaszi
176ce4edf7
Split EthAssemblyAdapter from AsmCodeGen
2021-04-27 11:31:15 +01:00
chriseth
cb1af8b88a
Make verbatim compatible with KnownState.
2021-04-26 19:56:44 +02:00
chriseth
e2d8005737
Add verbatim builtin.
2021-04-26 19:56:44 +02:00
hrkrshnn
011f8d3ff7
Changed the type of gas calculation to bigint instead of size_t
...
Since the gas calculation can involve multiplication by ``--optimize-runs``, it is possible that
`size_t` is not enough to represent the total gas.
2021-04-22 18:19:47 +02:00
hrkrshnn
94f9410abe
Added hashFunction to Dialect. For EVMDialect, it is keccak256
...
In a later PR, the functions `storageLoadFunction`, `storageStoreFunctions`, etc will be refactored
to return a YulString instead of a pointer to a BuiltinFunction.
2021-04-22 17:27:57 +02:00
hrkrshnn
dd6300a53e
GasMeter can now account for gas of Keccak-256
2021-04-22 17:27:57 +02:00
Daniel Kirchner
5bebbca273
Extract VariableReferenceCounter and StackTooDeep error from EVMCodeTransform.
2021-04-13 10:41:16 +02:00
Daniel Kirchner
35c2eeab68
Restrict to only popping, but not reusing argument slots, as well as only freeing up until the return slots are allocated.
2021-04-06 13:38:06 +02:00
Daniel Kirchner
4b0f8383a6
Reuse function argument slots and defer allocation of return variable slots in EVMCodeTransform.
2021-04-06 13:38:05 +02:00
anurag4u80
bbcdddeed9
Replaced keys, values and reverse with ranges
2021-03-31 23:33:04 +05:30
hrkrshnn
6d9e9e1b1e
Fix small bug in GasMeter calculation in creation context
...
Old calculation did not ignore `optimize-runs` parameter, when creation code gas computations were
done. This would lead to expanding values such as `shl(180, 1)` inside constructor code, even for
the default value for `--optimize-runs`, i.e., 200.
2021-03-17 12:33:10 +01:00
Daniel Kirchner
a75424eec4
Drop support for evm15 and eip-615.
2021-03-09 15:56:03 +01:00
Mathias Baumann
e4f1257c83
Yul Backend: Get rid of heuristics for finding the matching runtime
2021-02-09 14:50:25 +01:00
Alex Beregszaszi
0425936c8a
Rename AsmScope* to Scope*
2020-12-18 11:55:17 +00:00
Alex Beregszaszi
9230faf9a3
Simplify StackTooDeepError in Yul
2020-12-16 20:35:11 +00:00
Alex Beregszaszi
3a687c34e4
Add reservedIdentifier to dialect
2020-12-10 17:10:38 +01:00
chriseth
806453aca9
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-08 21:00:09 +01:00
Alex Beregszaszi
7e88ba8da0
Enable the -Wconversion warning
2020-12-08 16:45:24 +00:00
chriseth
329b8f2a60
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-07 13:04:14 +01:00
Daniel Kirchner
96a50b52e2
Add storage load/store functions to Yul dialect.
2020-12-03 19:10:05 +01:00
chriseth
9a5902f9d7
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-02 12:28:02 +01:00
Alex Beregszaszi
a22077f736
Rename AsmData -> AST
...
Also attempt to only include ASTForward where appropriate.
2020-11-25 17:58:02 +00:00
chriseth
bfd267459c
Panic codes.
2020-10-22 19:25:55 +02:00
Daniel Kirchner
0dca223b45
Add another argument to setimmutable and the AssignImmutable opcode, allowing to modify code at any memory offset.
2020-10-15 18:14:41 +02:00
Daniel Kirchner
f3c2d6cfdc
Move memory load and store functions to the dialect.
2020-09-17 22:13:27 +02:00
Daniel Kirchner
f4b42d1c72
Add stack limit evader.
2020-09-17 22:13:27 +02:00
Harikrishnan Mulackal
d166c2540a
Fix typo block
2020-09-07 17:24:03 +02:00
Harikrishnan Mulackal
3cbe65e4f3
Refactor SideEffects struct
2020-08-18 14:53:59 +02:00
Alex Beregszaszi
f6a57af809
Add LiteralKind to Dialect.literalArguments
...
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
2020-08-05 11:37:00 +01:00
Alex Beregszaszi
24bb6252ac
Merge Parser::instructions() into EVMDialect
2020-07-29 13:15:54 +01:00
chriseth
b1f79072df
Fix stack compressor wrt literal arguments.
2020-07-23 14:03:51 +02:00
Djordje Mijovic
6f97e6153c
[yul] Adding support for accessing subobjects via .
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2020-07-21 17:56:11 +02:00
chriseth
1c9179683e
Merge pull request #9433 from ethereum/reportAllStackErrors
...
Report all stack errors
2020-07-20 15:44:51 +02:00
chriseth
f5d8636d28
Document variableHeightDiff.
2020-07-20 15:44:29 +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
Daniel Kirchner
92cd1ddb7d
Add markAsInvalid to the various assemblies.
2020-07-16 17:38:13 +02:00
Daniel Kirchner
579e4b5a69
Report all stack errors in the EVM code transform.
2020-07-16 17:38:04 +02:00
Alex Beregszaszi
870ea98c21
Prefix EIP-615 opcodes with EIP615 in Instructions
2020-07-13 17:34:19 +01:00
Daniel Kirchner
def0ebbb3e
Free variables directly after visiting RHS of Variable Declarations during EVMCodeTransform.
2020-07-13 17:36:15 +02:00
Djordje Mijovic
547590b972
Fixing additional signedness errors after adding -Wsign-conversion flag
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2020-07-09 17:22:45 +02:00
chriseth
4d2b9cd38f
Jump types for yul functions.
2020-07-06 18:12:54 +02:00
Alex Beregszaszi
55e41b602a
Explicitly check for jump instructions in EVMDialect
2020-07-06 14:46:24 +01:00
Daniel Kirchner
8c5fce5b31
Merge pull request #9304 from ethereum/yul-assert
...
Only use yulAssert and not solAssert in libyul
2020-07-03 19:00:14 +02:00
Alex Beregszaszi
4c7c7c0270
Only use yulAssert and not solAssert in libyul
2020-07-03 15:46:50 +01:00