Commit Graph

223 Commits

Author SHA1 Message Date
Graydon Hoare
6e3a77c3a3 Merge remote branch 'tohava/master'
Conflicts:
	src/boot/fe/ast.ml
2010-08-23 18:19:42 -07:00
Or Brostovski
0830b5bf24 Modified parser to handle alt type andadded a few tests
ast.ml - modified arm types for easier polymorphism
       - fixed a bug in fmt_type_arm
dead.ml - modified arm types for easier polymorphism
common.ml - added 'either'
          - added some useful auxiliary functions
item.ml - modified arm code to be more polymorphic and handle both alt-tag and alt-type, also fixed the problematic case in bad-alt.rs
Makefile - added XFAIL for new alt-type test
bad-alt.rs - added test for invalid alt syntax
alt-type-simple.rs - added simple test for alt type
2010-08-21 02:41:43 +03:00
Roy Frostig
8097a10c36 XFAIL _io test because darwin and winnt are burning. 2010-08-20 13:29:19 -07:00
Roy Frostig
af64e4f305 Allow every test to make a .tmp file that is cleaned up before execution. 2010-08-20 12:48:45 -07:00
Graydon Hoare
34e5e98cf7 Re-XFAIL destructor-ordering.rs. Valgrind doesn't like it (though oddly, doesn't make the tbox burn). 2010-08-20 11:48:31 -07:00
Patrick Walton
4c28d9a54a Un-XFAIL some tests that (seem to) rely on large task stacks 2010-08-20 11:11:39 -07:00
Graydon Hoare
ddd8feea31 Support single-element append on vec, str. Closes #44. 2010-08-20 09:58:22 -07:00
Graydon Hoare
b34cb1b631 Fix a bunch of typestate bugs in handling if and while statement wirings. 2010-08-19 18:42:32 -07:00
Patrick Walton
61156ea714 Fail during build if we can't determine the current Git revision 2010-08-18 12:57:23 -07:00
Michael Bebenita
2c1ec6771b Lots of changes around memory managment in the Runtime. Added memory regions and fixed race caused by calling rust_srv::malloc() from multiple threads when sending messages. 2010-08-17 23:49:57 -07:00
Michael Bebenita
560d7b4983 Re-xfailed tests because Windows is still complaining. 2010-08-16 23:28:01 -07:00
Michael Bebenita
14f5b5750d Un-xfailed working tests. 2010-08-16 15:05:57 -07:00
Michael Bebenita
b40a9fa787 Pulled rust_srv in its own file. Some cleanup, and added varargs to assertion macros. 2010-08-16 15:05:57 -07:00
Roy Frostig
4e376852e7 Fix max_sz bug that ended up causing us to index incorrectly into a vec of tag types. Add a testcase. 2010-08-12 16:21:08 -07:00
Michael Bebenita
988695a96c Added support for task sleeping in the scheduler. 2010-08-11 21:24:04 -07:00
Michael Bebenita
8ac15c6844 Added test cases. 2010-08-11 16:08:45 -07:00
Roy Frostig
f307688bf4 Add native vec[u8] to str converter. Put in workaround for leak in str to vec[u8] converter. Add testcase exercising both. Drive-by fix a potential array-out-of-bounds write on rust_str buffers. 2010-08-11 16:06:45 -07:00
Graydon Hoare
60e5ad384e Put out burning tinderbox on OSX. 2010-08-10 16:49:36 -07:00
Graydon Hoare
5d2e94838e un-XFAIL lib-deque.rs, as it seems to have been waiting on something recently fixed. 2010-08-10 16:35:40 -07:00
Graydon Hoare
9f6dec9e13 Always bounce mul/div/mod ops. Closes #131 harder. 2010-08-10 16:03:58 -07:00
Graydon Hoare
dbe8760af3 Merge commit 'jyasskin/work'
Conflicts:
	src/rt/rust_dom.cpp
	src/rt/rust_upcall.cpp
