Brian Anderson
a2377ccf91
stdlib: Add vec::init. Returns all but the last element.
...
Per haskell, to go with head/tail, and last.
2011-10-28 22:42:38 -07:00
Matt Brubeck
b510a74a36
Cleanup: Remove uneccesary generic_cmp function.
2011-10-28 14:44:39 -07:00
Matt Brubeck
9c5c108d5b
Add more isNaN tests
2011-10-28 14:44:39 -07:00
Matt Brubeck
45d7777991
Change behavior of float::nonpositive/nonnegative
...
Rather than being defined as !positive and !negative, these should act the
same as negative and positive (respectively). The only effect of this change
should be that all four functions will now return false for NaN.
2011-10-28 14:44:39 -07:00
Matt Brubeck
000b2fe9a6
Use IEEE 754 semantics for NaN (Issue #1084 )
2011-10-28 14:44:39 -07:00
Matt Brubeck
7e064deacf
+0.0 should be positive and -0.0 should be negative.
2011-10-28 14:44:39 -07:00
Brian Anderson
54ddb553c2
stdlib: Replace an unsafe cast with ptr::null
2011-10-28 14:25:40 -07:00
Brian Anderson
f96ad30dfc
stdlib: Make reinterpret_cast and leak unsafe
2011-10-28 14:19:17 -07:00
Brian Anderson
ad66d72e6c
stdlib: Make merge_sort take [mutable? T]
2011-10-28 13:56:01 -07:00
Brian Anderson
39b729e36f
stdlib: Fix the list::foldl implementation
2011-10-28 13:45:32 -07:00
Brian Anderson
49e8ffa34f
stdlib: Rename list::length to list::len to match vec::len
2011-10-28 13:37:19 -07:00
Brian Anderson
2e8a8390d5
stdlib: Rename the 'ls_' param in list functions to 'ls'
2011-10-28 13:34:17 -07:00
Brian Anderson
1da99cdf68
stdlib: Make list::from_vec more efficient
2011-10-28 13:32:11 -07:00
Brian Anderson
d53a253dca
stdlib: make list::from_vec take [mutable? T]
2011-10-28 13:24:39 -07:00
Brian Anderson
83219269d5
rustc: Remove broken --depend flag
2011-10-28 12:58:10 -07:00
Brian Anderson
2a2945e5de
rustc: -h cleanup
2011-10-28 12:51:46 -07:00
Brian Anderson
d106a336cc
rustc: Change --OptLevel to --opt-level
2011-10-28 12:49:19 -07:00
Brian Anderson
bab2b37fd0
rustc: Use consistent error handling in main
2011-10-28 11:57:01 -07:00
Brian Anderson
8da8a4a018
rustc: Extract error reporting from codemap
2011-10-28 11:43:07 -07:00
Brian Anderson
f2a3270b9c
Reorder statements in rustc main to avoid bounds check
2011-10-28 11:17:07 -07:00
Haitao Li
a81fdf0a5a
rustc: Lift output file name handling out of main
2011-10-28 11:12:10 -07:00
Haitao Li
7bb9a54c73
Produce dyn libraries with proper names
...
Issue #744
2011-10-28 11:05:43 -07:00
Marijn Haverbeke
7dacccde94
Make shared kind the default only for generic functions
...
You almost never want a function with pinned type params. For
types, objects, resources, and tags, pinned types are actually often
more sane. For most of these, shared rarely makes sense. Only tricky
case is objs -- you'll have to think about the kinds you want there.
Issue #1076
2011-10-28 17:00:14 +02:00
Marijn Haverbeke
6fe7aa4aff
Move to blocks, rather than fn@s, in parser.rs
2011-10-28 16:41:56 +02:00
Marijn Haverbeke
7a0aee74bf
Move to short type parameter keywords
...
Issue #1076
2011-10-28 15:25:33 +02:00
Marijn Haverbeke
8e65dffc30
Register snapshot
2011-10-28 15:25:29 +02:00
Marijn Haverbeke
3397fa4701
Move to short kind kinds words in test suite
...
Issue #1076
2011-10-28 14:57:49 +02:00
Marijn Haverbeke
cba4ddc6a4
Start accepting short keywords for parameter kinds
...
This is a pre-snapshot commit to be able to implement #1076 without
the bootstrap compiler getting in my way.
2011-10-28 14:57:35 +02:00
Brian Anderson
4bb5a2c43a
Remove whitespace
2011-10-27 21:35:08 -07:00
Brian Anderson
d96c419b14
Add std::vec::foldr
2011-10-27 21:34:16 -07:00
Brian Anderson
8ad857f453
Add a test for std::vec::iter2
2011-10-27 21:17:51 -07:00
Brian Anderson
7a7940daca
Add reverse iterators to std::vec
2011-10-27 21:09:02 -07:00
Brian Anderson
f1f0e6c06c
Remove std::vec::eachi. Same function as iter2.
2011-10-27 20:50:10 -07:00
Brian Anderson
1a89e589a4
Implement vec::foldl without recursion
2011-10-27 20:47:06 -07:00
Brian Anderson
b5ed1c46c0
Add std::vec::iter
2011-10-27 20:30:06 -07:00
Brian Anderson
9c097d19e4
Remove std::int::eq_alias
...
This is the exact same function as int::eq
2011-10-27 18:23:06 -07:00
Brian Anderson
b16d9019a8
Make option::is_some option::is_none pure
2011-10-27 18:15:58 -07:00
Brian Anderson
91997e79aa
Make vec::reversed take [mutable? T]
2011-10-27 17:49:13 -07:00
Brian Anderson
74a1e054eb
Make std:vec::grow_fn take an init_op type
2011-10-27 17:06:49 -07:00
Brian Anderson
506ae934f8
Reorder std::vec so the documentation renders better
...
Put all types first, then predicates, then functions
2011-10-27 17:03:38 -07:00
Brian Anderson
2b85817af8
Convert various functions in std to take lambda blocks
2011-10-27 16:27:47 -07:00
Brian Anderson
cf2624106c
Document std::bitv
2011-10-27 15:35:56 -07:00
Brian Anderson
e0715380dc
Add more std docs
2011-10-27 14:54:18 -07:00
Brian Anderson
8222fa4e27
Use the std::term color constants in the codemap
...
Exported constants work now. Woo!
2011-10-27 13:52:00 -07:00
Matt Brubeck
5d6fe1a533
Remove uint::max/min in favor if math::max/min
2011-10-27 13:37:53 -07:00
Matt Brubeck
50d99ec32c
Add documentation to std::uint
2011-10-27 13:37:53 -07:00
Matt Brubeck
a9f9227a1c
Add std documentation for float and u8 functions
2011-10-27 13:37:53 -07:00
Matt Brubeck
9e4c2b6bc6
Mark uint add/sub/mul/div/rem functions as pure
2011-10-27 13:37:53 -07:00
Matt Brubeck
8dba51b87c
Add function aliases for float operators
2011-10-27 13:37:53 -07:00
Matt Brubeck
361adf9f86
Add tests for the 'as' (cast) operator
2011-10-27 13:37:35 -07:00
Brian Anderson
26d839216b
Add more std docs
2011-10-27 13:25:20 -07:00
Brian Anderson
00404ebe62
Cleanup in std::task
2011-10-27 11:29:04 -07:00
Brian Anderson
20e4f793e2
More std docs
2011-10-27 11:17:23 -07:00
Brian Anderson
17c651b3b0
Remove task::join_id
...
This is the old, racy way of joining to a task. It is no longer used.
2011-10-26 20:43:47 -07:00
Brian Anderson
4d669036f3
Add more std documentation
2011-10-26 18:32:34 -07:00
Brian Anderson
197c8543fe
Add more std documentation
2011-10-26 11:47:42 -07:00
Brian Anderson
7ae757583a
Begin documenting std and add doc generation using naturaldocs
...
Naturaldocs isn't really that great but it seems easier to get
something working than with doxygen, for which we would need to
convert rust code to something C++ish. We probably want to just
write a rustdoc utility at some point.
2011-10-25 18:01:52 -07:00
Marijn Haverbeke
013107a25c
Properly take mutable object fields into account during alias analysis
...
Closes #1055
2011-10-25 17:57:26 +02:00
Marijn Haverbeke
cfdf193c46
Update our code to new type parameter kind syntax
...
Closes #1067
2011-10-25 15:56:55 +02:00
Marijn Haverbeke
58c82a8da2
Remove support for @/~-style type param kind annotation
...
Issue #1067
2011-10-25 15:50:45 +02:00
Marijn Haverbeke
8e7f4a3760
Register new snapshot
2011-10-25 15:23:57 +02:00
Marijn Haverbeke
2884c722fe
Step one towards new type param kind syntax
...
Issue #1067
Needs a snapshot to finalize.
2011-10-25 14:31:56 +02:00
Brian Anderson
ea740a8bb0
Fix long lines
2011-10-24 17:23:34 -07:00
Niko Matsakis
c78b1639b4
fix c-stack-cdecl when used w/ i64
2011-10-24 17:03:18 -07:00
Niko Matsakis
d41385a69b
kill errant log_err
2011-10-24 16:06:18 -07:00
Niko Matsakis
a5cbf4b13b
remove (unused) fn rust_list_files from win32_fs; that is
...
defined in fs.rs
2011-10-24 16:06:18 -07:00
Niko Matsakis
8f2d75d53c
switch over sqrt from llvm to c-stack-cdecl, exposing a bug in
...
the supported return types of upcall_c_stack
2011-10-24 16:06:18 -07:00
Niko Matsakis
d69a83b021
add implicit ctx
2011-10-24 16:06:18 -07:00
Niko Matsakis
e308f3346b
remove unused task ptr arg
2011-10-24 16:06:18 -07:00
Niko Matsakis
c81808a9f7
update intrinsics file
2011-10-24 16:06:18 -07:00
Niko Matsakis
973a285371
move uses of rust ABI in tests to cdecl or c-stack-cdecl as appr
...
Note: I found a bug in c-stack-cdecl which codes not permit such
native functions to be used as values. I added an xfail-test
(c-stack-as-value) documenting it.
2011-10-24 16:06:18 -07:00
Niko Matsakis
f8de679c1e
move remaining task natives to cdecl ABI (run on rust stack)
2011-10-24 16:06:18 -07:00
Niko Matsakis
e838edc0b3
isolate those funcs in task that can run on the c stack
2011-10-24 16:06:17 -07:00
Niko Matsakis
fb48817ade
work around bug when calling c-stack-cdecl fns from outside crate
...
In the main test, I call the wrapper instead of the native fn, as intended.
I also added an xfail-test that exercises the broken code path. Will
file a bug.
Description of the broken code path:
The code path is that when we look up the external identifier we go through
trans_external_path() -> type_of_ty_param_kinds_and_ty() ->
type_of_fn_from_ty() -> type_of_fn(), and type_of_fn() adds a lot of external
parameters. Problem is, I guess, that we don't pass the native ABI (or even the
fact that it's a native function!), just the types and kinds of the parameters.
2011-10-24 16:06:17 -07:00
Niko Matsakis
02d7a1e781
move sys fns into c-stack-cdecl and get_type_desc() into rusti
...
there is one test failure, stdtest/sys.rs, which inexplicably
(thus far) fails to compile because it invokes
sys::rustrt::last_os_error() instead of invoking
sys::last_os_error(). If stdtest/sys.rs is updated to invoke
the wrapper, it passes. Still tracing the source of this error.
2011-10-24 16:06:17 -07:00
Niko Matsakis
0598635bdc
migrate leak
2011-10-24 16:06:17 -07:00
Niko Matsakis
8eb336a705
migrate rust_run_program
2011-10-24 16:06:17 -07:00
Niko Matsakis
5ddc15e42e
migrate debugging funcs
2011-10-24 16:06:17 -07:00
Niko Matsakis
c04f42e2c7
migrate sched_threads call
2011-10-24 16:06:17 -07:00
Niko Matsakis
6910552698
convert str methods to c-stack-cdecl
2011-10-24 16:06:17 -07:00
Niko Matsakis
12ab0d66f5
make time module use c-stack-cdecl
2011-10-24 16:06:17 -07:00
Niko Matsakis
96629d5c21
move rand functions into c-stack-cdecl mode
2011-10-24 16:06:17 -07:00
Niko Matsakis
35e01e0137
remove unnecessary && from various file routines
2011-10-24 16:06:17 -07:00
Niko Matsakis
af99b4b0dc
move more native "rust" to native "c-stack-cdecl"
2011-10-24 16:06:16 -07:00
Niko Matsakis
910f7c6dd3
move io.rs natives from "rust" to "c-stack-stdlib"
2011-10-24 16:06:16 -07:00
Niko Matsakis
b13e7e0f3d
move fs routines to c-stack-stdlib
2011-10-24 16:06:16 -07:00
Niko Matsakis
4880065429
rip out unused task pointers
2011-10-24 16:06:16 -07:00
Niko Matsakis
d9b23cb022
move comm functions out of rust abi
2011-10-24 16:06:16 -07:00
Niko Matsakis
44697a4293
purge log_err
2011-10-24 16:06:16 -07:00
Niko Matsakis
e590869c8f
update vec libs to use c-stack-cdecl calling convention
2011-10-24 16:06:16 -07:00
Brian Anderson
548c92df9c
Register snapshots
2011-10-24 13:10:41 -07:00
Brian Anderson
ff669cf5ad
Revert "Register snapshots"
...
This reverts commit 6e40f705c1
.
2011-10-23 20:40:42 -07:00
Brian Anderson
3571061bcc
Revert "Register snapshots"
...
This reverts commit 24a6d334b7
.
2011-10-23 20:40:33 -07:00
Brian Anderson
24a6d334b7
Register snapshots
2011-10-23 20:11:07 -07:00
Brian Anderson
6e40f705c1
Register snapshots
2011-10-23 19:41:55 -07:00
Austin Seipp
1703e9ec89
Fix an insane rt build error running 'make check -j3'
2011-10-23 19:04:49 -07:00
Brian Anderson
4c95c52016
Remove a test binary that shouldn't exist
2011-10-23 14:23:09 -07:00
Brian Anderson
b916c57021
Update src/etc/gyp-uv
...
Make instructions more accurate. Make the sed commands work on linux.
2011-10-22 17:38:27 -07:00
Brian Anderson
bdbeb75bfb
Upgrade libuv to 179f475b2ad64729feb0422f06ce133cb364482a
2011-10-22 17:37:18 -07:00
Brian Anderson
81a44ccacf
Remove hack to break the AST fold cycle. Closes #998
2011-10-21 17:47:31 -07:00