File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ impl Assembly {
259
259
let local_ty = monomorphize ( & instance, local. ty , tcx) ;
260
260
self . add_type ( local_ty, tcx, & instance) ;
261
261
}
262
+ println ! ( "Compiled method {name}" ) ;
262
263
self . add_method ( method) ;
263
264
Ok ( ( ) )
264
265
//todo!("Can't add function")
Original file line number Diff line number Diff line change @@ -324,7 +324,9 @@ impl Type {
324
324
todo ! ( "Generic fn defs unsuported!" )
325
325
}
326
326
TyKind :: Array ( element, length) => {
327
- let length = crate :: utilis:: try_resolve_const_size ( length) . unwrap ( ) ;
327
+
328
+ //TODO: array size *COULD* be generic. This is not handled yet.
329
+ let length = crate :: utilis:: try_resolve_const_size ( length) . expect ( "Generic array size." ) ;
328
330
329
331
let element = Type :: generic_from_ty ( * element, tyctx) ;
330
332
DotnetTypeRef :: array ( element, length) . into ( )
@@ -430,8 +432,8 @@ impl Type {
430
432
Self :: FnDef ( call)
431
433
}
432
434
TyKind :: Array ( element, length) => {
433
- // let length = crate::utilis::monomorphize(method, length, tyctx)
434
- let length = crate :: utilis:: try_resolve_const_size ( length) . unwrap ( ) ;
435
+ let length = crate :: utilis:: monomorphize ( method, * length, tyctx) ;
436
+ let length = crate :: utilis:: try_resolve_const_size ( & length) . unwrap ( ) ;
435
437
436
438
let element = Type :: from_ty ( * element, tyctx, method) ;
437
439
DotnetTypeRef :: array ( element, length) . into ( )
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ pub fn generic_field_ty<'ctx>(
111
111
. did ,
112
112
)
113
113
. instantiate_identity ( ) ;
114
- println ! ( "Generic field type {ty:?}" ) ;
114
+ // println!("Generic field type {ty:?}");
115
115
crate :: r#type:: Type :: from_ty ( ty, ctx, & method_instance)
116
116
}
117
117
TyKind :: Tuple ( _) => crate :: r#type:: Type :: GenericArg ( field_idx) ,
@@ -126,7 +126,7 @@ pub fn enum_tag_size(variants: u64) -> u32 {
126
126
pub fn tag_from_enum_variants ( variants : u64 ) -> crate :: r#type:: Type {
127
127
use crate :: r#type:: Type ;
128
128
let var_size = enum_tag_size ( variants) ;
129
- println ! ( "variants:{variants}tag_size:{var_size}" ) ;
129
+ // println!("variants:{variants}tag_size:{var_size}");
130
130
match var_size {
131
131
0 => Type :: Void ,
132
132
1 => Type :: U8 ,
You can’t perform that action at this time.
0 commit comments