Rafael Ávila de Espíndola
34643eeac8
Fix another import case we got wrong: The local environment should not
...
interfere with the import statements.
2011-01-11 13:59:52 -08:00
Rafael Ávila de Espíndola
c5a766f133
Fix two invalid import cases we were not detecting:
...
* If an import was unused we would never print any errors for it.
* We would keep the existing environment in scope when descending 'foo.bar'
and would find 'bar' in the global environment if there was no 'bar' in
'foo'.
2011-01-11 13:58:39 -08:00
Graydon Hoare
a8eeec1dbd
Sketch support for reading multi-file crates in rustc. Add test, not yet working.
2011-01-10 18:18:16 -08:00
Graydon Hoare
e96414a6f0
Further corrections to the Makefile rules covering failing tests.
2011-01-10 14:53:20 -08:00
Brian Anderson
295c54e10f
Remove the assumption that circular_buffer's buffer has a power of two size
...
It was not obvious how to make this implementation work when the unit size
was not also a power of two, so for now just make the buffer size a multiple
of the unit size so it can pass all the tests.
2011-01-10 11:31:33 -08:00
Brian Anderson
a077400d4c
Remove unused variable in circular_buffer tests
2011-01-10 11:31:33 -08:00
Brian Anderson
6c6c9acd96
Rename test to reflect that the circular_buffer runtime class is what's being tested
2011-01-10 11:31:33 -08:00
Brian Anderson
97aa599b0d
Fix circular_buffer growth when _next != 0
2011-01-10 11:31:33 -08:00
Brian Anderson
f1df1d1a51
Don't allow circular_buffer to shrink below its original size when unit_sz is not a power of two
2011-01-10 11:31:33 -08:00
Brian Anderson
5f05ae68e5
Don't allow circular_buffer to shrink below it's initial size
2011-01-10 11:31:32 -08:00
Brian Anderson
04056d89c8
Fix the check for growing the circular_buffer
2011-01-10 11:31:32 -08:00
Brian Anderson
32c1c9f55c
Simplify the test for circular_buffer initialization
2011-01-10 11:31:32 -08:00
Rafael Ávila de Espíndola
2fb09eb585
Add sufficient import support to compile some simple single-crate programs.
...
This is likely not the final solution. It does repetitive work and doesn't produce
errors for invalid but unused imports. In any case, I think it is a useful step.
2011-01-07 15:17:18 -08:00
Brian Anderson
a9994a2963
Correctly initialize circular_buffer to a power-of-two bytes
2011-01-07 11:34:14 -08:00
Graydon Hoare
919d5f1c0d
New test, bind-interior.rs.
2011-01-06 12:56:30 -08:00
Graydon Hoare
26817cbb08
Add testcase I meant to add in 9ee3475e09
.
2011-01-03 13:54:55 -08:00
Brian Anderson
73fd87baf5
Don't attempt to wake tasks that aren't blocked.
...
It's possible for a supervised task to kill and wake its supervising
task then immediately try to wake it again if the supervising task
has joined the supervised. This is the easiest way to prevent that.
2011-01-03 10:59:00 -08:00
Rafael Ávila de Espíndola
f900792fa3
Parse 'import' directives in rustc.
2010-12-24 21:06:14 -08:00
Rafael Ávila de Espíndola
8d2fdac93b
Parse 'use' directives in rustc.
2010-12-24 17:03:46 -08:00
Graydon Hoare
6443179bca
Add std.sort, with a simple mergesort.
2010-12-21 00:44:06 -08:00
Graydon Hoare
734c190918
Syntax tweak: move 'mutable' from pseudo-ty-param on vec ctor to low-precedence prefix inside paren.
2010-12-13 09:25:19 -08:00
Graydon Hoare
df5f8f3e37
Add minimal test for box/deref.
2010-12-02 15:02:17 -08:00
Graydon Hoare
de9fc72cb4
Add test for non-exhaustive match failure.
2010-12-02 14:50:00 -08:00
Patrick Walton
f55f46af64
rustc: Typecheck whiles and do-whiles. Add a workaround to complex.rs pending a solution to the one-armed-if problem.
2010-11-23 17:02:08 -08:00
Graydon Hoare
44a0c7225d
Isolate while-header bug to minimal testcase, fix in rustboot, remove workaround in rustc.
2010-11-19 14:59:58 -08:00
Patrick Walton
3e482d5f69
Implement a map2() function in std._vec
2010-11-09 15:38:42 -08:00
Graydon Hoare
89946609f2
Support a special const-value refcount, use it for const strings.
2010-11-09 14:15:07 -08:00
Graydon Hoare
3e9be14757
Add a check for binding an alias. Good thing, as we had two instances in our library.
2010-11-08 15:45:30 -08:00
Patrick Walton
199ff196aa
test_init_fn() in lib-vec.rs doesn't seem to segfault anymore. Un-XFAIL it.
2010-11-05 11:25:23 -07:00
Patrick Walton
adb1754e4d
Move the option type to its own module
2010-11-05 11:18:40 -07:00
Graydon Hoare
16faef2218
Fix buggy while and do-while translation in rustc. Add test.
2010-11-04 07:55:33 -07:00
Graydon Hoare
7db115834f
Split out stratum-checking pass, implement more-strict (overly aggressive) impure-effect checking.
2010-11-02 15:24:46 -07:00
Graydon Hoare
da13c508d8
First pass on splitting stratum and opacity off of effects. WIP.
2010-11-02 11:11:58 -07:00
Patrick Walton
67bcc70754
rustboot: Emit an error instead of asserting in trans when a T is passed by value
2010-10-28 15:07:05 -07:00
Graydon Hoare
05c9d885dd
Change vec slice to use uint, add push/pop/shift/unshift.
2010-10-22 11:46:04 -07:00
Dave Herman
dbe27199b8
line length police; moved comp.util.bits to std.bitv
2010-10-21 11:39:53 -07:00
Patrick Walton
c7ab80f743
Typecheck tags in "alt" patterns
2010-10-14 15:08:19 -07:00
Graydon Hoare
f234750d80
Fix crasher in rustc.
2010-10-14 12:41:48 -07:00
Graydon Hoare
52c2a1549c
Fetch typarams from the outermost item frame, when inside an iter-block. One less crash in rustc.
2010-10-13 15:53:38 -07:00
Graydon Hoare
caaf8679d8
Teach bind to actually bind typarams, as it claims to.
2010-10-10 00:14:26 -07:00
Graydon Hoare
d07f7533b0
Sketch out #fmt syntax extension in rustboot.
2010-10-01 14:54:40 -07:00
Graydon Hoare
2e0d075407
Fix bug in bind thunks failing top drop unbound args; add test and adjust rustc to use bind again.
2010-09-30 17:39:37 -07:00
Graydon Hoare
62c224ffe4
Drop slots on block exits even when blocks have no statements. Part way to fixing bind leakage in rustc.
2010-09-30 16:10:30 -07:00
Peter Hull
f6e3e6903b
Initial check-in of 99 Bottles Of Beer
...
using different methods (simple, iterator, tail-call, pattern match)
2010-09-30 13:50:25 -07:00
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