beetrees
d5db933f9d
Add f16
and f128
support
2024-07-10 10:43:14 +01:00
Lukas Wirth
866102cdaf
Re-implement tidy as an xtask action
2024-07-07 09:12:16 +02:00
Lukas Wirth
b9c1c42959
Allow new clippy lint in test
2024-07-07 08:41:41 +02:00
Hamir Mahal
7c34eb3880
style: simplify string interpolation
2024-05-30 16:18:49 -07:00
6d7a
142ef764ee
fix: Check stack depth to prevent stack overflows in create_memory_map
2024-03-24 10:19:25 +01:00
6d7a
7c1be82cd9
fix: Prevent stack overflow in recursive const types
...
In the evaluation of const values of recursive types
certain declarations could cause an endless call-loop
within the interpreter (hir-ty’s create_memory_map),
which would lead to a stack overflow.
This commit adds a check that prevents values that contain
an address in their value (such as TyKind::Ref) from being
allocated at the address they contain.
The commit also adds a test for this edge case.
2024-03-21 22:57:21 +01:00
Tetsuharu Ohzeki
d580b2c7bc
hir-ty: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
Lukas Wirth
f49a2fed3f
internal: Move out WithFixture
into dev-dep only crate
2023-12-18 15:24:08 +01:00
Lukas Wirth
35620306a6
internal: Move proc-macro knowledge out of base-db
2023-12-18 12:37:18 +01:00
hkalbasi
8b82ea4f51
Store binding mode for each instance independently
2023-10-22 23:35:33 +03:30
Lukas Wirth
f13b184eb3
Implement write_via_move
intrinsic for mir-eval
2023-09-06 21:49:16 +02:00
hkalbasi
3864b43d28
Update offset intrinsic to match 1.72
2023-08-25 22:24:40 +03:30
hkalbasi
021802c59c
Support enum in memory map patch address
2023-08-09 00:27:23 +03:30
hkalbasi
31c30933cf
Support closure in clone shim
2023-08-08 01:49:34 +03:30
hkalbasi
b96e4f2f4a
Add mir lower support for tuple destructing assignment
2023-08-07 02:12:35 +03:30
hkalbasi
6990d0f26a
Fix unsized struct problems in mir eval
2023-08-02 17:36:11 +03:30
hkalbasi
bd2a8ca507
Add manual implementation of clone for tuples in mir interpreter
2023-07-28 18:52:01 +03:30
hkalbasi
17cc813e92
Support atomic fence intrinsic
2023-07-27 12:28:16 +03:30
hkalbasi
ed8e1fd472
Lookup super traits in is_dyn_method
2023-07-20 15:43:42 +03:30
hkalbasi
eb143383c3
Pass TraitEnvironment
into layout_ty
and const_eval
2023-07-20 13:08:38 +03:30
bors
8e5f944317
Auto merge of #15282 - HKalbasi:mir, r=HKalbasi
...
Give real discriminant_type to chalk
2023-07-14 16:46:35 +00:00
hkalbasi
5208bf8f55
implement type_name intrinsic
2023-07-14 16:52:36 +03:30
bors
d16d5fcf68
Auto merge of #15268 - HKalbasi:mir, r=HKalbasi
...
Add write_bytes and ctlz intrinsics
2023-07-12 23:19:30 +00:00
hkalbasi
274e8301c1
Add write_bytes and ctlz intrinsics
2023-07-12 01:14:49 +03:30
Ryo Yoshida
0312c6c321
Mark test for MIR execution limit as slow test
2023-07-11 23:36:47 +09:00
hkalbasi
59420afa46
Support getrandom syscall
2023-07-11 00:29:06 +03:30
hkalbasi
aa52cbf784
Support read_via_copy intrinsic
2023-07-09 23:17:51 +03:30
hkalbasi
4a444e768c
Implement recursion in mir interpreter without recursion
2023-07-07 15:07:29 +03:30
hkalbasi
3a1054fc1c
Replace x
with it
2023-07-06 17:33:17 +03:30
hkalbasi
171ae2ee5d
Fix size_of_val and support min_align_of_val
2023-07-06 15:41:52 +03:30
hkalbasi
6f7452882a
Fix layout of simd types and respect align in mir interpreter
2023-07-02 00:42:33 +03:30
hkalbasi
15a0da6f30
Fix overflow checking in shift operator
2023-07-01 17:16:56 +03:30
hkalbasi
302bb3c871
Fix data layout of reference to nested unsized structs
2023-06-29 23:38:13 +03:30
hkalbasi
2272803330
Fix realloc problem in allocating smaller amounts
2023-06-29 17:28:48 +03:30
hkalbasi
6d2d1387af
Fix some unsizing problems in mir
2023-06-26 01:57:12 +03:30
hkalbasi
5eb4796d3d
Support more intrinsics in mir interpreter
2023-06-23 21:08:05 +03:30
hkalbasi
99a4f2e983
Support manual impl of fn traits in mir interpreter
2023-06-22 22:24:21 +03:30
dfireBird
410ede9101
Add some tests in number evaluvation and hover to prevent regression
...
Added a test near positive extermes and two test near negative
extermes as well one for 0.
Added a test using the `as` cast and one with comparison with 0.
2023-06-22 17:58:12 +05:30
hkalbasi
a481e004b0
Lower const params with a bad id
2023-06-11 00:39:28 +03:30
hkalbasi
aab7589c40
Fix string pattern matching in mir interpreter
2023-06-02 23:45:29 +03:30
hkalbasi
a6a27a7ff8
Support floating point intrinsics in const eval
2023-06-02 17:29:17 +03:30
hkalbasi
51368793b4
MIR episode 6
2023-05-28 23:25:15 +03:30
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +02:00
hkalbasi
92d6670f72
Consider block impls in lookup_impl_assoc_item_for_trait_ref
2023-05-20 01:11:17 +03:30
hkalbasi
4adfbbfbad
partially support panic message in MirEvalError
2023-05-18 18:30:49 +03:30
bors
9ce95674e8
Auto merge of #14837 - Veykril:rustc-lexer, r=Veykril
...
Support c string literals
2023-05-18 11:55:38 +00:00
Lukas Wirth
3e528b85f9
Fix cstring literals construct &CStr not &str
2023-05-18 12:03:15 +02:00
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
bors
b7b026bce6
Auto merge of #14825 - HKalbasi:float-const-eval, r=Veykril
...
Fix evaluating negative for floating point types
fix #14704
Unary operators was missed from #14705
2023-05-18 05:22:41 +00:00