2010-08-10 13:26:00 -07:00
Michael Bebenita
76e03be459 XFailed some tests. 2010-08-09 08:49:54 -07:00
Michael Bebenita
9ff6a3d031 Added class to abstract away platform specific thread primitives. 2010-08-09 07:42:06 -07:00
Jeffrey Yasskin
df75a968c5 Fix LLVM translation of modules. 2010-08-08 14:29:53 -07:00
Jeffrey Yasskin
3f6e8ffe64 Implement _str.len() to return the number of bytes, rename it to byte_len(),
and add a test.
2010-08-06 17:29:21 -07:00
Jeffrey Yasskin
581a95a804 Add an int->str conversion function.
The test currently fails because string equality isn't implemented.
2010-08-06 17:25:27 -07:00
Jeffrey Yasskin
987589e946 Change the destructor-ordering test to use channels instead of a shared mutable object.
This test used to take advantage of a hole in the type system that allows
objects with destructors to refer to stateful objects.
2010-08-06 17:17:04 -07:00
Jeffrey Yasskin
fdb842f9e6 Fix LLVM translation of modules. 2010-08-06 17:14:59 -07:00
Graydon Hoare
29987b56e1 Move 'as' precedence up to just above relational; support indexing str and vec by all integral types. Closes #94. 2010-08-05 10:04:11 -07:00
Graydon Hoare
cbe68d4ccb Add a CHECK_XFAILS target that inverts the sense of check: it tries to compile and run the tests marked as XFAILs. 2010-08-04 15:29:59 -07:00
Graydon Hoare
815424c2ec Fix pexp parser to do left-associativity, not right. Closes #130. 2010-08-04 13:44:22 -07:00
Graydon Hoare
ac4c5ae19b Bah. xfail arithmetic-interference for now; linux tinderbox is burning on it and it's late. 2010-08-04 00:37:25 -07:00
Roy Frostig
6277b462e9 More stdlib hashmap work. Add a simple test and XFAIL it due to a valgrind-spotted UMR. 2010-08-03 18:43:57 -07:00
Graydon Hoare
1fc4e9fcc6 Add tests and fix pexp bug. Closes #141. 2010-08-03 12:20:29 -07:00
Graydon Hoare
c7714b86ea XFAIL all task-related tests for now; yesterday's work on notification proxies broke inter-task shutdown. 2010-07-29 12:47:37 -07:00
Michael Bebenita
74a79fff3a Add a bunch of comm tests. 2010-07-28 20:30:30 -07:00
Michael Bebenita
e1264ac59c Add some missing headers to the Makefile's RUNTIME_HDR list. 2010-07-28 20:30:29 -07:00
Michael Bebenita
4246d567b7 Move ports out into their own file, add data_message and make communication system use it (and proxies) instead of existing token scheme. 2010-07-28 20:30:29 -07:00
Michael Bebenita
4ff8e15128 Move notification-messages out into their own file and unify into notify_message, make them use proxies, cache task proxies in dom. 2010-07-28 20:30:29 -07:00
Roy Frostig
3c22e79b77 Burn the mac and win trees less. Deque test is XFAILed, despite doing fine on Linux. 2010-07-28 17:50:07 -07:00
Roy Frostig
f282c5ccc0 Get slots in trans_tag using Semant tables. Closes #133. 2010-07-28 15:04:58 -07:00
Roy Frostig
596d19e2ea Test the deque a bit. Give it a get-by-index method. Fix two uncovered state-calculation bugs --- one decently, the other with an ugly hack. Bug on the latter coming right up. 2010-07-28 14:00:44 -07:00
Graydon Hoare
8030757624 Switch machine-type lexemes to use suffixes. Remove support for foo(bar) as a cast notation. Closes #129. 2010-07-27 19:21:51 -07:00
Graydon Hoare
6662aeb779 Calm some LLVM indigestion of last change. 2010-07-27 17:23:41 -07:00
Patrick Walton
4b97b4e79d Move the test suite to the "as" form for casts. XFAIL a few tests for LLVM. 2010-07-26 15:22:21 -07:00
Roy Frostig
5b6e714d05 Expose an RNG (the one used by our runtime) to Rust via std. 2010-07-25 21:45:09 -07:00
Graydon Hoare
fe82978980 Modify testcase to match new syntax and un-XFAIL mutable-vec-drop.rs. 2010-07-23 12:32:12 -07:00
Graydon Hoare
6668595ebf Include all lval-writing statements in stmt_is_init calculation, not just "copy-like". Un-XFAIL generic-tag-alt.rs 2010-07-23 12:21:06 -07:00
Roy Frostig
1730d2e037 Notify copy glue of dst-initialization and fix _vec.alloc issues in lib and runtime. Closes #109. 2010-07-22 17:47:32 -07:00
Graydon Hoare
ede42cf931 A certain incomplete quantity of wrestling with "INIT" statements that don't actually initialize. Should probably rename them to MAKE. Anyway, WIP, but two steps forward (and one back). More later. 2010-07-22 17:05:45 -07:00
Graydon Hoare
c6af9dda69 Un-XFAIL stuff that started working when pcwalton's new typechecker landed. 2010-07-22 15:40:04 -07:00
Graydon Hoare
a61be2d74a XFAIL task-comm-5, it's burning the tinderboxes. 2010-07-22 12:26:09 -07:00
Graydon Hoare
eaa35611dc Add XFAIL'ed test for return-in-iter, call unimpl when we find it. Closes #100. 2010-07-22 12:24:55 -07:00
Graydon Hoare
c96634af4b Fix mem op= mem bug in trans.ml (via not terribly good fix). Closes #111. 2010-07-22 12:11:39 -07:00
Jeffrey Yasskin
2c24f70cf4 Fix simple generic type parameters in LLVM. 2010-07-23 00:42:51 +08:00
Jeffrey Yasskin
09885b5b87 Implement tuple access for LLVM.
This involved adding an Ast.ty return to trans_lval.

