Skip to content

Commit a476dda

Browse files
authored
intermediate bytecode: simplification (#16)
1 parent 2d15fee commit a476dda

File tree

7 files changed

+388
-391
lines changed

7 files changed

+388
-391
lines changed

crates/compiler/src/c_compile_final.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,6 @@ use crate::{
1515
lang::{ConstExpression, ConstantValue},
1616
};
1717

18-
impl IntermediateInstruction {
19-
const fn is_hint(&self) -> bool {
20-
match self {
21-
Self::RequestMemory { .. }
22-
| Self::Print { .. }
23-
| Self::DecomposeBits { .. }
24-
| Self::Inverse { .. } => true,
25-
Self::Computation { .. }
26-
| Self::Panic
27-
| Self::Deref { .. }
28-
| Self::JumpIfNotZero { .. }
29-
| Self::Jump { .. }
30-
| Self::Poseidon2_16 { .. }
31-
| Self::Poseidon2_24 { .. }
32-
| Self::DotProduct { .. }
33-
| Self::MultilinearEval { .. } => false,
34-
}
35-
}
36-
}
37-
3818
struct Compiler {
3919
memory_size_per_function: BTreeMap<String, usize>,
4020
label_to_pc: BTreeMap<Label, usize>,
@@ -329,6 +309,7 @@ impl IntermediateValue {
329309
_ => Err(format!("Cannot convert {self:?} to MemOrFp")),
330310
}
331311
}
312+
332313
fn try_into_mem_or_constant(&self, compiler: &Compiler) -> Result<MemOrConstant, String> {
333314
if let Some(cst) = try_as_constant(self, compiler) {
334315
return Ok(MemOrConstant::Constant(cst));

crates/compiler/src/intermediate_bytecode.rs

Lines changed: 0 additions & 360 deletions
This file was deleted.

0 commit comments

Comments
 (0)