Commit Graph

56 Commits

Author SHA1 Message Date
Tim Chevalier
1244c0b6fd rustc: One Less Bad Copy 2013-01-17 19:17:24 -08:00
Niko Matsakis
9fed56ed90 When decoding types, indicate to the def-id conversion function what kind of
def-id we have, so that the inliner can distinguish between external and
internal def-ids.  Also add some comments explaining the distinction!

Fixes #4516.

r=graydon
2013-01-17 18:45:45 -08:00
Graydon Hoare
84825ee310 librustc: Make the default sigil for block lambdas & instead of @. 2013-01-15 17:57:45 -08:00
Erick Tryzelaar
293cd3480c convert ast::{field_,capture_item_,mt} and middle::ty::mt into structs 2013-01-14 21:36:27 -08:00
Erick Tryzelaar
4b0f702608 convert ast::attribute_ and ast::view_item to a struct 2013-01-14 18:15:54 -08:00
Erick Tryzelaar
df7d376d25 Convert ast::def_id into a struct. 2013-01-14 18:14:16 -08:00
Erick Tryzelaar
bea67bde21 Change ast::path into a struct. 2013-01-14 18:14:16 -08:00
Tim Chevalier
a4dc65baa1 syntax/rustc: Eliminate some bad copies
r=pcwalton
2013-01-14 15:49:53 -08:00
kyeongwoon
987f824f23 Support ARM and Android
Conflicts:
	src/libcore/os.rs
	src/librustc/back/link.rs
	src/librustc/driver/driver.rs
	src/librustc/metadata/loader.rs
	src/librustc/middle/trans/base.rs
2013-01-13 16:43:39 -08:00
Patrick Walton
a0c2a9b743 librustc: Implement a #[no_mangle] attribute to suppress name mangling. r=brson
This is very helpful for SDL, as SDL wants you to define a function named
`SDL_main`.
2013-01-10 21:44:59 -08:00
Niko Matsakis
737e115646 mode: reset mode on entry to fn body.
This is an interim fix to address the "Beware!" unsoundness.  I have a
more comprehensive rewrite of mode.rs in the pipeline.

r=pcwalton
2013-01-10 13:17:25 -08:00
Niko Matsakis
2b92962aa2 A collection of refactorings that I found it hard/tiresome to divide:
- Make `extern fn()` assignable to any closure type, rather than
  a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns.  This is both
  eliminating use of deprecated features and more forwards compatible
  with fn reform.

r=pcwalton
2013-01-09 14:59:07 -08:00
Erick Tryzelaar
93c2ebf994 syntax: convert ast::spanned into a struct 2013-01-09 08:55:36 -08:00
Patrick Walton
2db3abddcd librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37 Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
This reverts commit a8d37af247.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247 librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 19:27:57 -08:00
Niko Matsakis
c3a74d87bd Implement GLB algorithm. (Issue #2263)
r=brson
2013-01-08 15:41:53 -08:00
ILyoan
2d3c22ae59 arrange core::os::consts 2013-01-08 14:35:28 -08:00
Niko Matsakis
9f7dc1cb33 Remove ret_style and instead check whether fn return type is bot
cc #3681
2013-01-08 14:21:06 -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
Patrick Walton
3a570075b1 librustc: Remove unused mod_path_map. This was expensive to build. Saves another 15% or so. r=tjc 2013-01-07 12:54:46 -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
Tim Chevalier
89acd1f57f Rename option::get_default => get_or_default, get_zero => get_or_zero 2013-01-04 16:01:26 -08: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
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
Erick Tryzelaar
8650c6f683 Switch from serialization to std::serialize. (snapshot) 2012-12-17 20:00:36 -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
Brian Anderson
7ca94369da Fix encoding of trait static method paths. Closes #4097. r=pcwalton 2012-12-13 15:02:42 -08:00
Patrick Walton
4c2e4c37ce librustc: Make use statements crate-relative by default. r=brson 2012-12-13 13:05: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
Tim Chevalier
d2ad028a7c Rename std::ebml::Reader => std::ebml::reader, same for writer
Closes #4076
2012-12-06 16:14:54 -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
b8cfd5c414 librustc: Long lines. rs=rustbot 2012-12-04 21:13:02 -08:00
Patrick Walton
33c1e47c1b librustc: Implement moves based on type. r=nmatsakis 2012-12-04 15:38:04 -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
00c856c0b1 Update license, add license boilerplate to most files. Remainder will follow. 2012-12-03 17:12:14 -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
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
5a282ec26f core: Convert some records to structs 2012-11-28 21:50:09 -08:00
Brian Anderson
65bd40e300 Remove uses of #[merge] 2012-11-28 17:09:26 -08:00
Brian Anderson
8179e268ef Register snapshots 2012-11-28 12:33:00 -08:00
Brian Anderson
be6613e048 Remove the crate language 2012-11-26 18:13:54 -08:00
Tim Chevalier
ec0c029a7e Split EBML module into a reader and a writer module
Minor refactoring, no review.

Closes #2739
2012-11-24 13:40:00 -08:00
Tim Chevalier
ef833d4101 Introduce a T_err type for type errors
This allows more errors to be non-fatal, as per #1871.

I only went through and started changing span_fatal to span_err in
check.rs. There are probably more errors that could be made
non-fatal. So if you see derived type errors appearing from now on,
file a bug!

r=graydon

Closes #1871
2012-11-21 12:44:51 -08:00
Patrick Walton
318e534895 rustc: Implement explicit self for Eq and Ord. r=graydon 2012-11-19 15:33:11 -08:00