I also included the code for record and box access, but their tests don't
completely pass yet.
2010-07-23 00:42:51 +08:00
Graydon Hoare
c070c11248 Nothing change, to tickle tinderboxes. 2010-07-21 15:10:16 -07:00
Graydon Hoare
5cebace3d8 XFAIL comm-2 for now; there's an assertion trappping in rust_task::wakeup. 2010-07-21 12:22:50 -07:00
Jeffrey Yasskin
215060b72b Teach the makefile to generate .ll files,
which are helpful in debugging the llvm backend.  Also tell git to ignore
LLVM's intermediate files.
2010-07-22 01:11:34 +08:00
Graydon Hoare
53f787e0b3 Fix more bad tabs in Makefile. 2010-07-20 15:15:36 -07:00
Graydon Hoare
01353b2a7f Extend compile-check for llvm case. 2010-07-20 14:00:03 -07:00
Graydon Hoare
0bd33ad4b0 Re-XFAIL stuff that is definitely still unsupported in LLVM-land (like, throws Not_implemented). 2010-07-20 12:16:34 -07:00
Graydon Hoare
27c3af0d91 Fix whitespace in Makefile. 2010-07-20 12:15:44 -07:00
Roy Frostig
ae515c017c ctxt_auto_deref_lval decides whether to autoderef the entire lval, not its base. 2010-07-19 19:06:55 -07:00
Roy Frostig
fde9ca0937 Autoderef objects when passing them as implicit (indirect) arg upon vtbl-dispatch. Add testcase and XFAIL it on LLVM. Closes #112. 2010-07-19 18:25:26 -07:00
Jeffrey Yasskin
e6fa75a124 Fix argv.rs under the LLVM compiler.
The call to rust_start was assuming that all rust main() functions have the
same signature, but the compiler doesn't actually canonicalize them.  So
instead just match the C signature of rust_start, and cast.
2010-07-19 17:52:31 -07:00
Jeffrey Yasskin
dff6955bb0 Work around auto-dereference crash in rustboot. 2010-07-19 17:52:31 -07:00
Michael Bebenita
c80483d582 Fixed circular buffer resizing bug. 2010-07-19 17:33:50 -07:00
Michael Bebenita
00d1465d13 Added a message passing system based on lock free queues for inter-thread communication. Channels now buffer on the sending side, and no longer require blocking when sending. Lots of other refactoring and bug fixes. 2010-07-19 14:05:18 -07:00
Jeffrey Yasskin
2a2ec67e6e Fix opeq.rs for LLVM by implementing simple augmented-assignment operators. 2010-07-20 02:08:01 +08:00
Jeffrey Yasskin
9d0d350d2c Make the LLVM compiler crash when it hits a source construct it doesn't know
what to do with, rather than silently omitting it from the output.
2010-07-20 02:08:00 +08:00
Jeffrey Yasskin
fe78e33a2a Un-XFAIL a bunch of LLVM tests that already pass. 2010-07-20 01:23:46 +08:00
Jeffrey Yasskin
395819c621 Sort the XFAILed tests to make it easier to track changes. 2010-07-20 01:23:46 +08:00
Jeffrey Yasskin
a96c5f208f Make the build system run dsymutil so we can debug llvm-produced binaries on OSX. 2010-07-20 01:23:45 +08:00
Jeffrey Yasskin
d974aade93 Improve the LLVM-using experience.
llvm-config may be installed somewhere that's not on the path or in ocaml's
default lib directory, so allow users to override $CFG_LLVM_CONFIG with an
environment variable and look up lib and binary paths through calls to
llvm-config.
2010-07-20 01:23:45 +08:00
Jeffrey Yasskin
22eca31d98 Fix argv.rs under the LLVM compiler.
The call to rust_start was assuming that all rust main() functions have the
same signature, but the compiler doesn't actually canonicalize them.  So
instead just match the C signature of rust_start, and cast.
2010-07-18 14:25:19 +08:00
Jeffrey Yasskin
8ebf72ed29 Fix the LLVM ocamlopt build. 2010-07-18 14:25:19 +08:00
Jeffrey Yasskin
c3c425e9f1 Work around auto-dereference crash in rustboot. 2010-07-18 14:25:18 +08:00
Graydon Hoare
4d413af822 Un-XFAIL a couple tests fixed by pcwalton's new typechecker. Closes #50. Closes #51. 2010-07-16 15:22:40 -07:00
Patrick Walton
35e73b0627 Un-XFAIL generic-fn-twice.rs, issue 93 2010-07-16 15:07:40 -07:00
Patrick Walton
8b00ab1a48 Feed the correct return type to the typechecker when typechecking objects, and add a testcase. 2010-07-16 14:54:47 -07:00
Patrick Walton
aa37b8c047 XFAIL foreach-nested.rs and foreach-nested-2.rs under LLVM 2010-07-16 14:46:54 -07:00
Graydon Hoare
f300ca4ed7 XFAIL the new destructor tests; collided with new typechecker; add test for issue #109. 2010-07-15 18:57:21 -07:00
Patrick Walton
c96f0bf738 Implement the "simple typechecker", which avoids HM inference 2010-07-15 18:27:09 -07:00
Graydon Hoare
60044bbcef XFAIL jyasskin's new tests under LLVM backend. 2010-07-15 17:22:30 -07:00
Graydon Hoare
3b9286cb65 XFAIL use-import-export.rs on the LLVM backend. 2010-07-15 16:57:28 -07:00
Graydon Hoare
d0da083c5b Fix support for profiling the compiler. 2010-07-14 17:03:08 -07:00
Graydon Hoare
777002c565 Fix LLVM-detection logic to notice when we have, or don't have, the ocaml bindings. Also XFAIL missed new case. Closes #102. 2010-07-13 16:23:52 -07:00
Graydon Hoare
b3cf793bd9 Fix post-stmt drop calculations. Closes #106. 2010-07-11 22:31:56 -07:00
Graydon Hoare
30c4070e3d Add a boot/README file explaining rustboot's organization a bit. 2010-07-11 14:54:43 -07:00
Graydon Hoare
5e0757f0ba Disable llvm-config logic due to optimistic assumption of "having the ocaml bindings". Also add NO_LLVM override make-var, for good measure. 2010-07-10 19:58:02 -07:00
Graydon Hoare
fc4338e584 Add rule for building shootout tests. 2010-07-08 21:56:09 -07:00
Graydon Hoare
115e14a32c Some more typestate tests. 2010-07-08 07:33:25 -07:00
Graydon Hoare
a3f2609630 Add native-clean target. 2010-07-06 13:51:39 -07:00
Graydon Hoare
3175c83ff0 Un-XFAIL mutable-alias-vec.rs. Was only failing due to a typo, but a more thorough test revealed more bugs. 2010-07-05 14:43:02 -07:00
Graydon Hoare
24afa7532f XFAIL native-mod when running MINGW_CROSS. 2010-07-04 22:41:04 -07:00
Graydon Hoare
c21e12bc8b Move NO_VALGRIND check below MINGW_CROSS. 2010-07-04 22:40:19 -07:00
Graydon Hoare
2a413070c6 Preempt works on non-windows, just needed a little valgrind love to complete in a reasonable time. 2010-07-04 21:18:47 -07:00
Graydon Hoare
7f01af9555 XFAIL the remainder as until pwalton has a go at the typechecker. Branch is otherwise done, enough to merge anyway. 2010-07-04 17:01:22 -07:00
Graydon Hoare
df0fa603d0 Add version-stamp machinery (and put "Draft + datestamp" into doc footer). 2010-07-03 00:27:33 -07:00
Graydon Hoare
8660ce50a1 Merge branch 'master' of git@github.com:graydon/rust into exterior_and_mutable_types 2010-07-02 16:27:39 -07:00
Graydon Hoare
1578715d12 Compensate for .tmp in run-fail tests. 2010-07-02 13:35:29 -07:00
Graydon Hoare
4d00333b1e New test of explicit deref operator. 2010-07-02 12:55:12 -07:00
Graydon Hoare
4ea41512fc Change make rules around running tests to not produce an .out file if test-run fails. 2010-07-02 12:54:01 -07:00
Graydon Hoare
fb7e37842b Add compile-check target for just attempting to compile, not run, the tests. 2010-07-01 18:37:53 -07:00
Roy Frostig
e692ccfb0c Add (XFAILed) testcase for typechecker issue where fns-in-mods appear to lose their type parameters over the course of the typechecking pass. 2010-06-29 16:13:26 -07:00
Graydon Hoare
0ad7468ff2 Revert "Improve makefile to try to avoid wedging on failure-to-dep lib/std.rc"
This reverts commit 3bc263f102.
2010-06-29 10:30:36 -07:00
Graydon Hoare
3bc263f102 Improve makefile to try to avoid wedging on failure-to-dep lib/std.rc 2010-06-29 10:25:25 -07:00
Roy Frostig
0d6aaec493 Work-around and un-XFAIL generic-obj.rs test. The problem uncovered in the original XFAIL is more generally that of issue #92. 2010-06-29 00:48:49 -07:00
Graydon Hoare
d94f0e2498 Add a NO_VALGRIND override mechanism to makefile, if you want day-to-day builds to cycle faster on linux. 2010-06-28 22:29:17 -07:00
Roy Frostig
d5ff6e133c Add to generic-obj.rs testcase a method that takes an argument of the object type-param type. XFAIL the test since it no longer passes. 2010-06-28 21:45:48 -07:00
Roy Frostig
5b5b334c24 Testcase (XFAILed) for fn item given as lval. 2010-06-28 21:18:09 -07:00
Roy Frostig
a27cbd4ee8 Testcase (XFAILed) for mutable alias vec weirdness. 2010-06-28 16:36:24 -07:00
Graydon Hoare
7045526a3e Change slot_mem_ctrl to classify vec[state] as GC mem. Breaking / XFAILing mutable-vec-drop.rs test. 2010-06-27 13:53:23 -07:00
Graydon Hoare
a9c639ec8a Fix forgotten llvm xfail in Makefile. 2010-06-25 15:42:24 -07:00
Roy Frostig
85a701c8f6 Add testcases for item name conflict at the same path level. 2010-06-25 01:26:44 -07:00
Graydon Hoare
bcf29b882a A couple new tests for broken parts of the typechecker, XFAILed. 2010-06-24 16:57:00 -07:00
Graydon Hoare
af44ec2856 Issue 24, drop output slot when not initializing. Un-XFAIL generic-tag.rs. Add test for output slot modes with several broken cases. 2010-06-24 13:32:59 -07:00
Graydon Hoare
0364a801bb Clean up trans_alt_tag to use slots, not assume interior words. Also remove record-based destructuring (hard on eyes). Add execution parts to generic-tag-alt.rs and un-XFAIL it. 2010-06-24 11:15:22 -07:00
Graydon Hoare
25eb1fd3c9 Add fmt module, move out some common format helpers, add instruction-selection tracing and make selection use queues rather than list refs. 2010-06-24 10:34:47 -07:00
Roy Frostig
bc286c7f2c Resolve and typecheck patterns in pattern alt. 2010-06-24 08:13:32 -07:00
Graydon Hoare
d6b7c96c3e Populate tree. 2010-06-23 21:03:09 -07:00
Graydon Hoare
c01efc669f Initial git commit. 2010-06-16 14:30:45 -07:00