about summary refs log tree commit diff
path: root/compiler/rustc_smir/src/rustc_internal
AgeCommit message (Collapse)AuthorLines
2023-10-20s/Generator/Coroutine/Oli Scherer-2/+2
2023-10-19Add stable Instance::body() and RustcInternal traitCelina G. Val-0/+71
The `Instance::body()` returns a monomorphized body. For that, we had to implement visitor that monomorphize types and constants. We are also introducing the RustcInternal trait that will allow us to convert back from Stable to Internal. Note that this trait is not yet visible for our users as it depends on Tables. We should probably add a new trait that can be exposed.
2023-10-16Add MonoItems and Instance to stable_mirCelina G. Val-4/+24
Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body.
2023-10-10add new wrapper for FxIndexMapOğuz Ağcayazı-28/+38
2023-10-09spans are now indexmappedOğuz Ağcayazı-10/+8
2023-10-09alloc id is indexmappedOğuz Ağcayazı-7/+8
2023-10-09defids are indexmappedOğuz Ağcayazı-10/+15
2023-10-06Remove unnecessary `pub`.Nicholas Nethercote-1/+1
2023-09-28add RegionDefouz-a-0/+4
2023-09-25Split out the stable part of smir into its own crate to prevent accidental ↵Oli Scherer-3/+3
usage of forever unstable things
2023-09-25Move `Opaque` to `stable_mir`Oli Scherer-21/+0
2023-09-25Eliminate escape hatchOli Scherer-0/+9
2023-09-25Eliminate `with_tables` helperOli Scherer-58/+1
2023-09-14span is indexouz-a-1/+16
2023-09-10Remove EarlyErrorHandler argument from after_analysis callbackbjorn3-2/+0
It is only used by miri which can create a new one using the Session.
2023-09-05Add tests and use ControlFlowCelina G. Val-32/+27
2023-09-05SMIR: Allow users to pick if compilation continuesCelina G. Val-8/+20
Currently we stop compilation, but some users might want to keep going. This is needed for us to test against rustc tests. Other tools, such as Kani, also implements parts of their logic as a backend so it is important for compilation to continue.
2023-09-05Diferentiate between ICE and compilation errorCelina G. Val-6/+8
2023-09-05Adjust StableMIR interface to return and not crashCelina G. Val-10/+25
Invoking StableMir::run() on a crate that has any compilation error was crashing the entire process. Instead, return a `CompilerError` so the user knows compilation did not succeed. I believe ICE will also be converted to `CompilerError`. I'm also adding a return value to the callback, because I think it will be handy for users (at least it was for my current task of implementing a tool to validate stable-mir). However, if people disagree, I can remove that.
2023-09-03Auto merge of #115470 - ericmarkmartin:stable-prov, r=oli-obkbors-1/+16
add stable provenance r? `@spastorino` implements rust-lang/project-stable-mir#22
2023-09-02add stable provenanceEric Mark Martin-1/+16
2023-09-01Create a SMIR visitorOli Scherer-3/+15
2023-08-29Rollup merge of #115300 - spastorino:smir-tweaks, r=oli-obkMatthias Krüger-17/+11
Tweaks and improvements on SMIR around generics_of and predicates_of r? `@oli-obk` This allows an API like the following ... ```rust let trait_decls = stable_mir::all_trait_decls().iter().map(|trait_def| { let trait_decl = stable_mir::trait_decl(trait_def); let generics = trait_decl.generics_of(); let predicates = trait_decl.predicates_of().predicates; ``` I didn't like that much `trait_def.trait_decl()` which is it possible but adding a method to a def_id that loads up a whole trait definition looks backwards to me.
2023-08-29Create StableMir replacer for SMirCallsouz-a-0/+41
2023-08-29Index def_ids directlySantiago Pastorino-17/+1
2023-08-29Add stable_mir::DefId as new type wrapperSantiago Pastorino-6/+16
2023-08-22add generics_of to smirouz-a-0/+8
2023-08-10Add impl trait declarations to SMIRSantiago Pastorino-0/+12
2023-08-09Convert Const to Allocation in smirouz-a-0/+4
2023-08-07Convert trait declaration to SMIRSantiago Pastorino-0/+4
2023-07-24Dynamic for smirEric Mark Martin-0/+8
2023-07-22add Alias for smirEric Mark Martin-0/+8
2023-07-20Add FnPtr ty to SMIRSantiago Pastorino-0/+16
2023-07-19Add Generator to SMIRSantiago Pastorino-0/+8
2023-07-19Add Closure ty to SMIRSantiago Pastorino-0/+8
2023-07-19Add FnDef ty to SMIRSantiago Pastorino-0/+8
2023-07-18Add Foreign to SMIRSantiago Pastorino-0/+8
2023-07-13Add Adt to SMIRSantiago Pastorino-2/+14
2023-07-10Implement a few more rvalue translation to smirCelina G. Val-0/+10
- Introduce an Opaque type for adding information that is still internal to the compiler.
2023-05-08Encode types in SMIROli Scherer-1/+1
2023-05-08Create a trait to abstract over the smir APIOli Scherer-13/+32
2023-03-16Remove `DefId` from `CrateItem` in favor of a lookup tableOli Scherer-1/+18
2023-03-07Change item collection to be on demandCelina G. Val-4/+7
2023-03-06Create new rustc_smir struct to map future cratesCelina G. Val-0/+12
+ Add some information to the README.md