Commit Graph

7301 Commits

Author SHA1 Message Date
Brian Anderson
ed3a5ad5ad rt: Remove running_on flag. Does nothing 2012-02-02 18:10:24 -08:00
Brian Anderson
57cad61353 rt: Remove task pinning. Does nothing 2012-02-02 18:10:24 -08:00
Brian Anderson
18de0f2aeb rt: Rename task_sleep intrinsic to task_yield. Remove usec param 2012-02-02 18:10:24 -08:00
Brian Anderson
8693fcc2d7 rt: Remove yield timers 2012-02-02 18:10:24 -08:00
Brian Anderson
7f2980b749 rt: Remove bitrotted tests 2012-02-02 18:10:24 -08:00
Brian Anderson
65f4b0587a rt: Generate intrinsics 2012-02-02 18:10:23 -08:00
Brian Anderson
bda40e2e4a rt: Fix intrinsics bustage
intrinsics.cpp and the file to generate the ll had bitrotted.
2012-02-02 18:10:23 -08:00
Graydon Hoare
c485301d21 Update libuv. 2012-02-02 17:39:47 -08:00
Graydon Hoare
6784b18303 Win32 warning police. 2012-02-02 11:35:07 -08:00
Marijn Haverbeke
6a7de641da Add test case for issue #1733 2012-02-02 10:30:07 +01:00
Marijn Haverbeke
743c62e1ce Fix assumption in mut.rs that op overloading breaks
Closes #1733
2012-02-02 08:11:20 +01:00
Brian Anderson
2b67de06c8 rustdoc: Add support for type items 2012-02-01 22:41:54 -08:00
Kevin Cantu
ae0d49aa06 Rename str::char_slice -> str::slice 2012-02-01 21:56:53 -08:00
Kevin Cantu
fc9169f09c Make the tests work, too 2012-02-01 21:56:53 -08:00
Kevin Cantu
8f367ebfeb Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes and
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01 21:56:53 -08:00
Kevin Cantu
01c01f68af Stop exporting str::slice and str::safe_slice (use unsafe instead) 2012-02-01 21:56:53 -08:00
Kevin Cantu
c71667d9d2 Propagating unsafe::slice 4 2012-02-01 21:56:53 -08:00
Kevin Cantu
fceec03da0 Propagating unsafe::slice 3 2012-02-01 21:56:53 -08:00
Kevin Cantu
6156bc56cb Propagating unsafe::slice 2 2012-02-01 21:56:53 -08:00
Kevin Cantu
47c57a17dc Propagating unsafe::slice 1 2012-02-01 21:56:53 -08:00
Kevin Cantu
4e406d7fdd Make it work 1 2012-02-01 21:56:53 -08:00
Kevin Cantu
cccf9e5389 Copy str::slice -> str::unsafe::slice (and unsafe_slice) 2012-02-01 21:56:53 -08:00
Kevin Cantu
5a19bafeea Actually export the str::unsafe module for now 2012-02-01 21:56:53 -08:00
Niko Matsakis
af2dd9b3b7 register new snapshot, revert USE_SNAPSHOT_RUNTIME setting 2012-02-01 21:02:19 -08:00
Niko Matsakis
196d69beb2 make boxes self-describing (fixes #1493)" (take 2)
this will be used to generate a new snapshot.
2012-02-01 18:52:08 -08:00
Niko Matsakis
3116643806 Revert "make boxes self-describing (fixes #1493)" until a new
snapshot is prepared.
2012-02-01 18:50:19 -08:00
Niko Matsakis
c36207bfb8 make boxes self-describing (fixes #1493) 2012-02-01 18:18:07 -08:00
Tim Chevalier
49cb3fc7df Remove remaining references to option::t outside option itself 2012-02-01 16:49:57 -08:00
Brian Anderson
4eb92d4177 rt: Don't access fields on null supervisor task 2012-02-01 16:46:11 -08:00
Brian Anderson
f76e6c39f6 rt: Fix lock_held_by_current_thread
This simplifies the check for thread ownership by removing the _locked flag
and just comparing against the thread ID of the last thread to take the lock.
If the running thread took the lock _holding_thread will be equal to
pthread_self(); if _holding_thread is some other value then the running thread
does not have the lock.

Setting a pthread_t to 0 like this is not portable but should work on every
platform we are likely to care about for the near future.
2012-02-01 16:06:58 -08:00
Brian Anderson
6b5f7865be rt: Remove unused variable from lock_and_signal 2012-02-01 16:06:21 -08:00
Brian Anderson
f954ce5ef1 rt: Remove calls to signal the kernel lock
Nobody ever waits for it
2012-02-01 16:05:17 -08:00
Brian Anderson
5c89938544 rt: Remove rust_timer. Unused 2012-02-01 16:05:17 -08:00
Brian Anderson
d24eb58a09 core: Ignore should_fail tests on win32 2012-02-01 15:35:59 -08:00
Marijn Haverbeke
694de53d28 Make vec::pop efficient 2012-02-01 12:23:13 +01:00
Marijn Haverbeke
2dbaa05af8 Remove support for native types
Issue #1673
2012-02-01 12:23:13 +01:00
Marijn Haverbeke
856a544d0c Remove native types from stdlib 2012-02-01 12:23:13 +01:00
Marijn Haverbeke
c6aead7281 Get rid of native types in LLVM module
Code is still somewhat kludgy because we don't have 32-bit enums.

Issue #1673
2012-02-01 12:23:13 +01:00
Brian Anderson
f6f3d518e6 rustdoc: Split the pruning of undocumented branches into two passes
prune_undoc_details_pass strips arguments and return values that are
undocumented. prune_undoc_items_pass prunes entire items.
2012-01-31 21:54:16 -08:00
Tim Chevalier
e204aa281d Merge branch 'master' into register-snapshots 2012-01-31 21:08:53 -08:00
Brian Anderson
e8a5d81b24 rustdoc: Add impl docs to demo mod 2012-01-31 20:59:42 -08:00
Brian Anderson
77824cf2ed rustdoc: Write markdown for impls 2012-01-31 20:54:46 -08:00
Tim Chevalier
11ecec1b71 register snapshots 2012-01-31 20:49:00 -08:00
Brian Anderson
f9f9388874 rustdoc: Apply string ops to impl docs 2012-01-31 20:42:06 -08:00
Brian Anderson
3f1534ad72 rustdoc: Promote impl descriptions to brief descriptions 2012-01-31 20:31:52 -08:00
Brian Anderson
d7a2837c55 rustdoc: Prune undocumented impls 2012-01-31 20:24:31 -08:00
Brian Anderson
fee9037765 rustdoc: Refactor tests 2012-01-31 19:32:27 -08:00
Brian Anderson
496205c85f rustdoc: Pull impl docs out of attributes 2012-01-31 19:32:27 -08:00
Brian Anderson
23042a3566 rustdoc: Gather types of impls 2012-01-31 19:32:27 -08:00
Brian Anderson
b7108d71a5 rustdoc: Rename impldoc.for_ty to self_ty 2012-01-31 19:32:27 -08:00
Brian Anderson
c218b65fd8 rustdoc: Prune unexported impls 2012-01-31 19:32:27 -08:00
Brian Anderson
7d6cf37a8d rustdoc: Extract impl doc nodes from AST 2012-01-31 19:32:27 -08:00
Brian Anderson
acb11f47dc rustdoc: Add impl doc node 2012-01-31 19:32:27 -08:00
Niko Matsakis
56db37d4c7 add iter library in preliminary form (limited syntactic support) 2012-01-31 19:21:26 -08:00
Tim Chevalier
e5d095d67e Change option::t to option
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.

The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
2012-01-31 17:05:20 -08:00
Kevin Cantu
1f795ff3b0 Re-implementing str::to_upper and str::to_lower using str::map 2012-01-31 14:29:11 -08:00
Kevin Cantu
a8b657397a Add str::split_chars_iter and str::splitn_chars_iter 2012-01-31 14:29:11 -08:00
Kevin Cantu
ebf14cb3a9 Rename str::iter_chars -> str::chars_iter 2012-01-31 14:29:11 -08:00
Kevin Cantu
c7454f5595 Rename str::to_chars -> str::chars 2012-01-31 14:29:11 -08:00
Kevin Cantu
685a434e0a Rename str::loop_chars to str::all,
rename str::loop_chars_sub to str::substr_all, and
propagate this change to std::rope and rustdoc's calls to these
2012-01-31 14:29:11 -08:00
Kevin Cantu
be9129f556 Comment fixes in str 2012-01-31 14:29:11 -08:00
Kevin Cantu
03b8c8df01 Rename str::from_byte(s) to str::unsafe::from_byte(s),
mark them as unsafe,
make comp/driver/driver.rs use str::from_bytes...
2012-01-31 14:29:10 -08:00
Graydon Hoare
24668d7578 Merge pull request #1713 from killerswan/manpg
Updating the manpage and usage message
2012-01-31 14:09:48 -08:00
Graydon Hoare
fb236b0bb6 Merge branch 'master' of github.com:mozilla/rust 2012-01-31 12:51:53 -08:00
Tim Chevalier
45c1dfe5b3 Don't compute pre- and postconditions for item_consts
Since item_consts can't refer to or modify local variables, they
don't participate in typestate and thus get empty pre and
postconditions by default.

Closes #1660
2012-01-31 11:52:46 -08:00
Graydon Hoare
f7d756fcac Remove NSIS package, obsolete (and hazardous). 2012-01-31 11:46:47 -08:00
Tim Chevalier
fba35e1a3c Require alts to be exhaustive
middle::check_alt does the work. Lots of changes to add default cases
into alts that were previously inexhaustive.
2012-01-31 10:08:24 -08:00
Marijn Haverbeke
813a55d891 Move walk_ty to stack closure 2012-01-31 13:02:46 +01:00
Marijn Haverbeke
25d60172d6 Don't consider references to nullary tag variants lvals in kind.rs
This allows us to express option::map with noncopyable type
parameters, which makes sense, since the type params aren't being
copied (none doesn't contain any).
2012-01-31 13:02:46 +01:00
Brian Anderson
b9bb58f104 core: Add ctypes::c_char 2012-01-30 22:08:57 -08:00
Brian Anderson
19b9a0d363 rustdoc: Reenable a working test 2012-01-30 21:02:03 -08:00
Brian Anderson
868d9c753c rustdoc: Add some rustdocs 2012-01-30 21:01:09 -08:00
Brian Anderson
bc450e60c3 rustdoc: Add ifaces to demo module 2012-01-30 20:54:02 -08:00
Brian Anderson
38197d8728 rustdoc: Write markdown for ifaces 2012-01-30 20:53:52 -08:00
Brian Anderson
f4aba18ae7 rustdoc: Apply generic string ops to ifaces 2012-01-30 19:37:32 -08:00
Brian Anderson
fd7bb70d6f rustdoc: Promote iface descriptions to brief descriptions 2012-01-30 19:37:32 -08:00
Brian Anderson
a64030697b rustdoc: Prune undocumented ifaces 2012-01-30 19:37:32 -08:00
Brian Anderson
2c495a9bf8 rustdoc: Add iface attribute docs to the doc tree 2012-01-30 19:37:32 -08:00
Brian Anderson
b8a683415c rustdoc: Add attribute parsing for ifaces and methods 2012-01-30 19:37:32 -08:00
Brian Anderson
dd1564a6d3 rustdoc: Add iface method type info to the doc tree 2012-01-30 19:37:32 -08:00
Brian Anderson
c775798124 rustdoc: Add a test that unexported ifaces are pruned 2012-01-30 19:37:32 -08:00
Brian Anderson
cb4a383922 rustdoc: Extract iface doc nodes from the AST 2012-01-30 19:37:32 -08:00
Brian Anderson
d3aa174846 rustdoc: Add definition of iface docs 2012-01-30 19:37:32 -08:00
Kevin Cantu
8abcafe7ad Updating the manpage and usage message 2012-01-30 19:02:20 -08:00
Brian Anderson
fe745f1b5d rustdoc: Use fewer unique pointers 2012-01-30 13:05:25 -08:00
Brian Anderson
0e498da47e rustc: Allow attributes on methods. Closes #1709 2012-01-30 11:43:45 -08:00
Paul Woolcock
6ba3d24355 Remove ternary operator
`expr_ternary`, `ternary_to_if`, and all parses & lexer definitions have
been removed.
2012-01-30 18:21:19 +01:00
Paul Woolcock
a02493b969 Fix last failing test
All tests now pass, without the ternary operator.
2012-01-30 18:21:12 +01:00
Paul Woolcock
e1251f7b00 Change all ternary ops to if/then/else
All the files below had at least one instance of the ternary operator
present in the source.  All have been changed to the equivalent
if/then/else expression.
2012-01-30 18:21:01 +01:00
Paul Woolcock
e1f15a71e3 Alter/remove tests that include/concern ternary
3 tests, pretty/block-disambig.rs, run-pass/operator-overloading.rs,
and run-pass/weird-exprs.rs, all included the ternary operator.  These
were changed to use the if-then-else construct instead.

2 tests, run-pass/block-arg-in-ternary.rs and run-pass/ternary.rs, were
only there because of the ternary operator, and were removed.
2012-01-30 18:20:05 +01:00
Marijn Haverbeke
86d473ad1f Substitute type parameters more eagerly
This simplifies the typechecker a bit (no more ty_param_substs_opt_and_ty)
and is needed for another experiment I'm playing with. I hope it also
makes compilation faster (the bots will tell).
2012-01-30 17:28:30 +01:00
Marijn Haverbeke
964bd485c6 Revert self types 2012-01-30 11:37:52 +01:00
Marijn Haverbeke
98c3396ab6 Remove trailing whitespace in debuginfo.rs 2012-01-30 10:21:25 +01:00
Marijn Haverbeke
55c938b2c2 Only build debuginfo blocks for blocks that appear in the program text
I.e. a set of curly braces, not everything that creates a block
context in the trans pass.

Issue #1694
2012-01-30 10:06:06 +01:00
Brian Anderson
0ec92a4ca7 rustc: Add a missing llvm linkage type 2012-01-29 23:27:54 -08:00
Brian Anderson
c77f1d47f8 rustc: Add some missing llvm defs. Fix comments 2012-01-29 23:10:39 -08:00
Brian Anderson
fa13fd9d64 rt: Remove set_min_stack 2012-01-29 21:27:37 -08:00
Brian Anderson
cad4918b2a core: Remove sys::set_min_stack
This was a temporary hack with global effect. Eventually there will
be a real solution for controlling stack sizes.
2012-01-29 21:27:09 -08:00
Brian Anderson
6548cdd59b rt: Make the initial segment of the main task's stack 1MB
This is a trick to fool microbenchmarks. Closes #1681
2012-01-29 21:20:39 -08:00
Brian Anderson
361f90e618 rustdoc: Sort the items so modules are printed last 2012-01-29 14:51:09 -08:00
Brian Anderson
07ac2e1043 rustdoc: Add a sorting pass 2012-01-29 14:15:14 -08:00
Brian Anderson
55e69eb458 rustdoc: Extract method to get item names 2012-01-29 13:36:54 -08:00
Brian Anderson
dbe2928c4d rustdoc: Fix typo in attr_pass 2012-01-29 13:25:38 -08:00
Brian Anderson
f8c93bdbe1 rustdoc: Move mod docs into the item tag 2012-01-29 13:08:18 -08:00
Brian Anderson
9732e0d554 rustdoc: Move fn docs into the item tag 2012-01-29 12:47:06 -08:00
Brian Anderson
5aa6c3a49a rustdoc: Move const docs into the item tag 2012-01-29 12:46:26 -08:00
Brian Anderson
95e2b1b8f9 rustdoc: Add test that unexported resources are pruned 2012-01-29 11:38:44 -08:00
Brian Anderson
d56a4dd04b rustdoc: Move enum docs into the item tag 2012-01-29 11:38:44 -08:00
Brian Anderson
40cbc89b6f rustdoc: Move resource docs into the item tag 2012-01-29 11:38:44 -08:00
Brian Anderson
bfd8a14065 rustdoc: Create an item tag to hold doc for all item types 2012-01-29 11:38:44 -08:00
Marijn Haverbeke
2740a6b605 Fix mistake in previous commit 2012-01-29 19:57:57 +01:00
Marijn Haverbeke
d6996c0210 Fix bug where resolve didn't descend method ty params
Closes #1700
2012-01-29 19:46:36 +01:00
Erick Tryzelaar
29ba196336 Adding a function to concatanate vectors with a separator 2012-01-28 15:41:53 -08:00
Erick Tryzelaar
5b2c0a999f std: Whitespace cleanup. 2012-01-28 09:18:35 -08:00
Erick Tryzelaar
f98210db07 core: Flesh out vec find functions. 2012-01-28 09:18:34 -08:00
Erick Tryzelaar
025e6ff158 core: add vec spliting functions. 2012-01-28 09:18:34 -08:00
Erick Tryzelaar
1be3a7c263 core: add (,r)position(,_from) functions
This is to help search through a vector better.
2012-01-28 09:18:34 -08:00
Erick Tryzelaar
259636a112 core: rename vec::position* functions
Almost all of the vec functions that predicates don't have a
corresponding function that takes a single element, so this
commit renames the common fn usecase to be the default.
2012-01-28 09:18:34 -08:00
Josh Matthews
a831e7ce13 Merge remote-tracking branch 'mozilla/master' 2012-01-28 11:50:48 -05:00
Josh Matthews
fcb381410d Disable lexical block and function debug info caches to improve compilation time while #1694 is unfixed, and fix stack-exhaustion bug in block parent generation. 2012-01-28 11:50:26 -05:00
Brian Anderson
fc5ec630d4 rt: Remove unused variable 2012-01-27 18:45:43 -08:00
Brian Anderson
53dbde6cc2 rustc: Make 'attempted access of field' error non-fatal 2012-01-27 16:58:27 -08:00
Brian Anderson
3321880f13 Merge remote-tracking branch 'killerswan/fixing_strings_2'
Conflicts:
	src/comp/driver/driver.rs
	src/comp/middle/trans/base.rs
	src/comp/syntax/parse/lexer.rs
2012-01-27 16:44:40 -08:00
Brian Anderson
7e620f87a6 std: Long lines 2012-01-27 15:11:45 -08:00
Donovan Preston
6b42e6b298 Re-apply fixes brson made. 2012-01-27 15:07:29 -08:00
Donovan Preston
3d76922f97 Implement timers. 2012-01-27 14:04:13 -08:00
Marijn Haverbeke
e48bf6f3f4 Make occurs check in ty::fixup_vars more reliable
It wouldn't detect cycles that went through several type vars before.

Closes #1464
2012-01-27 18:58:52 +01:00
Marijn Haverbeke
362625008a Allow moving out of mutable unsafe pointers
This makes it possible to de-initialize values anywhere in
memory, which is needed, for example, for a fast imlementation
of vec::pop.
2012-01-27 17:15:40 +01:00
Marijn Haverbeke
dc55c06aa3 Properly check enum types for recursion
Closes #742
2012-01-27 16:03:43 +01:00
Marijn Haverbeke
03e9dac09a Move various trans_ modules under a trans:: umbrella module
Closes #1304
2012-01-27 13:20:36 +01:00
Marijn Haverbeke
b3f06c7d54 Stop passing spans to middle::trans functions that don't need them
Removes a bunch of (eventually) unused arguments. Makes span passing to debuginfo
explicit, instead of relying on the (usually incorrect) spans held in the contexts.

Closes #1439
2012-01-27 13:20:36 +01:00
Marijn Haverbeke
b80f0a3c9f Use the method name 'unary-' for overloading negation
It's less likely to clash with something than 'neg'.

Issue #1520
2012-01-27 10:06:53 +01:00
Brian Anderson
7b67e2d274 rustdoc: Write both crates and mods as header level 1 2012-01-26 23:16:42 -08:00
Brian Anderson
7c925cfaaf core: Long lines 2012-01-26 23:12:30 -08:00
Brian Anderson
7820c2f17a Merge pull request #1684 from rtanglao/master
rustdocs for f32.rs and f64.rs
2012-01-26 23:00:06 -08:00
Brian Anderson
094f91b685 rustdoc: Write markdown for resources 2012-01-26 22:54:20 -08:00
Brian Anderson
ca0aefa8bf rustdoc: Add resource arg tys to doc tree 2012-01-26 22:54:16 -08:00
Roland Tanglao
4e1bf8d692 rustdocs for f32.rs and f64.rs 2012-01-26 22:46:39 -08:00
Brian Anderson
e51ae23317 rustdoc: Apply generic string-op passes to resources 2012-01-26 22:27:13 -08:00
Brian Anderson
4c188fb82f rustdoc: Promote resource long descriptions to brief descriptions 2012-01-26 22:19:47 -08:00
Brian Anderson
21fc2a36d8 rustdoc: Build resource arguments as well 2012-01-26 22:14:16 -08:00
Brian Anderson
06ab83de2c rustdoc: Prune undocumented resources 2012-01-26 22:07:14 -08:00
Brian Anderson
ce7d150493 rustdoc: Add resource attribute docs to the doc tree 2012-01-26 21:39:20 -08:00
Brian Anderson
2efc6004b5 rustdoc: Parse resource doc attributes 2012-01-26 21:20:17 -08:00
Brian Anderson
97a1110c5f rustdoc: Add resource signatures to doc tree 2012-01-26 20:59:15 -08:00
Brian Anderson
9f80a17c0e rustc: Add pprust::res_to_str 2012-01-26 20:54:36 -08:00
Brian Anderson
e44467a47f rustdoc: Add resources to the doc fold 2012-01-26 20:34:16 -08:00
Brian Anderson
23e9f7a1b6 rustdoc: Extract resources from the AST 2012-01-26 20:34:16 -08:00
Brian Anderson
7cf725355a rustdoc: Add a resource node to the doc tree 2012-01-26 20:34:16 -08:00
Brian Anderson
f0ba69a96f Remove the --no-core command-line option
It is superceeded by the #[no_core] attribute
2012-01-26 20:30:46 -08:00