about summary refs log tree commit diff
path: root/compiler/rustc_mir/src
AgeCommit message (Collapse)AuthorLines
2021-05-23:facepalm:hyd-dev-1/+1
2021-05-23Pass `StackPopUnwind` to `eval_fn_call()` and some other functions that are ↵hyd-dev-26/+31
called by `eval_fn_call()`
2021-05-23"unwind" -> "unwinding"hyd-dev-1/+1
2021-05-23`Cleanup(Option<_>)` -> `Cleanup(BasicBlock), Skip`hyd-dev-6/+9
2021-05-23support creating mutable allocations from byte slicesRalf Jung-8/+19
2021-05-23avoid redundant immutability checkRalf Jung-3/+0
2021-05-23reject deallocation of read-only allocationsRalf Jung-0/+3
2021-05-23Don't evaluate `self.fn_can_unwind(...)` if `can_unwind` is already truehyd-dev-3/+4
2021-05-23Refactor `match` + `if`hyd-dev-12/+9
2021-05-23Move the callee "can unwind" check to the right placehyd-dev-38/+37
2021-05-23const-eval: disallow unwinding across functions that `!fn_can_unwind()`hyd-dev-11/+67
2021-05-22Auto merge of #85578 - RalfJung:alloc-mem-extra, r=oli-obkbors-2/+3
CTFE get_alloc_extra_mut: also provide ref to MemoryExtra This would let me use mutable references in more places in Stacked Borrows, avoiding some `RefCell` overhead. :) r? `@oli-obk`
2021-05-22Auto merge of #85078 - RalfJung:const_fn_unsize, r=oli-obkbors-38/+4
stabilize const_fn_unsize I will post a stabilization report and ask for FCP in https://github.com/rust-lang/rust/issues/64992. This PR is for the implementation side of stabilization. r? `@oli-obk` Fixes https://github.com/rust-lang/rust/issues/64992
2021-05-22CTFE get_alloc_extra_mut: also provide ref to MemoryExtraRalf Jung-2/+3
2021-05-22Add default implementation for `enforce_abi()`hyd-dev-6/+3
2021-05-22stabilize const_fn_unsizeRalf Jung-38/+4
2021-05-21Add `rustc_mir::interpret::Machine::enforce_abi()`hyd-dev-19/+29
2021-05-19CTFE Machine: do not expose AllocationRalf Jung-9/+11
2021-05-19Auto merge of #85376 - RalfJung:ptrless-allocs, r=oli-obkbors-275/+438
CTFE core engine allocation & memory API improvemenets This is a first step towards https://github.com/rust-lang/miri/issues/841. - make `Allocation` API offset-based (no more making up `Pointer`s just to access an `Allocation`) - make `Memory` API higher-level (combine checking for access and getting access into one operation) The Miri-side PR is at https://github.com/rust-lang/miri/pull/1804. r? `@oli-obk`
2021-05-18fix mplace_access_checked with forced alignmentRalf Jung-2/+3
2021-05-18add Align::ONE; add methods to access alloc.extraRalf Jung-17/+26
2021-05-18reduce number of allocation lookups during copyRalf Jung-6/+6
2021-05-18CTFE core engine allocation & memory API improvemenetsRalf Jung-260/+413
- 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-17Address review commentsJoshua Nelson-1/+1
- Simplify boolean expression - Give an example of invalid syntax - Remove explanation of why code block is text
2021-05-17New rustdoc lint to respect -Dwarnings correctlyAlexis Bourget-1/+1
This adds a new lint to `rustc` that is used in rustdoc when a code block is empty or cannot be parsed as valid Rust code. Previously this was unconditionally a warning. As such some documentation comments were (unknowingly) abusing this to pass despite the `-Dwarnings` used when compiling `rustc`, this should not be the case anymore.
2021-05-17Rollup merge of #85412 - RalfJung:c_str, r=oli-obkRalf Jung-75/+0
remove some functions that were only used by Miri and Miri does not need them any more with https://github.com/rust-lang/miri/pull/1805. r? ``@oli-obk``
2021-05-17Rollup merge of #85408 - RalfJung:alloc-size, r=oli-obkRalf Jung-13/+13
remove size field from Allocation This is a part of https://github.com/rust-lang/rust/pull/85376 that can be easily split out. r? ``@oli-obk``
2021-05-17Rollup merge of #85087 - hyd-dev:lots-of-abis, r=RalfJungRalf Jung-11/+18
`eval_fn_call`: check the ABI of `body.source` And stop checking `instance_ty.fn_sig(*self.tcx).abi()`, if the function is not an intrinsic. Addresses https://github.com/rust-lang/miri/pull/1776#discussion_r615381169. No idea how to test this without Miri...
2021-05-17Add a comment for `check_abi()`hyd-dev-0/+3
2021-05-17remove some functions that were only used by MiriRalf Jung-75/+0
2021-05-17remove size field from AllocationRalf Jung-13/+13
2021-05-17Auto merge of #85353 - jonas-schievink:async-blocks-in-ctfe, r=oli-obkbors-2/+10
Allow `async {}` expressions in const contexts Gated behind a new `const_async_blocks` feature.
2021-05-17Auto merge of #85178 - cjgillot:local-crate, r=oli-obkbors-23/+22
Remove CrateNum parameter for queries that only work on local crate The pervasive `CrateNum` parameter is a remnant of the multi-crate rustc idea. Using `()` as query key in those cases avoids having to worry about the validity of the query key.
2021-05-16Auto merge of #85332 - RalfJung:ptr-in-str, r=oli-obkbors-0/+1
CTFE validation: handle pointers in str I also finally learned how I can match *some* NOTEs in a ui test without matching all of them, and applied that to some const tests in the 2nd commit where I added NOTE because I did not know what I was doing. I can separate this into its own PR if you prefer. Fixes https://github.com/rust-lang/rust/issues/83182 r? `@oli-obk`
2021-05-16Allow `async {}` expressions in const contextsJonas Schievink-2/+10
2021-05-15handle pointers in strRalf Jung-0/+1
2021-05-15Rollup merge of #85278 - ayushmishra2005:code-refactoring, r=jackh726Guillaume Gomez-8/+2
Improve match statements
2021-05-15Rollup merge of #85246 - ayushmishra2005:minor-reactoring, r=petrochenkovGuillaume Gomez-4/+1
Miner code formatting
2021-05-15Rollup merge of #85215 - richkadel:ice-fixes-minus-dead-blocks, r=tmandryGuillaume Gomez-85/+90
coverage bug fixes and some refactoring This replaces the relevant commits (2 and 3) from PR #85082, and also corrects an error querying for coverageinfo. 1. `coverageinfo` query needs to use the same MIR as codegen I ran into an error trying to fix dead block coverage and realized the `coverageinfo` query is getting a different MIR compared to the codegenned MIR, which can sometimes be a problem during mapgen. I changed that query to use the `InstandeDef` (which includes the generic parameter substitutions, prosibly specific to const params) instead of the `DefId` (without unknown/default const substitutions). 2. Simplified body_span and filtered span code Some code cleanup extracted from future (but unfinished) commit to fix coverage in attr macro functions. 3. Spanview needs the relevant body_span used for coverage The coverage body_span doesn't always match the function body_span. r? ```@tmandry```
2021-05-14Improve match statementsayushmishra2005-8/+2
2021-05-13global_asm! consts do not depend on other itemsAmanieu d'Antras-7/+4
2021-05-13Add support for const operands and options to global_asm!Amanieu d'Antras-1/+20
On x86, the default syntax is also switched to Intel to match asm!
2021-05-13removed compilation errorayushmishra2005-1/+1
2021-05-13Miner code formattingayushmishra2005-4/+1
2021-05-12`coverageinfo` query needs to use the same MIR as codegenRich Kadel-13/+3
I ran into an error trying to fix dead block coverage and realized the `coverageinfo` query is getting a different MIR compared to the codegenned MIR, which can sometimes be a problem during mapgen. I changed that query to use the `InstandeDef` (which includes the generic parameter substitutions, prosibly specific to const params) instead of the `DefId` (without unknown/default const substitutions).
2021-05-12Simplified body_span and filtered span codeRich Kadel-68/+80
Some code cleanup extracted from future (but unfinished) commit to fix coverage in attr macro functions.
2021-05-12Spanview needs the relevant body_span used for coverageRich Kadel-8/+11
The coverage body_span doesn't always match the function body_span.
2021-05-12add check that simd_shuffle arguments are constantsRalf Jung-1/+15
2021-05-12entirely remove rustc_args_required_const attributeRalf Jung-11/+2
2021-05-12rustc_args_required_const is no longer a promotion siteRalf Jung-161/+28