clean inliner
This commit is contained in:
parent
c01cc25c51
commit
156ff24306
1 changed files with 9 additions and 31 deletions
|
@ -15,16 +15,17 @@
|
||||||
// ```
|
// ```
|
||||||
//
|
//
|
||||||
// Becomes
|
// Becomes
|
||||||
// ```
|
// inputs: [a]
|
||||||
// # Call foo::<42> with a_0 := x
|
// arguments: [x]
|
||||||
// n_0 = 42
|
// generics_bindings: [n = 42]
|
||||||
// a_1 = a_0
|
// statements:
|
||||||
// n_1 = n_0
|
// n = 42
|
||||||
// # Pop call with #CALL_RETURN_AT_INDEX_0_0 := a_1
|
// a = a
|
||||||
|
// n = n
|
||||||
|
// return_expression: a
|
||||||
|
|
||||||
// Notes:
|
// Notes:
|
||||||
// - The body of the function is in SSA form
|
// - The body of the function is *not* in SSA form
|
||||||
// - The return value(s) are assigned to internal variables
|
|
||||||
|
|
||||||
use zokrates_ast::common::FlatEmbed;
|
use zokrates_ast::common::FlatEmbed;
|
||||||
use zokrates_ast::typed::types::{ConcreteGenericsAssignment, IntoType};
|
use zokrates_ast::typed::types::{ConcreteGenericsAssignment, IntoType};
|
||||||
|
@ -165,12 +166,6 @@ pub fn inline_call<'a, 'ast, T: Field, E: Expr<'ast, T>>(
|
||||||
|
|
||||||
assert_eq!(f.arguments.len(), arguments.len());
|
assert_eq!(f.arguments.len(), arguments.len());
|
||||||
|
|
||||||
// let ssa_f = ShallowTransformer::transform(f, &assignment, versions);
|
|
||||||
|
|
||||||
// let ssa_f = f;
|
|
||||||
|
|
||||||
// let call_log = TypedStatement::PushCallLog(decl.key.clone(), assignment.clone());
|
|
||||||
|
|
||||||
let generics_bindings: Vec<_> = assignment
|
let generics_bindings: Vec<_> = assignment
|
||||||
.0
|
.0
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
@ -205,23 +200,6 @@ pub fn inline_call<'a, 'ast, T: Field, E: Expr<'ast, T>>(
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
|
|
||||||
// let v: ConcreteVariable<'ast> = ConcreteVariable::new(
|
|
||||||
// Identifier::from(CoreIdentifier::Call(0)).version(
|
|
||||||
// *versions
|
|
||||||
// .entry(CoreIdentifier::Call(0))
|
|
||||||
// .and_modify(|e| *e += 1) // if it was already declared, we increment
|
|
||||||
// .or_insert(0),
|
|
||||||
// ),
|
|
||||||
// *inferred_signature.output.clone(),
|
|
||||||
// false,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// let expression = TypedExpression::from(Variable::from(v.clone()));
|
|
||||||
|
|
||||||
// let output_binding = TypedStatement::definition(Variable::from(v).into(), return_expression);
|
|
||||||
|
|
||||||
// let pop_log = TypedStatement::PopCallLog;
|
|
||||||
|
|
||||||
Ok((
|
Ok((
|
||||||
input_variables,
|
input_variables,
|
||||||
arguments,
|
arguments,
|
||||||
|
|
Loading…
Reference in a new issue