1. 12 12月, 2020 3 次提交
  2. 10 12月, 2020 22 次提交
  3. 09 12月, 2020 15 次提交
    • B
      Auto merge of #79721 - Aaron1011:fix/reuse-def-path-hash, r=wesleywiser · fa55f668
      bors 提交于
      Properly re-use def path hash in incremental mode
      
      Fixes #79661
      
      In incremental compilation mode, we update a `DefPathHash -> DefId`
      mapping every time we create a `DepNode` for a foreign `DefId`.
      This mapping is written out to the on-disk incremental cache, and is
      read by the next compilation session to allow us to lazily decode
      `DefId`s.
      
      When we decode a `DepNode` from the current incremental cache, we need
      to ensure that any previously-recorded `DefPathHash -> DefId` mapping
      gets recorded in the new mapping that we write out. However, PR #74967
      didn't do this in all cases, leading to us being unable to decode a
      `DefPathHash` in certain circumstances.
      
      This PR refactors some of the code around `DepNode` deserialization to
      prevent this kind of mistake from happening again.
      fa55f668
    • B
      Auto merge of #78679 - oli-obk:temp_lifetime, r=eddyb · cc03ee67
      bors 提交于
      Also generate `StorageDead` in constants
      
      r? `@EddyB`
      
      None of this special casing is actually necessary since we started promoting within constants and statics.
      
      We may want to keep some of it around out of perf reasons, but it's not required for user visible behaviour
      
      somewhat related: #68622
      cc03ee67
    • O
      Also generate `StorageDead` in constants · 84fe7cf2
      oli 提交于
      84fe7cf2
    • B
      Auto merge of #78363 - RalfJung:promotion, r=oli-obk · c0bfe348
      bors 提交于
      remove this weird special case from promotion
      
      Promotion has a special case to ignore interior mutability under some specific circumstances. The purpose of this PR is to figure out what changes if we remove that. Since `Cell::new` and friends only get promoted inside `const`/`static` initializers these days, it actually is not easy to exploit this case: you need something like
      ```rust
      const TEST_INTERIOR_MUT: () = {
          // The "0." case is already ruled out by not permitting any interior mutability in `const`.
          let _val: &'static _ = &(Cell::new(1), 2).1;
      };
      ```
      
      I assume something like `&Some(&(Cell::new(1), 2).1)` would hit the nested case inside `validate_rvalue`... though I am not sure why that would not just trigger nested promotion, first promoting the inner reference and then the outer one?
      
      Fixes https://github.com/rust-lang/rust/issues/67534 (by simply rejecting that code^^)
      
      r? `@oli-obk` (but for now this is not meant to be merged!)
      Cc `@rust-lang/wg-const-eval`
      c0bfe348
    • R
      remove a test that does not work any more · d057a93e
      Ralf Jung 提交于
      d057a93e
    • R
      99a44ed0
    • R
      bd837e89
    • B
      Auto merge of #79767 - tmiasko:malformed-required-const, r=matthewjasper · db85512b
      bors 提交于
      Don't ICE on malformed `rustc_args_required_const` attribute
      db85512b
    • B
      Auto merge of #79575 - jyn514:time-passes, r=Mark-Simulacrum · 8080f546
      bors 提交于
      Don't time `emit_ignored_resolution_errors`
      
      This printed several hundred lines each time rustdoc was run, almost all
      of which rounded to 0.000. Since this isn't useful info, don't print it
      everywhere, so other perf info is easier to read.
      
      r? `@Mark-Simulacrum`
      8080f546
    • B
      Auto merge of #78768 - mzabaluev:optimize-buf-writer, r=cramertj · 2c56ea38
      bors 提交于
      Use is_write_vectored to optimize the write_vectored implementation for BufWriter
      
      In case when the underlying writer does not have an efficient implementation `write_vectored`, the present implementation of
      `write_vectored` for `BufWriter` may still forward vectored writes directly to the writer depending on the total length of the data. This misses the advantage of buffering, as the actually written slice may be small.
      
      Provide an alternative code path for the non-vectored case, where the slices passed to `BufWriter` are coalesced in the buffer before being flushed to the underlying writer with plain `write` calls. The buffer is only bypassed if an individual slice's length is at least as large as the buffer.
      
      Remove a FIXME comment referring to #72919 as the issue has been closed with an explanation provided.
      2c56ea38
    • T
      Update LLVM submodule · 4a7f2ec4
      Tomasz Miąsko 提交于
      4a7f2ec4
    • T
      Move RWUTable to a separate module · c7d7bc91
      Tomasz Miąsko 提交于
      c7d7bc91
    • T
      Remove `first_merge` from liveness debug logs · d711c300
      Tomasz Miąsko 提交于
      d711c300
    • B
      Auto merge of #79727 - tmiasko:8bit-rwu, r=lcnr · 1700ca07
      bors 提交于
      Compress RWU from at least 32 bits to 4 bits
      
      The liveness uses a mixed representation of RWUs based on the
      observation that most of them have invalid reader and invalid
      writer. The packed variant uses 32 bits and unpacked 96 bits.
      Unpacked data contains reader live node and writer live node.
      
      Since live nodes are used only to determine their validity,
      RWUs can always be stored in a packed form with four bits for
      each: reader bit, writer bit, used bit, and one extra padding
      bit to simplify packing and unpacking operations.
      1700ca07
    • M