1. 24 9月, 2016 4 次提交
  2. 23 9月, 2016 19 次提交
  3. 22 9月, 2016 13 次提交
    • B
      Auto merge of #36618 - jseyfried:crate_root_attr_invoc, r=nrc · a09cb57a
      bors 提交于
      macros: allow attribute invocations at the crate root
      
      Fixes #36617.
      r? @nrc
      a09cb57a
    • B
      Auto merge of #36592 - nnethercote:TypedArena, r=bluss · b2627b08
      bors 提交于
      Lazily allocate TypedArena's first chunk
      
      Currently `TypedArena` allocates its first chunk, which is usually 4096
      bytes, as soon as it is created. If no allocations are ever made from
      the arena then this allocation (and the corresponding deallocation) is
      wasted effort.
      
      This commit changes `TypedArena` so it doesn't allocate the first chunk
      until the first allocation is made.
      
      This change speeds up rustc by a non-trivial amount because rustc uses
      `TypedArena` heavily: compilation speed (producing debug builds) on
      several of the rustc-benchmarks increases by 1.02--1.06x. The change
      should never cause a slow-down because the hot `alloc` function is
      unchanged. It does increase the size of `TypedArena` by one `usize`
      field, however.
      
      The commit also fixes some out-of-date comments.
      b2627b08
    • J
    • J
      85bfd82b
    • J
      a344f14c
    • J
      Refactor away `ParentLink`. · 9a0e88a3
      Jeffrey Seyfried 提交于
      9a0e88a3
    • B
      Auto merge of #36585 - jonathandturner:misc_error_touchups, r=nrc · 6ad10844
      bors 提交于
      Add the ability to merge spans to codemap
      
      This PR adds the ability to merge Spans.  To do so, it builds on the Codemap's ability to verify the locations of spans, namely that following can be verified:
      
      * the expn_id of both spans much match
      * the lhs span needs to end on the same line the rhs span begins
      * the lhs span must start at or before the rhs span
      
      If all of these are met, a new span is returned that is min(lo), max(hi) of the two spans.
      
      This PR also removes an older Span merge, as this new functionality subsumes it.
      
      r? @nrc
      6ad10844
    • B
      Auto merge of #36551 - eddyb:meta-games, r=nikomatsakis · 1cf592fa
      bors 提交于
      Refactor away RBML from rustc_metadata.
      
      RBML and `ty{en,de}code` have had their long-overdue purge. Summary of changes:
      * Metadata is now a tree encoded in post-order and with relative backward references pointing to children nodes. With auto-deriving and type safety, this makes maintenance and adding new information to metadata painless and bug-free by default. It's also more compact and cache-friendly (cache misses should be proportional to the depth of the node being accessed, not the number of siblings as in EBML/RBML).
      * Metadata sizes have been reduced, for `libcore` it went down 16% (`8.38MB` -> `7.05MB`) and for `libstd` 14% (`3.53MB` -> `3.03MB`), while encoding more or less the same information
      * Specialization is used in the bundled `libserialize` (crates.io `rustc_serialize` remains unaffected) to customize the encoding (and more importantly, decoding) of various types, most notably those interned in the `TyCtxt`. Some of this abuses a soundness hole pending a fix (cc @aturon), but when that fix arrives, we'll move to macros 1.1 `#[derive]` and custom `TyCtxt`-aware serialization traits.
      * Enumerating children of modules from other crates is now orthogonal to describing those items via `Def` - this is a step towards bridging crate-local HIR and cross-crate metadata
      * `CrateNum` has been moved to `rustc` and both it and `NodeId` are now newtypes instead of `u32` aliases, for specializing their decoding. This is `[syntax-breaking]` (cc @Manishearth ).
      
      cc @rust-lang/compiler
      1cf592fa
    • B
      Auto merge of #36496 - pnkfelix:workaround-issue-34427, r=eddyb · 4f9812a5
      bors 提交于
      Workaround #34427 by using memset of 0 on ARM to set the discriminant.
      
      Workaround #34427 by using memset of 0 on ARM to set the discriminant.
      4f9812a5
    • J
      Add regression test. · f4fa62f4
      Jeffrey Seyfried 提交于
      f4fa62f4
    • N
      Adds a `ProcMacro` form of syntax extension · 6a2d2c94
      Nick Cameron 提交于
      This commit adds syntax extension forms matching the types for procedural macros 2.0 (RFC #1566), these still require the usual syntax extension boiler plate, but this is a first step towards proper implementation and should be useful for macros 1.1 stuff too.
      
      Supports both attribute-like and function-like macros.
      6a2d2c94
    • C
      Fix outdated Doc Comment on BufReader::seek · e107c8b8
      Christopher Serr 提交于
      A long time ago non-panicking `unwrap` methods were renamed to `into_inner` in this Pull Request: https://github.com/rust-lang/rust/pull/19149
      
      Looks like this doc comment was not updated however.
      e107c8b8
    • K
      Tweak std::rc docs · c316ae56
      Keegan McAllister 提交于
      Fixes #29372.
      c316ae56
  4. 21 9月, 2016 4 次提交
    • B
      Auto merge of #35074 - ashleygwilliams:assert_ne, r=steveklabnik · 53f97302
      bors 提交于
      add debug_assert_ne + assert_ne
      
      ~~ work in progress, please do not merge ~~
      
      fixes #35073
      53f97302
    • A
      add assert_ne and debug_assert_ne macros · 3d8d5578
      Ashley Williams 提交于
      3d8d5578
    • J
      4db157af
    • B
      Auto merge of #36524 - michaelwoerister:trans-inline-only-on-demand, r=nikomatsakis · 5cc6c6b1
      bors 提交于
      trans: Only instantiate #[inline] functions in codegen units referencing them
      
      This PR changes how `#[inline]` functions are translated. Before, there was one "master instance" of the function with `external` linkage and a number of on-demand instances with `available_externally` linkage in each codegen unit that referenced the function. This had two downsides:
      
      * Public functions marked with `#[inline]` would be present in machine code of libraries unnecessarily (see #36280 for an example)
      * LLVM would crash on `i686-pc-windows-msvc` due to what I suspect to be a bug in LLVM's Win32 exception handling code, because it doesn't like `available_externally` there (#36309).
      
      This PR changes the behavior, so that there is no master instance and only on-demand instances with `internal` linkage. The downside of this is potential code-bloat if LLVM does not completely inline away the `internal` instances because then there'd be N instances of the function instead of 1. However, this can only become a problem when using more than one codegen unit per crate.
      
      cc @rust-lang/compiler
      5cc6c6b1