Commit graph

27 commits

Author SHA1 Message Date
hkalbasi
eb143383c3 Pass TraitEnvironment into layout_ty and const_eval 2023-07-20 13:08:38 +03:30
hkalbasi
50559118fb Give real discriminant_type to chalk 2023-07-14 20:15:18 +03:30
hkalbasi
6f7452882a Fix layout of simd types and respect align in mir interpreter 2023-07-02 00:42:33 +03:30
hkalbasi
302bb3c871 Fix data layout of reference to nested unsized structs 2023-06-29 23:38:13 +03:30
hkalbasi
6d2d1387af Fix some unsizing problems in mir 2023-06-26 01:57:12 +03:30
hkalbasi
a481e004b0 Lower const params with a bad id 2023-06-11 00:39:28 +03:30
hkalbasi
51368793b4 MIR episode 6 2023-05-28 23:25:15 +03:30
bors
034d7c8537 Auto merge of #14787 - HKalbasi:mir2, r=HKalbasi
MIR episode 5

This PR inits drop support (it is very broken at this stage, some things are dropped multiple time, drop scopes are wrong, ...) and adds stdout support (`println!` doesn't work since its expansion is dummy, but `stdout().write(b"hello world\n")` works if you use `RA_SYSROOT_HACK`) for interpreting. There is no useful unit test that it can interpret yet, but it is a good sign that it didn't hit a major road block yet.

In MIR lowering, it adds support for slice pattern and anonymous const blocks, and some fixes so that we can evaluate `SmolStr::new_inline` in const eval. With these changes, 57 failed mir body remains.
2023-05-18 09:44:26 +00:00
hkalbasi
261047d019 Fix layout for hir_ty::Ty and friends 2023-05-18 11:29:03 +03:30
hkalbasi
cbcafd3539 MIR episode 5 2023-05-12 18:17:15 +03:30
hkalbasi
aafe9b1e06 Lazy evaluate consts in path_to_const 2023-05-05 01:17:11 +03:30
hkalbasi
6312fbf521 MIR episode 4 2023-05-01 23:23:10 +03:30
Lukas Wirth
0bb9a17312 internal: Move layout logic from hir-def to hir-ty 2023-04-16 12:21:12 +02:00
hkalbasi
a584cb998f Infer types of nested RPITs 2023-04-11 04:32:11 +03:30
hkalbasi
59b6f2d9f2 Compute closure captures 2023-04-10 23:04:34 +03:30
hkalbasi
61ad6a96ad Add BindingId 2023-03-06 21:09:08 +03:30
hkalbasi
cd67589f63 beginning of MIR 2023-02-27 23:45:54 +03:30
hkalbasi
40cf8b45ac reuse fetching target data layout from rustc function 2023-02-06 23:48:20 +03:30
hkalbasi
443bc7f193 Support layout of RPIT 2023-02-06 20:50:25 +03:30
Daniel Eades
efd2c20e96 remove useless conversions 2023-01-02 15:02:54 +00:00
Daniel Eades
cc80c5bd07 remove unnecessary lazy evaluations 2023-01-02 15:02:54 +00:00
Daniel Eades
ed128872eb remove needless borrows 2023-01-02 14:52:32 +00:00
Lukas Wirth
a694c342fa Fix tests not using appropriate target data 2022-12-21 20:23:43 +01:00
Lukas Wirth
33591cd3f4 Calculate the TargetDataLayout correctly for the selected target 2022-12-21 15:11:24 +01:00
hkalbasi
05906da0ec use rustc crates instead of copy paste 2022-12-07 01:59:38 +03:30
hkalbasi
f2c9502185 support nonzero* niche optimizations 2022-12-04 00:29:34 +03:30
hkalbasi
86b5b609f1 Compute data layout of types 2022-12-04 00:29:34 +03:30