Skip to content

Commit 2e90789

Browse files
committed
fmt
1 parent b5601d2 commit 2e90789

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,17 @@ jobs:
118118
with:
119119
tools: cargo-nextest
120120
rust-cache-shared-key: "stable"
121-
- run: just e2e-ci
122121
- name: Gas snapshot diff
123122
if: github.event_name == 'pull_request'
124123
run: |
125-
git show origin/${{ github.base_ref }}:crates/e2e/.gas-snapshot > /tmp/base-gas-snapshot || true
126-
if [ -f /tmp/base-gas-snapshot ] && [ -f crates/e2e/.gas-snapshot ]; then
127-
python3 scripts/gas-diff.py /tmp/base-gas-snapshot crates/e2e/.gas-snapshot > /tmp/gas-diff.md
124+
git show origin/${{ github.base_ref }}:crates/e2e/.gas-snapshot > /tmp/base-gas-snapshot 2>/dev/null || true
125+
git show HEAD:crates/e2e/.gas-snapshot > /tmp/head-gas-snapshot 2>/dev/null || true
126+
if [ -s /tmp/base-gas-snapshot ] && [ -s /tmp/head-gas-snapshot ]; then
127+
python3 scripts/gas-diff.py /tmp/base-gas-snapshot /tmp/head-gas-snapshot > /tmp/gas-diff.md
128128
else
129129
echo "No gas snapshots to compare." > /tmp/gas-diff.md
130130
fi
131+
- run: just e2e-ci
131132
- name: Post gas diff comment
132133
if: github.event_name == 'pull_request'
133134
uses: actions/github-script@v7

crates/ir/src/mem_region.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ use crate::schema::{EvmBaseType, EvmConstant, EvmContext, EvmExpr, EvmType, RcEx
2222
/// branches of an `If` can share the same memory offsets.
2323
enum RegionScope {
2424
/// Children execute sequentially — all must be non-overlapping.
25-
Sequential(Vec<RegionScope>),
25+
Sequential(Vec<Self>),
2626
/// Children are mutually exclusive (If branches) — can share base offset.
27-
Exclusive(Vec<RegionScope>),
27+
Exclusive(Vec<Self>),
2828
/// A single memory region allocation.
2929
Leaf { region_id: i64, size_bytes: usize },
3030
}

crates/ir/src/var_opt.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,14 +2212,13 @@ fn dead_store_elim_rec(expr: &RcExpr) -> RcExpr {
22122212
// Pattern: LetBind("a", 0, LetBind("b", 0, LetBind("c", 0,
22132213
// Concat(VarStore("a", val), ...))))
22142214
// The VarStore for "a" is in the innermost body, invisible to flat scan.
2215-
forward_through_nested_letbinds(name, &new_init, &new_body)
2216-
.unwrap_or_else(|| {
2217-
if Rc::ptr_eq(&new_init, init) && Rc::ptr_eq(&new_body, body) {
2218-
Rc::clone(expr)
2219-
} else {
2220-
Rc::new(EvmExpr::LetBind(name.clone(), new_init, new_body))
2221-
}
2222-
})
2215+
forward_through_nested_letbinds(name, &new_init, &new_body).unwrap_or_else(|| {
2216+
if Rc::ptr_eq(&new_init, init) && Rc::ptr_eq(&new_body, body) {
2217+
Rc::clone(expr)
2218+
} else {
2219+
Rc::new(EvmExpr::LetBind(name.clone(), new_init, new_body))
2220+
}
2221+
})
22232222
} else if Rc::ptr_eq(&new_init, init) && Rc::ptr_eq(&new_body, body) {
22242223
Rc::clone(expr)
22252224
} else {

0 commit comments

Comments
 (0)