Commit Graph

8612 Commits

Author SHA1 Message Date
Tim Chevalier
11610f9ca1 In typeck, don't call ty::store_iface_methods on private methods
This was resulting in a different error message depending on whether
the private method you were trying to call was in the same crate
or a different one.
2012-03-26 10:46:37 -07:00
Niko Matsakis
21111660ca Improve type inference to compute LUB/GLB 2012-03-26 10:34:58 -07:00
Tim Chevalier
2112c391cd Remove stray comment 2012-03-26 10:04:46 -07:00
Tim Chevalier
c282810ab0 Enforce privacy declarations for class fields and methods 2012-03-26 10:00:33 -07:00
Marijn Haverbeke
a00538b3b3 Fix return-in-block in cargo
Which is apparently not built as part of make check
2012-03-26 13:16:29 +02:00
Marijn Haverbeke
b89a5af2ab Check in a forgotten new file 2012-03-26 12:54:06 +02:00
Marijn Haverbeke
87e097a853 Disallow ret inside of block functions
Also adds proper checking for cont/break being inside a loop.

Closes #1854
Issue #1619
2012-03-26 12:45:47 +02:00
Marijn Haverbeke
e4c141a331 Fix bug in generation of non-generic resource dtors
Issue #1944
2012-03-26 11:31:17 +02:00
Niko Matsakis
763142816e repair the build---also, make try/commit work over both ty/region vars 2012-03-25 13:32:13 -07:00
Jacob Parker
f5c91d10dd Fixed vim highlighting for \' (and other) escapes in char literals 2012-03-25 16:26:48 -04:00
Patrick Walton
8462c6c831 rustc: Generalize several parts of infer in preparation for using them for region bounds as well 2012-03-24 23:14:45 -07:00
Niko Matsakis
1d7d5c16b3 correct more broken tests 2012-03-24 22:15:34 -07:00
Niko Matsakis
ac4294a176 add test that was failing from tedh 2012-03-24 21:59:16 -07:00
Niko Matsakis
7ae757ff1a add annotation for variable that used to infer to bot 2012-03-24 21:55:53 -07:00
Niko Matsakis
bf9d714d46 Avoid unifying vars when possible; handle bot (more) correctly 2012-03-24 21:38:43 -07:00
Niko Matsakis
ee5d0f5e3f new test which features conflicting variance requirements 2012-03-24 21:38:42 -07:00
Patrick Walton
bd6e6e349b rustc: Stub some region resolution stuff in infer 2012-03-24 21:30:57 -07:00
Patrick Walton
f507b54f19 test: Rename run-pass/simple-regions.rs to run-pass/regions-simple.rs
This groups all the region tests under regions-*.
2012-03-24 19:21:51 -07:00
Patrick Walton
8bef2716fe test: Add a simple test for dangling pointers 2012-03-24 19:00:08 -07:00
Patrick Walton
7c27ec72d1 rustc: Add some simple region checking (no region vars yet)
Amazingly, this causes no test cases to fail!
2012-03-24 18:44:05 -07:00
Niko Matsakis
3e385a80d4 prune unused unification code; leave region code that still needs to be ported 2012-03-24 09:22:09 -07:00
Tim Chevalier
aae14e352a Allow methods to call other methods in the same class 2012-03-23 23:10:45 -07:00
Tim Chevalier
bebdfe8ce8 Add another test for cross-crate method calls 2012-03-23 23:10:45 -07:00
Niko Matsakis
6b84cee5d3 add a few measly comments, remove some dead code 2012-03-23 22:36:37 -07:00
Niko Matsakis
f5edb5ee18 xfail-test regions tests 2012-03-23 22:06:39 -07:00
Niko Matsakis
042c532a08 Implement new inference algorithm. 2012-03-23 21:47:28 -07:00
Tim Chevalier
40443768b1 Fix breakage 2012-03-23 20:53:38 -07:00
Tim Chevalier
8bbd78075f Handle self correctly when translating classes
This change uses the same code for handling the "self" reference for
classes as is already used for impls/ifaces. This allows removing the
extra maybe_self_id argument (which was just for classes) to trans_closure
that I added before. I also rewrote the translation for class ctors so
that it doesn't generate new AST nodes (instead translating directly).

Also changed visit so that it visits class ctors correctly with visit_fn,
and changed typestate to not do return-checking when visiting a class ctor.
2012-03-23 20:37:50 -07:00
Patrick Walton
713b3585c6 rustc: Remove // */ sequence from trans/base.rs; it breaks vi syntax highlighting 2012-03-23 18:21:23 -07:00
Patrick Walton
0eae490669 rustc: Stub a table of borrowings 2012-03-23 17:28:24 -07:00
Patrick Walton
c56910fc9a rustc: Make region folding not descend into function types
Since region parameters are always universally quantified at the function
level, this would be incorrect.
2012-03-23 17:06:24 -07:00
Tim Chevalier
1ffaedac2b Remove unneeded code 2012-03-23 16:25:10 -07:00
Tim Chevalier
17cd9b4308 Remove ctypes -- it's no longer used. 2012-03-23 16:25:10 -07:00
Tim Chevalier
cb0eeed539 Remove a FIXME and workaround that appear to be obsolete 2012-03-23 16:25:10 -07:00
Tim Chevalier
372673b58c Remove char::to_lower, char::to_upper, use libc versions instead
As per Graydon's comments on #1985: remove char::to_lower and
char::to_upper. The str versions of these functions now call
libc::tolower and libc::toupper (using wrappers that cast between
char and c_char). Not sure how much better that is, but it at least
makes it clearer that these functions are Unicode-unsafe.
2012-03-23 16:25:10 -07:00
Patrick Walton
cab4f1685b test: Add a test case that ensures ret &EXPR works. 2012-03-23 16:18:28 -07:00
Patrick Walton
cba007e6c8 rustc: Fix parsing of ret &EXPR
The parser didn't think that `&` could start an expression.
2012-03-23 16:15:58 -07:00
Patrick Walton
7592dae949 test: Fix unresolved name in regions-mock-trans-impls.rs 2012-03-23 15:44:37 -07:00
Patrick Walton
c56ec7b02a test: Add a version of the "mock-trans" regions test case that uses impls 2012-03-23 15:28:47 -07:00
Patrick Walton
b9c4dbeb33 test: Fix leak in regions-mock-trans 2012-03-23 15:17:34 -07:00
Patrick Walton
df77eb433b test: Fix whitespace at EOL 2012-03-23 15:05:39 -07:00
Patrick Walton
aa0f25ae31 test: Add a trans.rs-workalike test case for regions 2012-03-23 14:42:39 -07:00
Patrick Walton
7931a61ebb rustc: Redo region inference to be a bit less broken 2012-03-23 12:22:58 -07:00
Marijn Haverbeke
84019aa0dc Keep an explicit map of things that have to be spilled
This prevents us from spilling locals more than once.

