Commit Graph

123 Commits

Author SHA1 Message Date
Alexander Arlt
3e98d49b3e Add explicit std:: namespace. 2023-07-12 18:13:35 +02:00
Alexander Arlt
c5de882bbb [libevmasm] EVM Assembly JSON Import: add support for sub-object index. 2023-07-12 18:11:42 +02:00
Alexander Arlt
2ffa8aa57a [libevmasm] EVM Assembly JSON Export: add subobject index. 2023-07-12 17:48:48 +02:00
Alexander Arlt
49a0948d92 [test] import/export: Add simple yul reimport bytecode equivalance test. 2023-07-12 17:48:48 +02:00
Alexander Arlt
b0d65f83ce [libevmasm] EVM Assembly import: Fix sub-assembly object import. 2023-07-12 17:48:48 +02:00
Alexander Arlt
a9b56ef5ff [evmasm::Assembly] Fix createAssemblyItemFromJSON value check: no value on c_instructions. 2023-07-12 17:48:48 +02:00
Alexander Arlt
024f55165a [evmasm::Assembly] Fix createAssemblyItemFromJSON VERBATIM value check. 2023-07-12 17:48:48 +02:00
Alexander Arlt
14304b7d75 [evmasm::Assembly] Fix SourceLocation::sourceName shared_ptr creation. 2023-07-12 17:48:48 +02:00
Alexander Arlt
98944cba5b [libevmasm] Remove m_sourceList member from Assembly class. 2023-07-12 17:48:48 +02:00
Alexander Arlt
108490e630 [libevmasm] Add support to import evm assembly json. 2023-07-12 17:48:48 +02:00
Nikola Matic
a9c8b4b4d1 Purge using namespace std 2023-07-10 13:12:46 +02:00
Alexander Arlt
2f78e9549a Misc small refactors: Superfluous std::, trailing commas in lists, whitespace, missing breaks, import order 2023-04-20 19:53:48 +02:00
hrkrshnn
0bfcdaf794 feat: change generation of bytecode for pushes with zero-value 2023-04-12 00:10:24 +02:00
Daniel Kirchner
4064116df4 Do not duplicate subassemblies.
Add LinkerObject check and more tests
2023-02-20 22:20:45 +01:00
Rodrigo Q. Saramago
ef6ff2f055
Adds support for the EVM version "Paris".
Deprecates `block.difficulty` and disallow `difficulty()` in inline assembly for EVM versions >= paris.
The change is due to the renaming introduced by EIP-4399 (see: https://eips.ethereum.org/EIPS/eip-4399).
Introduces `block.prevrandao` in Solidity and `prevrandao()` in inline assembly for EVM versions >= paris.

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: matheusaaguiar <95899911+matheusaaguiar@users.noreply.github.com>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-01-23 18:50:36 +00:00
Alexander Arlt
b7abcb25ae [libevmasm] Add Assembly::OptimiserSettings::translateSettings. 2022-10-26 14:11:59 +02:00
Marenz
f7cc29bec1 Add std:: qualifier to move() calls 2022-08-30 11:12:15 +02:00
Alexander Arlt
1a0988e503 libevmasm: refactor asm-json export & add support for source list. 2022-03-23 15:58:07 -05:00
Daniel Kirchner
e0c837b33b Remove isCreation flag from OptimiserSettings. 2022-03-09 17:53:28 +01:00
Daniel Kirchner
ce0a3e93f2 Store whether an evmasm Assembly is creation code. 2022-03-09 17:42:29 +01:00
Daniel Kirchner
06820e1b1e Remove unused entry point to evmasm Assembly. 2022-03-07 12:14:08 +01:00
Christian Parpart
b1dd0d0d02 Properly compute source mappings for immutables. 2021-10-12 17:56:17 +02:00
Kamil Śliwak
f7c4ed849d Handle DebugInfoSelection in the code printing Yul and EVM assembly 2021-10-11 20:34:48 +02:00
Alex Beregszaszi
3c8846e669
Merge pull request #11976 from ethereum/json-cleanup
Some cleanup and testing for JSON
2021-09-24 19:03:45 +01:00
chriseth
1531863835 Split Common.h into Numeric.h. 2021-09-23 15:27:29 +02:00
chriseth
c8e6ef9657
Merge pull request #12004 from ethereum/disambiguateBytesRequired
Disambiguate bytesRequired
2021-09-23 15:25:44 +02:00
chriseth
50ce1f5ddd Disambiguate bytesRequired 2021-09-22 11:22:07 +02:00
chriseth
2741175507 Use function debug data. 2021-09-22 11:11:51 +02:00
Alex Beregszaszi
55c64e3ca1 Always explicitly initialise Json objects 2021-09-21 10:49:13 +01:00
Alexander Arlt
7fcf888fbf Remove unused AssemblyItemType::PushString. 2021-09-13 18:59:18 +02:00
chriseth
55bb53c9de
Merge pull request #11912 from ethereum/refactorSourcePrinting
Refactor source printing
2021-09-08 14:07:07 +02:00
Kamil Śliwak
a7612ce873 Move the function for creating code snippets used next to source locations in assembly to liblangutil 2021-09-07 17:18:22 +02:00
chriseth
3fe52d9869 Run the optimizer only once. 2021-09-07 15:06:31 +02:00
Kamil Śliwak
6753c8f624 Rename escapeAndQuoteYulString() back to escapeAndQuoteString() 2021-07-14 21:29:01 +02:00
chriseth
f75b55071e Remove CharStream from SourceLocation. 2021-07-14 15:12:07 +02:00
chriseth
f9c94d7c42 Note function entry points. 2021-05-04 17:15:13 +02:00
chriseth
e2d8005737 Add verbatim builtin. 2021-04-26 19:56:44 +02:00
Daniel Kirchner
cb74a45fd6 Add inlining for old optimizer. 2021-02-09 19:08:58 +01:00
Alex Beregszaszi
97173247c0 Improve the Error class with a constructor for secondaryLocation
Remove occurances of Error construction using the boost helpers.
2020-12-17 13:50:04 +00: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
e93a84ccd4 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-28 18:19:31 +01:00
Alex Beregszaszi
e5faea5f35 Make use of pushInstruction() helper in libevmasm 2020-10-28 10:11:54 +00:00
Daniel Kirchner
68667f0e84 Remove POPs from ASSIGNIMMUTABLE generated bytecode, if possible. 2020-10-15 18:14:41 +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
a3d4
5b54cfbed3 Report an error if immutables not assigned 2020-07-23 16:38:54 +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
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