Skip to content

Commit 2003385

Browse files
committed
Optimize ABI decode_from paths
1 parent 16a6072 commit 2003385

6 files changed

Lines changed: 367 additions & 23 deletions

File tree

crates/fe/tests/differential_deposit/gas_report.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ expression: report
55
bytecode size
66
path fe-O2 sol sol-IR fe vs sol-IR
77
------------------------------------------------------------
8-
init 5248 4819 3082 +2166 (+70.3%)
9-
runtime 5064 4445 2844 +2220 (+78.1%)
8+
init 5202 4819 3082 +2120 (+68.8%)
9+
runtime 5038 4445 2844 +2194 (+77.1%)
1010

1111
deployment gas
1212
path fe-O2 sol sol-IR fe vs sol-IR
1313
-------------------------------------------------------------
14-
deploy 1843145 1738847 1379411 +463734 (+33.6%)
14+
deploy 1838070 1738847 1379411 +458659 (+33.3%)
1515

1616
call gas
1717
path fe-O2 sol sol-IR fe vs sol-IR
@@ -21,13 +21,13 @@ supportsInterface(deposit) 21672 21641 21600 +72 (+0.3%)
2121
supportsInterface(unknown) 21659 21641 21600 +59 (+0.3%)
2222
get_deposit_root(empty) 107906 117558 109178 -1272 (-1.2%)
2323
get_deposit_count(empty) 23774 24510 24099 -325 (-1.3%)
24-
deposit#0 82969 84626 81089 +1880 (+2.3%)
24+
deposit#0 82287 84626 81089 +1198 (+1.5%)
2525
get_deposit_root(after#0) 107919 117570 109174 -1255 (-1.1%)
2626
get_deposit_count(after#0) 23774 24510 24099 -325 (-1.3%)
27-
deposit#1 68411 70411 66629 +1782 (+2.7%)
27+
deposit#1 67729 70411 66629 +1100 (+1.7%)
2828
get_deposit_root(after#1) 107919 117570 109174 -1255 (-1.1%)
2929
get_deposit_count(after#1) 23774 24510 24099 -325 (-1.3%)
30-
deposit#2 48757 50414 46877 +1880 (+4.0%)
30+
deposit#2 48075 50414 46877 +1198 (+2.6%)
3131
get_deposit_root(after#2) 107932 117582 109170 -1238 (-1.1%)
3232
get_deposit_count(after#2) 23774 24510 24099 -325 (-1.3%)
33-
TOTAL 791884 838656 792487 -603 (-0.1%)
33+
TOTAL 789838 838656 792487 -2649 (-0.3%)

crates/uitest/fixtures/ty_check/error_unsupported_field_type.snap

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/uitest/tests/ty_check.rs
3+
assertion_line: 27
34
expression: diags
45
input_file: fixtures/ty_check/error_unsupported_field_type.fe
56
---
@@ -21,9 +22,9 @@ error[6-0003]: trait bound is not satisfied
2122
6 │ │ }
2223
│ ╰─^ `StorageMap<Address, u256, 0>` doesn't implement `AbiSize`
2324
24-
┌─ src/abi.fe:226:32
25+
┌─ src/abi.fe:235:32
2526
26-
226pub fn dynamic_payload_size<T: AbiSize>(_ value: T) -> u256 {
27+
235pub fn dynamic_payload_size<T: AbiSize>(_ value: T) -> u256 {
2728
------- required by this bound on `dynamic_payload_size`
2829

2930
error[6-0003]: trait bound is not satisfied
@@ -35,9 +36,9 @@ error[6-0003]: trait bound is not satisfied
3536
6 │ │ }
3637
│ ╰─^ `StorageMap<Address, u256, 0>` doesn't implement `Encode<Sol>`
3738
38-
┌─ src/abi.fe:313:14
39+
┌─ src/abi.fe:322:14
3940
40-
313where T: Encode<A> + AbiSize, E: AbiEncoder<A>
41+
322where T: Encode<A> + AbiSize, E: AbiEncoder<A>
4142
│ --------- required by this bound on `encode_field`
4243

4344
error[6-0003]: trait bound is not satisfied
@@ -49,7 +50,7 @@ error[6-0003]: trait bound is not satisfied
4950
6 │ │ }
5051
│ ╰─^ `StorageMap<Address, u256, 0>` doesn't implement `AbiSize`
5152
52-
┌─ src/abi.fe:313:26
53+
┌─ src/abi.fe:322:26
5354
54-
313 │ where T: Encode<A> + AbiSize, E: AbiEncoder<A>
55+
322 │ where T: Encode<A> + AbiSize, E: AbiEncoder<A>
5556
│ ------- required by this bound on `encode_field`

0 commit comments

Comments
 (0)