1. 21 8月, 2018 12 次提交
    • K
      Rollup merge of #53521 - alexcrichton:optimize-lit-token, r=michaelwoerister · 44571808
      kennytm 提交于
      syntax: Optimize some literal parsing
      
      Currently in the `wasm-bindgen` project we have a very very large crate that's
      procedurally generated, `web-sys`. To generate this crate we parse all of a
      browser's WebIDL and we then generate bindings for all of the APIs contained
      within.
      
      The resulting Rust file is 18MB large (wow!) and currently takes a very long
      time to compile in debug mode. On the nightly compiler a *debug* build takes 90s
      for the crate to finish. I was curious what was taking so long and upon
      investigating a *massive* portion of the time was spent in the `lit_token`
      method of the compiler, primarily formatting strings via `format!`.
      
      Upon some more investigation it looks like the `byte_str_lit` was allocating an
      error message once per byte, causing a very large number of allocations to
      happen for large literals, of which wasm-bindgen generates quite a few (some are
      MB large).
      
      This commit fixes the issue by lazily allocating the error message, only doing
      so if the error message is actually needed (which should be never). As a result,
      the debug mode compilation time for our `web-sys` crate decreased from 90s to
      20s, a very nice improvement! (although we've still got some work to do).
      44571808
    • K
      Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkor · b5519db3
      kennytm 提交于
      Fix typos found by codespell.
      b5519db3
    • K
      Rollup merge of #53492 - danc86:lld-riscv, r=alexcrichton · 0834a1ae
      kennytm 提交于
      update lld submodule to include RISCV patch
      
      This pulls in one new commit, to add support for linking static RISCV
      binaries, suitable for the new riscv32imac-unknown-none-elf target.
      See: https://github.com/rust-lang/lld/pull/1
      0834a1ae
    • K
      Rollup merge of #53465 - bjorn3:remove_link_meta_struct, r=varkor · 5d4a25da
      kennytm 提交于
      Remove LinkMeta struct
      
      Fixes #53291
      5d4a25da
    • K
      Rollup merge of #53452 - tromey:lldb-manifest-fix, r=alexcrichton · c980ba75
      kennytm 提交于
      Change target triple used to check for lldb in build-manifest
      
      The wrong target triple was used for lldb in build-manifest.  lldb is
      only built for macOS, so update the triple to reflect that.
      
      This is an attempt to fix bug#48168.
      c980ba75
    • K
      Rollup merge of #53405 - oconnor663:search_esc, r=GuillaumeGomez · 2a0d7207
      kennytm 提交于
      restore the page title after escaping out of a search
      
      Currently if I start a search in the docs, but then hit ESC, the "Results for..." title is still there in my browser tab. This is a simple attempt to fix that. I see that there's a separate `var previousTitle = document.title` thing happening in `startSearch()`, but as far as I can tell that's only related to the back stack? I'd also appreciate feedback on the right place to declare the `titleBeforeSearch` variable.
      
      Testing-wise, I've confirmed by hand that the tab title restores correctly after building with `./x.py doc --stage 1 src/libstd`, but nothing more involved than that. What else should I test?
      2a0d7207
    • K
      Rollup merge of #53393 - BurntPizza:serialize-inlines, r=alexcrichton · b21e956f
      kennytm 提交于
      Mark libserialize functions as inline
      
      Got to thinking: "what if that big pile of tiny functions isn't inlining as it should?"
      So a few `replace-regex` later the local perf run says this:
      <details>
      
      ![](https://i.imgur.com/gvdJEgG.png)
      </details>
      Not huge, but still a win, which is interesting. Want to verify with the real perf run, but I understand there's a backlog.
      
      I didn't notice any increase in compile time or binary sizes for rustc/libs.
      b21e956f
    • K
      Rollup merge of #53370 - jkozlowski:stabilize-macro_vis_matcher, r=cramertj · f9e3af74
      kennytm 提交于
      Stabilize macro_vis_matcher
      
      This PR should stabilize [macro_vis_matcher](https://github.com/rust-lang/rust/issues/41022) feature.
      
      - [ ] "reference" book changes: https://github.com/rust-lang-nursery/reference/pull/400
      - [ ] "Rust by example" book changes: https://github.com/rust-lang/rust-by-example/pull/1096
      - [ ] "clippy" changes: https://github.com/rust-lang-nursery/rust-clippy/pull/3055
      
      r? @cramertj
      f9e3af74
    • A
      syntax: Optimize some literal parsing · 5bf2ad30
      Alex Crichton 提交于
      Currently in the `wasm-bindgen` project we have a very very large crate that's
      procedurally generated, `web-sys`. To generate this crate we parse all of a
      browser's WebIDL and we then generate bindings for all of the APIs contained
      within.
      
      The resulting Rust file is 18MB large (wow!) and currently takes a very long
      time to compile in debug mode. On the nightly compiler a *debug* build takes 90s
      for the crate to finish. I was curious what was taking so long and upon
      investigating a *massive* portion of the time was spent in the `lit_token`
      method of the compiler, primarily formatting strings via `format!`.
      
      Upon some more investigation it looks like the `byte_str_lit` was allocating an
      error message once per byte, causing a very large number of allocations to
      happen for large literals, of which wasm-bindgen generates quite a few (some are
      MB large).
      
      This commit fixes the issue by lazily allocating the error message, only doing
      so if the error message is actually needed (which should be never). As a result,
      the debug mode compilation time for our `web-sys` crate decreased from 90s to
      20s, a very nice improvement! (although we've still got some work to do).
      5bf2ad30
    • K
      Rollup merge of #53296 - estebank:suggest-closure, r=KodrAus · ffde96c2
      kennytm 提交于
      When closure with no arguments was expected, suggest wrapping
      
      Fix #49694.
      ffde96c2
    • K
      Rollup merge of #53213 - tmccombs:stable-ipconstructors, r=KodrAus · fa3d56ac
      kennytm 提交于
      Stabilize IP associated constants
      
      Fixes #44582
      fa3d56ac
    • K
      Rollup merge of #53030 - Aaronepower:master, r=Mark-Simulacrum · b51723a8
      kennytm 提交于
      Updated RELEASES.md for 1.29.0
      
      [Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)
      
      r? @Mark-Simulacrum
      cc @rust-lang/release
      b51723a8
  2. 20 8月, 2018 24 次提交
  3. 19 8月, 2018 4 次提交