Commit graph

869 commits

Author SHA1 Message Date
Brian Anderson
236bf7a9b8 stdlib: Actually write the word 'fail' instead of just thinking it 2011-12-02 11:10:03 -08:00
Brian Anderson
e814c42000 stdlib: Add issue number to win32 fsync FIXME 2011-12-02 11:07:55 -08:00
Brian Anderson
39b05c85b8 stdlib: Win32 fsync is just fail
No fsync function on windows. Needs custom implementation.
2011-12-02 11:06:42 -08:00
Stefan Plantikow
21c69d4ba4 Added cross-platform fsync api to io; win32 impl needs to be refined
No tests, need mktmpfile first
2011-12-02 11:06:03 -08:00
Niko Matsakis
dfb2c15bba fix name of SetCurrentDirectory 2011-12-01 19:31:12 -08:00
Elly Jones
9b3f8bf2a9 libstd: add fs::change_dir() 2011-12-01 22:19:53 -05:00
Brian Anderson
7476a39e47 stdlib: Implement some preliminary libuv bindings
std::uv is intended to be low-level, exactly mirroring the C API.
Difficult to continue the implementation now without scheduler
improvements.
2011-12-01 10:24:21 -08:00
Lindsey Kuper
586a685eec Fix typo in stdlib docs. 2011-11-30 03:54:32 -05:00
Joshua Wise
45dc5356df c_vec: Remove the mutable cast be forcing the pointer to be mutable throughout (discussion in #1217). 2011-11-28 10:41:45 -08:00
Joshua Wise
c2eb084b4c Add c_vec library to std. 2011-11-28 10:41:45 -08:00
Joshua Wise
9aa6e5750e ptr: Add mut_offset, to be able to calculate an offset on mutable pointers. 2011-11-28 10:41:45 -08:00
Stefan Plantikow
891528fb73 std: math: renaming and documentation fixes 2011-11-24 16:21:14 -08:00
Stefan Plantikow
97fc39b214 std: factored f32 and f64 out from math 2011-11-24 16:21:14 -08:00
Stefan Plantikow
a611496ddf std: added missing calls to math; covers C95 completely now, includes tests 2011-11-24 16:21:13 -08:00
Stefan Plantikow
bd405fb457 std: math now declares libm dependencies as pure 2011-11-24 16:21:13 -08:00
Stefan Plantikow
9c9be62b02 std: rewrote math to support most C95 libmath calls on f32, f64 and float 2011-11-24 16:21:13 -08:00
Haitao Li
3e303af86b rustc: Add a path attribute for crate directives
The path information was an optional "filename" component of crate
directive AST. It is now replaced by an attribute with metadata named
"path".

With this commit, a directive

  mod foo = "foo.rs";

should be written as:

  #[path = "foo.rs"]
  mod foo;

Closes issue #906.
2011-11-24 15:31:18 -08:00
Marijn Haverbeke
9fb3719ded Rollback return-by-reference
It's proving too inflexible, so I'm ripping out the extra complexity
in the hope that regions will, at some point, provide something
similar.

Closes #918
2011-11-23 11:02:27 +01:00
Marijn Haverbeke
a8dd52ed36 Remove last traces of auth keyword
The reference now has an empty hole where the auth keyword used to be.
Changing the keyword table seems to require manually sorting the
keywords and putting them back into some kind of arcane interleaved
order. I'll open an issue to actually fix this.

Closes #1211
2011-11-23 11:02:27 +01:00
Brian Anderson
a69c5617f0 stdlib: Use c_ints instead of ints for natives 2011-11-22 17:16:20 -08:00
Brian Anderson
bb7750b8d0 stdlib: Fix some busted macos libc decls 2011-11-22 15:34:53 -08:00
Brian Anderson
d0a2f00611 stdlib: win32 fixes for dir handling 2011-11-22 15:14:34 -08:00
Elly Jones
9dd4789d80 Add fs::rmdir() and tempfile/gen_str() tests. 2011-11-22 14:43:18 -08:00
Elly Jones
d468af59ed once more with feeling... 2011-11-22 14:43:18 -08:00
Elly Jones
864672bb84 Use type inference! 2011-11-22 14:43:18 -08:00
Elly Jones
91e04f7dd2 Fix long lines 2011-11-22 14:43:18 -08:00
Elly Jones
c11c44abc0 std: add fs::mkdir(), rng.gen_str(), tempfile::mkdtemp()
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-11-22 14:43:18 -08:00
Stefan Plantikow
1a13504796 Fixed documentation comment glitches in the logic ADTs 2011-11-21 11:15:19 -08:00
Stefan Plantikow
1c9f97b669 stdlib: added (2,3,4)-valued logic ADTs
This is useful for writing caches and perhaps in typestate predicates.
It also adds a companion module for bool with from_str, to_str, ... fns.
2011-11-21 11:15:19 -08:00
Stefan Plantikow
2524636dbd std: declared fns in math to be pure; requires calling libc via unsafe 2011-11-21 13:00:00 +01:00
Stefan Plantikow
68839c3dda Added logarithm functions for floats to std::math
Thanks to marijn for helping with #[link_name]
2011-11-21 12:59:59 +01:00
Marijn Haverbeke
a6b2a2cdb1 Separate vec::map and vec::map_mut
The safe-reference checker requires a copy of each mapped-over element
only when the vector is mutable. Let's not pay that cost for immutable
vectors.
2011-11-21 12:07:41 +01:00
Brian Anderson
9aa67052e1 rt: Remove some stack-wasting macros from rust_task::yield 2011-11-18 15:59:10 -08:00
Brian Anderson
1e58049da2 rt: Remove fail calls from rust_task::yield 2011-11-18 15:36:48 -08:00
Brian Anderson
792068d871 rt: Remove unblock call from rust_task::yield 2011-11-18 14:45:48 -08:00
Brian Anderson
3a6320f71b intrinsics: Eliminate recv intrinsic
This intrinsic existed just to get ahold of the return pointer. I replaced it
with a call_with_retptr intrinsic that grabs the return pointer and passes it
to another Rust function, thereby eliminating the need to call C functions on
the Rust stack.
2011-11-18 12:48:54 -08:00
Brian Anderson
21865ddce6 intrinsics: Remove the call to get_task from task_sleep 2011-11-18 10:32:27 -08:00
Brian Anderson
3feaecd757 intrinsics: Move the call to upcall_fail out of rust_intrinsic_cast 2011-11-18 10:32:27 -08:00
Brian Anderson
9ca2005959 rt: Remove size_of and align_of functions. Now written in Rust 2011-11-18 10:32:27 -08:00
Brian Anderson
1f74af505f stdlib: Add some useful fields to the definition of type_desc 2011-11-18 10:32:27 -08:00
Marijn Haverbeke
f6491bb426 Update stdlib, compiler, and tests to new kind system
This involved adding 'copy' to more generics than I hoped, but an
experiment with making it implicit showed that that way lies madness --
unless enforced, you will not remember to mark functions that don't
copy as not requiring copyable kind.

Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
8f8ebb550c Implement a last-use-of-local finding algorithm
Issue #925
2011-11-18 12:49:01 +01:00
Niko Matsakis
adc79e2f44 remove compile-command from local variable blocks 2011-11-17 11:46:13 -08:00
Brian Anderson
342dc21d2c Disconnect ports before draining them. Issue #1155 2011-11-16 17:22:14 -08:00
Niko Matsakis
809ca13bfa fix minor merge errors 2011-11-16 16:13:43 -08:00
Niko Matsakis
2b8cf89ba2 correct signed-ness and long line 2011-11-16 15:27:49 -08:00
Niko Matsakis
62b298ee13 missed merges 2011-11-16 15:27:08 -08:00
Niko Matsakis
23bb158acb fix win32 types, make close() use i32 as return type 2011-11-16 15:27:08 -08:00
Brian Anderson
d2199e8716 Various fixes for x86_64 on linux
Configure LLVM correctly, use the right data layout, add the readlink
function back, fix C constants, etc.
2011-11-16 15:24:56 -08:00
Niko Matsakis
c572b793fe fix mismatched types---make check passes on x86_64! 2011-11-16 15:24:37 -08:00