Commit Graph

100 Commits

Author SHA1 Message Date
Patrick Walton bdb8f6cf52 rustc: "tag" -> "enum" 2012-01-19 14:24:03 -08:00
Tim Chevalier 04a2887f87 Remove '.' after nullary tags in patterns
Does what it says on the tin.

The next commit will remove support for this syntax.
2012-01-18 23:17:34 -08:00
Niko Matsakis a83ad1b9e6 encode variant names and have log print them out. 2012-01-17 10:33:28 -08:00
Marijn Haverbeke 4c9c1cd199 Fix dependency bug iface-did-of-impl resolving
By simply not resolving that def id until the typeck pass.

Closes #1494
2012-01-11 21:40:13 +01:00
Marijn Haverbeke 34d7f05292 Major clean-up of std::io
Use ifaces instead of objs, stop wrapping everything in two (or three)
layers of no-value-added indirection, and remove some of the more
pointless/outdated idioms from the code.
2012-01-11 21:00:11 +01:00
Marijn Haverbeke f2352f4062 Fix regression in resolving of external impls 2012-01-11 17:12:11 +01:00
Kevin Atkinson 08abf8d37f Support explicit discriminant numbers on tag variants.
Addresses issue #1393.

For now disallow disr. values unless all variants use nullary
contractors (i.e. "enum-like").

Disr. values are now encoded in the crate metadata, but only when it
will differ from the inferred value based on the order.
2012-01-10 15:59:57 -08:00
Marijn Haverbeke cc929fc9f9 Clean up translating of def_ids in metadata reader
Reduces the amount of closure allocation, and makes the code cleaner.
2012-01-05 17:03:38 +01:00
Marijn Haverbeke 3a20dda7ea Get external interfaces / impls working
Issue #1227
2012-01-05 14:17:31 +01:00
Marijn Haverbeke 6559aa8bfb Write the iface type of an impl in the crate data
Also, move checking of ifaces into the collect phase of typeck
to give further passes some guarantees.

Issue #1227
2012-01-05 11:04:41 +01:00
Marijn Haverbeke 9f2369dc9f Box arrays of parameter bounds 2012-01-02 15:15:27 +01:00
Marijn Haverbeke 40d5f288c3 Check that type parameter bounds are interface types
Issue #1227
2012-01-02 15:15:27 +01:00
Marijn Haverbeke 816b0ac8ae Box ty_param_bounds_and_ty
It contains a vector, which shouldn't be copied all the time.
2011-12-29 09:29:08 +01:00
Marijn Haverbeke 1ed6a27548 Change representation of type params to handle interface bounds
Issue #1227
2011-12-28 21:18:16 +01:00
Marijn Haverbeke 9292744959 Use the same type of record in ty::ty_fn and ty::method
Removes some more code duplication.
2011-12-23 16:11:35 +01:00
Haitao Li bd300636ee rustc: Implement re-export of renamed modules
Issue #1115
2011-12-20 15:38:40 +08:00
Marijn Haverbeke 619d7c3f72 Associate names with types introduced by items
Issue #828

This is not a full solution yet. To really get sane error messages,
we'll also have to guess the name to apply to literals, which seems
non-trivial.
2011-12-19 13:52:58 +01:00
Marijn Haverbeke 58a81a68ed Finish resolving and calling of crate-external impls
Issue #1227
2011-12-16 22:18:38 +01:00
Niko Matsakis 2833ca478c reorder args to the various vec, option fns so blk comes last 2011-12-16 07:17:23 -08:00
Haitao Li 9bb290c725 rustc: Implement non-renamed re-export across crates
First patch for issue #1115. Not yet ready for re-exported modules which
are renamed when importing them.
2011-12-16 17:16:00 +08:00
Brian Anderson 1f8f6054d2 rustc: Box tag variants to avoid copies 2011-12-15 17:25:58 -08:00
Graydon Hoare fa9ad984fb Copy first batch of material from libstd to libcore. 2011-12-13 16:34:50 -08:00
Haitao Li f3c206c9f4 rustc: Encode crate hash into metadata 2011-12-12 16:15:29 -08:00
Marijn Haverbeke 9cf48d3753 Preparation for kind system overhaul
This goes before a snapshot, so that subsequenct patches can make the
transition without breaking the build. Disables kind checking pass, makes
parser accept both new and old-style kind annotation.

