Commit Graph

3989 Commits

Author SHA1 Message Date
Niko Matsakis
bceea8339a change def's that are always local to use node_id, add --inline opt 2012-02-28 06:31:28 -08:00
Niko Matsakis
55a642c2d4 correct freevar encoding, add more debugging output 2012-02-28 06:31:28 -08:00
Tim Chevalier
c28c258f91 Disallow type parameters in the main() function
Closes #1900
2012-02-25 11:06:01 -08:00
Niko Matsakis
acb129c541 Add temp cleanups for copy/move mode args when other args fail. Fixes #1374 2012-02-24 20:46:27 -08:00
Niko Matsakis
f3ca50c9ca Encode/decode AST into metadata, re-instantiate inlined items 2012-02-24 20:46:27 -08:00
Brian Anderson
9982a2a841 rustc: Don't add duplicate entries to exp_map 2012-02-23 21:52:41 -08:00
Graydon Hoare
b44be95e45 Support basic, unsophisticated, somewhat wrong export-globs. 2012-02-23 18:39:14 -08:00
Graydon Hoare
1f4a6bb3ad Treat export-globs as import-globs for sake of linking. 2012-02-23 18:39:12 -08:00
Graydon Hoare
893bbea576 Minor renaming to help my comprehension. 2012-02-23 18:39:11 -08:00
Marijn Haverbeke
8733386bcc Make sure fold_ty preserves associated def_ids
Closes #1884
2012-02-23 17:44:03 +01:00
Marijn Haverbeke
780f8277f4 Finish cleanup of core::str
Closes #1849
2012-02-23 17:00:19 +01:00
Marijn Haverbeke
d802c1fbd2 Various cleanups and optimizations in core::str 2012-02-23 17:00:19 +01:00
Kevin Cantu
c3318f29fe (core::str) rename substr_len_bytes to substr_len, and delete unused byte_index[_from] 2012-02-23 17:00:19 +01:00
Kevin Cantu
7782f5d692 (core::str) remove len_bytes alias 2012-02-23 17:00:19 +01:00
Kevin Cantu
1b957c0942 (core::str) replace uses of unsafe::slice_bytes; replace find[_from]_bytes with find[_from] 2012-02-23 17:00:19 +01:00
Kevin Cantu
cec053487c (core::str) stop using index_chars 2012-02-23 17:00:19 +01:00
Kevin Cantu
6ea3d7935e (core::str) replace byte_index[_from] with index[_from] 2012-02-23 17:00:19 +01:00
Kevin Cantu
454b53a7c2 (core::char) rename slice -> slice_chars 2012-02-23 17:00:19 +01:00
Kevin Cantu
969fdf419c (core::str) rename index -> index_chars 2012-02-23 17:00:19 +01:00
Kevin Cantu
98447f5236 (core::str) mostly rename len -> len_chars 2012-02-23 17:00:19 +01:00
Brian Anderson
27ab663845 rustc: Don't ignore attributes inside empty mods. Closes #1655 2012-02-22 21:47:23 -08:00
Brian Anderson
99a48660d1 rustc: Allow any integral types on rhs of shift ops 2012-02-22 17:26:08 -08:00
Tim Chevalier
4acfcd8c2f Improve error message for use of a non-pure-fn in a pred
Closes #1883
2012-02-22 10:59:52 -08:00
Marijn Haverbeke
cb2f43cbf4 Stop normalizing patterns
The check for whether a pat_ident is a variant or a binding
is simple and fast. Normalizing patterns again and again is
slow and error-prone (several places were forgetting to do it).
2012-02-22 16:57:23 +01:00
Marijn Haverbeke
1e5266260a Take move captures in account in mutability checker
Closes #1461
2012-02-22 13:35:17 +01:00
Marijn Haverbeke
8015e6d52b Return a new type var instead of nil when failing to typecheck a field
The previous solution was usually causing a second spurious error
message.
2012-02-22 13:34:43 +01:00
Marijn Haverbeke
ffd50b9cdf Make the various from_str functions return options
So that they can be used with user input without causing task
failures.

Closes #1335
2012-02-22 13:18:15 +01:00
Marijn Haverbeke
ad03761a97 Remove preconditions from libraries
Closes #1805
2012-02-22 11:47:47 +01:00
Marijn Haverbeke
e57b6775c3 Clean up small things in syntax submodules 2012-02-22 11:16:25 +01:00
Brian Anderson
77a01054fa rustc: Generate crates with #ast 2012-02-21 15:34:26 -08:00
Marijn Haverbeke
9d20ed7bf9 Clean up unification code 2012-02-21 17:08:14 +01:00
Marijn Haverbeke
ff927f18f5 Clean up some FIXMEs in middle:: modules
Rename all TODOs to FIXMEs
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
92a45f5582 Move trans::type_of code into its own file
Slowly shrinking base.rs
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
d85d4f55f7 Include @ in crate_ctxt and fn_ctxt type definitions
So that code using them doesn't have to spell it out constantly.
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
b1d7f252a9 Remove unused tydesc argument to upcall_shared_malloc 2012-02-21 17:08:14 +01:00
Marijn Haverbeke
389aff333d Make the cleanup tag in resource types a u8
Closes #1184
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
5458da0fd9 Remove some checks and associated FIXMEs from trans code
Such intentions are better tracked in the bug tracker, don't need
to litter the code with repetetive comments.
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
789a1ae356 Clean up a number of TODOs in the trans modules
Rename the ones that I didn't handle to FIXME
2012-02-21 14:20:18 +01:00
Tim Chevalier
4cd3d4ab1e More work on typechecking classes
classes-simple doesn't fail until trans now!
2012-02-20 22:26:19 -08:00
Brian Anderson
4220dcf1e9 core: New task API 2012-02-20 18:58:04 -08:00
Tim Chevalier
ac7aa73b3e Oops, my whitespace is showing 2012-02-20 17:19:09 -08:00
Tim Chevalier
2299d204e4 Further work on resolving and typechecking classes
Class tests aren't working yet, but they fail a little later :-)

Also, make the parser correctly set a constructor's result type to
its enclosing class type.
2012-02-20 17:16:52 -08:00
Tycho Sci
2e63bc5d82 cargo: Use $sysroot/$libdir/cargo as work dir
On win32  environment, it's "$sysroot/bin/cargo".
On unix-y environment, it's "$sysroot/lib/cargo".
2012-02-20 17:55:35 +09:00
Brian Anderson
d2294a2d99 rustc: Add missing space to error message 2012-02-18 14:04:24 -08:00
Brian Anderson
4370188055 Merge pull request #1860 from erickt/master
add str::find_from_bytes and str::index_from_bytes
2012-02-18 13:17:12 -08:00
Graydon Hoare
ef6f628589 Refactor view_path to parse (but not yet process) export globs, unify code paths. 2012-02-17 23:05:20 -08:00
Brian Anderson
4e44437180 rustc: Make resolve more forgiving of missing external crates
Rustdoc needs to be able to resolve locals without resolving externals
2012-02-17 17:34:05 -08:00
Brian Anderson
a5ede9d345 rustdoc: Resolve imports and reexports 2012-02-17 16:00:39 -08:00
Marijn Haverbeke
f7f73c79ec Move debuginfo into trans 2012-02-17 23:03:12 +01:00
Marijn Haverbeke
ff42964546 Clean up some of trans using block combinators
`with_scope` and `with_cond` can be used to wrap a piece of code in a
scope block, or conditionalize it on a value, without doing all the
context-creation and jumping by hand.

Also renames @block_ctxt to block to reduce noise.
2012-02-17 23:03:12 +01:00