Commit graph

147 commits

Author SHA1 Message Date
Or Brostovski
4a3404803b implemented break for while-loop case
ast.ml - added break and cont statements
item.ml - added break and cont statements
lexer.mll - added break and cont statements
token.ml - added break and cont statements
trans.ml - implemented the break statement for the while-loop case
         - replaced hash table accesses with get_stmt_depth where needed
type.ml = added break and cont statements
typestate.ml - implemented the break statement for the while-loop case
             - added shorthand filter_live_block_slots
walk.ml - added break and cont statements
while-with-break.rs - code for testing while loops
2010-09-30 13:45:57 -07:00
Or Brostovski
74cb9508cd Closed issue 154 - prevents compiler from compiliing a line to zero statements 2010-09-30 13:40:34 -07:00
Graydon Hoare
e0f682e5fb Add some basic string functions: index, rindes, find, substr, split, concat, connect. 2010-09-22 15:27:40 -07:00
Graydon Hoare
fc6f307787 Fix linear for loops on strings to not hit trailing null. 2010-09-22 15:27:35 -07:00
Graydon Hoare
9f0a6c21b2 Implement preliminary form of structured compare. No boxes, vectors or strings yet. 2010-09-21 11:47:10 -07:00
Graydon Hoare
c5f4789d5b Bind pattern slots with ?, drop parens from 0-ary tag constructors, translate 0-ary constructors as constants. Rustc loses ~300kb. 2010-09-20 23:56:43 -07:00
Roy Frostig
dda16f807c Add issue #163 testcase to str-append testcase. 2010-09-20 17:42:14 -07:00
Patrick Walton
bc03c82c79 Check for infinitely sized tags. Un-XFAIL test/compile-fail/infinite-tag-type-recursion.rs. 2010-09-16 16:24:19 -07:00
Graydon Hoare
cd1a765c6f Add Peter Hull's contributed translation of the fasta shootout benchmark (integer-only version). 2010-09-15 18:22:10 -07:00
Graydon Hoare
6cfeac162d Translate const uses via runtime expression evaluation. 2010-09-14 11:44:25 -07:00
Graydon Hoare
7287d3aaa0 Teach front-end about simple, first-cut version of const items. 2010-09-14 10:52:32 -07:00
Graydon Hoare
bc646d01c5 Fix leaking arg slots on tail calls. Closes #160. 2010-09-13 13:37:24 -07:00
Graydon Hoare
67aa39e1ef Fix a leak when box types are used via type descriptors. 2010-09-12 01:05:56 -07:00
Graydon Hoare
a9e2327a18 Switch tags to purely nominal, removing TY_iso and TY_idx. Seems to mostly work, possibly a little bumpy. Changes a lot. 2010-09-09 15:59:29 -07:00
Michael Bebenita
7f6d8b95bd Fixed race in the rust kernel. 2010-09-07 23:37:51 -07:00
Michael Bebenita
79e3856d7d Small updates to test cases. 2010-09-07 18:41:07 -07:00
Roy Frostig
ca1475382e Add hashmap tests exercising strings as keys and values. No longer leaks on linux. 2010-09-07 01:21:18 -07:00
Roy Frostig
974092c526 Test multi-ref'ed vec growth more seriously than before. 2010-09-03 16:25:56 -07:00
Roy Frostig
47e86a05ae Fix rust_vec constructor assertion failure caused by slow path of upcall_vec_grow. Add testcase. 2010-08-31 13:01:57 -07:00
Roy Frostig
0d15ae4f7a Modify alt-pattern-drop.rs to also insure the slot bound in the pattern doesn't also get dropped (again) at the end of the block containing the alt. 2010-08-27 13:48:45 -07:00
Roy Frostig
ecb7fc2038 Tiny change to tighten up alt-pattern-drop.rs test. 2010-08-27 13:29:53 -07:00
Roy Frostig
5e77e784f0 Have alt-pattern drop the slots it initializes when binding slot patterns. Add a testcase for this as well. 2010-08-27 13:29:53 -07:00
Roy Frostig
927b2f7ef4 Comment out hashmap tests exercising maps with str as key or value type, as they appear to cause leaks. 2010-08-27 11:16:49 -07:00
Roy Frostig
4c1c8460f9 Add simple hashmap tests exercising maps with str as key type, value type, and both. 2010-08-27 11:01:51 -07:00
Roy Frostig
1035ad93dd Pinching myself for certainty. ;p 2010-08-26 20:02:07 -07:00
Roy Frostig
66b5b9567c Test the hashmap more, exercising hash collision, element removal, and a forced rehashing that actually causes elements to change buckets. In the process, find a bug in hashmap's remove() and fix it. 2010-08-26 19:44:38 -07:00
Graydon Hoare
7cfa7bdd23 Make vreg constrs per-quad, regfence on nontrivial constrs, back out workaround to _uint, add regression test. Closes #152. 2010-08-26 16:27:47 -07:00
Patrick Walton
a7eeeb596a Add automatic parameter instantiation. Closes #45. 2010-08-26 14:47:18 -07:00
Roy Frostig
8559a85cca When copying function values, null out the destination's binding iff the source's binding is null. 2010-08-26 14:44:11 -07:00
Roy Frostig
5cf83dcc1a Test the hashmap for growth and rehashing. 2010-08-26 13:03:28 -07:00
Roy Frostig
c3c5e6c773 Workaround issue #152 in _uint.next_power_of_two 2010-08-26 11:57:48 -07:00
Roy Frostig
6b053f24c7 Insure bools remain 0x1 or 0x0 by having boolean-NOT not just be a simple bit-NOT. 2010-08-25 17:17:14 -07:00
Graydon Hoare
91d640f90f Merge obj-drop and closure-drop code, handles freeing bound exteriors now. 2010-08-25 16:21:50 -07:00
Graydon Hoare
c2b6c27d65 Fix edge case in uint->string conversion. 2010-08-25 13:54:27 -07:00
Graydon Hoare
af6e1d2c2b Fix ghastly typestate bug breaking nested functions. 2010-08-25 12:08:05 -07:00
Michael Bebenita
64ff82ecf9 Implemented an lock free queue based on this paper http://www.cs.rochester.edu/~scott/papers/1996_PODC_queues.pdf, the "lock free queue" we had before wasn't lock free at all. 2010-08-24 21:07:14 -07:00
Graydon Hoare
2dc3a37f93 First successful hashmap lookups. Yay. 2010-08-24 17:38:04 -07:00
Graydon Hoare
e846643d23 Fix mod-bug in std.map, work around bug in closure typaram capture, enable insert-tests in lib-map.rs. 2010-08-24 17:23:09 -07:00
Graydon Hoare
14262c7311 Rename lib tests, enable lib-int.rs using _str.eq for now. 2010-08-24 09:09:04 -07:00
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
2da4fecacd Test the buffered reader and writer in _io. 2010-08-20 12:57:38 -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
Michael Bebenita
14f5b5750d Un-xfailed working tests. 2010-08-16 15:05:57 -07:00
Roy Frostig
abe307cf45 Uncomment recently-no-longer-failing std.deque tests. Add a few arbitrary-access checks. 2010-08-13 11:55:25 -07:00
Roy Frostig
73ee16b1a4 A little tidy-up that should have gone in with 4e376852e7. 2010-08-12 19:20:29 -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
74e12fcef6 Ignore upcall_flush for channels that are disassociated from ports. This makes task-comm-10 break a little less hard, but it still leaks because messages pending in the channel are never freed. 2010-08-11 16:08:45 -07:00