Issue #1177
2011-11-18 10:52:28 +01:00
Niko Matsakis adc79e2f44 remove compile-command from local variable blocks 2011-11-17 11:46:13 -08:00
Haitao Li 5a7249c935 Cleanup unused imports 2011-11-10 19:19:40 -08:00
Marijn Haverbeke 6bcb4a426c Remove last uses of iterators from stdlib
Issue #1056
2011-10-21 12:31:48 +02:00
Brian Anderson 29ad3bdb10 Make fn denote a bare function. Convert fn to fn@ as needed 2011-10-20 18:23:48 -07:00
Niko Matsakis e8a0e592da reimplement some of the unsafe stuff which got lost
- blocks inherit unsafety
  - remove the --check-unsafe flag
  - add unsafe annotations where needed to get things to compile
2011-10-12 16:33:07 -07:00
Niko Matsakis 212707ce84 make native functions markable as unsafe and incorporate that
into the type check
2011-10-12 14:39:34 -07:00
Niko Matsakis e9569371f7 add 'u' to one other place it was missing 2011-10-12 14:26:47 -07:00
Niko Matsakis f304c1bee5 add 'u' to decoder (kinda' important) 2011-10-12 14:26:47 -07:00
Niko Matsakis 29584cc5ac Extend the unchecked block stuff to allow unsafe blocks as well. 2011-10-12 14:26:47 -07:00
Graydon Hoare a4815b6742 Factor imports mindlessly. 2011-09-12 16:13:28 -07:00
Marijn Haverbeke fc6b7c8b38 Reformat for new mode syntax, step 1
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00
Brian Anderson 5c49e4f4e9 Reformat. Issue #855 2011-09-02 22:11:42 -07:00
Brian Anderson 418d09e547 Convert all uses of #ifmt to #fmt. Issue #855 2011-09-01 18:54:03 -07:00
Brian Anderson ab6bb035e5 Rename std::istr to std::str. Issue #855 2011-09-01 17:27:58 -07:00
Brian Anderson e824775d53 Remove std::str. Issue #855 2011-09-01 16:09:15 -07:00
Brian Anderson 498e38b705 Convert uses of #fmt to #ifmt. Issue #855 2011-08-31 11:44:06 -07:00
Brian Anderson 5f57a508af Convert misc compiler bits to istrs. Issue #855 2011-08-27 18:05:59 -07:00
Brian Anderson cbad23a747 Convert pretty-printer to istrs. Issue #855 2011-08-27 15:54:46 -07:00
Brian Anderson 54691f9a6c Convert rustc::metadata to istrs. Issue #855 2011-08-27 15:54:45 -07:00
Brian Anderson 03119fe269 Convert ast::ident to istr. Issue #855 2011-08-27 15:54:44 -07:00
Brian Anderson b2408d57f0 Convert portions of rustc to istrs. Recover a lot of performance.
Issue #855
2011-08-27 15:54:43 -07:00
Brian Anderson fcc031c5b4 Convert std::io to istrs. Issue #855 2011-08-27 15:54:43 -07:00
Tim Chevalier c6155d1fd1 Change "pred" to "pure fn" (but still accept "pred")
This is part 1 of changing the "pred" keyword to "pure fn".
Right now, the compiler accepts both "pred" and "pure fn".
2011-08-24 14:21:37 -07:00
Brian Anderson 152cbaade7 Move functions from syntax::ast to syntax::ast_util
This leaves syntax::ast just defining the AST, which strikes me as somewhat
nicer
2011-08-22 10:44:04 -07:00
Brian Anderson 518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Marijn Haverbeke cd440d338e Remove or _-prefix all unused function arguments
This should make the compilation process a bit less noisy.
2011-08-18 10:02:13 +02:00