- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Open
Description
  
    
      stable-mir-json/src/printer.rs
    
    
        Lines 490 to 494
      in
      8c178ef
    
  
  
    
        
           
           struct TyCollector<'tcx> {  
         
        
           
               tcx: TyCtxt<'tcx>,  
         
        
           
               types: TyMap,  
         
        
           
               resolved: HashSet<stable_mir::ty::Ty>,  
         
        
           
           }  
         
    
  
stable-mir-json/src/printer.rs
Lines 490 to 494 in 8c178ef
| struct TyCollector<'tcx> { | |
| tcx: TyCtxt<'tcx>, | |
| types: TyMap, | |
| resolved: HashSet<stable_mir::ty::Ty>, | |
| } | 
TODO
- 
Emit signatures for monomorphized FnDefs
stable-mir-json/src/printer.rs
Lines 534 to 538 in 8c178ef
TyKind::RigidTy(RigidTy::FnDef(def, ref args)) => { self.resolved.insert(*ty); let instance = Instance::resolve(def, args).unwrap(); self.visit_instance(instance) } 
stable-mir-json/src/printer.rs
Lines 508 to 514 in 8c178ef
fn visit_instance(&mut self, instance: Instance) -> ControlFlow<<Self as Visitor>::Break> { let fn_abi = instance.fn_abi().unwrap(); let mut inputs_outputs: Vec<stable_mir::ty::Ty> = fn_abi.args.iter().map(|arg_abi| arg_abi.ty).collect(); inputs_outputs.push(fn_abi.ret.ty); inputs_outputs.super_visit(self) } 
The resolved argument and return types get added to the collector'sTyMap, but should we also add the type for the resolved function signature? - 
Investigate
CoroutineWitness
stable-mir-json/src/printer.rs
Lines 532 to 533 in 8c178ef
// Break on CoroutineWitnesses, because they aren't expected when getting the layout TyKind::RigidTy(RigidTy::CoroutineWitness(..)) => ControlFlow::Break(()),  - 
Investigate whether or not we're adding unmonomorphized/mir to the type map.
Look into anything offered by the compiler interface like predicates, or match/print statements we can come up with to catch anything. 
Metadata
Metadata
Assignees
Labels
No labels