@@ -7,26 +7,18 @@ use crate::{
77 bytecode:: precompiles:: Precompile ,
88 constant:: F ,
99 intermediate_bytecode:: HighLevelOperation ,
10- lang:: { boolean:: Boolean , simple_expr:: SimpleExpr } ,
10+ lang:: { boolean:: Boolean , constant_value :: ConstantValue , simple_expr:: SimpleExpr } ,
1111} ;
1212
1313pub mod boolean;
14+ pub mod constant_value;
1415pub mod function;
1516pub mod program;
1617pub mod simple_expr;
1718
1819pub type Var = String ;
1920pub type ConstMallocLabel = usize ;
2021
21- #[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
22- pub enum ConstantValue {
23- Scalar ( usize ) ,
24- PublicInputStart ,
25- PointerToZeroVector , // In the memory of chunks of 8 field elements
26- FunctionSize { function_name : Label } ,
27- Label ( Label ) ,
28- }
29-
3022#[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
3123pub enum ConstExpression {
3224 Value ( ConstantValue ) ,
@@ -392,20 +384,6 @@ impl Line {
392384 }
393385}
394386
395- impl fmt:: Display for ConstantValue {
396- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
397- match self {
398- Self :: Scalar ( scalar) => write ! ( f, "{scalar}" ) ,
399- Self :: PublicInputStart => write ! ( f, "@public_input_start" ) ,
400- Self :: PointerToZeroVector => write ! ( f, "@pointer_to_zero_vector" ) ,
401- Self :: FunctionSize { function_name } => {
402- write ! ( f, "@function_size_{function_name}" )
403- }
404- Self :: Label ( label) => write ! ( f, "{label}" ) ,
405- }
406- }
407- }
408-
409387impl fmt:: Display for ConstExpression {
410388 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
411389 match self {
0 commit comments