1. 15 2月, 2014 19 次提交
  2. 14 2月, 2014 21 次提交
    • E
      6e840235
    • S
      Expand ItemDecorator extensions in all contexts · 07ea23e1
      Steven Fackler 提交于
      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
    • E
      Add test for #8860 · c1fac653
      Edward Wang 提交于
      c1fac653
    • H
      Removed libextra dependency from libsyntax. · 11b2515f
      HeroesGrave 提交于
      11b2515f
    • D
      Add function doc comments for extra::url::* · 3f54ca1e
      Dave Hodder 提交于
      3f54ca1e
    • F
      Ensure an error is raised on infinite recursion · a289587d
      Flavio Percoco 提交于
      a289587d
    • E
      3af5f38f
    • A
      extra: Capture stdout/stderr of tests by default · ee2a8888
      Alex Crichton 提交于
      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
    • L
      return value/use extra::test::black_box in benchmarks · 665555d5
      lpy 提交于
      665555d5
    • B
      auto merge of #12207 : alexcrichton/rust/up-llvm, r=sfackler · 92c5738a
      bors 提交于
      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
    • A
      Upgrade LLVM · 804955f7
      Alex Crichton 提交于
      Includes an upstream commit by pcwalton to improve codegen of our enums getting
      moved around.
      804955f7
    • B
      auto merge of #12234 : sfackler/rust/restructure-item-decorator, r=huonw · 18477ac6
      bors 提交于
      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
    • B
      auto merge of #12192 : luqmana/rust/fix-cross, r=alexcrichton · d40b5374
      bors 提交于
      Fix some fall out from the big command line option changes.
      d40b5374
    • B
      auto merge of #12186 : alexcrichton/rust/no-sleep-2, r=brson · 03b324ff
      bors 提交于
      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
    • B
      2fe7bfe4
    • E
    • S
      Tweak ItemDecorator API · 3c02749a
      Steven Fackler 提交于
      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
    • B
      auto merge of #12256 : brson/rust/android, r=alexcrichton · 8d6fef67
      bors 提交于
      Android bot has been having some problems. A few details in the commits.
      8d6fef67
    • B
      Stop looping on error waiting for android test results · 67841793
      Brian Anderson 提交于
      These seem to be causing iloops on the bots. Let's rather see the errors.
      67841793
    • B
      compiletest: Run all android tests serially · a06ce0c9
      Brian Anderson 提交于
      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
    • B
      auto merge of #12172 : alexcrichton/rust/green-improvements, r=brson · 22c34f3c
      bors 提交于
      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