- 18 7月, 2013 6 次提交
-
-
由 Patrick Walton 提交于
-
由 bors 提交于
This should get us over the hump of activating basic ratcheting on codegen tests, at least. It also puts in place optional (disabled by default) ratcheting on all #[bench] tests, and records all metrics from them to harvestable .json files in any case.
-
由 Graydon Hoare 提交于
-
由 Graydon Hoare 提交于
-
由 bors 提交于
It disables the insertion of `use std::prelude::*;` into the top of all the modules below the item on which it is placed (including that item itself). (Similar to GHC's `-XNoImplicitPrelude`.)
-
由 bors 提交于
This is the first of a series of refactorings to get rid of the `codemap::spanned<T>` struct (see this thread for more information: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004798.html). The changes in this PR should not change any semantics, just rename `ast::blk_` to `ast::blk` and add a span field to it. 95% of the changes were of the form `block.node.id` -> `block.id`. Only some transformations in `libsyntax::fold` where not entirely trivial.
-
- 17 7月, 2013 29 次提交
-
-
由 bors 提交于
Closes #7818
-
由 bors 提交于
Adding options for `po4a` in `mk/docs.mk` and updating .pots.
-
由 bors 提交于
Simulates borrow checks for '@mut' boxes, or at least it's the same idea. This allows you to store owned values, but mutate them while they're owned by TLS. This should remove the necessity for a `pop`/`set` pattern to mutate data structures in TLS.
-
由 bors 提交于
Add some codegen tests. Nothing too surprising.
-
由 Michael Woerister 提交于
-
由 bors 提交于
Whenever a lang_item is required, some relevant message is displayed, often with a span of what triggered the usage of the lang item. Now "hello word" is as small as: ```rust #[no_std]; extern { fn puts(s: *u8); } extern "rust-intrinsic" { fn transmute<T, U>(t: T) -> U; } #[start] fn main(_: int, _: **u8, _: *u8) -> int { unsafe { let (ptr, _): (*u8, uint) = transmute("Hello!"); puts(ptr); } return 0; } ```
-
由 Huon Wilson 提交于
It disables the insertion of `use std::prelude::*;` into the top of all the modules below the item on which it is placed (including that item itself).
-
由 Alex Crichton 提交于
Whenever a lang_item is required, some relevant message is displayed, often with a span of what triggered the usage of the lang item
-
由 bors 提交于
Fixes Issue #7764 Running `make check` I do get a failure: test rt::io::extensions::test::push_bytes ... ok rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition: read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}', /Users/shout/Projects/rust/src/libstd/condition.rs:50 /bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
-
由 Alex Crichton 提交于
Closes #7818
-
由 Alex Crichton 提交于
Simulates borrow checks for '@mut' boxes, or at least it's the same idea.
-
由 Graydon Hoare 提交于
-
由 bors 提交于
Allowing them in type signatures is a significant amount of extra work, unfortunately. This also doesn't apply to static values, which takes a different code path.
-
由 OGINO Masanori 提交于
-
由 bors 提交于
Changes int/uint range_rev to iterate over range `(hi,lo]` instead of `[hi,lo)`. Fix #5270. Also: * Adds unit tests for int/uint range functions * Updates the uses of `range_rev` to account for the new semantics. (Note that pretty much all of the updates there were strict improvements to the code in question; yay!) * Exposes new function, `range_step_inclusive`, which does the range `[hi,lo]`, (at least when `hi-lo` is a multiple of the `step` parameter). * Special-cases when `|step| == 1` removing unnecessary bounds-check. (I did not check whether LLVM was already performing this optimization; I figure it would be a net win to not leave that analysis to the compiler. If reviewer objects, I can easily remove that from the refactored code.) (This pull request is a rebased version of PR #7524, which went stale due to recent unrelated changes to num libraries.)
-
由 bors 提交于
r? anyone Fix #7821.
-
由 Austin King 提交于
-
由 bors 提交于
As per @pcwalton's request, `debug!(..)` is only activated when the `debug` cfg is set; that is, for `RUST_LOG=some_module=4 ./some_program` to work, it needs to be compiled with `rustc --cfg debug some_program.rs`. (Although, there is the sneaky `__debug!(..)` macro that is always active, if you *really* need it.) It functions by making `debug!` expand to `if false { __debug!(..) }` (expanding to an `if` like this is required to make sure `debug!` statements are typechecked and to avoid unused variable warnings), and adjusting trans to skip the pointless branches in `if true ...` and `if false ...`. The conditional expansion change also required moving the inject-std-macros step into a new pass, and makes it actually insert them at the top of the crate; this means that the cfg stripping traverses over the macros and so filters out the unused ones. This appears to takes an unoptimised build of `librustc` from 65s to 59s; and the full bootstrap from 18m41s to 18m26s on my computer (with general background use). `./configure --enable-debug` will enable `debug!` statements in the bootstrap build.
-
由 Huon Wilson 提交于
That is, the `b` branch in `if true { a } else { b }` will not be trans'd, and that expression will be exactly the same as `a`. This means that, for example, macros conditionally expanding to `if false { .. }` (like debug!) will not waste time in LLVM (or trans).
-
由 Huon Wilson 提交于
An alloca in an unreachable block would shortcircuit with Undef, but with type `Type`, rather than type `*Type` (i.e. a plain value, not a pointer) but it is expected to return a pointer into the stack, leading to confusion and LLVM asserts later. Similarly, attaching the range metadata to a Load in an unreachable block makes LLVM unhappy, since the Load returns Undef. Fixes #7344.
-
由 Huon Wilson 提交于
The entire testsuite is converted to using info! rather than debug! because some depend on the code within the debug! being trans'd.
-
由 Graydon Hoare 提交于
-
由 Graydon Hoare 提交于
-
由 Graydon Hoare 提交于
-
由 Graydon Hoare 提交于
-
由 Graydon Hoare 提交于
-
由 bors 提交于
The Ord impl of Version refered to the algorithm in release candidate versions of semver. [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html) says, "Build metadata SHOULD be ignored when determining version precedence." Note that Version's `le` is not "less than or equal to" now, since `lt` ignores build metadata. I think the new ordering algorithm satisfies strict weak ordering which C++ STL requires, instead of strict total ordering. BTW, is `a || b || ... || x`-style code better or idiomatic in Rust than `if a { return true; } if b { return true; } ... if x { return true; } return false;`-style one?
-
由 Felix S. Klock II 提交于
Fix #7821.
-
由 Josh Matthews 提交于
-
- 16 7月, 2013 5 次提交
-
-
由 OGINO Masanori 提交于
-
由 OGINO Masanori 提交于
Note that Version's `le` is not "less than or equal to" now, since `lt` ignores build metadata. I think the new ordering algorithm satisfies strict weak ordering which C++ STL requires, instead of strict total ordering.
-
由 Huon Wilson 提交于
Macros can be conditionally defined because stripping occurs before macro expansion, but, the built-in macros were only added as part of the actual expansion process and so couldn't be stripped to have definitions conditional on cfg flags. debug! is defined conditionally in terms of the debug config, expanding to nothing unless the --cfg debug flag is passed (to be precise it expands to `if false { normal_debug!(...) }` so that they are still type checked, and to avoid unused variable lints).
-
由 bors 提交于
Note that the headers are still on `~[T]` when `T` is managed. This is continued from #7605, which removed all the code relying on the headers and removed them from `~T` for non-managed `T`.
-
由 Daniel Micay 提交于
-