diff --git a/crates/bin/sierra-compile-json/src/main.rs b/crates/bin/sierra-compile-json/src/main.rs index e98b7471f11..74466305334 100644 --- a/crates/bin/sierra-compile-json/src/main.rs +++ b/crates/bin/sierra-compile-json/src/main.rs @@ -20,9 +20,6 @@ struct Args { /// Add gas usage check #[arg(long, default_value_t = false)] gas_usage_check: bool, - #[arg(long, default_value_t = false)] - /// Add pythonic hints - add_pythonic_hints: bool, } fn main() -> anyhow::Result<()> { @@ -44,9 +41,8 @@ fn main() -> anyhow::Result<()> { ) .with_context(|| "Compilation failed.")?; - let casm_cairo_program = - CasmCairoProgram::new(&sierra_program, &cairo_program, args.add_pythonic_hints) - .with_context(|| "Sierra to Casm compilation failed.")?; + let casm_cairo_program = CasmCairoProgram::new(&sierra_program, &cairo_program) + .with_context(|| "Sierra to Casm compilation failed.")?; let res = serde_json::to_string(&casm_cairo_program) .with_context(|| "Casm contract Serialization failed.")?; diff --git a/crates/cairo-lang-sierra-to-casm/src/compiler.rs b/crates/cairo-lang-sierra-to-casm/src/compiler.rs index 84092f4f59a..30260676191 100644 --- a/crates/cairo-lang-sierra-to-casm/src/compiler.rs +++ b/crates/cairo-lang-sierra-to-casm/src/compiler.rs @@ -1,7 +1,7 @@ use std::fmt::Display; use cairo_lang_casm::assembler::AssembledCairoProgram; -use cairo_lang_casm::hints::{Hint, PythonicHint}; +use cairo_lang_casm::hints::Hint; use cairo_lang_casm::instructions::{Instruction, InstructionBody, RetInstruction}; use cairo_lang_sierra::extensions::bitwise::BitwiseType; use cairo_lang_sierra::extensions::circuit::{AddModType, MulModType}; @@ -140,8 +140,6 @@ pub struct CasmCairoProgram { pub compiler_version: String, pub bytecode: Vec, pub hints: Vec<(usize, Vec)>, - #[serde(skip_serializing_if = "skip_if_none")] - pub pythonic_hints: Option)>>, pub entry_points_by_function: OrderedHashMap, } @@ -175,7 +173,6 @@ impl CasmCairoProgram { pub fn new( sierra_program: &Program, cairo_program: &CairoProgram, - add_pythonic_hints: bool, ) -> Result { let replacer = CanonicalReplacer::from_program(&sierra_program); let sierra_program = &replacer.apply(&sierra_program); @@ -196,18 +193,6 @@ impl CasmCairoProgram { }) .collect(); - let pythonic_hints = match add_pythonic_hints { - true => Some( - hints - .iter() - .map(|(pc, hints)| { - (*pc, hints.iter().map(|hint| hint.get_pythonic_hint()).collect_vec()) - }) - .collect_vec(), - ), - false => None, - }; - let builtin_types = UnorderedHashSet::::from_iter([ RangeCheckType::id(), BitwiseType::id(), @@ -309,14 +294,7 @@ impl CasmCairoProgram { (function_name, CasmCairoEntryPoint { offset, builtins, input_args, return_arg }) })); - Ok(Self { - prime, - compiler_version, - bytecode, - hints, - pythonic_hints, - entry_points_by_function, - }) + Ok(Self { prime, compiler_version, bytecode, hints, entry_points_by_function }) } }