summary refs log tree commit diff
path: root/compiler/stable_mir/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2023-10-30Add a stable MIR visitorCelina G. Val-3/+4
Add a few utility functions as well and extend most `mir` and `ty` ADTs to implement `PartialEq` and `Eq`.
2023-10-24Remove fold code and add Const::internal()Celina G. Val-4/+0
We are not planning to support user generated constant in the foreseeable future, so we are removing the Fold logic for now in favor of the Instance::resolve logic. The Instance::resolve was however incomplete, since we weren't handling internalizing constants yet. Thus, I added that. I decided to keep the Const fields private in case we decide to translate them lazily.
2023-10-23Remove unsafe and `Rc`Celina G. Val-8/+5
2023-10-23Add method to convert internal to stable constructsCelina G. Val-26/+26
2023-10-19Add stable Instance::body() and RustcInternal traitCelina G. Val-0/+4
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-15/+28
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-13change fn name, return loc info, local nameOğuz Ağcayazı-2/+2
2023-10-11implement get_filename/lines for spanOğuz Ağcayazı-5/+12
2023-10-10Rollup merge of #116560 - ouz-a:efficient_ids, r=oli-obkGuillaume Gomez-3/+23
In smir use `FxIndexMap` to store indexed ids Previously we used `vec` for storing indexed types, which is fine for small cases but will lead to huge performance issues when we use `smir` for real world cases. Addresses https://github.com/rust-lang/project-stable-mir/issues/35 r? ``@oli-obk``
2023-10-10add new wrapper for FxIndexMapOğuz Ağcayazı-3/+23
2023-10-09return crates instead of a crateOğuz Ağcayazı-4/+4
2023-09-25Split out the stable part of smir into its own crate to prevent accidental ↵Oli Scherer-0/+242
usage of forever unstable things