Commit Graph

63 Commits

Author SHA1 Message Date
Graydon Hoare
697f1e38d6 Change 'native' and 'crust' to 'extern'.
This comes with a terminology change. All linkage-symbols are 'extern'
now, including rust syms in other crates. Some extern ABIs are
merely "foreign". The term "native" is retired, not clear/useful.

What was "crust" is now "extern" applied to a _definition_. This
is a bit of an overloading, but should be unambiguous: it means
that the definition should be made available to some non-rust ABI.
2012-06-26 16:18:37 -07:00
Tim Chevalier
da470ff5b8 Merge 2012-06-25 13:29:41 -07:00
Brian Anderson
fad307d7b4 core: Convert declarations to not use the trailing 'unsafe' notation 2012-06-25 12:48:39 -07:00
Tim Chevalier
fee78d296c Port resources to classes in libcore 2012-06-21 21:30:16 -07:00
Graydon Hoare
312faf31df Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this. 2012-06-21 16:44:10 -07:00
Tim Chevalier
39d9c30a15 Remove code from parser that was awaiting snapshot
Remove old parser functions as well as support for old-style capture
clauses. Remove remaining old-style capture clauses.
2012-06-14 19:09:02 -07:00
Brian Anderson
7a74545e97 Convert reinterpret_cast + forget to 'transmute' 2012-06-08 10:58:46 -07:00
Brian Anderson
95b9d538b8 Use #[cfg(unix)] and #[cfg(windows)] everywhere 2012-06-07 22:28:00 -07:00
Tim Chevalier
053db0208b Comment only: fix typo 2012-06-01 20:40:34 -07:00
Eric Holk
3f0358bc5c Updating comments. 2012-05-29 10:33:04 -07:00
Brian Anderson
7277cd7198 core: Add task::unkillable 2012-05-15 16:13:42 -07:00
Tim Chevalier
93a1f5e85f Annotate FIXMEs in core::task 2012-04-12 23:38:25 -07:00
Tim Chevalier
9d274ec5f2 Re-rename option functions
get_with_default (nee from_maybe) => get_default
with_option (nee maybe) => map_default
with_option_do (nee may) => iter

As per discussion of 21be1379d5
2012-04-06 12:20:13 -07:00
Tim Chevalier
98b07ddc82 Rename task::task_builder to task::builder
Closes #2120.
2012-04-05 14:09:32 -07:00
Brian Anderson
e325146eb4 Merge remote-tracking branch 'brson/mainthread'
Conflicts:
	src/rt/rust_kernel.cpp
	src/rt/rust_scheduler.cpp
	src/rt/rust_scheduler.h
2012-04-03 20:30:01 -07:00
Brian Anderson
bef72447e7 core: Add a scheduler mode, osmain, to spawn onto the main scheduler 2012-04-03 14:28:30 -07:00
Tim Chevalier
21be1379d5 Rename some core::option functions
from_maybe => get_with_default
maybe => with_option
may => with_option_do

I know these names are kind of ridiculous, but it's the best I could think of.
Feel free to bikeshed. Closes #2081
2012-04-02 16:12:49 -07:00
Graydon Hoare
6e6798c4e1 Bulk-edit mutable -> mut. 2012-03-26 18:35:18 -07:00
Niko Matsakis
bf9d714d46 Avoid unifying vars when possible; handle bot (more) correctly 2012-03-24 21:38:43 -07:00
Marijn Haverbeke
0545e4a920 Support [rust_stack] annotation on native functions (crudely) 2012-03-23 10:49:47 +01:00
Niko Matsakis
dc07280b08 make --enforce-mut-vars always on, add mut annotations to remaining files 2012-03-22 09:58:19 -07:00
Brian Anderson
b181ea415e core: Rename unsafe::leak to unsafe::forget. Closes #2031 2012-03-20 15:20:37 -07:00
Brian Anderson
47d468f08c core: Store reexporting result and either. Closes #1997 2012-03-16 15:14:37 -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
b968c8e6cd Name types after their modules instead of 't' 2012-03-13 15:14:17 -07:00
Brian Anderson
cd72b1f848 Overhaul constructor naming in libs 2012-03-13 11:07:22 -07: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
Brian Anderson
b22556a6f8 core: Convert to rustdoc 2012-03-09 22:56:53 -08:00
Niko Matsakis
713006c7b6 add mutability annotations to libcore 2012-03-07 07:47:50 -08:00
Brian Anderson
e9b5f4204a core: Remove some explicit move capture clauses 2012-03-06 13:05:03 -08:00
Brian Anderson
4220dcf1e9 core: New task API 2012-02-20 18:58:04 -08:00
Brian Anderson
ae2968d10a core: Use rust_task_config_notify instead of twiddling rust_task's innards 2012-02-09 19:00:15 -08:00
Brian Anderson
149d1d4a6e core: Add a test for blocking in native code 2012-02-08 15:42:51 -08:00
Brian Anderson
35ba9715fa core: Add task::spawn_sched
This function creates a new scheduler with a specified number of threads and
immediately executes a task on it. The scheduler is configured to terminate
when the task dies. This is the minimum API necessary to enable blocking C
calls.
2012-02-08 15:42:51 -08:00
Brian Anderson
c04b897cb2 core: Resolve some FIXMEs 2012-02-05 17:30:47 -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
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
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
Patrick Walton
194d8e3bd5 lib: ";" to "," in enums 2012-01-19 18:04:24 -08:00
Patrick Walton
97ed871fc1 libcore: "tag" -> "enum" 2012-01-19 15:56:54 -08:00
Tim Chevalier
04a2887f87 Remove '.' after nullary tags in patterns
Does what it says on the tin.

The next commit will remove support for this syntax.
2012-01-18 23:17:34 -08:00
Haitao Li
dde41869ce Use ctypes in native function declarations 2012-01-19 02:10:36 +08:00
Brian Anderson
17bf4b0e1b libcore: Move core tests into libcore 2012-01-17 19:41:05 -08:00
Brian Anderson
e66c036c9f libcore: Add task::try 2012-01-13 14:21:17 -08:00
Niko Matsakis
3f3bfeec27 make "native fn" the type for bare functions, remove fn exprs 2012-01-13 06:27:35 -08:00
Niko Matsakis
455f8b0d45 deprecate fn exprs and the fn() type, preferring fn@ and native fn 2012-01-13 06:27:34 -08:00