- 22 8月, 2018 40 次提交
-
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
During the sanity check, we keep track of the path we are below in a `Vec`. We avoid cloning that `Vec` unless we hit a pointer indirection. The `String` representation is only computed when validation actually fails.
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
This is still roughly 45ns slower than the old state, because it now works with an MPlaceTy and uses the appropriate abstractions, instead of working with a ptr-align pair directly.
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
- The logging in step.rs becomes debug! to make it stand out a bit more - Dump value of operands (in `eval_operands`) - Try to log a bit less verbose
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the "dynamic" versions of mir::{Place, Operand}. * Operand and Place share the data for their "stuff is in memory"-base in a new type, MemPlace. This also makes it possible to give some more precise types in other areas. Both Operand and MemPlace have methods available to project into fields (and other kinds of projections) without causing further allocations. * The type for "a Scalar or a ScalarPair" is called Value, and again used to give some more precise types. * All of these have versions with an attached layout, so that we can more often drag the layout along instead of recomputing it. This lets us get rid of `PlaceExtra::Downcast`. MPlaceTy and PlaceTy can only be constructed in place.rs, making sure the layout is handled properly. (The same should eventually be done for ValTy and OpTy.) * All the high-level functions to write typed memory take a Place, and live in place.rs. All the high-level typed functions to read typed memory take an Operand, and live in operands.rs.
-
由 Ralf Jung 提交于
-
由 bors 提交于
Exec gdb/lldb in rust-{gdb/lldb} wrapper scripts This way, the process we get by executing `rust-gdb` or `rust-lldb` (eventually) is an actual `gdb` or `lldb` process and behaves accordingly. Previously (and at least to me unexpectedly) it was just a script waiting for the debugger to exit. Sending a signal (e.g. SIGINT) to the spawned process did therefore not affect the debugger process (which was just a child of the wrapper script). In order to work around that we `exec` (according to [this](http://pubs.opengroup.org/onlinepubs/009695399/utilities/exec.html) part of the posix shell) and replace the script process with the debugger in the last line of the script. The lldb script had to be modified to not pass the configuration commands via a script file (which in my opinion is cleaner anyway).
-
由 bors 提交于
Exhaustive integer matching This adds a new feature flag `exhaustive_integer_patterns` that enables exhaustive matching of integer types by their values. For example, the following is now accepted: ```rust #![feature(exhaustive_integer_patterns)] #![feature(exclusive_range_pattern)] fn matcher(x: u8) { match x { // ok 0 .. 32 => { /* foo */ } 32 => { /* bar */ } 33 ..= 255 => { /* baz */ } } } ``` This matching is permitted on all integer (signed/unsigned and char) types. Sensible error messages are also provided. For example: ```rust fn matcher(x: u8) { match x { //~ ERROR 0 .. 32 => { /* foo */ } } } ``` results in: ``` error[E0004]: non-exhaustive patterns: `32u8...255u8` not covered --> matches.rs:3:9 | 6 | match x { | ^ pattern `32u8...255u8` not covered ``` This implements https://github.com/rust-lang/rfcs/issues/1550 for https://github.com/rust-lang/rust/issues/50907. While there hasn't been a full RFC for this feature, it was suggested that this might be a feature that obviously complements the existing exhaustiveness checks (e.g. for `bool`) and so a feature gate would be sufficient for now.
-
由 varkor 提交于
-
由 bors 提交于
Auto merge of #53439 - GuillaumeGomez:generate-blanket-impls-for-reexported-items, r=QuietMisdreavus Generate blanket implementations for reexported items as well Fixes #53374. r? @QuietMisdreavus
-
由 varkor 提交于
-
由 bors 提交于
resolve: Some macro resolution refactoring Work towards completing https://github.com/rust-lang/rust/pull/50911#issuecomment-411605393 The last commit also fixes https://github.com/rust-lang/rust/issues/53269 by not using `def_id()` on `Def::Err` and also fixes https://github.com/rust-lang/rust/issues/53512.
-
由 varkor 提交于
-
由 bors 提交于
Only fetch lib_features when there are unknown feature attributes An attempt to win back some of the performance lost in https://github.com/rust-lang/rust/pull/52644#issuecomment-413761127. cc @nnethercote
-
由 bors 提交于
Rollup of 17 pull requests Successful merges: - #53030 (Updated RELEASES.md for 1.29.0) - #53104 (expand the documentation on the `Unpin` trait) - #53213 (Stabilize IP associated constants) - #53296 (When closure with no arguments was expected, suggest wrapping) - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.) - #53363 (add individual docs to `core::num::NonZero*`) - #53370 (Stabilize macro_vis_matcher) - #53393 (Mark libserialize functions as inline) - #53405 (restore the page title after escaping out of a search) - #53452 (Change target triple used to check for lldb in build-manifest) - #53462 (Document Box::into_raw returns non-null ptr) - #53465 (Remove LinkMeta struct) - #53492 (update lld submodule to include RISCV patch) - #53496 (Fix typos found by codespell.) - #53521 (syntax: Optimize some literal parsing) - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/) - #53551 (Avoid some Place clones.) Failed merges: r? @ghost
-