1. 15 Feb, 2014 3 commits
  2. 14 Feb, 2014 37 commits
    • bors's avatar
      d365c3a6
    • Kevin Ballard's avatar
      Add crate keyword to gedit language spec · 33b2b8a1
      Kevin Ballard authored
      33b2b8a1
    • Kevin Ballard's avatar
      Add crate to emacs and kate modefiles · fff12220
      Kevin Ballard authored
      fff12220
    • bors's avatar
      auto merge of #12195 : kballard/rust/rustdoc-strip-impls-of-stripped, r=cmr · 718c13fe
      bors authored
      Strip trait impls for types that are stripped either due to the strip-hidden or strip-private passes.
      
      This fixes the search index including trait methods on stripped structs (which breaks searching), and it also removes private types from the implementors list of a trait.
      
      Fixes #9981 and #11439.
      718c13fe
    • bors's avatar
      auto merge of #12267 : alexcrichton/rust/rollup, r=alexcrichton · 3f717bbe
      bors authored
      The last commit has the closed PRs
      3f717bbe
    • Kevin Ballard's avatar
      Add CheckedDiv to vim syntax · c718e0e2
      Kevin Ballard authored
      c718e0e2
    • Kevin Ballard's avatar
      Update vim syntax for extern crate · 84c60186
      Kevin Ballard authored
      84c60186
    • Alex Crichton's avatar
      Test fixes and rebase conflicts from rollups · 2f8dbf21
      Alex Crichton authored
      PRs closed as part of this:
      
      Closes #12212 r=alexcrichton
      Closes #12215 r=brson
      Closes #12246 r=pcwalton
      Closes #12247 r=cmr
      Closes #12251 r=brson
      Closes #12255 r=alexcrichton
      Closes #12257 r=alexcrichton
      Closes #12258 r=huonw
      Closes #12259 r=huonw
      Closes #12263 r=kballard
      Closes #12269 r=alexcrichton
      2f8dbf21
    • Corey Richardson's avatar
      909fd0d8
    • Kevin Ballard's avatar
      rustdoc: Strip impls of traits on #[doc(hidden)] types · 9e6c3f03
      Kevin Ballard authored
      In the strip-hidden pass, record all types that were stripped, and make
      a second pass stripping all impls of traits for these types.
      9e6c3f03
    • Kevin Ballard's avatar
      rustdoc: Strip impls of stripped private types · 52a3d387
      Kevin Ballard authored
      In strip-private, also strip impls of traits for private types. This
      fixes the search index so searching for "drop", "eq", etc doesn't throw
      an exception.
      52a3d387
    • Alex Crichton's avatar
      Add MKFILE_DEPS to compiler-rt target · 8694fd1e
      Alex Crichton authored
      Currently when you run `make -jN` it's likely that you'll remove compiler-rt and
      then it won't get cp'd back into the right place. I believe the reason for this
      is that the compiler-rt library target never got updated so make decided it
      never needed to copy the files back into place. The files were all there at the
      beginning of `make`, but then we may clean out the stage0 versions if we unzip
      the snapshot again.
      8694fd1e
    • bors's avatar
      auto merge of #12205 : alexcrichton/rust/nodefaultlibs, r=brson · 99474702
      bors authored
      This will hopefully bring us closer to #11937. We're still using gcc's idea of
      "startup files", but this should prevent us from leaking in dependencies that we
      don't quite want (libgcc for example once compiler-rt is what we use).
      99474702
    • Alex Crichton's avatar
      Invoke gcc with -nodefaultlibs · 28fa81a9
      Alex Crichton authored
      This will hopefully bring us closer to #11937. We're still using gcc's idea of
      "startup files", but this should prevent us from leaking in dependencies that we
      don't quite want (libgcc for example once compiler-rt is what we use).
      28fa81a9
    • Eduard Burtescu's avatar
    • Steven Fackler's avatar
      Expand ItemDecorator extensions in all contexts · 07ea23e1
      Steven Fackler authored
      Now that fold_item can return multiple items, this is pretty trivial. It
      also recursively expands generated items so ItemDecorators can generate
      items that are tagged with ItemDecorators!
      
      Closes #4913
      07ea23e1
    • Edward Wang's avatar
      Add test for #8860 · c1fac653
      Edward Wang authored
      c1fac653
    • HeroesGrave's avatar
      Removed libextra dependency from libsyntax. · 11b2515f
      HeroesGrave authored
      11b2515f
    • Dave Hodder's avatar
      Add function doc comments for extra::url::* · 3f54ca1e
      Dave Hodder authored
      3f54ca1e
    • Flavio Percoco's avatar
      a289587d
    • Eduard Burtescu's avatar
    • Alex Crichton's avatar
      extra: Capture stdout/stderr of tests by default · ee2a8888
      Alex Crichton authored
      When tests fail, their stdout and stderr is printed as part of the summary, but
      this helps suppress failure messages from #[should_fail] tests and generally
      clean up the output of the test runner.
      ee2a8888
    • lpy's avatar
      665555d5
    • bors's avatar
      auto merge of #12207 : alexcrichton/rust/up-llvm, r=sfackler · 92c5738a
      bors authored
      Includes an upstream commit by pcwalton to improve codegen of our enums getting
      moved around.
      
      This also introduces a new commit on top of our stack of patches to fix a mingw32 build issue. I have submitted the patch upstream: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140210/204653.html
      
      I verified that this builds on the try bots, which amazes me because I think that c++11 is turned on now, but I guess we're still lucky!
      
      Closes #10613 (pcwalton's patch landed)
      Closes #11992 (llvm has removed these options)
      92c5738a
    • Alex Crichton's avatar
      Upgrade LLVM · 804955f7
      Alex Crichton authored
      Includes an upstream commit by pcwalton to improve codegen of our enums getting
      moved around.
      804955f7
    • bors's avatar
      auto merge of #12234 : sfackler/rust/restructure-item-decorator, r=huonw · 18477ac6
      bors authored
      The old method of building up a list of items and threading it through
      all of the decorators was unwieldy and not really scalable as
      non-deriving ItemDecorators become possible. The API is now that the
      decorator gets an immutable reference to the item it's attached to, and
      a callback that it can pass new items to. If we want to add syntax
      extensions that can modify the item they're attached to, we can add that
      later, but I think it'll have to be separate from ItemDecorator to avoid
      strange ordering issues.
      
      @huonw
      18477ac6
    • bors's avatar
      auto merge of #12192 : luqmana/rust/fix-cross, r=alexcrichton · d40b5374
      bors authored
      Fix some fall out from the big command line option changes.
      d40b5374
    • bors's avatar
      auto merge of #12186 : alexcrichton/rust/no-sleep-2, r=brson · 03b324ff
      bors authored
      Any single-threaded task benchmark will spend a good chunk of time in `kqueue()` on osx and `epoll()` on linux, and the reason for this is that each time a task is terminated it will hit the syscall. When a task terminates, it context switches back to the scheduler thread, and the scheduler thread falls out of `run_sched_once` whenever it figures out that it did some work.
      
      If we know that `epoll()` will return nothing, then we can continue to do work locally (only while there's work to be done). We must fall back to `epoll()` whenever there's active I/O in order to check whether it's ready or not, but without that (which is largely the case in benchmarks), we can prevent the costly syscall and can get a nice speedup.
      
      I've separated the commits into preparation for this change and then the change itself, the last commit message has more details.
      03b324ff
    • bors's avatar
    • Eduard Burtescu's avatar
    • Steven Fackler's avatar
      Tweak ItemDecorator API · 3c02749a
      Steven Fackler authored
      The old method of building up a list of items and threading it through
      all of the decorators was unwieldy and not really scalable as
      non-deriving ItemDecorators become possible. The API is now that the
      decorator gets an immutable reference to the item it's attached to, and
      a callback that it can pass new items to. If we want to add syntax
      extensions that can modify the item they're attached to, we can add that
      later, but I think it'll have to be separate from ItemDecorator to avoid
      strange ordering issues.
      3c02749a
    • bors's avatar
      auto merge of #12256 : brson/rust/android, r=alexcrichton · 8d6fef67
      bors authored
      Android bot has been having some problems. A few details in the commits.
      8d6fef67
    • Brian Anderson's avatar
      Stop looping on error waiting for android test results · 67841793
      Brian Anderson authored
      These seem to be causing iloops on the bots. Let's rather see the errors.
      67841793
    • Brian Anderson's avatar
      compiletest: Run all android tests serially · a06ce0c9
      Brian Anderson authored
      This is an attempt to isolate test failures on the bots. It may also
      eliminate problems with the emulators breaking by reducing the chance
      of OOM.
      a06ce0c9
    • bors's avatar
      auto merge of #12172 : alexcrichton/rust/green-improvements, r=brson · 22c34f3c
      bors authored
      These commits pick off some low-hanging fruit which were slowing down spawning green threads. The major speedup comes from fixing a bug in stack caching where we never used any cached stacks!
      
      The program I used to benchmark is at the end. It was compiled with `rustc --opt-level=3 bench.rs --test` and run as `RUST_THREADS=1 ./bench --bench`. I chose to use `RUST_THREADS=1` due to #11730 as the profiles I was getting interfered too much when all the schedulers were in play (and shouldn't be after #11730 is fixed). All of the units below are in ns/iter as reported by `--bench` (lower is better).
      
      |               | green | native | raw    |
      | ------------- | ----- | ------ | ------ |
      | osx before    | 12699 | 24030  | 19734  |
      | linux before  | 10223 | 125983 | 122647 |
      | osx after     |  3847 | 25771  | 20835  |
      | linux after   |  2631 | 135398 | 122765 |
      
      Note that this is *not* a benchmark of spawning green tasks vs native tasks. I put in the native numbers just to get a ballpark of where green tasks are. This is benchmark is *clearly* benefiting from stack caching. Also, OSX is clearly not 5x faster than linux, I think my VM is just much slower.
      
      All in all, this ended up being a nice 4x speedup for spawning a green task when you're using a cached stack.
      
      ```rust
      extern mod extra;
      extern mod native;
      use std::rt::thread::Thread;
      
      #[bench]
      fn green(bh: &mut extra::test::BenchHarness) {
          let (p, c) = SharedChan::new();
          bh.iter(|| {
              let c = c.clone();
              spawn(proc() {
                  c.send(());
              });
              p.recv();
          });
      }
      
      #[bench]
      fn native(bh: &mut extra::test::BenchHarness) {
          let (p, c) = SharedChan::new();
          bh.iter(|| {
              let c = c.clone();
              native::task::spawn(proc() {
                  c.send(());
              });
              p.recv();
          });
      }
      
      #[bench]
      fn raw(bh: &mut extra::test::BenchHarness) {
          bh.iter(|| {
              Thread::start(proc() {}).join()
          });
      }
      ```
      22c34f3c
    • Alex Crichton's avatar
      Remove two allocations from spawning a green task · 301ff0c2
      Alex Crichton authored
      Two unfortunate allocations were wrapping a proc() in a proc() with
      GreenTask::build_start_wrapper, and then boxing this proc in a ~proc() inside of
      Context::new(). Both of these allocations were a direct result from two
      conditions:
      
      1. The Context::new() function has a nice api of taking a procedure argument to
         start up a new context with. This inherently required an allocation by
         build_start_wrapper because extra code needed to be run around the edges of a
         user-provided proc() for a new task.
      
      2. The initial bootstrap code only understood how to pass one argument to the
         next function. By modifying the assembly and entry points to understand more
         than one argument, more information is passed through in registers instead of
         allocating a pointer-sized context.
      
      This is sadly where I end up throwing mips under a bus because I have no idea
      what's going on in the mips context switching code and don't know how to modify
      it.
      
      Closes #7767
      cc #11389
      301ff0c2
    • Alex Crichton's avatar
      Don't require an allocation for on_exit messages · 21a064d5
      Alex Crichton authored
      Instead, use an enum to allow running both a procedure and sending the task
      result over a channel. I expect the common case to be sending on a channel (e.g.
      task::try), so don't require an extra allocation in the common case.
      
      cc #11389
      21a064d5