Commit Graph

3210 Commits

Author SHA1 Message Date
Brian Anderson f7ebe23ae1 Add the ability to ignore tests by compiler config
[test]
[ignore(cfg(target_os = "win32"))]
2011-10-29 18:30:32 -07:00
Brian Anderson da064ef884 Add more logging to crate resolution 2011-10-29 15:04:44 -07:00
Brian Anderson e0f44730e8 rustc: Support 'companion mod's for crates and directory mods
Under this scheme when parsing foo.rc the parser will also look for
foo.rs to fill in the crate-level module, and when evaluating a
directory module directive it will look for a .rs file with the
same name as the directory.
2011-10-29 01:40:20 -07:00
Brian Anderson 2cebef095e stdlib: Make io failures recoverable by returning a result 2011-10-29 01:25:11 -07:00
Matt Brubeck b510a74a36 Cleanup: Remove uneccesary generic_cmp function. 2011-10-28 14:44:39 -07:00
Matt Brubeck 000b2fe9a6 Use IEEE 754 semantics for NaN (Issue #1084) 2011-10-28 14:44:39 -07:00
Brian Anderson f96ad30dfc stdlib: Make reinterpret_cast and leak unsafe 2011-10-28 14:19:17 -07:00
Brian Anderson 83219269d5 rustc: Remove broken --depend flag 2011-10-28 12:58:10 -07:00
Brian Anderson 2a2945e5de rustc: -h cleanup 2011-10-28 12:51:46 -07:00
Brian Anderson d106a336cc rustc: Change --OptLevel to --opt-level 2011-10-28 12:49:19 -07:00
Brian Anderson bab2b37fd0 rustc: Use consistent error handling in main 2011-10-28 11:57:01 -07:00
Brian Anderson 8da8a4a018 rustc: Extract error reporting from codemap 2011-10-28 11:43:07 -07:00
Brian Anderson f2a3270b9c Reorder statements in rustc main to avoid bounds check 2011-10-28 11:17:07 -07:00
Haitao Li a81fdf0a5a rustc: Lift output file name handling out of main 2011-10-28 11:12:10 -07:00
Haitao Li 7bb9a54c73 Produce dyn libraries with proper names
Issue #744
2011-10-28 11:05:43 -07:00
Marijn Haverbeke 7dacccde94 Make shared kind the default only for generic functions
You almost never want a function with pinned type params. For
types, objects, resources, and tags, pinned types are actually often
more sane. For most of these, shared rarely makes sense. Only tricky
case is objs -- you'll have to think about the kinds you want there.

Issue #1076
2011-10-28 17:00:14 +02:00
Marijn Haverbeke 6fe7aa4aff Move to blocks, rather than fn@s, in parser.rs 2011-10-28 16:41:56 +02:00
Marijn Haverbeke 7a0aee74bf Move to short type parameter keywords
Issue #1076
2011-10-28 15:25:33 +02:00
Marijn Haverbeke cba4ddc6a4 Start accepting short keywords for parameter kinds
This is a pre-snapshot commit to be able to implement #1076 without
the bootstrap compiler getting in my way.
2011-10-28 14:57:35 +02:00
Brian Anderson 8222fa4e27 Use the std::term color constants in the codemap
Exported constants work now. Woo!
2011-10-27 13:52:00 -07:00
Matt Brubeck 5d6fe1a533 Remove uint::max/min in favor if math::max/min 2011-10-27 13:37:53 -07:00
Marijn Haverbeke 013107a25c Properly take mutable object fields into account during alias analysis
Closes #1055
2011-10-25 17:57:26 +02:00
Marijn Haverbeke cfdf193c46 Update our code to new type parameter kind syntax
Closes #1067
2011-10-25 15:56:55 +02:00
Marijn Haverbeke 58c82a8da2 Remove support for @/~-style type param kind annotation
Issue #1067
2011-10-25 15:50:45 +02:00
Marijn Haverbeke 2884c722fe Step one towards new type param kind syntax
Issue #1067

Needs a snapshot to finalize.
2011-10-25 14:31:56 +02:00
Niko Matsakis c78b1639b4 fix c-stack-cdecl when used w/ i64 2011-10-24 17:03:18 -07:00
Niko Matsakis d41385a69b kill errant log_err 2011-10-24 16:06:18 -07:00
Niko Matsakis 8f2d75d53c switch over sqrt from llvm to c-stack-cdecl, exposing a bug in
the supported return types of upcall_c_stack
2011-10-24 16:06:18 -07:00
Brian Anderson 81a44ccacf Remove hack to break the AST fold cycle. Closes #998 2011-10-21 17:47:31 -07:00
Niko Matsakis 020726c981 update trans_c_stack_native_call() to use type_of_explicit_args()
currently trans_c_stack_native_call() had some ad-hoc code for
determining the type of the arguments. this code was not in
agreement with the rest of trans. now it uses the same code path.
2011-10-21 16:19:28 -07:00
Niko Matsakis 80102c9d24 avoid extra load for by_mutable_ref parameters 2011-10-21 16:19:27 -07:00
Marijn Haverbeke b0a72ee06a Be more careful when parsing block calls
Previously, the parser would try to interpret this as a block call:

    if true {} // No semicolon
    {|i, am, a, block|};

Which, though unlikely, might come up in practice.
2011-10-21 14:55:54 +02:00
Marijn Haverbeke 7114702496 Change the way block calls are parsed, mark them as block-calls.
This makes it possible to omit the semicolon after the block, and will
cause the pretty-printer to properly print such calls (if
pretty-printing of blocks wasn't so broken). Block calls (with the
block outside of the parentheses) can now only occur at statement
level, and their value can not be used. When calling a block-style
function that returns a useful value, the block must be put insde the
parentheses.

Issue #1054
2011-10-21 14:24:14 +02:00
Marijn Haverbeke 0ce40f60e7 Drop support for iter, put, and for-each
Closes #1056
2011-10-21 13:47:24 +02:00
Marijn Haverbeke 050170d2af Remove remaining uses of iter and for-each
Issue #1056
2011-10-21 13:34:35 +02:00
Marijn Haverbeke fd5a08384d Move ast_util::pat_bindings over to new iter system.
Issue #1056
2011-10-21 12:41:42 +02:00
Marijn Haverbeke 6bcb4a426c Remove last uses of iterators from stdlib
Issue #1056
2011-10-21 12:31:48 +02:00
Marijn Haverbeke 4ebbbe597e Move hash table iteration over to block-taking functions
Issue #1056
2011-10-21 12:21:27 +02:00
Marijn Haverbeke f134261ae6 Support Ruby-style block argument syntax
Issue #1054
2011-10-21 11:32:26 +02:00
Brian Anderson d24894e181 Remove unused empty_fn_ty from rustc::front::test 2011-10-20 20:54:12 -07:00
Brian Anderson 4ef2c37059 Give native functions proto_bare 2011-10-20 20:53:52 -07:00
Brian Anderson ebc61e39d7 Remove temporary fn# syntax 2011-10-20 20:34:04 -07:00
Brian Anderson 6fb9d4f83b Remove typeck::proto_to_ty_proto 2011-10-20 20:30:20 -07:00
Brian Anderson 5c38f7dfd7 Don't allow fn@ items
fn@ is intended to be caputring but isn't implemented.
2011-10-20 18:23:48 -07:00
Brian Anderson 9efdd0f326 Merge ast::proto_shared and ast::proto_closure
Now they are both just proto_shared and proto_shared takes an
argument indicating that it is sugared as 'lambda'
2011-10-20 18:23:48 -07:00
Brian Anderson 4b30a06abe Rename ast::proto_fn to ast::proto_shared 2011-10-20 18:23:48 -07:00
Brian Anderson 29ad3bdb10 Make fn denote a bare function. Convert fn to fn@ as needed 2011-10-20 18:23:48 -07:00
Brian Anderson f324704c0a Parse obj methods as proto_bare
I don't know if this is the right thing to do, but it works
and it lets 'fn' always mean proto_bare
2011-10-20 18:23:48 -07:00
Brian Anderson 391e12124b Tweak typecheck to enforce covariance on higher-order function arguments 2011-10-20 18:23:48 -07:00
Brian Anderson 342a400e79 Remove type coercion from fn to block
fn is a proper subtype of block now
2011-10-20 18:23:48 -07:00