Skip to content

Commit

Permalink
WIP: try fixing default methods
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickpeterse committed Dec 13, 2024
1 parent 8549788 commit b43ef93
Show file tree
Hide file tree
Showing 6 changed files with 530 additions and 197 deletions.
6 changes: 4 additions & 2 deletions compiler/src/llvm/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ use std::thread::scope;
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
use types::module_name::ModuleName;
use types::{
ClassId, Database, Intrinsic, Shape, TypeRef, BYTE_ARRAY_ID, STRING_ID,
ClassId, Database, Intrinsic, Shape, TypeRef, TypeSpecializationKey,
BYTE_ARRAY_ID, STRING_ID,
};

const NIL_VALUE: bool = false;
Expand Down Expand Up @@ -842,8 +843,9 @@ impl<'shared, 'module, 'ctx> LowerModule<'shared, 'module, 'ctx> {
),
};

let key = TypeSpecializationKey::new(vec![shape]);
let class_id = ClassId::array()
.specializations(&self.shared.state.db)[&vec![shape]];
.specializations(&self.shared.state.db)[&key];
let layout = self.layouts.instances[class_id.0 as usize];
let array = builder.allocate_instance(
self.module,
Expand Down
Loading

0 comments on commit b43ef93

Please sign in to comment.