Stefan Plantikow
ff04cb1eb0
Added a little sudoku solver to test/bench for everone's puzzle solving needs
2011-11-20 01:53:12 +01:00
Niko Matsakis
b6af844f3a
re-enable tests for #1058 and #1059
2011-11-18 16:32:19 -08:00
Niko Matsakis
12a67af81d
add test for issue #1174
2011-11-18 16:32:19 -08:00
Brian Anderson
44aebb978c
Add tests for unsafe::reinterpret_cast
2011-11-18 10:32:27 -08:00
Brian Anderson
a9f7cbe240
stdlib: Add tests for sys::size_of and sys::align_of
2011-11-18 10:32:27 -08:00
Marijn Haverbeke
a7573af59d
Add some tests for new kind system
...
Issue #1177
2011-11-18 16:15:46 +01: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
4e03112141
Add a pass-by-copy parameter passing convention
...
This is intended to solve the problem of how to pass arguments to
constructor functions -- you want to move in rvalues, but not have to
explicitly copy stuff that is not an rvalue. The by-copy passing
convention will ensure the callee gets its own copy of the value. For
rvalues, it'll just pass off the value. For lvalues, it'll make a
copy.
Issue #1177
2011-11-18 12:49:00 +01:00
Marijn Haverbeke
9cf48d3753
Preparation for kind system overhaul
...
This goes before a snapshot, so that subsequenct patches can make the
transition without breaking the build. Disables kind checking pass, makes
parser accept both new and old-style kind annotation.
Issue #1177
2011-11-18 10:52:28 +01:00
Niko Matsakis
adc79e2f44
remove compile-command from local variable blocks
2011-11-17 11:46:13 -08:00
Haitao Li
388eed383f
rustc: Add a flag '--warn-unused-imports'
...
Followup of issue #889
2011-11-17 09:28:30 +01:00
Brian Anderson
342dc21d2c
Disconnect ports before draining them. Issue #1155
2011-11-16 17:22:14 -08:00
Niko Matsakis
25bc37cef9
refactor all unix types
2011-11-16 15:24:08 -08:00
Brian Anderson
b655fb9ea7
Replace 'mutable?' with 'const'
2011-11-16 14:41:32 -08:00
Brian Anderson
045a437556
rustc: Accept 'const' as synonym for 'mutable?'
2011-11-16 13:52:08 -08:00
Brian Anderson
f157d0b32c
Fix S_IRUSR/S_IWUSR constants on mac. Closes #726
2011-11-16 12:18:15 -08:00
Brian Anderson
a362d85329
Add a test that native mods don't need to declare an ABI
2011-11-16 11:36:46 -08:00
Haitao Li
88f29aab27
Use attributes for native module ABI and link name
...
This patch changes how to specify ABI and link name of a native module.
Before:
native "cdecl" mod llvm = "rustllvm" {...}
After:
#[abi = "cdecl"]
#[link_name = "rustllvm"]
native mod llvm {...}
The old optional syntax for ABI and link name is no longer supported.
Fixes issue #547
2011-11-16 11:35:13 -08:00
Haitao Li
3b683f5205
rustc: Use link_name attribute for native function
...
Fixes issue #906
2011-11-16 23:45:07 +08:00
Stefan Plantikow
d335d1a169
Replaced constant functions with actual constants in std and updated tests
...
Fixes issue #1165
2011-11-15 18:02:45 -08:00
Brian Anderson
f47f92235a
Make run-pass/bitwise 64-bit compatible
2011-11-15 17:01:06 -08:00
Brian Anderson
dd5512ccb0
Support conditional compilation based on architecture
...
target_os = "x86" or target_os = "x86_64"
2011-11-15 16:33:09 -08:00
Brian Anderson
47d875e002
Make run-pass/native-fn-linkname's main take no args
...
check-fast doesn't like it.
2011-11-15 10:09:33 -08:00
Haitao Li
eae478cd74
Use native fn's link name attribute if given
...
Fixes issue #905
2011-11-15 22:31:33 +08:00
Marijn Haverbeke
9ff6f816ba
Fix handling of loops and conditionals in alias.rs
...
It now threads information about invalidated aliases through the AST
properly. This makes it more permissive for conditionals (invalidating
an alias in one branch doesn't prevent you from using it in another),
and less permissive for loops (it now properly notices when a loop
invalidates an alias that it might still use in another iteration).
Closes #1144
2011-11-15 13:29:57 +01:00
Brian Anderson
81d9717864
xfail-fast run-pass/native-dupe.rs
...
This test calls the task pin function which has side effects and causes
other tests to lock.
2011-11-14 19:26:43 -08:00
Brian Anderson
5b9f76eb7c
stdlib: Run cleanups on data that fails to send
2011-11-14 14:07:52 -08:00
Brian Anderson
c74fd1dc77
Un-xfail-win32 two tests that should actually work
2011-11-14 13:13:44 -08:00
Haitao Li
b8dd148444
rustllvm: Add a GetOrInsertFunction wrapper
...
Fixes issue #1161
Test-case-by: Brian Anderson <banderson@mozilla.com>
Signed-off-by: Haitao Li <lihaitao@gmail.com>
2011-11-15 00:33:29 +08:00
Brian Anderson
138d9ca5d5
Drop enqueued elements when a port is destructed. Closes #1155
2011-11-13 15:43:58 -08:00
Brian Anderson
3cc2641fc3
Make various binops not typecheck for unsafe pointers. Closes #1173
2011-11-13 13:55:12 -08:00
Brian Anderson
768306badd
Add test for #783 . Closes #783
2011-11-11 17:14:30 -08:00
Brian Anderson
9b9fc33663
Rehabilitate run-fail/linked-failure4.rs
2011-11-11 16:52:07 -08:00
Brian Anderson
b2dd5f5cff
Rehabilitate run-pass/task-killjoin.rs
2011-11-11 16:52:07 -08:00
Brian Anderson
d645f87c6d
Rehabilitate run-pass/task-comm.rs
2011-11-11 16:11:34 -08:00
Brian Anderson
3d9023fa4d
rt: Take the task lock when dropping port refcounts
...
Sucks, but otherwise there are races when one task drops the refcount to zero
followed by another bumping it again
2011-11-11 16:11:31 -08:00
Brian Anderson
07771ec25b
Fix run-fail/spawnfail
...
Catch the case where a parent is killed immediately before it terminates
normally.
2011-11-11 14:20:00 -08:00
Brian Anderson
fcdb313bd5
Give task-perf-word-count default behavior. Closes #1172
2011-11-11 12:35:43 -08:00
Elly Jones
24b6645156
str: add escape()
...
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-11-10 19:53:28 -08:00
Haitao Li
7ee8b852fd
Cleanup unused imports in tests
2011-11-10 19:19:40 -08:00
Haitao Li
9bc2f1800d
rustc: Add support of warning on unused imports
...
Fixes issue #889
2011-11-10 19:19:10 -08:00
Brian Anderson
6c108aade9
stdlib: Remove sio and aio. Bitrotted.
2011-11-10 17:59:26 -08:00
Josh Matthews
43cb74b830
Add float support to #fmt. Fix #1014 .
2011-11-10 11:40:34 -08:00
Brian Anderson
d26a96d2bb
Add "cdecl" as synonym for "c-stack-cdecl"
2011-11-09 16:47:44 -08:00
Brian Anderson
e96342820d
Add "stdcall" as synonym for "c-stack-stdcall"
2011-11-09 16:47:44 -08:00
Brian Anderson
4a4d31cf0e
Make native "c-stack-stdcall" ABI work
...
The symbol name is based on the number of arguments, so we have to declare
it correctly.
For some reason GetLastError doesn't work now.
2011-11-09 15:29:53 -08:00
Joshua Wise
ae2ce09267
Add test with implemented bits of issue #570 .
2011-11-09 14:33:06 -08:00
Brian Anderson
061d2c2f77
Make task_sleep an intrinsic.
2011-11-08 15:58:08 -08:00
Brian Anderson
68f82de817
rt: Remove task_yield builtin
...
This is just a special case of task_sleep
2011-11-08 14:28:41 -08:00
Brian Anderson
0f1af17a60
Remove all uses of native cdecl except for those that yield
2011-11-08 11:29:10 -08:00