Rafael Ávila de Espíndola
698022d351
Update rust to build with newer llvm versions.
2011-06-08 14:08:24 -04:00
Patrick Walton
08dcb9306b
rustc: Remove all traces of the unification cache
2011-06-08 10:52:12 -07:00
Rafael Ávila de Espíndola
d360c481e8
Don't force the fetch of main.o from main.a, we are not using main.a anymore.
2011-06-08 13:47:21 -04:00
Josh Matthews
2235fb73ef
Add optional message to fail.
2011-06-08 04:02:55 -04:00
Patrick Walton
0857d22c04
rustc: Print out a real error message on unresolved types. Puts out burning tinderbox.
2011-06-07 23:03:41 -07:00
Patrick Walton
ddec6b5f47
rustc: Use a set-based approach to unification; remove ty_bound_param and ty_local.
...
Sorry, big perf regression; will fix soon.
2011-06-07 19:33:18 -07:00
Graydon Hoare
721c5bbee8
More work on proper linkage name-mangling. Almost right, aside from version numbers.
2011-06-07 18:08:17 -07:00
Rafael Ávila de Espíndola
7034a28241
Update the snapshot.
2011-06-07 20:40:31 -04:00
Lindsey Kuper
a4ca75e6af
For consistency, use ctxt instead of ty_ctxt outside of unify.
2011-06-07 15:18:30 -07:00
Lindsey Kuper
ab69c4a98f
Removing dead code and redundant fails; changing fails to sess.bug
...
calls (issue #444 ).
2011-06-07 14:12:34 -07:00
Rafael Ávila de Espíndola
b1d6f12a05
Don't put a copy of main (the C one) in each binary we produce. This is a step
...
in getting a driver that works on all linux systems.
Sorry for the linker hacks, I will remove them after snapshotting a new compiler.
2011-06-07 16:56:27 -04:00
Josh Matthews
df9cf0be9b
Add multiline, whitespace-eating strings.
2011-06-07 11:21:10 +02:00
Graydon Hoare
319156c8d1
Begin tidying up name-mangling rules.
2011-06-06 15:48:47 -07:00
Rafael Ávila de Espíndola
ee54fa5c7d
Implement enough support for pointer to get an identity function working.
2011-06-06 16:36:01 -04:00
Marijn Haverbeke
4bd5f834b0
First take on an alias-safety checker
...
The alias checker works by ensuring that any value to which an alias
is created is rooted in some way that ensures it outlives the alias.
It is now disallowed to create an alias to the content of a mutable
box, or to a box hanging off a mutable field. There is also machinery
in place to prevent assignment to local variables whenever they are
the root of a live alias.
2011-06-06 21:24:03 +02:00
Marijn Haverbeke
2b334f061a
Change unsafe aliases
...
This litters aberrations like 'alt({foo.bar}) { ... }' and f({*baz})
though the code (mostly in trans.rs). These are a way to explicitly
copy the given value so that it can be safely aliased. At some point
we'll probably want a more explicit copy operator.
2011-06-06 21:09:55 +02:00
Brian Anderson
4d8f715dab
rustc: Make resolve::unresolved return !. Remove redundant fails
2011-06-05 00:11:44 -04:00
Lindsey Kuper
2736d63db0
Adding comments; removing dead code.
2011-06-04 19:38:11 -07:00
Lindsey Kuper
5f95766a40
Remove redundant 'fail' exprs and dead code; use sess.bug or
...
sess.span_err instead of 'fail'. (issue #444 )
2011-06-04 18:34:40 -07:00
Brian Anderson
53ea2a4751
stdlib: Use spans for #fmt errors originating in std
...
Issue #444
2011-06-04 19:48:19 -04:00
Brian Anderson
a177dc485b
rustc: Reenable debug logging in extfmt
...
This is not obnoxious now that logging is off by default
2011-06-04 17:57:53 -04:00
Brian Anderson
4b566fe7f9
rustc: Hide the parser from syntax extensions
...
Eventually extensions will probably need access to the parser again, but it'll
be in a different form.
2011-06-04 17:51:59 -04:00
Brian Anderson
c88fa92de4
rustc: Generate extension annotations from ext_ctxt instead of parser
2011-06-04 17:44:24 -04:00
Brian Anderson
1d6f1dc58d
rustc: Add a next_ann method to ext_ctxt
...
After this we can remove the parser from the syntax extensions, at least for
now.
2011-06-04 17:31:44 -04:00
Brian Anderson
3ca5fff195
rustc: Use spans for #env errors
...
Issue #444
2011-06-04 17:14:32 -04:00
Brian Anderson
ac83e34dc6
rustc: Report unimplemented #fmt features with spans
2011-06-04 17:10:08 -04:00
Brian Anderson
dd588519bd
rustc: Add a span_unimpl method to ext_ctxt
2011-06-04 17:10:08 -04:00
Brian Anderson
ecf1bd7651
rustc: Use spans on extfmt error messages
...
Issue #444
2011-06-04 17:10:04 -04:00
Brian Anderson
794221b353
rustc: Return the correct span from parse_seq
2011-06-04 16:36:08 -04:00
Brian Anderson
c18f2e2dac
rustc: Pass the correct span to syntax extensions
2011-06-04 15:57:13 -04:00
Brian Anderson
af46f3ed0d
rustc: Introduce ext module. Move some things from parser to ext.
...
Introduce an ext_ctxt record to provide a span_err method for use while
expanding syntax extensions. Hopefully it will be useful for other things.
2011-06-04 15:49:42 -04:00
Paul Stansifer
dbd066a02a
"macro" -> "syntax extension" for now
2011-06-03 18:47:11 -07:00
Paul Stansifer
79fcd51b46
Make the macro system more modular.
2011-06-03 18:47:11 -07:00
Graydon Hoare
cfc75695a5
Register new snapshots.
2011-06-03 18:47:08 -07:00
Graydon Hoare
f29d04672b
Remove zerobreak between foo and ( on a call expr. Never looks right.
2011-06-03 17:32:29 -07:00
Graydon Hoare
f34d19a242
Make pp more conservative about inserting trailing comments mid-list.
2011-06-03 17:32:29 -07:00
Lindsey Kuper
69325f815d
More comments.
2011-06-03 17:16:28 -07:00
Lindsey Kuper
dcf7fbf833
Comments and cleanup.
2011-06-03 17:09:50 -07:00
Patrick Walton
cb4c969ba6
rustc: Add a "smallintmap" implementation
2011-06-03 16:15:14 -07:00
Graydon Hoare
088ab03fdb
Add spans to fields, args, methods. Improve pp of same.
2011-06-03 15:42:42 -07:00
Graydon Hoare
8235e76a47
Tidy up printing of ty_fn.
2011-06-03 15:42:42 -07:00
Rafael Ávila de Espíndola
429e21414b
Parse pointers in metadata.
2011-06-03 15:13:10 -04:00
Rafael Ávila de Espíndola
ba74c6cfdc
Boilerplate for pointers. Sorry for missing this on the first patch.
2011-06-03 15:02:58 -04:00
Rafael Ávila de Espíndola
18b63865ce
Accept *foo as a pointer to foo.
...
This is accepted everywhere, since just passing a pointer is safe.
2011-06-03 14:34:19 -04:00
Marijn Haverbeke
07667d29aa
Temporarily xfail compile-fail/pattern-tyvar
...
So that the tinderboxes can go green again. Patrick, please look into
this at some point.
2011-06-03 10:23:13 +02:00
Lindsey Kuper
dc29dead2e
Removing redundant "fail"s.
2011-06-02 18:15:29 -07:00
Patrick Walton
ad9afefa10
rustc: Typecheck patterns from the top down; remove pushdown_pat
2011-06-02 18:11:26 -07:00
Tim Chevalier
76bcbfd269
Un-XFAIL break-value
...
It passes thanks to the previous two commits.
2011-06-02 17:52:04 -07:00
Tim Chevalier
ba377c043d
Handle _|_ values properly in trans
...
Generate an LLVMUndef value of the proper type for an argument of
type _|_. Otherwise we get an LLVM assertion failure.
2011-06-02 17:52:04 -07:00
Tim Chevalier
468786e36d
Fix unification bug
...
Hello from SFO Terminal 3!
unify_fn_common had the expected and actual types reversed in one
place. This was causing the type of an occurence of a function f
with type fn(int) -> T to be set to fn(_|_) -> T at a call site like
f(fail); I think this was also making some of the type error messages
come out backwards, but I haven't checked.
Also: ty_bot does not contain pointers
2011-06-02 17:52:04 -07:00
Patrick Walton
c515ed13de
Merge pull request #450 from paulstansifer/quick_error_message_fix_2
...
Flatten functions and objects in trans::simplify_type.
2011-06-02 17:43:11 -07:00
Paul Stansifer
20bd927c3f
Flatten functions and objects in trans::simplify_type.
2011-06-02 17:40:12 -07:00
Graydon Hoare
cb61d7b38e
Pretty-print literals exactly as we saw them in the source.
2011-06-02 17:18:49 -07:00
Lindsey Kuper
3a6b5576ac
Refactor make_fp_cmp_glue and make_integral_cmp_glue into one.
2011-06-02 16:35:25 -07:00
Paul Stansifer
1377e9b341
Implement pcwalton's code review suggestions.
2011-06-02 15:12:17 -07:00
Paul Stansifer
5cd10d2fef
Error message, instead of segfault, when recursive types are used.
2011-06-02 14:03:17 -07:00
Patrick Walton
12f86e6f2f
rustc: Print node IDs for more types of nodes
2011-06-02 11:29:17 -07:00
Patrick Walton
7c6a0f189e
rustc: Tiny style fix in pprust::rust_printer
2011-06-02 11:29:17 -07:00
Graydon Hoare
f919af0f8f
Remove offending hyphen.
2011-06-02 10:34:19 -07:00
Marijn Haverbeke
fd5428a95e
Re-xfail lib-io test. Seems to only work on Linux
2011-06-02 17:58:49 +02:00
Marijn Haverbeke
5144f790fe
Fix and un-xfail vec-append test
2011-06-02 16:45:26 +02:00
Marijn Haverbeke
75ffe657db
Un-xfail multi test
2011-06-02 16:21:14 +02:00
Marijn Haverbeke
8ac94d59e8
Un-xfail lib-io test
2011-06-02 16:19:30 +02:00
Marijn Haverbeke
830c58b651
Un-xfail obj-dtor-2
2011-06-02 16:12:20 +02:00
Patrick Walton
78374d11ce
rustc: Add a new mode to the pretty printer that prints out node IDs, for debugging
2011-06-01 18:53:52 -07:00
Patrick Walton
eae3036179
rustc: Remove else-after-return in main
2011-06-01 18:38:00 -07:00
Patrick Walton
d43f60e5d4
rustc: Fold --pretty and --typed-pretty into a single option with an optional argument
2011-06-01 18:32:05 -07:00
Patrick Walton
8c3809afd0
stdlib: Add some functions to getopts to deal with optional arguments more easily
2011-06-01 18:32:05 -07:00
Tim Chevalier
24c9d7e5f8
Improve type error message for non-constructor in pattern
2011-06-01 18:15:12 -07:00
Tim Chevalier
1402cd101b
Redo typestate-related data structures to support predicate constraints. No actual support yet, just infrastructure.
2011-06-01 18:14:48 -07:00
Tim Chevalier
af4554aadf
Add a few more to_str functions
2011-06-01 17:47:59 -07:00
Tim Chevalier
ac4ef1741e
Allow constraint args to be literals
2011-06-01 17:45:13 -07:00
Lindsey Kuper
528c6516f0
Use span_err instead of err. Fixes issue #444 .
2011-06-01 17:22:23 -07:00
Patrick Walton
af9272f70e
rustc: Remove rustboot workaround from walk::default_visitor()
2011-06-01 16:52:22 -07:00
Patrick Walton
8851ae0423
rustc: Allow walking over patterns
2011-06-01 16:47:24 -07:00
Graydon Hoare
6e058ff54e
Register new snapshots.
2011-06-01 16:39:31 -07:00
Graydon Hoare
1f915ef7ce
Permit breaking before fn args block.
2011-06-01 16:39:31 -07:00
Lindsey Kuper
dba9caeba9
Comments.
2011-06-01 16:39:52 -07:00
Graydon Hoare
1b67fbdfd3
More tweaks to comment preservation rules.
2011-06-01 15:29:38 -07:00
Graydon Hoare
198f6a247e
Print iters as iters not fns.
2011-06-01 13:18:16 -07:00
Graydon Hoare
023bbc0449
Add a space after @mutable.
2011-06-01 13:12:12 -07:00
Graydon Hoare
19f85cc9c4
Print ty_bot properly.
2011-06-01 13:08:08 -07:00
Rafael Ávila de Espíndola
a6ca9c2922
Don't create an empty section.
2011-06-01 15:59:28 -04:00
Rafael Ávila de Espíndola
30efdeeca1
Visibility is an ELF concept and protected visibility is not very well implemented,
...
avoid using it for now.
Instead, mark pairs that are not needed elsewhere as internal.
2011-06-01 15:45:31 -04:00
Graydon Hoare
2ef2bda276
Move brace/if/for/while/do/alt/spawn exprs into bottom_expr rule.
2011-06-01 12:42:28 -07:00
Graydon Hoare
4eef7b613c
Bug fixes to pprust.
2011-06-01 12:26:42 -07:00
Graydon Hoare
e5dc138dfa
Buffer pending whitespace in printer so as not to introduce trailing whitespace lines.
2011-06-01 12:01:42 -07:00
Graydon Hoare
681f0c7a2b
Support printing globs.
2011-06-01 11:39:20 -07:00
Graydon Hoare
ae16639dfa
Slightly more aggressive about inserting whitespace. Getting frustrated with comments.
2011-06-01 11:39:20 -07:00
Lindsey Kuper
649a7bf38a
Comments and cleanup.
2011-06-01 11:34:52 -07:00
Paul Stansifer
9f5dddf08c
Now imports are not re-exported unless 'export' is explicitly used.
2011-05-31 18:43:26 -07:00
Graydon Hoare
0235e742f6
Give up on use of huge_word for comments. Still not formatting quite right, but closer.
2011-05-31 17:39:15 -07:00
Michael Sullivan
f4df2e4974
Fix pretty printer for move.
2011-05-31 17:39:14 -07:00
Michael Sullivan
78b0d33c35
More tests for <-.
2011-05-31 17:39:14 -07:00
Michael Sullivan
fd1029e6dd
Support move as an initializer.
2011-05-31 17:39:14 -07:00
Michael Sullivan
68b4688875
Add some simple tests for move.
2011-05-31 17:39:14 -07:00
Michael Sullivan
c232964301
Implement move semantics.
2011-05-31 17:39:14 -07:00
Michael Sullivan
5e7bba3d23
Insert plumbing for move that behaves just like assign.
2011-05-31 17:39:14 -07:00
Eric Holk
43342e9a66
Updating snapshot
2011-05-31 17:40:17 -07:00
Eric Holk
84a56ed7cd
Teach the compiler to understand yield and join, as well as using task as a type name.
2011-05-31 16:28:13 -07:00