Commit Graph

172 Commits

Author SHA1 Message Date
Tim Chevalier
4557f70487 Revert "Suppress type error message involving a function type whose result is ty_err"
This reverts commit e45312e5a0.
2013-01-07 18:27:20 -08:00
Tim Chevalier
7b433d098a Revert "Change the self def_id to a self_info in typeck, and inherit"
This reverts commit 921393c568.
2013-01-07 18:18:22 -08:00
Tim Chevalier
0e774de766 Revert "Improve a typeck ICE message (slightly)"
This reverts commit c662a9aad7.
2013-01-07 18:15:44 -08:00
Tim Chevalier
921393c568 Change the self def_id to a self_info in typeck, and inherit
That is, treat `self` as if it has dynamic scope. This seems to
be harmless, and prevents an ICE as per #3563
2013-01-07 18:08:19 -08:00
Tim Chevalier
86db69def2 Revert "xfail broken tests"
This reverts commit d771830c4c.
2013-01-07 18:04:30 -08:00
Tim Chevalier
d771830c4c xfail broken tests 2013-01-07 18:04:01 -08:00
Tim Chevalier
e45312e5a0 Suppress type error message involving a function type whose result is ty_err
In general it would be good to suppress any messages involving types that
have ty_err as a sub-component, but this works for now.
2013-01-07 16:14:25 -08:00
Tim Chevalier
c662a9aad7 Improve a typeck ICE message (slightly) 2013-01-07 16:14:25 -08:00
Patrick Walton
8bf38b26ee librustc: Fix some librustc test modes. rs=bustage 2013-01-07 15:37:48 -08:00
Patrick Walton
53f41f07ce librustc: Make vectors no longer implicitly copyable in rustc. r=graydon
~20% perf win for trans on -O0, with other minor improvements across the board.
No effect on -O2.
2013-01-07 14:17:36 -08:00
Tim Chevalier
09758f7072 Merge pull request #4357 from jld/constenum-bonus-fix
Trivial cleanup: use enum_is_univariant; no functional change intended.
2013-01-07 13:40:45 -08:00
Tim Chevalier
78aad60062 Merge pull request #4358 from jld/constenum-unit
Fix consts of nullary univariant enum type.
2013-01-07 13:40:05 -08:00
Patrick Walton
9f387926fc librustc: Fold rt items into lang items. Shaves another 10% or so off hello world compile time. 2013-01-07 12:21:34 -08:00
Patrick Walton
d2d1d98968 librustc: Encode language items into a special lookup table. 9% improvement in hello world compile time. 2013-01-07 10:51:53 -08:00
Patrick Walton
0ab7f9129e librustc: Refactor language items to have IDs. rs=refactor
Preparation for fixing the performance problems with language item collection.
2013-01-06 12:05:34 -08:00
Patrick Walton
96e01a67c7 librustc: Convert some large structural records over to structs. rs=perf
No effect on compile-time performance.
2013-01-06 11:16:14 -08:00
Patrick Walton
fa96740923 librustc: Remove some string allocations. rs=perf 2013-01-05 19:33:37 -08:00
Patrick Walton
1070cc0109 librustc: Fix unconditional ty_to_str call in ty.rs. Was heaviest path in allocation. Negligible perf win. rs=perf-fix 2013-01-05 18:41:22 -08:00
Jed Davis
6043a72774 Make consts of degenerate nullary enums not ICE.
This makes the const construction code match the logic in type_of.
2013-01-05 00:24:38 -08:00
Jed Davis
8f8b417811 Trivial cleanup: use enum_is_univariant; no functional change intended. 2013-01-05 00:24:33 -08:00
Patrick Walton
7b245d46ed librustc: Stop generating first-class aggregates in visit glue, since they kick us off fast isel. Closes #4352. rs=minor-perf-improvement 2013-01-04 23:07:58 -08:00
Tim Chevalier
89acd1f57f Rename option::get_default => get_or_default, get_zero => get_or_zero 2013-01-04 16:01:26 -08:00
gareth
624421aa3d Simplify idents_to_str and use it in more places. 2012-12-29 18:25:09 +00:00
gareth
d68954efa0 Fix the build by removing trailing whitespace. 2012-12-29 11:44:02 +00:00
gareth
b6aafe928d When an import fails to resolve, make the error message say
which import it actually was. This makes debugging imports
like: use aa::{x, y, z} easier (for issue #2914).
2012-12-29 11:15:54 +00:00
Tim Chevalier
a75c0b3b32 Merge pull request #4268 from catamorphism/issue-3477
Emit a type error for integer literals where the expected type is char
2012-12-28 13:05:58 -08:00
Patrick Walton
84ce55e542 librustc: Fix some unresolved imports in the test runner. rs=bustage 2012-12-27 15:50:03 -08:00
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