Tim Chevalier
0873553680
Merge pull request #4298 from JensNockert/byteswap
...
Add support for byteswap intrinsics
2012-12-27 10:47:15 -08:00
Jens Nockert
a51661e8c1
Add support for byteswap intrinsics
...
Adds support for the llvm.bswap.i{8,16,32} intrinsics, which swaps the
byte order from little endian to big endian, or the reverse.
2012-12-27 19:07:05 +01:00
Patrick Walton
57c599914a
librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon
2012-12-27 10:02:54 -08:00
Erick Tryzelaar
efb8711f90
Merge branch 'master' of github.com:mozilla/rust into incoming
2012-12-27 10:34:27 -05:00
Tim Chevalier
499a58708f
Assign correct types to struct-like enum variant constructors
...
Before, the type was just the enum type itself, which caused an
assertion failure in iter_variant in trans::base.
r=brson
Closes #4229
2012-12-24 15:59:15 -08:00
Tim Chevalier
65839fa622
Emit a type error for integer literals where the expected type is char
...
For example, in let x: char = 42; This was an ICE and is now a
proper type error, as per #3477
2012-12-22 15:58:05 -08:00
Jens Nockert
82641d4c39
Add support for bitcount intrinsics
...
Adds support for the llvm.ctpop, llvm.ctlz and llvm.cttz intrinsics.
2012-12-21 19:30:33 +01:00
Erick Tryzelaar
76a2891feb
Remove the cfg(stageN)-specific serialize code.
2012-12-20 12:52:53 -08:00
Erick Tryzelaar
c14105bb8a
Remove serialize::traits submodule.
2012-12-19 18:16:20 -08:00
Brian Anderson
97ddf3c7bd
Stop resolving static methods at the module level. Closes #4179
2012-12-18 18:35:18 -08:00
Erick Tryzelaar
85bb1fc2c4
Change iter::find's closure to take a ref
2012-12-17 22:01:38 -08:00
Brian Anderson
23564574ac
Change the default_methods lint mode from forbid to deny to fix tests
2012-12-17 20:41:12 -08:00
Erick Tryzelaar
8650c6f683
Switch from serialization to std::serialize. (snapshot)
2012-12-17 20:00:36 -08:00
Jakub Wieczorek
6530fd3401
When matching a slice, the tail should have the same lifetime
2012-12-17 16:50:40 -08:00
Jakub Wieczorek
1fdfd3b1d6
Simplify the exhaustiveness check and add comments
2012-12-17 16:50:40 -08:00
Jakub Wieczorek
856dbac567
Use the same logic for _ and [..tail] when checking reachability
2012-12-17 16:50:40 -08:00
Jakub Wieczorek
1968cb315a
Add support for destructuring vectors in match expressions
2012-12-17 16:50:40 -08:00
Patrick Walton
ebd9ad4d04
librustc: Add a lint mode for deprecated self. r=brson
2012-12-14 19:46:55 -08:00
Patrick Walton
41c0d7083e
librustc: Fix type_use for generic newtype structs. Closes #4188 . rs=bugfix
2012-12-14 19:44:07 -08:00
Patrick Walton
8a9ccf81b0
librustc: Implement a lint mode for default methods. r=brson
2012-12-14 19:28:43 -08:00
Patrick Walton
99fa9c3cab
Revert "librustc: Implement a lint mode for default methods"
...
This reverts commit 53b181dd47
.
2012-12-14 19:13:59 -08:00
Patrick Walton
53b181dd47
librustc: Implement a lint mode for default methods
2012-12-14 19:07:20 -08:00
Patrick Walton
bdb2d659ae
librustc: Ensure that no moves from the inside of @ or & boxes occur. rs=crashing-servo
2012-12-14 18:19:07 -08:00
Patrick Walton
1b9f740f2f
librustc: Reset the mode context to MoveValue for block lambdas. rs=bugfix
2012-12-13 21:44:19 -08:00
Patrick Walton
57e4ed479e
librustc: Add missing case in mem_categorization. rs=bugfix
2012-12-13 18:03:48 -08:00
Patrick Walton
036b26a197
librustc: Remove merge markers. rs=oops
2012-12-13 16:17:57 -08:00
Patrick Walton
732c39c183
librustc: Have coherence check Copy kind bounds when determining whether parameter substitutions could possibly unify. r=nmatsakis
2012-12-13 16:14:54 -08:00
Brian Anderson
ed4fac01b5
Rename Send trait to Owned
2012-12-13 15:52:50 -08:00
Brian Anderson
a277081ee4
Rename Owned trait to Durable
2012-12-13 15:52:50 -08:00
Patrick Walton
cd120736cb
librustc: Allow moves out of self
. r=nmatsakis
2012-12-13 15:49:07 -08:00
Patrick Walton
45848b2040
librustc: Automatically move non-implicitly-copyable types into unique closures. r=nmatsakis
2012-12-13 15:33:33 -08:00
Patrick Walton
efb9b74718
librustc: Fix explicit self for objects in more cases. r=nmatsakis
2012-12-13 13:29:08 -08:00
Patrick Walton
4c2e4c37ce
librustc: Make use
statements crate-relative by default. r=brson
2012-12-13 13:05:22 -08:00
Brian Anderson
6047dd35bb
Fix vtable calculations when translating static methods. Closes #4165
2012-12-12 17:14:39 -08:00
Graydon Hoare
9cced55b93
syntax: remove all remaining uses of #ast, and #ast / qquote itself.
2012-12-12 15:02:47 -08:00
Tim Chevalier
d42bdf1997
Auto-deref when checking field and method privacy
...
This disallows using pointers to sneak around priv qualifiers.
Deeming this too small for review as well. Closes #3763
2012-12-11 19:17:31 -08:00
Brian Anderson
a7159be24a
Remove old deriving
2012-12-11 18:11:14 -08:00
Tim Chevalier
6439f2d546
Avoid extra error for type mismatches in patterns
...
When a type error has already occurred, don't call ty::subst,
which may ICE due to the mismatch in the number of type params
involved.
I'm deeming this too small to review.
Closes #3680
2012-12-11 17:38:57 -08:00
Tim Chevalier
94a76843f4
Revert "Merge pull request #4144 from luqmana/deprecated-attribute"
...
This reverts commit f675b97ddc
, reversing
changes made to e7dd3af970
.
2012-12-11 12:28:30 -08:00
Tim Chevalier
1abad3b4e6
Fix whitespace
2012-12-11 11:42:44 -08:00
Tim Chevalier
01c0971172
Allow pattern-matching on any strings, not just unique strings
...
r=brson
Closes #3574
2012-12-11 11:22:13 -08:00
Tim Chevalier
f675b97ddc
Merge pull request #4144 from luqmana/deprecated-attribute
...
Add deprecated attribute.
2012-12-10 21:16:20 -08:00
Tim Chevalier
e7dd3af970
Remove commented-out code
2012-12-10 21:08:22 -08:00
Tim Chevalier
0046ed9462
Remove un-needed code for obsolete classes
...
and rename "class" to "struct" everywhere possible (except local
vars, I was too lazy for that) -- that is why this commit is so
big.
No review, just dead code removal and renaming.
Closes #3515
2012-12-10 18:45:01 -08:00
Graydon Hoare
12c32e944d
Add license boilerplate to more files.
2012-12-10 17:32:58 -08:00
Patrick Walton
3f78e0ecc0
librustc: Fix bug preventing cross-crate struct destructuring from working. rs=bugfix
2012-12-10 12:38:31 -08:00
Patrick Walton
ac2b0456f4
librustc: Remove is_self_field from borrowck. Unused. rs=#rust
2012-12-10 10:50:45 -08:00
Luqman Aden
4b4c8331bb
Add deprecated attribute.
2012-12-09 02:26:12 -05:00
Tim Chevalier
42f8a3366a
Print out a more helpful type error message for do-blocks/for-loops
...
If a do-block body has the wrong type, or a for-loop body has a
non-() type, suggest that the user might have meant the other one.
Closes #2817
r=brson
2012-12-08 23:04:38 -08:00
Patrick Walton
98fdcb0b9d
librustc: De-mode pattern bindings. r=nmatsakis
2012-12-07 19:34:57 -08:00
Patrick Walton
ab3b752906
librustc: Implement "&mut [T]" as an expression. r=brson
2012-12-07 18:29:10 -08:00
Brian Anderson
e5e6d3c43d
Long lines
2012-12-07 16:48:55 -08:00
Brian Anderson
ecdc8aae41
Remove impl_id from trait_ref. Unused
2012-12-07 15:54:17 -08:00
Brian Anderson
2fcf562d16
Add an auto-slice-and-ref step to method lookup. Allows ~[T] to work with explicit self
2012-12-07 15:29:38 -08:00
Brian Anderson
e71081ec03
Merge pull request #4101 from brson/bound-default-methods
...
Call default methods on bound typarams more correctly
2012-12-07 15:10:57 -08:00
Patrick Walton
cf3972e95a
librustc: Propagate type uses correctly from method calls to the containing functions. rs=bugfix
...
This adds a new script, `monodebug.pl`. It can be used to diagnose problems stemming from incorrect combining of monomorphic generic instantiations.
2012-12-06 19:11:51 -08:00
Tim Chevalier
d2ad028a7c
Rename std::ebml::Reader => std::ebml::reader, same for writer
...
Closes #4076
2012-12-06 16:14:54 -08:00
Brian Anderson
3464f60c00
Remove previous x86 data corruption workaround. #4054
2012-12-06 15:26:22 -08:00
Patrick Walton
7203be1109
librustc: Fix handling of ~
and @
unary operators in mode computation. Closes #4114 . rs=bugfix
2012-12-05 22:57:58 -08:00
Patrick Walton
4fc03bac65
librustc: Implement "-Z no-monomorphic-collapse" as a debugging tool to diagnose mysterious crashes we're seeing. rs=debug-tool
2012-12-05 20:45:58 -08:00
Patrick Walton
aa3aa3b1b2
librustc: Fix type_use to not treat i1* arguments as interchangeable with i8* arguments. Closes #3917 . rs=bugfix
2012-12-05 20:23:14 -08:00
Patrick Walton
e23ea24aed
librustc: Move the "legality of move bindings" check from typechecking to alt checking. rs=refactoring
2012-12-05 19:01:14 -08:00
Patrick Walton
16506c0250
librustc: Make a context including the method map in check_alt, in preparation for moving check_legality_of_move_bindings there. rs=refactoring
2012-12-05 18:28:34 -08:00
Brian Anderson
1fc802233b
Long lines
2012-12-05 18:10:45 -08:00
Brian Anderson
4f3cc01487
Fix cross-crate inlining of static functions
2012-12-05 18:09:52 -08:00
Patrick Walton
1282fc8074
librustc: Hook borrow check loan checking up to the moves-based-on-type infrastructure. rs=helps-unbreak-the-build
2012-12-05 15:07:48 -08:00
Patrick Walton
b8cfd5c414
librustc: Long lines. rs=rustbot
2012-12-04 21:13:02 -08:00
Brian Anderson
01cd53baf0
Merge remote-tracking branch 'luqmana/incoming'
...
Conflicts:
src/librustc/middle/typeck/check.rs
2012-12-04 18:49:50 -08:00
Patrick Walton
c0d3b291d5
librustc: Shot in the dark to try to unbreak Windows. rs=me
2012-12-04 16:03:50 -08:00
Patrick Walton
33c1e47c1b
librustc: Implement moves based on type. r=nmatsakis
2012-12-04 15:38:04 -08:00
Patrick Walton
f02e9db212
librustc: Remove bogus ValueMode. rs=tree-on-fire
2012-12-04 15:09:40 -08:00
Patrick Walton
d1ebdbeb6c
librustc: Implement explicit self for Add and Index; add a hack in the borrow checker to support this. r=nmatsakis
2012-12-04 14:51:31 -08:00
Patrick Walton
56ece46f7d
librustc: Remove all legacy pattern bindings from libsyntax and librustc. rs=refactoring
2012-12-04 14:19:19 -08:00
Graydon Hoare
94be145169
core: rename box to managed. Close #4079 .
2012-12-03 17:45:19 -08:00
Graydon Hoare
00c856c0b1
Update license, add license boilerplate to most files. Remainder will follow.
2012-12-03 17:12:14 -08:00
Patrick Walton
b6f1e3084f
librustc: Add missing cases in kind and privacy checking to try to put out the burning tinderbox. rs=rustbot
2012-12-03 15:28:51 -08:00
Brian Anderson
05e51e6f7f
Call default methods on bound typarams more correctly
2012-12-02 18:29:22 -08:00
Patrick Walton
1088006ed9
librustc: Implement unit-like struct constants. r=brson
2012-11-30 21:10:54 -08:00
Patrick Walton
8fa306a0ad
librustc: Implement tuple struct constants. r=brson
2012-11-30 21:10:17 -08:00
Patrick Walton
5b5a0df7ee
librustc: Implement C-like enum constants. r=tjc
2012-11-30 21:09:14 -08:00
Patrick Walton
f34833abfc
librustc: Make a.b()
always a method call. r=nmatsakis
2012-11-30 20:41:46 -08:00
Patrick Walton
54ae377ec2
librustc: Implement explicit @self and ~self for objects. r=nmatsakis
2012-11-30 19:39:01 -08:00
Patrick Walton
3afd6c3d79
librustc: Implement simple explicit self for objects. r=nmatsakis
2012-11-30 18:55:12 -08:00
Tim Chevalier
daf28a421a
Disallow dereferencing enum types when the variant is private
...
If an enum type's only variant is private, disallow dereferencing
values of its type.
Due to #4082 , this only applies to enums that are in the same crate.
r=pcwalton
Closes #818
2012-11-30 12:45:10 -08:00
Graydon Hoare
d783f4d7bb
libs: Remove transitionary material on iter_bytes, add workcache to build.
2012-11-30 10:33:16 -08:00
Brian Anderson
3ed9fbd63c
impls of traits cannot define methods on the anonymous trait
2012-11-29 22:07:49 -08:00
Brian Anderson
78ee821154
Implement trait inheritance for bounded type parameters
2012-11-29 18:10:11 -08:00
Brian Anderson
daa89e0861
rustc: Remove existing inheritance code from coherence
...
Inheritance will be implemented differently, hopefully simpler
2012-11-29 18:10:11 -08:00
Patrick Walton
a0617eae68
librustc: Eliminate most expressions of the form a.b()
that are not method calls. rs=refactoring
2012-11-29 17:51:56 -08:00
Brian Anderson
b38d7f6538
Remove more uses of #[merge]
2012-11-29 16:41:47 -08:00
Brian Anderson
0a3a2eebfc
Long lines
2012-11-29 14:43:33 -08:00
Tim Chevalier
f459acc45d
Disallow importing private items
...
resolve wasn't checking that a `use` referred to a public item.
r=brson
2012-11-29 14:12:51 -08:00
Paul Stansifer
9814e58815
No longer parse the delimiters of the RHS of a macro as part of the expansion.
2012-11-29 12:09:10 -08:00
Paul Stansifer
ee076f63f9
Allow for macros to occur in statement position.
2012-11-29 12:09:10 -08:00
Patrick Walton
9e1c9be16f
librustc: Make the Drop trait use explicit self
2012-11-29 11:06:15 -08:00
Luqman Aden
c6b1739232
Add more standard c lib llvm intrinsics.
2012-11-29 06:48:07 -05:00
Brian Anderson
65bd40e300
Remove uses of #[merge]
2012-11-28 17:09:26 -08:00
Brian Anderson
16f72df704
Merge remote-tracking branch 'erickt/time'
...
Conflicts:
src/libstd/time.rs
2012-11-28 14:49:58 -08:00
Brian Anderson
fc06114ddf
Merge remote-tracking branch 'brson/companion' into incoming
...
Conflicts:
src/compiletest/compiletest.rs
src/libcargo/cargo.rs
src/libcore/core.rs
src/librustc/rustc.rs
src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Brian Anderson
8179e268ef
Register snapshots
2012-11-28 12:33:00 -08:00