Patrick Walton
fd1dd76977
stdlib: Add a str::split_str() to split on a delimiter string of any length
2011-12-15 17:39:53 -08:00
Stefan Plantikow
af8e471908
Fixed type resolution error in math tests
2011-12-14 14:54:16 -08:00
Stefan Plantikow
50db7ce906
Moved std::math to std::core
...
- merges math and float into core::float
- Splits core::ctypes into core::ctypes and core::mtypes
- cmath is not exported
- stdtest::math passes
2011-12-14 14:54:16 -08:00
Stefan Plantikow
6d0901cb4d
std: export math_f* as math::f* submods and use tailcalls in std::math
2011-12-14 14:54:16 -08:00
Graydon Hoare
fa9ad984fb
Copy first batch of material from libstd to libcore.
2011-12-13 16:34:50 -08:00
Brian Anderson
7a8e73662d
rt: Make unwinding through __morestack work on mac
...
Had to bump the min stack size in some of the tests from 256 bytes
to 1024 bytes. Not sure why yet.
2011-12-11 18:49:04 -08:00
Marijn Haverbeke
44ffd8e3aa
Allow type annotations for blocks
...
I.e. {|foo: int| -> int foo + 2}
Issue #1275
2011-12-09 09:42:22 +01:00
Marijn Haverbeke
9a269a3aa8
Allow binding of nested patterns
...
See src/test/run-pass/nested-patterns.rs for some examples. The syntax is
boundvar@subpattern
Which will match the subpattern as usual, but also bind boundvar to the
whole matched value.
Closes #838
2011-12-08 12:03:48 +01:00
Marijn Haverbeke
17e99ec57f
Fix test that used an oversized int literal
2011-12-07 22:10:56 +01:00
Marijn Haverbeke
7548a0d77a
Restore accidentally overwritten test
2011-12-07 22:02:38 +01:00
Marijn Haverbeke
3d0610b072
Check for literals that are out of range for their type
2011-12-07 21:53:05 +01:00
Marijn Haverbeke
e3eca9174b
Change literal representation to not truncate
...
Also shuffles around the organization of numeric literals and types,
separating by int/uint/float instead of machine-vs-non-machine types.
This simplifies some code.
Closes #974
Closes #1252
2011-12-07 21:08:28 +01:00
Marijn Haverbeke
03a6e54212
Disallow binding by-mut-ref and by-move arguments
...
Fix bug in bound by-copy arguments.
Closes #1261
2011-12-07 15:28:57 +01:00
Brian Anderson
9a738fd61d
rt: Various tweaks to make __morestack unwinding work on linux
...
When unwinding through __morestack the stack limit in the TLS is invalidated
and must be reset. Instead of actually landing at __morestack we're
just going to make all our Rust landing pads call upcall_reset_stack_limit,
which will find the stack segment that corresponds to the current stack
pointer and put the limit in the TLS.
Also massively expand the stack segment red zone to make more room for the
dynamic linker. Will fix in the future.
2011-12-06 16:32:41 -08:00
Brian Anderson
8d8148f1f7
test: More tests for unwinding + morestack
2011-12-05 19:21:46 -08:00
Brian Anderson
58844aee42
rt: Make stack unwinding work more correctly with stack growth
2011-12-05 17:42:58 -08:00
Brian Anderson
a731f165df
test: Test hitting the dynamic linker in the red zone
2011-12-05 17:20:59 -08:00
Brian Anderson
98cd96ce96
test: Add more tests for stack growth
2011-12-05 14:44:15 -08:00
Haitao Li
47ea57fead
rustc: Add suffix ".rc" to LLVM module identifier
...
LLVM code generator emits the ".file filename" directive for ELF
backends. Value of the "filename" is set as the LLVM module identifier.
Due to a LLVM MC bug[1], LLVM crashes if the module identifer is same as
other symbols such as a function name in the module.
This patch adds a ".rc" suffix (means crates) to LLVM module identifier
to workaround the bug.
Fixes issue #1251 .
1. http://llvm.org/bugs/show_bug.cgi?id=11479
2011-12-05 17:21:20 +08:00
Stefan Plantikow
a69eab16ec
typeck: Fix for #932
2011-12-05 01:23:10 +01:00
Haitao Li
96b0881a68
rustc: Fix memory leak in do-while loop
...
Issue #1257
2011-12-05 00:38:38 +08:00
Stefan Plantikow
68a82e4468
const_check: trans: added support for trivial casts
...
Part of #1215
2011-12-02 11:58:35 -08:00
Stefan Plantikow
4ba3158e4f
parse: typeck: enabling trivial casts of tail-call return values
...
introduces ctypes::m_* machine type aliases for int, uint, float
depending on cfg(target_arch) that are used in tests
2011-12-02 11:38:24 -08:00
Marijn Haverbeke
46e5e2f685
Be less specific in 'unresolved import' error patterns
...
To make sure different test set-ups (check-fast) don't cause the
tests to fail.
2011-12-02 17:20:03 +01:00
Marijn Haverbeke
30d923d14b
Disable a test that's failing on 32-bit due to imprecise literal handling
...
7655b3c0c6
(re-)introduced the problem
2011-12-02 16:56:52 +01:00
Marijn Haverbeke
0f918ddd8b
Make import ignore imports coming after them
...
This broke no code at all, so I guess people were already writing
imports in this style.
Issue #1228
2011-12-02 16:06:55 +01:00
Brian Anderson
2511299024
test: Don't fill queue in run-pass/send-iloop. Closes #1244
2011-12-01 20:36:03 -08: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
Niko Matsakis
fdebd1e2ef
adjust and un-xfail
2011-11-30 15:55:28 -08:00
Brian Anderson
0ed5c84403
xfail run-pass/bind-native-printf
...
Bots are crashing on this on the x86_64 build. As this doesn't seem crucial
for getting the x86_64 snapshot, I'm just turning it off.
2011-11-30 12:30:12 -08:00
Brian Anderson
06f4cb43f6
rt: Delete the entire stack chain on task destruction
...
Unwinding through __morestack on 64-bit Linux seems to be no big deal, and
all we have to do is free the stacks to make unwinding work with split stacks.
2011-11-29 22:22:49 -08:00
Brian Anderson
afb8f01741
rt: Fix calculation of stack args location in x86_64/morestack.S
2011-11-29 13:47:54 -08:00
Niko Matsakis
21ffc55e57
update io test to use tmp directory, and update configure to create it
2011-11-29 12:51:09 -08:00
Niko Matsakis
092fc0ab22
extra whitespace
2011-11-29 12:51:09 -08:00
Niko Matsakis
152bb314f5
fix bug in shape concerning size of tag variant
2011-11-29 12:51:08 -08:00
Brian Anderson
579399f92f
Add --stack-growth to the morestack test compile flags
2011-11-29 12:14:34 -08:00
Brian Anderson
92f1e9f1ab
Ignore some should_fail tests on win32
2011-11-28 13:28:03 -08:00
Joshua Wise
90d27af42a
c_vec: add tests
2011-11-28 10:41:45 -08:00
Brian Anderson
0365001864
Comment-out some math tests that produce different results on win32
2011-11-24 17:03:22 -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
9c9be62b02
std: rewrote math to support most C95 libmath calls on f32, f64 and float
2011-11-24 16:21:13 -08:00
Brian Anderson
7aee9f7b56
rustc: Fix a bug in cdir attribute parsing
...
The first attribute of the first mod was being applied to every mod.
2011-11-24 16:18:26 -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
e98286b594
Allow import directives in any block
...
Closes #49
2011-11-23 20:57:34 +01: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
Brian Anderson
6bdf347418
rt: Make __morestack (without unwinding) work on 32-bit linux
2011-11-22 18:02:10 -08:00
Elly Jones
9dd4789d80
Add fs::rmdir() and tempfile/gen_str() tests.
2011-11-22 14:43:18 -08:00
Haitao Li
a936f78d98
rustc: Allow trailing comma in record fields
2011-11-22 13:41:17 -08:00