Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move error printout to the end (after code dump) #43

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circuit_passes/src/bucket_interpreter/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl<'a> Env<'a> {
observe: bool,
) -> Value {
if cfg!(debug_assertions) {
println!("Running {}", name);
println!("Running function {}", name);
}
let code = &self.functions_library[name].body;
let mut function_env =
Expand Down
2 changes: 1 addition & 1 deletion circuit_passes/src/passes/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl PassMemory {
pub fn run_template(&self, observer: &dyn InterpreterObserver, template: &TemplateCode) {
assert!(!self.current_scope.is_empty());
if cfg!(debug_assertions) {
println!("Running {}", self.current_scope);
println!("Running template {}", self.current_scope);
}
let interpreter = self.build_interpreter(observer);
let env = Env::new(&self.templates_library, &self.functions_library, self);
Expand Down
10 changes: 3 additions & 7 deletions code_producers/src/llvm_elements/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ pub trait BodyCtx<'a> {
index: IntValue<'a>,
) -> AnyValueEnum<'a>;

fn get_variable_array(
&self,
producer: &dyn LLVMIRProducer<'a>,
) -> AnyValueEnum<'a>;
fn get_variable_array(&self, producer: &dyn LLVMIRProducer<'a>) -> AnyValueEnum<'a>;
}

pub trait LLVMIRProducer<'a> {
Expand All @@ -63,7 +60,6 @@ pub trait LLVMIRProducer<'a> {

pub type IndexMapping = HashMap<usize, Range<usize>>;


#[derive(Default, Eq, PartialEq, Debug)]
pub struct LLVMCircuitData {
pub field_tracking: Vec<String>,
Expand Down Expand Up @@ -294,13 +290,13 @@ impl<'a> LLVM<'a> {
}
// Run module verification
self.module.verify().map_err(|llvm_err| {
eprintln!("Generated LLVM:");
self.module.print_to_stderr();
eprintln!(
"{}: {}",
Colour::Red.paint("LLVM Module verification failed"),
llvm_err.to_string()
);
eprintln!("Generated LLVM:");
self.module.print_to_stderr();
})?;
// Verify that bitcode can be written, parsed, and re-verified
{
Expand Down