Closes #2040
2012-03-23 16:08:01 +01:00
Marijn Haverbeke
1b81c5112a Remove last vestiges of old-style intrinsics
Closes #2048
2012-03-23 16:08:01 +01:00
Marijn Haverbeke
837478ccb0 Register new snapshot 2012-03-23 16:07:54 +01:00
Marijn Haverbeke
a84b56bc70 Remove more needless context threading in trans 2012-03-23 14:45:47 +01:00
Marijn Haverbeke
5cfbbbc9ed Revert resolve kludge that was working around #2049 2012-03-23 13:32:00 +01:00
Marijn Haverbeke
3e7a514521 Fix inconsistent-iteration hazard in map.rs
Closes #2049
2012-03-23 13:30:29 +01:00
Marijn Haverbeke
683085b3f0 Stop trying to link intrinsics.bc 2012-03-23 12:57:37 +01:00
Marijn Haverbeke
ca71e01bce Interpret native mods with ABI rust-intrinsic as builtins 2012-03-23 12:52:53 +01:00
Marijn Haverbeke
52d618a99a Revert removal of intrinsics
Oops. We can't do this yet until the next snapshot.
2012-03-23 12:51:20 +01:00
Marijn Haverbeke
c704d5a5d3 Clean up some confused shuffling of def_ids in resolve.rs 2012-03-23 12:38:36 +01:00
Marijn Haverbeke
562afef216 Rename builtin back to intrinsic
As per Graydon's request

Issue #1981
2012-03-23 12:21:56 +01:00
Marijn Haverbeke
f5024692d4 Remove support for the old-style intrinsics
Closes #2042
Closes #1981
2012-03-23 12:21:55 +01:00
Marijn Haverbeke
0303396f4c Register snapshot, turn off USE_SNAPSHOT flags 2012-03-23 12:21:46 +01:00
Marijn Haverbeke
6374ffc5f3 Kludge in resolve to be able to land builtins
Something strange is happening to hash maps. I'm still investigating but
want to get my snapshot built in the meantime. (Problem only happened on
OS X.)
2012-03-23 11:09:19 +01:00
Marijn Haverbeke
cdb93d70a1 Fix bug in function-instance reuse
You can't safely reuse functions that pass a T by move, since they might
zero it out, which will not end well when it doesn't know its precise
size.
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
16ca6e8d7f Change vector append to no longer rely on an intrinsic
Issue #1981
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
0545e4a920 Support [rust_stack] annotation on native functions (crudely) 2012-03-23 10:49:47 +01:00
Marijn Haverbeke
894b7469d6 Replace most uses of intrinsics in core with builtins
Issue #1981
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
ea2e379e4f Implement built-in native modules as an alternative to intrinsics
Issue #1981
2012-03-23 10:49:47 +01:00
Tim Chevalier
73a0c17d77 Make cross-crate calls to class methods work 2012-03-22 20:32:47 -07:00
Brian Anderson
f7f1490d6e rt: Run resource destructors during cycle collection 2012-03-22 19:07:31 -07:00
Brian Anderson
f3fe85dad7 Bump version numbers to 0.2 2012-03-22 15:25:02 -07:00
Graydon Hoare
b224bcf6e1 Add an LLVM-instruction-counting mode to trans.
Pipe to xdu to see a trans call graph of generated insns.
2012-03-22 13:44:20 -07:00
Niko Matsakis
dc07280b08 make --enforce-mut-vars always on, add mut annotations to remaining files 2012-03-22 09:58:19 -07:00
Niko Matsakis
b653a18416 add mut decls to rustc and make them mandatory 2012-03-21 21:04:14 -07:00
Brian Anderson
d7be4abdae rt: Fix valgrind stack hints 2012-03-21 19:10:32 -07:00
Brian Anderson
9ea3bc614e rt: Shave 16 bytes off the __morestack frame 2012-03-21 19:10:32 -07:00
Brian Anderson
9f89cc9d15 rt: Shave a few instructions off __morestack 2012-03-21 19:10:32 -07:00
Brian Anderson
f5f6135fd0 rt: Stop using large stacks for the main task 2012-03-21 19:10:32 -07:00
Brian Anderson
0639b67290 rt: Use get_task_from_tcb during stack growth calls 2012-03-21 19:10:32 -07:00
Brian Anderson
4ad57f5c39 rt: Add rust_task::get_task_from_tcb 2012-03-21 19:10:32 -07:00
Brian Anderson
08f783ff10 rt: Add a task field to stk_seg and populate it 2012-03-21 19:10:32 -07:00
Brian Anderson
4a0c6c7f41 rt: Add a get_sp_limit function 2012-03-21 19:10:31 -07:00
Brian Anderson
1cb35c9b26 rt: Rename record_sp to record_sp_limit 2012-03-21 19:10:31 -07:00
Brian Anderson
ba322b0a70 rt: Reset the stack limit after catching an exception
This wasn't causing problems but it looked wrong
2012-03-21 19:10:31 -07:00
Brian Anderson
b78af4f7c4 rt: Inline a bunch of stack switching code 2012-03-21 19:10:31 -07:00
Brian Anderson
d5968d9f38 rt: Swap the definition of stk_seg::next and prev 2012-03-21 19:10:31 -07:00
Brian Anderson
6115b13dfc rt: Don't switch to the C stack on the upcall_new_stack fast path 2012-03-21 19:10:31 -07:00
Brian Anderson
8a145a601e rt: Don't swatch stacks during upcall_del_stack 2012-03-21 19:10:31 -07:00
Graydon Hoare
9ba712fb8b Every time you don't use a variable, a kitten scowls. 2012-03-21 19:00:52 -07:00
Graydon Hoare
eba5129978 Quiet unused-result error harder. 2012-03-21 18:53:27 -07:00
Graydon Hoare
d28175b916 Upgrade valgrind headers to 3.7, silencing build breakage on FreeBSD. 2012-03-21 18:40:32 -07:00
Graydon Hoare
a9e7bff731 Remove incorrect uses of NVALGRIND, Close #1435. 2012-03-21 18:21:11 -07:00
Patrick Walton
44bd8da7fd rustc: Use the right "nxt" function in unify_regions 2012-03-21 16:13:34 -07:00
Brian Anderson
75ee4633eb rustc: Long lines 2012-03-21 16:10:39 -07:00
Josh Matthews
5835a4cc8e Merge remote-tracking branch 'mozilla/master' 2012-03-21 19:01:04 -04:00
Patrick Walton
b0f6dad5e3 rustc: Add a function to record region bindings 2012-03-21 15:59:57 -07:00
Josh Matthews
8142438938 Avoid mangling names differently in debug builds to work around a build error. Fix up file name and path debug information, and build one compilation unit for a crate instead of one per source file. 2012-03-21 18:56:36 -04:00
Patrick Walton
c8ab0c1b3b rustc: Replace region parameters in function return values 2012-03-21 15:22:12 -07:00
Patrick Walton
324f57a180 rustc: Check call and bind expressions using a set of region bindings 2012-03-21 14:47:57 -07:00
Patrick Walton
bdf968c9d9 rustc: Add a version of demand that takes in a set of region variable bindings 2012-03-21 14:15:43 -07:00
Tim Chevalier
30c272cb3a methods work
Cross-crate method calls don't work yet. Added
run-pass/class-method-cross-crate to test that, but it's xfailed

