Camille GILLOT
c5fc2609f0
Rename rustc_mir to rustc_const_eval.
2021-09-07 20:46:26 +02:00
Ralf Jung
f4b61ba509
adjustions and cleanup to make Miri build again
2021-07-15 17:14:11 +02:00
Ralf Jung
626605cea0
consistently treat None-tagged pointers as ints; get rid of some deprecated Scalar methods
2021-07-14 18:17:49 +02:00
Ralf Jung
d4f7dd6702
CTFE/Miri engine Pointer type overhaul: make Scalar-to-Pointer conversion infallible
...
This resolves all the problems we had around "normalizing" the representation of a Scalar in case it carries a Pointer value: we can just use Pointer if we want to have a value taht we are sure is already normalized.
2021-07-14 18:17:46 +02:00
Ralf Jung
46c2286395
CTFE core engine allocation & memory API improvemenets
...
- make Allocation API offset-based (no more Pointer)
- make Memory API higher-level (combine checking for access and getting access into one operation)
2021-05-18 19:33:55 +02:00
Oli Scherer
5582b19559
Only emit a discrimiant tag for enums
2021-03-29 12:30:55 +00:00
Oli Scherer
f0997fa1e8
Update compiler/rustc_mir/src/const_eval/mod.rs
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2021-03-16 18:26:09 +01:00
Oli Scherer
0dd5a1b622
Explain pointer and dyn Trait handling in const_to_valtree
2021-03-15 12:06:52 +00:00
Oli Scherer
c01c49430c
Explain how we encode enums at the encoding site
2021-03-15 12:06:52 +00:00
Oli Scherer
f646c1e434
Explain why we do not allow const_to_valtree to read from statics
2021-03-15 12:06:52 +00:00
Oli Scherer
c51749af6e
We won't support trait object constants in type level constants for the forseeable future
2021-03-12 13:00:16 +00:00
Oli Scherer
0fe4f38769
Intern valtree field vector
2021-03-12 12:19:17 +00:00
Oli Scherer
a4fbac163e
Implement valtree
...
valtree is a version of constants that is inherently safe to be used within types.
This is in contrast to ty::Const which can have different representations of the same value. These representation differences can show up in hashing or equality comparisons, breaking type equality of otherwise equal types.
valtrees do not have this problem.
2021-03-12 12:16:14 +00:00
Tomasz Miąsko
d06a2a368d
Pass MPlaceTy by reference not value
2021-02-16 23:52:05 +01:00
Tomasz Miąsko
e915cf45dc
Pass OpTy by reference not value
2021-02-16 23:52:05 +01:00
Vishnunarayan K I
bd7229daf0
make intern_const_alloc_recursive return error fix #78655
2020-11-04 23:22:14 +05:30
Ralf Jung
18fd58e9d1
interning cleanup: we no longer need to distinguish Const and ConstInner; we no longer need the ignore_interior_mut_in_const hack
2020-10-26 08:56:54 +01:00
est31
301907497f
Remove needless alloc_slice
...
Don't invoke alloc_slice.
Arenas are temporary,
empty slices are eternal!
2020-10-14 14:23:32 +02:00
Oliver Scherer
b2532a8730
Implement destructuring for all aggregates and for references
2020-09-20 13:28:18 +02:00
Oliver Scherer
34c62e0abc
Add a query for dereferencing constants of reference type
2020-09-20 12:42:44 +02:00
LeSeulArtichaut
3e14b684dd
Change ty.kind to a method
2020-09-04 17:47:51 +02:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00