Lukas Wirth
ccff704c25
Shrink some stuff
2023-09-10 08:24:26 +02:00
bors
548d2f08e0
Auto merge of #15575 - HKalbasi:mir, r=HKalbasi
...
Intern projections in mir place
I hope this reduces mir memory usage.
2023-09-08 09:28:46 +00:00
hkalbasi
9708a29e57
Intern projections in mir place
2023-09-08 12:39:41 +03:30
Lukas Wirth
cd53bd6b8e
Remove allocation on mir eval memory write
2023-09-07 18:41:50 +02:00
bors
fc2f90e0e5
Auto merge of #15419 - HKalbasi:mir, r=HKalbasi
...
Add mir lower support for tuple destructing assignment
And some other changes in mir eval
2023-08-08 21:02:57 +00:00
hkalbasi
021802c59c
Support enum in memory map patch address
2023-08-09 00:27:23 +03:30
Ryo Yoshida
6aa03c5d15
Use Cast::cast()
instead of interning GenericArgData
2023-08-09 00:47:29 +09:00
hkalbasi
3115d6988f
Improve mir interpreter performance by caching
2023-08-04 16:05:54 +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
eb143383c3
Pass TraitEnvironment
into layout_ty
and const_eval
2023-07-20 13:08:38 +03:30
hkalbasi
e64a10fc4d
Use .kind(Interner)
instead of .data(Interner).kind
2023-07-17 20:56:31 +03:30
hkalbasi
5208bf8f55
implement type_name intrinsic
2023-07-14 16:52:36 +03:30
hkalbasi
274e8301c1
Add write_bytes and ctlz intrinsics
2023-07-12 01:14:49 +03:30
hkalbasi
59420afa46
Support getrandom syscall
2023-07-11 00:29:06 +03:30
hkalbasi
f0ba0dbe8a
Use debug impl in rendering const eval result
2023-07-08 01:07:38 +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
Lukas Wirth
69cd3c30ac
Format let-else
2023-07-03 20:34:09 +02:00
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
45828cdb54
Disable mir interpreter for targets with different pointer size from host
2023-06-30 21:21:52 +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
b8017928af
Change comparsion for checking if number is negative to include 128
...
Reason: The last byte in Little Endian representation of negative
integers start at 128 (Ox80) till 255 (OxFF). The comparison before
the fix didn't check for 128 which made is_negative variable as false.
2023-06-22 12:51:35 +05:30
hkalbasi
6fbf6ef514
Fix panic in displaying const trait objects
2023-06-10 02:10:52 +03:30
hkalbasi
08f89193b5
Fix drop scopes in mir
2023-06-04 01:03:32 +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
f9e3b180b7
Add enum, reference, array and slice to render_const_scalar
2023-06-02 13:47:02 +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
23ce228d54
Reduce MIR memory usage
2023-05-19 00:16:52 +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
fd034bea1a
Fix evaluating negative for floating point types
2023-05-17 01:27:45 +03:30
hkalbasi
cbcafd3539
MIR episode 5
2023-05-12 18:17:15 +03:30
Laurențiu Nicola
7197a27028
Use triomphe Arc
2023-05-02 20:02:43 +03:00
hkalbasi
38544f56ab
Catch overflow in shift binop evaluation
2023-05-02 12:57:34 +03:30
hkalbasi
266ceb7b4d
Fix floating point binop evaluation
2023-05-02 11:48:04 +03:30
hkalbasi
6312fbf521
MIR episode 4
2023-05-01 23:23:10 +03:30
hkalbasi
01c1b3dc71
Fix panic in const eval and parameter destructing
2023-04-24 00:49:57 +03:30
bors
2400b36a2e
Auto merge of #14577 - jsoref:spelling, r=lnicola
...
Spelling
This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling ).
The misspellings have been reported at 4699991040 (summary-12751355796)
The action reports that the changes in this PR would make it happy: 4699991284 (summary-12751356293)
closes #14567
2023-04-19 14:05:40 +00:00
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00
Lukas Wirth
0bb9a17312
internal: Move layout logic from hir-def to hir-ty
2023-04-16 12:21:12 +02:00
hkalbasi
59b6f2d9f2
Compute closure captures
2023-04-10 23:04:34 +03:30
Lukas Wirth
8ea1afce28
Simplify
2023-03-28 16:32:26 +02:00
hkalbasi
8a3ad7c3d5
Support evaluating inherent associated constants with generics
2023-03-21 02:20:30 +03:30