References to fields within methods don't work yet. Added
run-pass/class-methods to test that, but it's also xfailed
2012-03-21 13:53:21 -07:00
Patrick Walton
3e47442471 rustc: Add region unification functions 2012-03-21 13:28:50 -07:00
Patrick Walton
68e364b54d rustc: Introduce re_params into the typechecker
This is the first step of the region refactoring I need to do in order to handle named regions properly.
2012-03-21 12:21:53 -07:00
Graydon Hoare
071dedde79 Register snapsnots. 2012-03-21 11:46:46 -07:00
Niko Matsakis
7cc0f554ae add test for commit 9502fb99e0 2012-03-21 08:23:31 -07:00
Marijn Haverbeke
9502fb99e0 Fix bug in vtable resolution 2012-03-21 15:57:23 +01:00
Marijn Haverbeke
bc3f5e7160 rustc: Replace intrinsic vec_len with unsafe Rust code
Preparation for #1981
2012-03-21 15:56:48 +01:00
Niko Matsakis
cce2751461 Adjust arena definition to be compatible with placement new 2012-03-21 05:46:31 -07:00
Niko Matsakis
cfcbec3cc3 Implement an initial version of placement new. 2012-03-20 20:39:40 -07:00
Patrick Walton
ba39e277e2 stdlib: Implement arenas 2012-03-20 19:08:17 -07:00
Brian Anderson
57281f52e5 test: Begin running the language ref examples. Mostly xfailed 2012-03-20 18:59:21 -07:00
Brian Anderson
a0cbf638ee doc: Switch the tutorial to pandoc's method of tagging code blocks
Instead of '## tag', it's '~~~ {.tag}'
2012-03-20 18:59:21 -07:00
Patrick Walton
237cd4455c rustc: Fix a few more instances of node ID stomping, due to AST folding incorrectly passing stuff through unchanged 2012-03-20 18:37:09 -07:00
Graydon Hoare
084fe56ad5 Conditionalize test to only run double/byte/double test on x64 for now. 2012-03-20 17:34:21 -07:00
Patrick Walton
86ebde575c rustc: Make the quasiquote operator stop reusing nodes (and therefore stop reusing node IDs). Should fix issue #1947 for real. 2012-03-20 17:23:46 -07:00
Graydon Hoare
faacbb38f0 Xfail struct-return test. x64 ABI is not quite right yet. 2012-03-20 17:13:48 -07:00
Tim Chevalier
b06dc884e5 Class methods WIP
In particular, use the ast::method type to represent a class method,
and try to reuse as much iface code as possible. (This makes sense now
since I'll be allowing polymorphic class methods.)
2012-03-20 17:07:07 -07:00
Graydon Hoare
855c99ea75 Some tests for passing and returning structures by value on x64. Close #1402. Close #1970. 2012-03-20 16:44:56 -07:00
Brian Anderson
b181ea415e core: Rename unsafe::leak to unsafe::forget. Closes #2031 2012-03-20 15:20:37 -07:00
Graydon Hoare
56828d49fd Remove unused "flav" parameter from function registration paths. 2012-03-20 15:16:12 -07:00
Graydon Hoare
d282481c12 Fix naughty mangling-breakage from stringifying a node ID. Close #1344. 2012-03-20 15:16:12 -07:00
Graydon Hoare
8e911cbd65 Work on fixing name mangling. 2012-03-20 15:16:12 -07:00
Brian Anderson
1695148b5d rustdoc: Refactor reexport_pass 2012-03-20 14:54:40 -07:00
Brian Anderson
651aeea961 rustdoc: Document impl reexports 2012-03-20 14:54:40 -07:00
Brian Anderson
f3ed738399 rustdoc: Run the entire resolve pass 2012-03-20 14:54:40 -07:00
Graydon Hoare
b994b17be8 Remove object file directly rather than running "rm". Close #1778 also. 2012-03-20 12:39:40 -07:00
Graydon Hoare
0973bccfe2 Fail when there's an error starting a process. Close #1778. 2012-03-20 12:38:57 -07:00
Jyun-Yan You
d3712a287d make native and crust functions conform to x86-64 ABI 2012-03-20 11:59:24 -07:00
Graydon Hoare
716dc29ffc Minor io fixlet to account for racing against last_os_error. 2012-03-20 11:59:23 -07:00
Marijn Haverbeke
1a20f8e7cc rustc: Be more careful about spans in 'unexpected token' errors
Closes #2017
2012-03-20 15:05:14 +01:00
Marijn Haverbeke
7a34ac5890 Revert order of arguments to option::maybe and from_maybe
Closes #2019
2012-03-20 14:55:07 +01:00
Marijn Haverbeke
1547c27926 Fix caching bug in resolve, get rid of enumness kludge
Closes #1911
2012-03-20 14:33:04 +01:00
Marijn Haverbeke
928364b98b Only make symbols external when they are actually externally accessible
Closes #2030
2012-03-20 13:19:33 +01:00
Marijn Haverbeke
ade1207ba3 Move external-reachability checker to trans
Preparation for a fix for issue #2020
2012-03-20 12:28:46 +01:00
Brian Anderson
ccaace6587 rt: Remove an unused function 2012-03-19 19:02:54 -07:00
Patrick Walton
bf13fb7921 rustc: Fix handling of the self region in method return types. Also stub some code to allow the regions of simple field access expressions to be determined. 2012-03-19 18:52:18 -07:00
Patrick Walton
b12588a197 rustc: Fix mutability checking when dereferencing a region-annotated pointer 2012-03-19 17:28:00 -07:00
Brian Anderson
4e3e13302d test: Remove pretty/issue-953. Doesn't typecheck 2012-03-19 16:11:46 -07:00
Brian Anderson
20417ebf31 core: Move unsafe conversions to str::unsafe 2012-03-19 15:47:52 -07:00
Brian Anderson
1a40aa0935 core: Make converting from a C string unsafe 2012-03-19 15:47:52 -07:00
Graydon Hoare
869b2d7064 Send string concatenation to specialized upcall, shave 17s off librustc compile time. 2012-03-19 14:29:39 -07:00
Brian Anderson
bbfa08d947 rustc: Stop generating the flag_none #fmt flag. Issue #1993 2012-03-19 14:28:42 -07:00
Brian Anderson
a0c6ad0c51 core: Remove a FIXME. Closes #1992
This is too vague to ever fix
2012-03-19 14:17:59 -07:00
Brian Anderson
009bbadd92 core: Remove a FIXME. Closes #2002
It works for negative integers
2012-03-19 14:14:49 -07:00
Marijn Haverbeke
cec1a9b859 Properly check kinds when instantiating types
Closes #2011
2012-03-19 10:45:29 +01:00
Brian Anderson
4c4ac05f02 rustdoc: Print type params in fn sigs. Closes #2021 2012-03-18 21:41:57 -07:00
Brian Anderson
7dcac31e4d rt: Remove rust_task_thread::dead_tasks 2012-03-18 18:18:18 -07:00
Brian Anderson
6f6650e726 rt: Remove rust_task_thread::newborn_tasks 2012-03-18 18:18:18 -07:00
Brian Anderson
5d4bf75f56 rt: Convert rust_task_list to a typedef 2012-03-18 18:18:18 -07:00
Brian Anderson
47c1895724 rt: Don't store the name of the task state in rust_task_list 2012-03-18 18:18:15 -07:00
Brian Anderson
05466c6138 rt: Use an enum to represent the task state 2012-03-18 17:41:56 -07:00
Brian Anderson
0201a03203 core: Rename vec::*_from to _between to match str mod 2012-03-18 17:40:52 -07:00
Brian Anderson
13bcc73625 core: Rename vec::position_elt to position_elem 2012-03-18 17:40:49 -07:00
Brian Anderson
cab02145ba Merge pull request #2025 from damag/master
Fix typo in error message
2012-03-18 17:05:38 -07:00
Brian Anderson
b247de6458 rt: Remove lock_held_by_current_thread 2012-03-18 17:03:35 -07:00
Brian Anderson
e4af1ca065 core: Add vec::unshift 2012-03-18 16:16:47 -07:00
Brian Anderson
397f33fd35 core: Don't require a copyable T for vec::push 2012-03-18 16:08:37 -07:00
Brian Anderson
b1eb4579c6 core: Improve the docs and signature of vec::iter2 2012-03-18 15:41:03 -07:00
Brian Anderson
d6ded6788d core: vec::filter_map doesn't require a copyable T 2012-03-18 15:26:05 -07:00
Damien Grassart
38ac87f0ff rustc: Fix typo in error message 2012-03-18 04:45:03 +01:00
Brian Anderson
132266b2cb rt: Remove the recursive lock from rust_task_thread 2012-03-17 18:44:41 -07:00
Brian Anderson
3ee4a15e5e core: Don't copy elements in filter_map 2012-03-17 18:17:27 -07:00
Brian Anderson
35e9970e29 rt: Ports don't need to ref their tasks
Port lifetime is always bounded by their owning task
2012-03-17 17:56:15 -07:00
Brian Anderson
5728a69e78 rt: Remove some bogus pthread settings from rust_task_thread
This is all handled by rust_thread, and 'true' isn't even a valid
value to pass to pthread_attr_setdetachestate
2012-03-17 17:18:24 -07:00
Brian Anderson
4debe71785 compiletest: Remove FIXME. Closes #1984 2012-03-17 14:57:13 -07:00
Brian Anderson
c139b348fe core: Fix signature of call_with_retptr. Closes #1987 2012-03-17 14:57:13 -07:00
Brian Anderson
cae2c1611b Register snapshots 2012-03-17 00:49:23 -07:00
Tim Chevalier
e3a1c5c96a Encode both private and public class fields in metadata
This is necessary to calculate the correct offsets for field references.

Simple cross-crate class tests (still with fields only) now pass.
2012-03-16 20:36:07 -07:00
Tim Chevalier
16dd6c4756 Fix encoding of class ctors
Class tests still fail at runtime
2012-03-16 19:20:36 -07:00
Josh Matthews
d958123d8a Don't break -g in the presence of monomorphization. 2012-03-16 20:19:52 -04:00
Brian Anderson
154a3fdf44 rustc: Unify impl self types in the opposite order so variance is correct 2012-03-16 17:06:15 -07:00
Brian Anderson
3445454e79 core: Resolve and remove some FIXMEs 2012-03-16 16:46:32 -07:00
Brian Anderson
9e9f4a6240 core: Remove str::init_elt
This was added based on my FIXME, but I no longer believe it has a place in
core::str, partly because it doesn't follow current naming conventions, and
partly because it can be immitated with a one liner using str::from_chars and
vec::from_elem. I have replaced the existing uses with said one-liner.
2012-03-16 15:31:53 -07:00
Tim Chevalier
1680ccce1e Classes WIP
Cross-crate metadata for classes works well enough that programs with
classes in other crates compile successfully, but output wrong results.
Checking in work so far to avoid merge hassles. (Tests are xfailed.)
2012-03-16 15:28:05 -07:00
Brian Anderson
47d468f08c core: Store reexporting result and either. Closes #1997 2012-03-16 15:14:37 -07:00
Brian Anderson
ddbd02aaf2 rustdoc: Allow elipses to appear in brief descriptions. Closes #2003 2012-03-16 14:50:30 -07:00
Niko Matsakis
e399ddbf17 allow binding of fn~, make result fn@. fixes 1899. 2012-03-16 17:48:53 -04:00
Brian Anderson
f80008f04b core: Add lots of string docs 2012-03-16 14:29:09 -07:00
Patrick Walton
f6a792585b rustc: Give a better error message when references involving the caller region fail to unify 2012-03-16 14:02:02 -07:00
Brian Anderson
3db8ae0bdc core: Remove extra backslashes from docs 2012-03-16 12:20:38 -07:00
Brian Anderson
0b0ecc662b rustdoc: Escape backslashes 2012-03-16 12:20:29 -07:00
Brian Anderson
a7132eeb1e core: Doc cleanup 2012-03-16 12:12:25 -07:00
Brian Anderson
0d88bf7e43 core: Escape some characters in comments 2012-03-16 11:58:39 -07:00
Erick Tryzelaar
67a1c35264 std: Add a a hashmap_from_vecs function 2012-03-16 17:05:29 +01:00
Erick Tryzelaar
2ddd084631 std: Add a function to iterate over a subset of a vec 2012-03-16 17:05:29 +01:00
Erick Tryzelaar
da91b60343 Add loop to the vim keyword list. 2012-03-16 17:05:29 +01:00
Marijn Haverbeke
35fc4a4291 Check kind bounds when calling methods
Closes #1915
2012-03-16 17:05:29 +01:00
Marijn Haverbeke
25c2be0ff4 Forbid boxed ifaces with self types or generic methods in bounded params
They are a soundness hole.

Closes #1994
2012-03-16 15:39:07 +01:00
Marijn Haverbeke
484469c58d Register new snapshot 2012-03-16 15:39:04 +01:00
Marijn Haverbeke
22bef74b55 Remove shared tydescs
All tydescs are static now, there's no need to worry about
marshalling them between threads anymore.
2012-03-16 15:38:42 +01:00
Marijn Haverbeke
15a325f267 Support binding of methods off boxed iface values
Closes #435
2012-03-16 12:58:26 +01:00
Marijn Haverbeke
5f20c94785 Register new snapshots 2012-03-16 12:58:21 +01:00
Tim Chevalier
c86135e80b Comments only: associate core::libc FIXMEs with issue numbers 2012-03-15 23:12:07 -07:00
Tim Chevalier
2ef7d135a9 Comments only: associate core::iter FIXMEs with issue numbers 2012-03-15 23:12:07 -07:00
Tim Chevalier
f5da4881dc Comments only: issue numbers for FIXMEs 2012-03-15 23:12:06 -07:00
Tim Chevalier
c1c84e92dd Put the OS error in the error string in io::mk_file_writer() 2012-03-15 23:12:06 -07:00
Patrick Walton
e464e2ba56 rustc: Describe why regions failed to unify as part of the type error message 2012-03-15 19:19:32 -07:00
Patrick Walton
4ea3b0b89c rustc: Fix the AST map to actually map blocks. Also improve region error messages involving blocks. 2012-03-15 19:06:38 -07:00
Brian Anderson
389f53c6ff core: Docs 2012-03-15 18:58:30 -07:00
Tim Chevalier
07d0981bbb Comments only: associate FIXMEs with issue numbers in int library 2012-03-15 18:50:26 -07:00
Patrick Walton
e0edcfc21c rustc: Index blocks 2012-03-15 18:46:57 -07:00
Tim Chevalier
43b457c5d6 Comments only: associate FIXMEs in float libs with issue numbers 2012-03-15 18:46:17 -07:00
Patrick Walton
0972571cdd test: Add a test case for self regions and typeclass implementations 2012-03-15 18:13:57 -07:00
Tim Chevalier
20ec72830a Address FIXMEs in extfmt / add issue numbers 2012-03-15 17:50:22 -07:00
Tim Chevalier
ce3f369047 Change ctypes::intptr_t to int 2012-03-15 17:50:22 -07:00
Tim Chevalier
e3222e9905 Improve error message for passing mutable argument by reference 2012-03-15 17:50:22 -07:00
Tim Chevalier
48ccb3fbfd Associate FIXME with an issue in compiletest.rs 2012-03-15 17:50:22 -07:00
Tim Chevalier
b3dada0017 cargo FIXMEs 2012-03-15 17:50:21 -07:00
Patrick Walton
95ce42b346 rustc: Instantiate self regions in impls 2012-03-15 17:14:02 -07:00
Brian Anderson
bcf44f8cc1 core: Optimize str::unsafe::slice_bytes. Closes #1995 2012-03-15 17:10:39 -07:00
Patrick Walton
0095e6d85b rustc: Have the typechecker pick up the resolved self region 2012-03-15 16:48:53 -07:00
Marijn Haverbeke
76d07f4056 Remove dynastack support from runtime
Issue #1982
2012-03-16 00:44:06 +01:00
Marijn Haverbeke
146b61189a Get rid of rust_crate_cache in the runtime
We are no longer generating dynamic tydescs or dicts.

Issue #1982
2012-03-16 00:44:06 +01:00
Patrick Walton
bc21a5ddbe rustc: Create self region bindings, and forbid the self region from being used in places it shouldn't be 2012-03-15 16:38:08 -07:00
Brian Anderson
041c9a0863 core: Optimize str::bytes
This compiles down to a memmove. Takes about 1/4 of the time of the old
version.
2012-03-15 15:43:01 -07:00
Tim Chevalier
771177a814 Don't pass Unicode to char::is_upper 2012-03-15 15:40:43 -07:00
Tim Chevalier
26b54cc17e Add asserts to char::is_upper and char::is_lower
Add an assert that the argument char is ASCII, as well as adding
issue numbers to FIXMEs
2012-03-15 15:40:43 -07:00
Tim Chevalier
f67f2388f7 Use str::is_whitespace instead of dup'd is_whitespace function 2012-03-15 15:40:43 -07:00
Tim Chevalier
e697456d52 Associate FIXMEs with issue numbers (comments only) 2012-03-15 15:40:43 -07:00
Niko Matsakis
5f68206a73 register new snapshots 2012-03-15 18:30:10 -04:00
Niko Matsakis
d365ec5c7d kill old serialization code 2012-03-15 18:30:10 -04:00
Niko Matsakis
3dca3393fa switch over to using new serialize/deserialize code 2012-03-15 18:30:08 -04:00
Brian Anderson
f69e9ff643 test: Fix breakage 2012-03-15 15:18:04 -07:00
Brian Anderson
e1b14f6d5b test: Fix name of bitv type 2012-03-15 14:54:41 -07:00
Brian Anderson
7e0fa3f852 std: Swap the argument order of list::foldl to match vec::foldl 2012-03-15 14:15:49 -07:00
Brian Anderson
5e8004d493 std: Follow conventions in bitv 2012-03-15 14:08:47 -07:00
Brian Anderson
844fbd83da core: Make some functions pure 2012-03-15 13:57:26 -07:00
Brian Anderson
561511e628 core: Channels are just port ids 2012-03-15 11:10:53 -07:00
Brian Anderson
c414b78afe rt: Remove the kernel task table 2012-03-15 11:10:52 -07:00
Brian Anderson
1366d65660 rt: Remove remaining uses of rust_kernel::get_task_by_id 2012-03-15 11:10:52 -07:00
Brian Anderson
b278d675a2 rt: Look up ports through a single port table
Instead of a two-level lookup, just use one big table
2012-03-15 11:10:52 -07:00
Marijn Haverbeke
337d860a87 Make last-use finder treat referenced function arguments properly
Closes #1964
2012-03-15 17:04:35 +01:00
Marijn Haverbeke
1745ac9c61 Remove tests from astencode.rs
They mysteriously fail on Windows, and Niko assures me this code is about
be replaced anyway.
2012-03-15 15:44:19 +01:00
Marijn Haverbeke
2e3f1096bb Fix bug in vtable builder
Closes #1947 , which I completely misdiagnosed.
2012-03-15 15:08:31 +01:00
Marijn Haverbeke
24ed441a05 Reuse monomorphized functions more aggressively
Adds a trans::type_use pass that, given a function body, detects how
dependant that function is on properties of its type parameters.
2012-03-15 15:08:31 +01:00
Marijn Haverbeke
3ab9978b9b Remove support for dynamically-sized types from translation code 2012-03-15 15:08:31 +01:00
Marijn Haverbeke
a4d75a4ed1 Remove GEP_tup_like 2012-03-15 15:08:31 +01:00
Marijn Haverbeke
c3a93ecd3f Remove dynastack code from compiler 2012-03-15 15:08:30 +01:00
Marijn Haverbeke
bc8a43a776 Remove lltyparams field in trans::common::fn_ctxt 2012-03-15 15:08:30 +01:00
Marijn Haverbeke
d0f5e58e95 Zero out dest ptr when port_recv doesn't return a value 2012-03-15 15:08:30 +01:00
Marijn Haverbeke
959adff2fa Suppress valgrind error in dynamic linker
This was happening when running the rustdoc tests. The test proceeded
fine after that, and the code looks like it is running before anything
we generate, so I assume it is spurious.
2012-03-15 15:08:30 +01:00
Marijn Haverbeke
332329f161 Don't pass an undef retptr to generic intrinsics
It leads to segfaults
2012-03-15 10:22:46 +01:00
Marijn Haverbeke
b6ad34bef4 Properly recognize external intrinsics 2012-03-15 10:22:46 +01:00
Marijn Haverbeke
e4cbd43c43 Huge kludge to get intrinsics' type parameters passed 2012-03-15 09:41:21 +01:00
Marijn Haverbeke
9aa78e34e4 Never pass tydesc to functions
My assumption that native generics needed them was wrong, so tydescs
can be eliminated from function signatures completely.
2012-03-15 09:40:52 +01:00
Marijn Haverbeke
47f35c9d34 Properly replace iface tps with impl tps in static method calls
Un-xfail iface-generic.rs
2012-03-15 09:32:53 +01:00
Marijn Haverbeke
fe90c189f4 Only write metadata for items that actually appear in the root AST
Not for imported ASTs from inlined items.
2012-03-15 09:32:53 +01:00
Marijn Haverbeke
2c8c50d6cb Make sure enum and resource constructors are inlined properly 2012-03-15 09:32:53 +01:00
Marijn Haverbeke
4650e8bcf4 Make sure resource destructors are properly monomorphized 2012-03-15 09:32:53 +01:00
Marijn Haverbeke
8f84d4c8b6 Remove a large part of the tydesc-passing code 2012-03-15 09:31:34 +01:00
Marijn Haverbeke
83c9f58534 Rename dict to vtable throughout the compiler
The difference went away.
2012-03-15 09:28:50 +01:00
Marijn Haverbeke
4511f936b1 Hugely simplify iface handling
With the assumption of monomorphization
2012-03-15 09:26:54 +01:00
Marijn Haverbeke
168398bb3d Stop generating generic versions of generic functions
Monomorphic instances are generated on demand.
2012-03-15 09:00:21 +01:00
Marijn Haverbeke
47e65403b7 Disallow calling generic methods through a boxed iface 2012-03-15 08:59:29 +01:00
Marijn Haverbeke
5e647d799e Fix assumption that monomorphized method's impls are crate-local 2012-03-15 08:59:29 +01:00
Marijn Haverbeke
75e6fb4feb Fix monomorphization of resource constructors 2012-03-15 08:59:29 +01:00
Marijn Haverbeke
0e5da379dd Turn on monomorphization by default 2012-03-15 08:59:29 +01:00
Marijn Haverbeke
c67679ea03 Write out the AST for all externally-reachable generics 2012-03-15 08:59:29 +01:00
Graydon Hoare
b2e4872e2c Upgrade LLVM and add fix to PE/COFF relocation overflow handling. 2012-03-14 20:11:14 -07:00
Brian Anderson
2a293ed8b8 Convert *u8 native string users to *c_char 2012-03-14 18:20:14 -07:00
Brian Anderson
e5dea87f43 core: Add str::from_c_str, from_c_str_len, as_c_str 2012-03-14 18:19:08 -07:00
Brian Anderson
3a2df84d89 core: Rename str::from_cstr et. al to from_buf 2012-03-14 18:19:08 -07:00
Brian Anderson
9e480708a2 core:: Eliminate str::sbuf. Replace with *u8 2012-03-14 18:19:08 -07:00
Brian Anderson
3864d6d845 std: Rename the hashmap constructors to conform to new standards
Instead of using the new_ prefix just name them after their type
2012-03-14 18:19:08 -07:00
Patrick Walton
383a801993 rustc: Universally quantify regions when looking up typeclass implementations 2012-03-14 18:17:40 -07:00
Niko Matsakis
a3d2882ffd fixup auto_serialize's treatment of nullary variants 2012-03-14 21:05:06 -04:00
Niko Matsakis
e702d20191 allow immut vars to be moved. enforce mut vars after stage0 in std. 2012-03-14 20:46:36 -04:00
Niko Matsakis
6b35875dca annotate libstd and start enforcing mutability 2012-03-14 20:46:36 -04:00
Patrick Walton
273c5e5f11 rustc: Lift the @ from the type definition of crate_ctxt into its uses
This will make it easier to convert crate_ctxt into a region pointer, since
there are functions that return crate contexts. There would be no way to type
these functions if crate_ctxt had to be an inferred region pointer.
2012-03-14 17:31:16 -07:00
Patrick Walton
1e0e089185 rustc: Fix a couple of bugs that prevented taking addresses of rvalues 2012-03-14 16:50:20 -07:00
Patrick Walton
b516913a5d test: Remove unsafe from the region tests 2012-03-14 16:18:33 -07:00
Patrick Walton
fd9c9ac912 rustc: Make region dereference no longer require an unsafe block 2012-03-14 16:17:45 -07:00
Patrick Walton
0cd72d24dc rustc: Autoderef through region pointers 2012-03-14 16:13:05 -07:00
Patrick Walton
45d0b5f0b9 rustc: Reword field/method-not-found error message to mention the possibility that a field wasn't found 2012-03-14 16:02:59 -07:00
Patrick Walton
83ed4f4bc4 test: Add a test case for the "self" region in enums 2012-03-14 15:41:54 -07:00
Patrick Walton
1ed768bc3b rustc: Determine the region of pointer dereference expressions 2012-03-14 15:13:04 -07:00
Niko Matsakis
1600be2c3b fix auto_serialize for enums with type parameters 2012-03-14 17:19:33 -04:00
Patrick Walton
715d1995d7 rustc: Make the self region work properly in enums 2012-03-14 14:05:57 -07:00
Patrick Walton
3a45f87620 rustc: Record the parent blocks of locals 2012-03-14 11:41:50 -07:00
Marijn Haverbeke
de79caa97e Add crude support for casts in constant expressions
Only casts to integral and float types are supported

Closes #1975
2012-03-14 18:05:28 +01:00
Marijn Haverbeke
c988800cf5 Properly walk pat_lit and pat_range in visit.rs
Issue #1975
2012-03-14 18:04:31 +01:00
Niko Matsakis
ffa187db25 adjust auto_serialize to generate fns named serialize_T()
We used to generate a module T with a serialize() and deserialize() fn,
but this was suboptimal for a number of reasons:

- it required moving serialization into core so that uint etc worked
- it was harder to override the serialization behavior locally
  (this is now trivial)
2012-03-14 11:49:28 -04:00
Niko Matsakis
c6f2594319 register new snapshots 2012-03-14 08:02:16 -04:00
Niko Matsakis
7c70d35a10 rewrite unify in a modal style, extend result module 2012-03-13 21:53:14 -04:00
Niko Matsakis
9086c6f5a2 merge all auto_serialize tests into one 2012-03-13 21:30:07 -04:00
Niko Matsakis
b30cb8e43a implement deserialization, rename mk_mem_buffer() to mem_buffer() 2012-03-13 21:30:07 -04:00
Niko Matsakis
d91742294f first (functional) version of the auto_serialize syntax ext 2012-03-13 21:30:07 -04:00
Niko Matsakis
06c8acdd31 fixup serialize_variant 2012-03-13 21:30:07 -04:00
Niko Matsakis
bdd0c9387b get new decorator extensions working 2012-03-13 21:30:06 -04:00
Patrick Walton
c3516f091b rustc: Allow the addresses of rvalues to be taken 2012-03-13 18:24:14 -07:00
Brian Anderson
ffc1d0a55d Fix typo in snapshots.txt 2012-03-13 17:57:31 -07:00
Brian Anderson
94421749fe Register snapshots 2012-03-13 17:38:13 -07:00
Patrick Walton
fc50abe6c5 rustc: Instantiate "caller" regions when calling functions 2012-03-13 17:31:34 -07:00
Brian Anderson
aeb445b2ea rustc: Don't make the while loop body's basic block a child of the condition
As a child of the condition, when the body encounters a ret or break it
incorrectly re-runs the cleanups of the condition.
2012-03-13 17:27:17 -07:00
Patrick Walton
b87cdd8572 rustc: Infer regions of variant arguments to the caller region 2012-03-13 16:16:27 -07:00
Brian Anderson
5c23d21e83 rt: Remove an incorrect assert in lock_and_signal
This assert doesn't hold because it isn't made while holding the lock
2012-03-13 16:12:38 -07:00
Patrick Walton
8cbaebbb49 rustc: Get reference typedefs working 2012-03-13 15:53:16 -07:00
Brian Anderson
b968c8e6cd Name types after their modules instead of 't' 2012-03-13 15:14:17 -07:00
Patrick Walton
a38ccf1254 rustc: Thread the use site around in ast_ty_to_ty 2012-03-13 14:41:18 -07:00
Patrick Walton
0837a6ba04 rustc: Don't cache ast_ty_to_ty results for types that have references 2012-03-13 14:13:13 -07:00
Brian Anderson
02e9400a82 core: Fix os::self_exe_path on FreeBSD 2012-03-13 13:51:03 -07:00
Patrick Walton
107767731a rustc: Use only ast_ty_to_ty for region inference 2012-03-13 12:01:34 -07:00
Patrick Walton
014dd547a0 rustc: Use the inferred region as the self region in ast_ty_to_ty as well 2012-03-13 11:34:48 -07:00
Patrick Walton
ec340c8f40 rustc: Look up inferred regions in ast_ty_to_ty 2012-03-13 11:26:55 -07:00
Brian Anderson
cd72b1f848 Overhaul constructor naming in libs 2012-03-13 11:07:22 -07:00
Patrick Walton
aea8736129 rustc: Fix long line 2012-03-13 11:04:02 -07:00
Patrick Walton
07b4c80c68 rustc: Record what & would resolve to for every AST type 2012-03-13 10:44:37 -07:00
Marijn Haverbeke
e54cde5215 Use type size/alignment of target, rather than host, in debuginfo 2012-03-13 16:20:31 +01:00
Marijn Haverbeke
463cf837eb rustc: Teach trans::alt.rs about exhaustive alts
Closes #1971
2012-03-13 16:20:31 +01:00
Kevin Atkinson
15985277b9 Fix Issue #1926 by sorting the gather list. 2012-03-13 07:40:41 -04:00
Graydon Hoare
6f5853f5a1 Libc/os/run/rand/io reorganization. Close #1373. Close #1638.
- Move io, run and rand to core.
 - Remove incorrect ctypes module (use libc).
 - Remove os-specific modules for os and fs.
 - Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Patrick Walton
ac57bb3856 rustc: Word a comment more clearly in region.rs 2012-03-12 18:56:13 -07:00
Patrick Walton
afa046a56b rustc: Use linked lists instead of hash tables for region binding scopes
Hash tables are overkill.
2012-03-12 18:47:18 -07:00
Patrick Walton
4571175568 stdlib: Make list::find do what the docs say it does.
Talked on #rust about this change, got approval from graydon and brson. Will bring up tomorrow at meeting to verify.
2012-03-12 18:28:16 -07:00
Brian Anderson
3de30f4ef2 rt: Change alignof to rust_alignof. Remove -Wno-c++11-compat. Closes #1644 2012-03-12 18:03:48 -07:00
Patrick Walton
dd610a151b rustc: Add node IDs to AST types so we can associate them with region environments 2012-03-12 17:34:37 -07:00
Brian Anderson
d60813146d std: Sort test failures. Closes #1929 2012-03-12 17:31:17 -07:00
Patrick Walton
59a56ad043 Revert "rustc: Add node IDs to AST types so we can associate them with region environments"
This reverts commit 96e1bbd4a0.
2012-03-12 16:33:55 -07:00
Patrick Walton
96e1bbd4a0 rustc: Add node IDs to AST types so we can associate them with region environments 2012-03-12 16:28:15 -07:00
Patrick Walton
db77c38fc9 rustc: Use the name map to resolve region names 2012-03-12 13:58:08 -07:00
Patrick Walton
864ff4707e rustc: Map region names to their functions. Also speed up region checking by 17x. 2012-03-12 13:25:10 -07:00
Brian Anderson
db79f3c0a5 rt: Remove arbitrary limit on size of port queue. Closes #1245 2012-03-12 13:24:09 -07:00
Patrick Walton
47bfd4f4e9 rustc: Refactor regions to handle nested functions properly and fix the subtyping relation 2012-03-12 12:43:47 -07:00
Tim Chevalier
664d71f1f0 Improve a typechecker error message (wrong type for main())
As per #1903, state what type is expected for main().

Closes #1903
2012-03-11 20:55:19 -07:00
Tim Chevalier
813c41362b A few tests for infinite loops 2012-03-11 20:17:27 -07:00
Patrick Walton
46aec2c960 rustc: Record the parent function of each function 2012-03-11 17:02:16 -07:00
Brian Anderson
8f071bb841 rustdoc: Add indexes to native mods. Closes #1963 2012-03-11 16:36:20 -07:00
Patrick Walton
cb1efb0092 rustc: Fix long lines 2012-03-11 16:18:52 -07:00
Patrick Walton
8f9afec5a3 rustc: Turn on errors for region checking 2012-03-11 13:29:23 -07:00
Patrick Walton
3e8bb22af1 rustc: Unify regions in most cases. (Nested functions aren't properly handled yet.) 2012-03-11 13:28:43 -07:00
Patrick Walton
f7efc29b38 rustc: Determine regions for locals 2012-03-11 12:36:56 -07:00
Patrick Walton
e968672ac7 rustc: Map local variables to their containing blocks so we know their regions 2012-03-11 12:05:17 -07:00
Tim Chevalier
d3035a1b20 Fix test so it terminates, and un-xfail it
Still need more tests for loop{}
2012-03-10 21:19:02 -08:00
Tim Chevalier
40a5c56345 Fix Windows build breakage 2012-03-10 20:44:10 -08:00
Tim Chevalier
9838a7ec54 Tweak some test cases and add a few new ones 2012-03-10 20:38:03 -08:00
Tim Chevalier
eb9d0e89d1 wibble 2012-03-10 20:36:48 -08:00
Tim Chevalier
8ab075ee45 Clean up occurs check code and give non-breaking loop {..}s _|_ type
The latter change is so that code dominated by a loop{ } without a
break gets considered unreachable.

The former change is just cosmetic (occurs_check_fails was a predicate
when it should be a unit-typed function that can fail).
2012-03-10 20:35:41 -08:00
Tim Chevalier
205cefdc6e In typestate, consider infinite loops w/ conts to be infinite
If a loop { } contains a cont, that doesn't affect whether the entire
loop diverges. Only breaks affect that. Fix that in typestate.
2012-03-10 20:34:57 -08:00
Tim Chevalier
35400e13ad Use loop instead of while(true) in libraries and compiler itself
And remove spurious fails/unreachable() calls.
2012-03-10 20:34:17 -08:00
Tim Chevalier
98260a2a22 Handle infinite-loop poststate correctly in typestate
If control passes an infinite loop (that doesn't have non-local
exits), then everything is true.
2012-03-10 20:15:27 -08:00
Tim Chevalier
e34fad7503 Register snapshots 2012-03-10 20:13:03 -08:00
Brian Anderson
e5eea72677 cargo: Don't bail when signature verification fails 2012-03-10 19:33:09 -08:00
Brian Anderson
87d72303ad core: Remove empty bessel mod 2012-03-10 18:04:51 -08:00
Brian Anderson
e8f7bb0db1 core: Cleanup bool module
Instead of defining a type for bool, just use the bool type directly in order
to be more consistent with other modules. Cleanup the comments a bit.
2012-03-10 18:01:01 -08:00
Brian Anderson
91e5a1c8b3 core: Remove the nearly empty math module
This mod only had two functions, all of whose users have been changed
to use the uint module.
2012-03-10 17:43:19 -08:00
Brian Anderson
035197609a core: Formatting 2012-03-10 17:29:58 -08:00
Brian Anderson
6d4fb35912 core Remove vec::enum_chars/uint. Closes #1955 2012-03-10 17:07:23 -08:00
Brian Anderson
a5368fb6d8 rustdoc: Put native mods on their own pages. Closes #1959 2012-03-10 16:44:48 -08:00
Brian Anderson
474ad2e4de rustdoc: Fix native mod breakage 2012-03-10 16:43:38 -08:00
Brian Anderson
4bbe33c8eb rustdoc: Write page titles 2012-03-10 16:21:23 -08:00
Brian Anderson
78d539927a rustdoc: Remove unused fn 2012-03-10 15:42:08 -08:00
Brian Anderson
d54d9b1cab rustdoc: Fix generation of impl links. Closes #1953 2012-03-10 15:38:52 -08:00
Brian Anderson
e4bb2d707f core: Rename vec::tail_n to vec::tailn to match other fns 2012-03-10 00:44:13 -08:00
Brian Anderson
a0f0a704b0 core: Clean up comments and exports 2012-03-10 00:35:02 -08:00
Brian Anderson
95521c4084 std: Convert to rustdoc 2012-03-09 22:56:53 -08:00
Brian Anderson
b22556a6f8 core: Convert to rustdoc 2012-03-09 22:56:53 -08:00
Tim Chevalier
a0521971b1 Merge branch 'master' into floop-for-snapshot 2012-03-09 22:16:52 -08:00
Tim Chevalier
c758ef3f38 Register snapshots 2012-03-09 22:16:15 -08:00
Brian Anderson
e2dad03f44 rustdoc: Change the formatting for enum variants 2012-03-09 21:20:51 -08:00
Brian Anderson
31ce3637da Merge pull request #1950 from damag/master
Update README.txt with the new path to the compiler
2012-03-09 18:17:38 -08:00
Brian Anderson
f9755c666d rustdoc: Simplify attribute parsing 2012-03-09 18:13:14 -08:00
Brian Anderson
effe4559d2 rustdoc: Accept the first sentence as the brief description 2012-03-09 18:13:14 -08:00
Brian Anderson
4fc5b822e2 rustdoc: Simplify the relation between the brief and long description
Brief is just used for indexes now
2012-03-09 18:13:14 -08:00
Damien Grassart
c19ea057fa The compiler is now in src/rustc 2012-03-10 02:51:38 +01:00
Patrick Walton
e8c7b5347d rustc: Add a region checking pass
Errors aren't reported yet, because the regions aren't properly inferred from the & operator at the moment and that would break the tests.
2012-03-09 17:39:32 -08:00
Brian Anderson
0905ad2bbe rustdoc: Vastly simplify the document model
Don't attempt to impose any structure for documenting arguments, return
values, etc.
2012-03-09 17:24:56 -08:00
Brian Anderson
9f4c0d71e5 rustdoc: Update the demo module 2012-03-09 17:24:56 -08:00
Brian Anderson
e399263b5e rustdoc: Write sections in markdown 2012-03-09 17:24:56 -08:00
Brian Anderson
0ad8265fee rustdoc: Add the concept of 'sections' 2012-03-09 17:24:55 -08:00
Tim Chevalier
321fd80219 Add an infinite loop construct
Add a loop {} construct for infinite loops, and use it in test
cases. See #1906 for details.
2012-03-09 16:40:58 -08:00
Patrick Walton
4ffcb95974 rustc: Perform region inference 2012-03-09 16:40:37 -08:00
Graydon Hoare
7f55e7d087 Add a couple more missing pieces to libc and os. 2012-03-09 16:38:23 -08:00
Patrick Walton
b7d3874349 rustc: Wrap regions in a node ID 2012-03-09 16:10:11 -08:00
Patrick Walton
7b938d8903 rustc: Add region def ids to the AST 2012-03-09 15:55:13 -08:00
Patrick Walton
e2f6052c6d Revert "rustc: Create def IDs for region parameters"
This reverts commit 0d4cb75949.
2012-03-09 14:40:36 -08:00
Patrick Walton
0d4cb75949 rustc: Create def IDs for region parameters 2012-03-09 14:06:43 -08:00
Patrick Walton
2975bcdd7d rustc: Stub a to-string implementation for region types
Not too useful without region resolution yet, but there it is.
2012-03-08 18:24:17 -08:00
Patrick Walton
92ed73d0bd rustc: Add pretty printing support for the address-of operator. Un-XFAIL-pretty simple-regions.rs. 2012-03-08 18:10:07 -08:00
Patrick Walton
c40bfec45d test: Add a simple region test, xfail'd in the pretty printer 2012-03-08 17:45:36 -08:00
Patrick Walton
8ce6b0dd21 rustc: Add appropriate type predicates for references. Simple uses of references/region pointers now work. 2012-03-08 17:22:43 -08:00
Brian Anderson
256146bba4 rustdoc: Rename desc_pass to text_pass 2012-03-08 17:00:03 -08:00
Patrick Walton
71799cff2b rustc: Actually write the type back 2012-03-08 16:44:33 -08:00
Patrick Walton
ddeaea2287 rustc: Change the address-of operator to an explicit production so that we can parse the mutability 2012-03-08 16:34:36 -08:00
Patrick Walton
0722786664 rustc: Add some missing cases in various folds for reference types and some broken trans code for the address-of operator 2012-03-08 15:55:28 -08:00
Tim Chevalier
0c5fdc8745 Rename last to last_opt, last_unsafe to last
As per discussion on IRC. I am about to file an RFC for further
discussion about the more general issue of whether to enforce
invariants through types, typestate, or dynamic checks, but for now,
removing the misleading name "last_unsafe".
2012-03-08 15:25:56 -08:00
Patrick Walton
8047c0cd68 rustc: Typecheck dereference operations on safe references.
They require unsafe blocks for now. This will be removed once they typecheck properly.
2012-03-08 15:08:26 -08:00
Brian Anderson
57596cbe53 rustdoc: Improve formatting of subsection headers 2012-03-08 15:05:13 -08:00
Brian Anderson
7d686d6372 rustdoc: Format return values consistently 2012-03-08 15:05:13 -08:00
Brian Anderson
6ad653bb31 rustdoc: Add some more demo docs 2012-03-08 15:05:13 -08:00
Brian Anderson
ac8b2c8354 rustdoc: Don't bother reporting the type of return values 2012-03-08 15:05:13 -08:00
Brian Anderson
5c28b2c1d1 rustdoc: Don't bother reporting the type of arguments
This is already displayed in the function signature. Simpler this way.
2012-03-08 15:05:13 -08:00
Patrick Walton
fcde161f4f rustc: Stub typechecking for the address-of operator 2012-03-08 14:55:51 -08:00
Tim Chevalier
d048a00cf3 Change util::unreachable to core::unreachable
Closes #1931
2012-03-08 14:30:01 -08:00
Patrick Walton
0824d1501b rustc: Add ty_rptr support to the visitor 2012-03-08 14:23:22 -08:00
Patrick Walton
0e17cdb627 rustc: Add regions to the type system 2012-03-08 14:05:56 -08:00
Tim Chevalier
ebc1d3e704 Rename last_total to last_unsafe
See Issue 1943 for any discussion (reopen it if necessary).

Closes #1943
2012-03-08 13:07:31 -08:00
Patrick Walton
c9cf73f0a8 rustc: represend -> represent in a comment 2012-03-08 13:01:08 -08:00
Marijn Haverbeke
e71703db02 Properly serialize is_last_use values
They were all normalized to the same thing by the serializer.
2012-03-08 21:29:07 +01:00
Marijn Haverbeke
c71306b0db Explicitly store self_ids use for self locals in methods
This makes it possible to move them between crates without confusion,
and to instantiate them at a point where the monomorphizing
substitutions are known.

Issue #1944
2012-03-08 21:17:32 +01:00
Marijn Haverbeke
fd465f91a8 Drop collect_items pass, create decls on demand
This solves a problem with inlined functions that have inner functions.
2012-03-08 21:17:32 +01:00
Patrick Walton
6f8fe78120 rustc: Parse the safe address-of operator 2012-03-08 12:12:04 -08:00
Patrick Walton
ec8380f9b1 rustc: Add the safe address-of operator to the AST 2012-03-08 12:04:02 -08:00
Patrick Walton
19c651f4a1 rustc: Parse region types 2012-03-08 11:26:31 -08:00
Patrick Walton
6224fdcd08 rustc: Add region-annoted type parameters to the AST; stub associated patterns 2012-03-08 10:49:43 -08:00
Patrick Walton
c09e339133 etc: Allow a build dir to be specified in gen-astencode, for out of tree builds 2012-03-08 10:32:36 -08:00
Brian Anderson
bdec806848 rustdoc: Look for pandoc in ~/.cabal 2012-03-07 19:22:02 -08:00