about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2013-03-06Add a test for enum discriminant range overflow.Jed Davis-1/+31
It causes an LLVM assertion for every host/target word-size combination on incoming at the time of this writing.
2013-03-06Re-add discriminant range annotationsJed Davis-17/+40
2013-03-06Avoid unnecessary casts in struct_GEPJed Davis-8/+12
2013-03-06Convert type_of to use trans::adt.Jed Davis-88/+11
2013-03-06Convert match on enums to use trans::adt.Jed Davis-83/+51
2013-03-06Unified algebraic datatype representation implementation, initial version.Jed Davis-15/+366
Later changes on this branch adapt the rest of rustc::middle::trans to use this module instead of scattered hard-coded knowledge of representations; a few of them also have improvements or cleanup for adt.rs (and many added comments) that weren't drastic enough to justify changing history to move them into this commit.
2013-03-06auto merge of #5256 : thestinger/rust/bool, r=brsonbors-9/+14
2013-03-06auto merge of #5255 : jbclements/rust/remove-parse-value-ident, r=graydonbors-40/+21
After the removal of the "restricted keyword" feature in 0c82c00dc4f49aeb9b57c92c9a40ae35d8a1ee29 , there's no longer any difference between parse_ident() and parse_value_ident(), and therefore no difference between parse parse_path_without_tps() and parse_value_path(). I've collapsed all of these, removing the redundant functions and eliminating the need for two higher-order arguments.
2013-03-06Update uv submoduleBrian Anderson-1/+1
2013-03-06auto merge of #5182 : youknowone/rust/enum-cast, r=brsonbors-3/+65
Fix #4926
2013-03-06auto merge of #5125 : nikomatsakis/rust/issue-4846-lifetime-defaults, ↵bors-601/+686
r=nikomatsakis Work towards #4846. - Institute new region defaults where all omitted regions get a fresh lifetime. - Require explicit region names except in functions. - Fix a bug in region parameterization inference. I've been putting this off because it will not be important when we remove RP inference in favor of explicit declarations, but then it was blocking this patch. r? @pcwalton
2013-03-06fix test to not use fn exprNiko Matsakis-1/+2
2013-03-06Cheat and temporarily work around a pretty-printer bugNiko Matsakis-2/+2
that will go away with the new region syntax.
2013-03-06patch up pretty printing of things with both lifetime and type parametersNiko Matsakis-0/+1
2013-03-06Improve error messages when illegal lifetimes are usedNiko Matsakis-56/+109
2013-03-06Convert region parameterization to change defaults and handleNiko Matsakis-37/+9
methods correctly
2013-03-06convert FnCtxt methods from @mut self to &selfNiko Matsakis-33/+35
2013-03-06Permit either foo/&self or foo<'self>Niko Matsakis-9/+33
2013-03-06Add manual &self/ and &static/ and /&self declarations thatNiko Matsakis-476/+508
are currently inferred. New rules are coming that will require them to be explicit. All add some explicit self declarations.
2013-03-06auto merge of #5246 : brson/rust/demode, r=brsonbors-63/+61
r?
2013-03-06rustc: De-mode some bits of transBrian Anderson-63/+61
2013-03-06auto merge of #5253 : nikomatsakis/rust/issue-5243, r=graydonbors-21/+56
them to be non-monomorphic. Merely having lifetime parameters is not enough to qualify for that status. Fixes #5243. r?
2013-03-06bool: make the from_str function a FromStr implDaniel Micay-9/+14
2013-03-06Fix a bug with region-parameterized enums etc where trans consideredNiko Matsakis-21/+56
them to be non-monomorphic. Merely having lifetime parameters is not enough to qualify for that status. Fixes #5243.
2013-03-06finish removing parse_value_identJohn Clements-15/+7
2013-03-06removed unused abstraction over paths and value_pathsJohn Clements-25/+14
2013-03-06auto merge of #5252 : nikomatsakis/rust/issue-5087-make-trait-not-impl-self, ↵bors-420/+344
r=pcwalton Two changes: - The first fixes an inconsistency in coherence whereby extension methods were added to the inherent methods table, but only in cross-crate scenarios. This causes some minor fallout in tests and so forth. In one case (comm) I added inherent and trait methods so as to avoid the need to import traits like `GenericPort` just to use a port. - The second makes objects not implement the associated trait, as discussed in #5087. r? @pcwalton
2013-03-06auto merge of #5251 : bstrie/rust/deimpselfcore2, r=pcwaltonbors-9/+7
2013-03-06Remove trailing whitespace.Niko Matsakis-2/+2
2013-03-06Make object types not implement associated trait. Fixes #5087.Niko Matsakis-339/+65
2013-03-06Fix bug in coherence that causes all cross-crate impls to be regarded asNiko Matsakis-94/+292
inherent impls, not just those of the `impl Type` variety.
2013-03-06Finish de-implicit-selifizng libcoreBen Striegel-9/+7
2013-03-05auto merge of #5235 : yjh0502/rust/io_float, r=graydonbors-0/+108
When parsing bytes from a wire, there is a need to parse floating-point bytes to float values ([u8*4] to f32, [u8*8] to f64). This can be done via cast::transmute, but there is no way to do it safely. It's quite common, so I think I't better to support it in core library.
2013-03-05auto merge of #5213 : erickt/rust/vec-ref, r=graydonbors-183/+308
This patch series changes a handful of vec functions to return references instead of copies. The one downside with making this change is that these functions aren't usable in a couple cases now due to some purity complaints. For example, this [change](https://github.com/erickt/rust/commit/c31e81a532fc07e89be33cadb5109d167aa725f4#L1R87). I couldn't figure out a way to get `last` to work on a `@mut ~[...]` type, so I ended up having to use `*crate_cache[crate_cache.len() - 1].metas`.
2013-03-05core: convert vec::{last,last_opt} to return referencesErick Tryzelaar-51/+74
2013-03-05rustc: minor code cleanupErick Tryzelaar-16/+16
2013-03-05rustc: remove some copiesErick Tryzelaar-11/+12
2013-03-05core: convert vec::{init,initn} to return referencesErick Tryzelaar-26/+54
2013-03-05core: convert vec::{tail,tailn} to return referencesErick Tryzelaar-48/+84
2013-03-05core: convert vec::{head,head_opt} to return referencesErick Tryzelaar-31/+68
2013-03-05rustdoc: change paragraphs fn to take &strErick Tryzelaar-2/+2
2013-03-05rustdoc: Remove a unused variable warningErick Tryzelaar-1/+1
2013-03-05std: remove an unnecessary copy from workcacheErick Tryzelaar-1/+1
2013-03-06add floating-point read/write to Reader/WriterJihyun Yu-0/+108
2013-03-05auto merge of #5245 : thestinger/rust/trie, r=graydonbors-16/+30
2013-03-05trie: remove the Copy requirementDaniel Micay-16/+30
2013-03-05auto merge of #5234 : pcwalton/rust/equiv, r=pcwaltonbors-28/+111
r? @nikomatsakis
2013-03-05auto merge of #5232 : bstrie/rust/issue4448, r=nikomatsakisbors-0/+19
2013-03-05libcore: Implement an `Equiv` trait and use it on hashmaps.Patrick Walton-3/+73
7.3x speedup in string map search speed on a microbenchmark of pure hashmap searching against a constant string, due to the lack of allocations. I ran into a few snags. 1. The way the coherence check is set up, I can't implement `Equiv<@str>` and `Equiv<~str>` for `&str` simultaneously. 2. I wanted to implement `Equiv<T>` for all `T:Eq` (i.e. every type can be compared to itself if it implements `Eq`), but the coherence check didn't like that either. 3. I couldn't add this to the `Map` trait because `LinearMap` needs special handling for its `Q` type parameter: it must not only implement `Equiv<T>` but also `Hash` and `Eq`. 4. `find_equiv(&&"foo")` doesn't parse, because of the double ampersand. It has to be written `find_equiv(& &"foo")`. We can probably just fix this. Nevertheless, this is a huge win; it should address a major source of performance problems, including the one here: http://maniagnosis.crsr.net/2013/02/creating-letterpress-cheating-program.html
2013-03-05librustc: Fix silly bug in AST conversion for const vstores. rs=bugfixPatrick Walton-1/+8
Means that we'll need another snapshot to rid the language of `[const T]`.