Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
449 changes: 0 additions & 449 deletions translator/eth/src/bytecode/flow_graph/builder.rs

This file was deleted.

72 changes: 0 additions & 72 deletions translator/eth/src/bytecode/flow_graph/debug.rs

This file was deleted.

53 changes: 0 additions & 53 deletions translator/eth/src/bytecode/flow_graph/flow.rs

This file was deleted.

142 changes: 0 additions & 142 deletions translator/eth/src/bytecode/flow_graph/mapper.rs

This file was deleted.

7 changes: 0 additions & 7 deletions translator/eth/src/bytecode/flow_graph/mod.rs

This file was deleted.

2 changes: 2 additions & 0 deletions translator/eth/src/bytecode/hir/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub struct Context<'a> {
pub stack: Stack,
pub vars: Vars,
jmp_id: usize,
pub private_func: bool,
}

impl<'a> Context<'a> {
Expand All @@ -39,6 +40,7 @@ impl<'a> Context<'a> {
vars: Default::default(),
loc: Loc::new(0u128, 0u128, ()),
jmp_id: 0,
private_func: false,
}
}

Expand Down
10 changes: 10 additions & 0 deletions translator/eth/src/bytecode/hir/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ pub fn print_stmt<B: Write>(buf: &mut B, stmt: &Loc<Stmt>) -> Result<(), Error>
print_expr(buf, cnd)?;
writeln!(buf, "\nBrTrue {};", true_br)?;
}
Stmt::CallLocal(label, expr) => {
write!(buf, "call_local {}(", label)?;
for (i, arg) in expr.iter().enumerate() {
if i > 0 {
write!(buf, ", ")?;
}
print_expr(buf, arg)?;
}
writeln!(buf, ");")?;
}
}
Ok(())
}
Expand Down
8 changes: 8 additions & 0 deletions translator/eth/src/bytecode/hir/func.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::{Hir, Offset};

pub struct PrivateFunc {
pub name: Offset,
// pub params: Vec<Variable>,
// pub ret: Vec<Variable>,
pub body: Hir,
}
1 change: 1 addition & 0 deletions translator/eth/src/bytecode/hir/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub enum Stmt {
},
BrunchTrue(Expr, Label),
Brunch(Label),
CallLocal(Label, Vec<Expr>),
}

pub type Expr = Loc<_Expr>;
Expand Down
Loading