Skip to content

Commit

Permalink
Back out further small changes that aren't needed
Browse files Browse the repository at this point in the history
  • Loading branch information
prozacchiwawa committed Oct 18, 2023
1 parent 89ddca5 commit 9181d18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/classic/clvm_tools/clvmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pub fn compile_clvm_text_maybe_opt(
) -> Result<NodePtr, EvalErr> {
let ir_src = read_ir(text).map_err(|s| EvalErr(allocator.null(), s.to_string()))?;
let assembled_sexp = assemble_from_ir(allocator, Rc::new(ir_src))?;

let dialect = detect_modern(allocator, assembled_sexp);
// Now the stepping is optional (None for classic) but we may communicate
// other information in dialect as well.
Expand All @@ -60,8 +61,8 @@ pub fn compile_clvm_text_maybe_opt(
let runner = Rc::new(DefaultProgramRunner::new());
let opts = opts
.set_dialect(dialect)
.set_optimize(do_optimize)
.set_frontend_opt(stepping > 21);
.set_optimize(do_optimize || stepping > 22) // Would apply to cl23
.set_frontend_opt(stepping == 22);

let unopt_res = compile_file(allocator, runner.clone(), opts.clone(), text, symbol_table);
let res = unopt_res.and_then(|x| {
Expand Down
5 changes: 2 additions & 3 deletions src/compiler/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,14 @@ fn rename_in_bodyform(
&letdata.bindings,
)?;
let new_body = rename_in_bodyform(namemap, letdata.body.clone())?;
let res = BodyForm::Let(
Ok(BodyForm::Let(
kind.clone(),
Box::new(LetData {
bindings: new_bindings,
body: Rc::new(new_body),
..*letdata.clone()
}),
);
Ok(res)
))
}

BodyForm::Quoted(atom) => match atom {
Expand Down

0 comments on commit 9181d18

Please sign in to comment.