Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenArthur committed Jun 21, 2024
1 parent acacab8 commit ac54569
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions compiler/plc_driver/src/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ impl<T: SourceContainer + Sync> AnnotatedProject<T> {
literals,
&got_layout,
)?;

dbg!(module.persist_to_string());

module
.persist(
Some(&compile_directory),
Expand Down
5 changes: 3 additions & 2 deletions src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ impl<'ink> CodeGen<'ink> {
let all_names = global_index
.get_globals()
.values()
.map(|g| g.get_qualified_name())
.map(VariableIndexEntry::get_qualified_name)
.chain(program_globals)
.chain(functions)
.map(|n| n.to_lowercase());
.map(str::to_lowercase);

let all_names: Vec<_> = all_names.collect();
dbg!(all_names.len());
Expand Down Expand Up @@ -192,6 +192,7 @@ impl<'ink> CodeGen<'ink> {

// Construct our GOT as a new global array. We initialise this array in the loader code.
let got_size = new_got.keys().max().map_or(0, |m| *m + 1);
eprintln!("creating __custom_got array");
let _got = llvm.create_global_variable(
&self.module,
"__custom_got",
Expand Down

0 comments on commit ac54569

Please sign in to comment.