xermicus
a07968205b
llvm-context: modularize compiler builtin functions ( #234 )
...
- Add the revive runtime function interface to minimize boiler plate
code.
- Outline heavily repeated code into dedicated functions to bring down
code size.
- The code size tests builds optimized for size.
- Function attributes are passed as slices.
This significantly brings down the code size for all OpenZeppelin wizard
contracts (using all possible features) compiled against OpenZeppelin
`v5.0.0` with size optimizations.
|contract|| `-Oz` main | `-Oz` PR || `-O3` main | `-O3` PR |
|-|-|-|-|-|-|-|
|erc1155.sol||100K|67K||114K|147K|
|erc20.sol||120K|90K||160K|191K|
|erc721.sol||128K|101K||178K|214K|
|governor.sol||226K|165K||293K|349K|
|rwa.sol||116K|85K||154K|185K|
|stable.sol||116K|86K||155K|192K|
On the flip side this introduces a heavy penalty for cycle optimized
builds. Setting the no-inline attributes for cycle optimized builds
helps a lot but heavily penalizes runtime speed (LLVM does not yet
inline everything properly - to be investigated later on).
Next steps:
- Modularize more functions
- Refactor the YUL function arguments to use pointers instead of values
- Afterwards check if LLVM still has trouble inline-ing properly on O3
or set the no-inline attribute if it does not penalize runtime
performance too bad.
2025-02-25 16:47:01 +01:00
Pavlo Khrystenko
89ec25da65
Add per file output selection for --standard-json mode and some other small foundry support bits. ( #228 )
2025-02-24 12:44:22 +01:00
xermicus
89cdfefab4
remove some dead code leftovers ( #218 )
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2025-02-19 10:41:32 +01:00
xermicus
a73b0925c6
ci: do not run bun tests ( #215 )
2025-02-17 17:04:53 +01:00
xermicus
60fc09f787
llvm-context: disable call re-entrancy for send and transfer ( #196 )
2025-02-06 16:49:50 +01:00
xermicus
157647d5c1
remove superfluous warning and clippy allows ( #194 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2025-02-05 12:44:29 +01:00
xermicus
35419e8202
solidity: update custom warnings and version validation ( #193 )
2025-02-05 11:42:35 +01:00
xermicus
ba7310fdff
integration: bugfix blob cache ( #192 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2025-02-04 12:11:25 +01:00
xermicus
8ed689e7ec
solidity: various small resolc fixes ( #189 )
2025-02-03 16:16:54 +01:00
xermicus
bfda465c32
remove support for legacy evm assembly ( #186 )
2025-02-03 14:13:43 +01:00
xermicus
ab90af49df
Solidity: add --libraries to sources ( #187 )
...
* bugfix: add libraries to sources
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2025-01-31 18:08:11 +01:00
Siphamandla Mjoli
06f43083c3
multiple resolc fixes and improvements ( #151 )
...
- Error out early on compiler invocations with invalid base path or include path flags.
- Do not error out if no files and no errors were produced. This aligns resolc closer to sloc.
- Add a CLI test with an involved fixture containing multiple contract remappings to properly testing the standard JSON path.
- Fixes input normalization in the Wasm version.
Co-authored-by: Cyrill Leutwiler <cyrill@parity.io >
2025-01-17 10:10:47 +01:00
Cyrill Leutwiler
3e7579580b
vet workspace dependencies ( #163 )
...
- Update the used workspace dependencies.
- Remove the unused workspace dependencies.
- Add the machete CI workflow.
2025-01-15 20:14:54 +01:00
Cyrill Leutwiler
3f9771f838
update and fix the linker ( #140 )
2024-12-18 23:11:06 +01:00
Cyrill Leutwiler
4e5482bad2
fix the commit sha in the version ( #129 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-12-03 12:34:17 +01:00
Cyrill Leutwiler
3f6cd115ee
update warnings ( #126 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-11-29 16:23:36 +01:00
Cyrill Leutwiler
7c00bbb0fc
remove unneeded utils ( #125 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-11-29 16:21:24 +01:00
Sebastian Miasojed
229c0d452d
Merge remote-tracking branch 'origin/main' into resolc.js
2024-11-25 10:54:44 +01:00
Sebastian Miasojed
4e024655a1
Add support for esm and cjs modules
2024-11-25 10:26:22 +01:00
Ermal Kaleci
01b5ed5ba3
Implement delegate_call ( #80 )
2024-11-23 18:05:21 +01:00
xermicus
84d47fa738
fix missing semicolon
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-11-22 16:14:07 +01:00
Cyrill Leutwiler
dbb47fd13e
experimental: support for debug info ( #118 )
...
Signed-off-by: wpt967 <matt.aw@parity.io >
Signed-off-by: xermicus <cyrill@parity.io >
2024-11-22 08:56:09 +01:00
Sebastian Miasojed
cdebf69fc0
Fix stdin support
2024-11-20 10:54:15 +01:00
Sebastian Miasojed
39e504703e
Add test with standard json args
2024-11-18 16:52:56 +01:00
Sebastian Miasojed
3072c03600
Fix parallel feature
2024-11-18 13:59:48 +01:00
Sebastian Miasojed
d88ddb25bd
Refactor soljson compiler
2024-11-18 12:19:36 +01:00
Sebastian Miasojed
87dd77b784
Remove libsolc crate
2024-11-18 11:07:45 +01:00
Sebastian Miasojed
881b88354c
Rename compiler to solc
2024-11-14 17:09:03 +01:00
Sebastian Miasojed
010a2ed223
Fmt
2024-11-14 11:44:48 +01:00
Sebastian Miasojed
ce8bf3d9ef
Apply suggestions from previous review
2024-11-14 11:20:33 +01:00
Sebastian Miasojed
94445bab93
Fix compilation for wasm target
2024-11-08 12:06:11 +01:00
Sebastian Miasojed
b6baf6cfd9
Make wasm version to compile
2024-11-08 09:54:10 +01:00
Sebastian Miasojed
b7b28efded
Update solc compiler version check
2024-11-07 15:30:00 +01:00
Sebastian Miasojed
d260472330
Fmt
2024-11-07 15:15:52 +01:00
Sebastian Miasojed
4f6debcbe3
Make native version to compaile again
2024-11-07 15:04:35 +01:00
Sebastian Miasojed
9b23e19479
Fix Cargo.toml
2024-11-07 09:43:44 +01:00
Sebastian Miasojed
88a888d138
Merge remote-tracking branch 'origin/main' into resolc.js
2024-11-06 15:04:34 +01:00
Cyrill Leutwiler
9267a2af02
use the long revive version string in the contract metadata ( #109 )
2024-10-31 14:52:06 +01:00
Cyrill Leutwiler
173ace72cb
solidity: rename the revive metadata ( #106 )
...
Rename the revive metadata fields and includes the commit hash and LLVM version in the revive version (similar to what solc does).
Signed-off-by: xermicus <cyrill@parity.io >
2024-10-31 13:00:35 +01:00
Cyrill Leutwiler
68564f9866
display the git revision version information ( #105 )
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2024-10-30 14:28:00 +01:00
Sebastian Miasojed
cc38c37481
Set evm.deployedBytecode to the value of evm.bytecode ( #95 )
2024-10-24 14:59:50 +02:00
Cyrill Leutwiler
e56feb95be
standard json output: skip serializing keys instead of emitting a null object ( #52 )
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2024-10-23 15:28:28 +02:00
Cyrill Leutwiler
f0f344a139
disable sbrk and emulate EVM linear memory internally ( #76 )
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
Signed-off-by: xermicus <cyrill@parity.io >
2024-10-14 15:20:00 +02:00
Cyrill Leutwiler
92a18460e4
support solc 0.8.28 ( #84 )
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2024-10-14 13:25:18 +02:00
Cyrill Leutwiler
49d2157a84
remove near calls
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2024-10-11 15:58:28 +02:00
Cyrill Leutwiler
e131eebf50
remove system mode and request memoization
...
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com >
2024-10-11 15:58:28 +02:00
Cyrill Leutwiler
d5d419cefc
implement immutable variables codegen ( #70 )
2024-10-10 13:33:00 +02:00
xermicus
b344e0cff5
Revert "implement immutable variables codegen"
...
This reverts commit 0e6a6d12c3 .
2024-10-09 03:43:05 +02:00
xermicus
0e6a6d12c3
implement immutable variables codegen
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-10-09 03:37:56 +02:00
Cyrill Leutwiler
77fe683f18
remove the test encoding option ( #65 )
2024-10-04 09:59:27 +02:00