Roy Frostig
982dcc29bf
Get object's captured typarams when calculating sizes in the backend's fn-prologue-generation for object methods.
2010-08-09 15:45:08 -07:00
Michael Bebenita
76e03be459
XFailed some tests.
2010-08-09 08:49:54 -07:00
Michael Bebenita
97d6342bf0
Synthesize a flush_chan upcall right before a channel's ref_count drops to zero. This should only happen in the Rust code and not in the drop glue, or on the unwind path. This change allows the task owning the channel to block on a flush and delete its own channel. This change also cleans up some code around rust_port and rust_chan.
2010-08-09 08:15:34 -07:00
Michael Bebenita
5917ca3519
Fixed deadlock in the scheduler caused by condition variables.
2010-08-09 08:06:08 -07:00
Michael Bebenita
4641fcef61
Added peek() to ptr_vec.
2010-08-09 08:01:40 -07:00
Michael Bebenita
f65c885c83
Made ref_count signed to help detect negative ref_count bugs.
2010-08-09 08:00:04 -07:00
Michael Bebenita
30734a9a7b
Some pretty printing in the runtime.
2010-08-09 07:52:07 -07:00
Michael Bebenita
9ff6a3d031
Added class to abstract away platform specific thread primitives.
2010-08-09 07:42:06 -07:00
Michael Bebenita
56cd4e458a
Made the runtime keep track of all live domains and print their state.
2010-08-09 07:34:11 -07:00
Michael Bebenita
c5744c8aef
Added the RUST_SEED env variable to seed the Rust task scheduler -- helpful when debugging task race conditions within a single thread domain.
2010-08-09 07:30:48 -07:00
Michael Bebenita
768adb3ddd
Added a python script to run test cases repeatedly. This helps with debugging race conditions.
2010-08-09 07:27:39 -07:00
Michael Bebenita
0e422c748b
Added "none" option to rust_log env string to disable all log output.
2010-08-09 07:07:00 -07:00
Michael Bebenita
d2c2fbe7ca
Added timed_wait to condition variables.
2010-08-09 07:04:38 -07:00
Michael Bebenita
8395d46163
Changed seemingly incorrect stk_field_valgrind_id.
2010-08-09 07:01:20 -07:00
Michael Bebenita
76ba8f1d84
Changed array_list::replace() return behavior.
2010-08-09 06:59:46 -07:00
Michael Bebenita
d647c163fd
Updated/added test cases.
2010-08-09 06:53:37 -07:00
Jeffrey Yasskin
b71340552f
Add names to tasks and domains. These can either be an explicit literal string
...
after the "spawn" keyword, or implicitly the call expression used to start the
spawn.
2010-08-09 11:43:16 +02:00
Jeffrey Yasskin
df75a968c5
Fix LLVM translation of modules.
2010-08-08 14:29:53 -07:00
Or Brostovski
4467d7683d
Merge branch 'master' of git://github.com/graydon/rust
...
Conflicts:
src/boot/fe/ast.ml
2010-08-07 16:43:08 +03:00
Or Brostovski
b1c86beea8
Added AST pretty printing for communication alt statement, closes issue 19.
2010-08-07 13:44:44 +03:00
Or Brostovski
459e860457
Added forgotten handling for alt_type_else, and also for stmt_note
2010-08-06 17:34:31 -07:00
Or Brostovski
122ea68b12
Added AST pretty printing for slice expression
2010-08-06 17:34:31 -07:00
Or Brostovski
a0cc4817e9
Added AST logging, and modified AST for consistent handling of alt stmts.
...
- Modified the arm types, instead of a single arm type, there are now 2 (soon to be 3) arm types, one for each type of alt statement
- Added AST logging for constrained type (see fmt_constrained)
- Added AST logging for STMT_alt_type
- Created a generic fmt_arm for use with all alt statements
2010-08-06 17:34:31 -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
Roy Frostig
80a1cd3d1e
Redo yesterday's buf_writer-wrapper in a less silly and convoluted way. Add integer stringifying functions to _int module.
2010-08-06 15:48:23 -07:00
Roy Frostig
514fb4b321
Accept uint literals as literal patterns.
2010-08-06 15:44:09 -07:00
Tohava
7d38caf9c3
Added forgotten handling for alt_type_else, and also for stmt_note
2010-08-06 17:15:55 +03:00
Tohava
4bc173fd3c
Added AST pretty printing for slice expression
2010-08-06 16:11:15 +03:00
Graydon Hoare
db561b52ff
Degrade emitter size cache to just a flat hashtable with regular flushes (sigh) and re-introduce horrible bounce-off-spill hack for DIV, MUL, etc.
2010-08-05 17:44:35 -07:00
Graydon Hoare
9da8101cc8
Something is wrong with the emitter size cache; disable for now, possibly put out flaming tinderboxes.
2010-08-05 13:28:43 -07:00
Patrick Walton
53b01dc006
Add a valgrind suppression for Snow Leopard dyld
2010-08-05 12:00:34 -07:00
Graydon Hoare
935b4347e2
Mop up workarounds in stdlib no longer required as issue #93 is closed.
2010-08-05 10:10:39 -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
Roy Frostig
718c0b5963
Add to std._io some formatter/type-specific-writer mechanism. Make a few type-specific buffered writers as wrappers of buf_writer.
2010-08-04 23:09:33 -07:00
Tohava
ce79b0e492
Merge branch 'master' of git://github.com/graydon/rust
2010-08-05 04:19:46 +03:00
Graydon Hoare
6e98a3b64f
Thread argument-types down to internal_check_outer_lval in type.ml, in preparation for trying to infer type params from call args.
2010-08-04 17:50:57 -07:00
Tohava
0f53d03139
Added AST logging, and modified AST for consistent handling of alt stmts.
...
- Modified the arm types, instead of a single arm type, there are now 2 (soon to be 3) arm types, one for each type of alt statement
- Added AST logging for constrained type (see fmt_constrained)
- Added AST logging for STMT_alt_type
- Created a generic fmt_arm for use with all alt statements
2010-08-05 03:44:29 +03:00
Roy Frostig
c17ea956a2
Add per-platform file-open flags to std.os. Open buffers as desired in std._io.
2010-08-04 17:14:17 -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
Roy Frostig
1a8d609e89
Add a buffered writer to stdlib _io module.
2010-08-04 12:59:48 -07:00
Roy Frostig
b9075c23c0
Address _io.new_buf FIXME now that issue #93 is closed.
2010-08-04 11:24:09 -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
Graydon Hoare
7595aca5e3
Kill the preallocator, install a sane replacement. Closes #131 . And probably a lot of others.
2010-08-04 00:27:36 -07:00
Graydon Hoare
22c0776247
Merge branch 'master' of git@github.com:graydon/rust
2010-08-03 19:02:09 -07:00
Graydon Hoare
d1a67574c6
Factor append_quad out of IL.emit_full, for use elsewhere.
2010-08-03 18:59:26 -07:00
Roy Frostig
299657550e
Have hashmap's insert method overwrite on existing-key insertion and return true iff overwrite did not occur.
2010-08-03 18:57:54 -07:00
Graydon Hoare
c014748c01
Remove dead implicit-destinations logic from IL.
2010-08-03 18:52:49 -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
Roy Frostig
5b2451c231
Address _vec.map allocation FIXME. Add test.
2010-08-03 18:18:19 -07:00
Roy Frostig
5796ebb1e7
Address _vec.grow FIXME, as issue #89 has been closed.
2010-08-03 18:10:18 -07:00
Roy Frostig
d5fd81174e
Pass parametric types by-alias in various stdlib spots.
2010-08-03 18:06:31 -07:00
Roy Frostig
085790a73a
More stdlib hashmap bits (plus some drive-by extras).
2010-08-03 17:52:35 -07:00
Roy Frostig
7b91933eed
Avoid mem cmp mem in trans even though it's an X86ism becase we don't always catch it later on.
2010-08-03 17:42:22 -07:00
Graydon Hoare
a1ecdb103d
Fix some naughtiness of handling newlines in bracequotes and multi-line comments. Closes #142 .
2010-08-03 16:28:50 -07:00
Graydon Hoare
1fc4e9fcc6
Add tests and fix pexp bug. Closes #141 .
2010-08-03 12:20:29 -07:00
Patrick Walton
559e1e7e01
Use a better heuristic to determine whether we're on a Mac, issue 69
2010-08-02 13:26:35 -07:00
Graydon Hoare
e85f6ca4d3
Patch up another place where the newly-expanded 'closure-ptr' implicit arg needs to be passed. Amazingly, it mostly-worked without this. On some platforms.
2010-07-30 19:14:42 -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
Graydon Hoare
0b9c882d66
Log join-wait count under rust_log::TASK bits, not ::ALL.
2010-07-29 10:41:22 -07:00
Michael Bebenita
74a79fff3a
Add a bunch of comm tests.
2010-07-28 20:30:30 -07:00
Michael Bebenita
fa70212c86
Log dead tasks when dom is just waiting for refcounts to drop.
2010-07-28 20:30:29 -07:00
Michael Bebenita
a5b7a5202c
Note that we keep running the main loop until all task refcounts are zero.
2010-07-28 20:30:29 -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
Michael Bebenita
defd8a66ea
Rename rust_proxy_delegate to maybe_proxy, flesh out logic in it. Add strong-ref distinction on rust_proxy.
2010-07-28 20:30:29 -07:00
Michael Bebenita
30b3f8a117
Add rust_dom::log_state, for logging the running/blocked/dead vectors per scheduling iteration.
2010-07-28 20:30:29 -07:00
Michael Bebenita
5db5eb0c55
Null rust_task::cond on wakeup, add asserts and logging to block/wakeup.
2010-07-28 20:30:29 -07:00
Michael Bebenita
e327aa5093
Teach task_owned and dom_owned to find their dom via consistent interface.
2010-07-28 20:30:29 -07:00
Michael Bebenita
9fe4b0d404
Add modeline / file-local emacs var blocks.
2010-07-28 20:30:29 -07:00
Michael Bebenita
6c0ce25dbf
Move rust_cond.
2010-07-28 20:30:29 -07:00
Michael Bebenita
06b52b70db
Fix typos in comments, delete obsolete comments and dead commented code.
2010-07-28 20:30:29 -07:00
Michael Bebenita
cc4906ba79
Wrap long lines.
2010-07-28 20:30:29 -07:00
Michael Bebenita
436efdcb4f
Add C++ wrapper around uthash.
2010-07-28 20:30:29 -07:00
Michael Bebenita
dbcc9b36b1
Let circular buffers actually grow to max sz, reset _next when resizing.
2010-07-28 20:30:29 -07:00
Michael Bebenita
c1795a1046
Change unread-on-destroy condition for circular buffer to merely a warning.
2010-07-28 20:30:29 -07:00
Michael Bebenita
c5e0ea7276
Add comment explaining NULL case in circular_buffer::enqueue and add logging to ::dequeue.
2010-07-28 20:30:29 -07:00
Michael Bebenita
d6cba83322
Add peek method to circular buffer.
2010-07-28 20:30:29 -07:00
Michael Bebenita
17fa6bfd9a
Change _unit_sz to unit_sz and make public in circular_buffer.
2010-07-28 20:30:28 -07:00
Michael Bebenita
60b0486c11
Make circular buffer use only power-of-two sizes, cheaper arithmetic.
2010-07-28 20:30:28 -07:00
Michael Bebenita
d786469785
Add a warning interface to rust_srv.
2010-07-28 20:30:28 -07:00
Michael Bebenita
6afb6c767e
Move allocation-tracking into rust_srv.
2010-07-28 20:30:28 -07:00
Michael Bebenita
712249d6b8
Log a separator when logging switches between threads.
2010-07-28 20:30:28 -07:00
Michael Bebenita
7ead107290
array_list improvements.
2010-07-28 20:30:28 -07:00
Roy Frostig
dfcf21ca82
Another deque test commented out.
2010-07-28 18:14:33 -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
c489af8e1a
Test the deque some more.
2010-07-28 17:31:41 -07:00
Roy Frostig
237b9d4a64
Test the deque more and fix uncovered off-by-one bug.
2010-07-28 16:34:22 -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
a9ad2e98e3
Refer to issue #136 at the offending source point.
2010-07-28 14:11:56 -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
Graydon Hoare
4d31cf1dc5
Distill semantics of use-def maps to fewer and more-obvious words.
...
- Remove redundant uses of 'resolve' and 'referent' in semant.
- Use defn, defn_id, lval, lval_base more consistently.
- Make associated query functions more consistent.
- Closes #127 .
2010-07-27 11:19:43 -07:00
Graydon Hoare
b7d7f70d09
Slight shaving on RA, no more optimizing today. It's fast enough for now.
2010-07-26 16:55:54 -07:00
Roy Frostig
1a61fb8eb7
Adjust testcase to cover issue #91 , which was actually fixed back in commit f02f9cbf29
. Closes #91 .
2010-07-26 15:52:59 -07:00
Graydon Hoare
3d69407b51
Fix numerous non-linearities and O(sizeof(crate)) issues in typestate system's dataflow algorithm. No longer substantial in profile.
2010-07-26 15:44:29 -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
Graydon Hoare
ec5efd2577
Note the typestate dataflow timing. The culprit is revealed.
2010-07-26 12:31:43 -07:00
Graydon Hoare
c4897f849c
Add a cumulative timer count to be sure we're getting everything.
2010-07-26 12:31:08 -07:00
Graydon Hoare
1b41d7be1a
Change ctxt_crate_main to an Ast.name.
2010-07-26 12:30:43 -07:00
Graydon Hoare
025b1e4133
Do some more iflog-guarding.
2010-07-26 12:30:02 -07:00
Roy Frostig
085cd2ee7d
vec_alloc takes four arguments these days, not three.
2010-07-25 22:21:07 -07:00
Roy Frostig
beca62e2e3
Attempt 2. This time actually reading my own diffs before committing.
2010-07-25 22:07:21 -07:00
Roy Frostig
b9f82d85f9
Attempt number 1 at extinguishing the windows tree remotely (apologies to those hacking on Sunday evening PST).
2010-07-25 22:05:39 -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
Roy Frostig
7ef9e82f51
Don't write to NULL after calling C natives returning void.
2010-07-25 21:27:28 -07:00
Graydon Hoare
3ce18d88c5
Another quick fix from jmuizelaar for that "some ocaml versions dont't notice wrong wildcard count in patterns" bug.
2010-07-23 15:38:34 -07:00
Graydon Hoare
44e2dc2789
Improve mutability checking. Closes #118 .
2010-07-23 15:29:17 -07:00
Graydon Hoare
8bd8413906
Add test for writing-through-uninit bug (reported on IRC by jrmuizel), plus fix in typestate system.
2010-07-23 13:52:46 -07:00
Graydon Hoare
62b69503d5
Stop using project_lval_ty_from_slot for lval_ty; cover residual un-caught cases in type.ml.
2010-07-23 13:51:56 -07:00
Graydon Hoare
ac228a59ce
Widen write mutability check to cover all writing stmts.
2010-07-23 13:51:17 -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
b5e46ac2a0
Two more testcases for overwriting already-live box-like fields in structures, without leaking.
2010-07-23 12:22:31 -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
Graydon Hoare
7d44ee7c3c
Add pretty-printing for alt-tag statements.
2010-07-23 12:20:20 -07:00
Graydon Hoare
4d4fa99b31
Rename STMT_init_* to STMT_new_*; former name was confusing.
2010-07-23 11:37:38 -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
7ff2094496
Back out too-platform-fussy bits in preempt-test work. I hate this test.
2010-07-22 15:39:41 -07:00
Graydon Hoare
1cb4a57b7b
Re-classify some err / bug cases as unimpl. Ideally rustboot should never produce a backtrace.
2010-07-22 15:25:29 -07:00
Graydon Hoare
0f220ecae9
Beat up on the preempt test a bit more, as it keeps hanging under valgrind.
2010-07-22 15:05:35 -07:00
Roy Frostig
3708865906
Re-introduce bits of vec-lib test that blocked on now-fixed issue #108 .
2010-07-22 12:49:11 -07:00
Roy Frostig
1ae13b3fdd
Source FIXME annotations for issue #81 and a correction to STMT_bind fmt.
2010-07-22 12:45:58 -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
c99f0273e3
Make sure debug locations are propagated to every new block created by making
...
them an argument to new_block. gdb should do a good job of single-stepping
LLVM-compiled rust programs by rust line number now.
2010-07-22 01:11:35 +08: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
Jeffrey Yasskin
068c71f11c
Fix -Wnon-virtual-destructor, which apple's gcc-4.0 seems to turn on by default.
2010-07-22 01:11:34 +08:00
Graydon Hoare
aca5082273
Back out "::ALL" default logbits.
2010-07-20 18:38:06 -07:00
Roy Frostig
9c81889ad2
Add a (coarse, first-pass) deque implementation to stdlib.
2010-07-20 18:03:09 -07:00
Graydon Hoare
bf3528342a
Be a little more careful before assuming we have crate debuginfo and abbrevs to read.
2010-07-20 17:42:49 -07:00
Patrick Walton
34016d323c
Make bound functions have the right types
2010-07-20 17:29:36 -07:00
Michael Bebenita
66181ce2cc
Fixed Windows build.
2010-07-20 15:44:21 -07:00
Graydon Hoare
cb989a816d
Pick off the last LLVM-crasher from mbx's change.
2010-07-20 15:29:13 -07:00
Graydon Hoare
05f34b0886
Adjust llasm, llabi to be aware of changes to rust_task structure. Still not working fully.
2010-07-20 15:17:08 -07:00
Graydon Hoare
9935a48e95
Fix message formatting in runtime library.
2010-07-20 15:16:09 -07: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
62522def74
Tidy up handling of unimplemented features. These are expected (if undesirable) sorts of error, we should handle better than "backtrace and exit 2".
2010-07-20 13:55:56 -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
c69ec53dc5
Remove explicit deref workaround in dtor-order test. No longer necessary.
2010-07-20 09:15:23 -07:00
Patrick Walton
b0f77088fa
Strip off TY_mutables and TY_constraineds when unboxing values during autoderef
2010-07-19 19:14:41 -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
Patrick Walton
0863114a05
Include the statements on the LHS of a binop when desugaring. Closes #117 .
2010-07-19 17:52:31 -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
Graydon Hoare
1f0656d908
Add a test for an obvious-seeming (but not actually legal) kind of cast attempted in issue #115 , downgrade bug to an err in type.ml so you get a better message.
2010-07-19 13:25:04 -07:00
Graydon Hoare
f1db420317
Fix over-optimistic resolution of self-methods within obj scopes. There is no such feature in the language at present. Add test to prevent regression. Closes #114 .
2010-07-19 12:03:58 -07:00
Graydon Hoare
bacb8e6b79
Missing semicolon in type.ml, plus test to catch regression. Closes #113 .
2010-07-19 11:50:41 -07:00
Roy Frostig
2141154c85
Change the body-fetching GEP in mark_ty to be dynamic. Our box may be parametric.
2010-07-19 11:47:46 -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
ca95da8bea
Teach the LLVM backend to emit line number information.
...
This isn't complete: it misses line numbers in certain kinds of block. It's
also still tricky to use it on Darwin, where we need to call dsymutil while the
.o file is still around in order for gdb to find the debugging symbols.
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
Patrick Walton
1c1dc651a7
Stub an interface to the (as-yet-nonexistent) structural comparison glue in trans
2010-07-18 14:25:43 +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
Roy Frostig
fb68286700
Add incomplete hashmap implementation to stdlib.
2010-07-16 18:14:52 -07:00
Roy Frostig
c906759807
Fix IL translation of pattern-alt to allow a value of mutable/constrained type to be the subject of a pattern-alt.
2010-07-16 18:04:34 -07:00
Patrick Walton
1ac01e16cf
Ensure that functions that should return a value do; issue 41
2010-07-16 15:34:25 -07: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
Roy Frostig
700e522dff
More renaming of GEP offsets in abi/trans. This should settle it. Also, fix some overenthusiastic renaming in previous commit.
2010-07-16 12:23:46 -07:00
Roy Frostig
348e434cee
Clean up nomenclature in the Abi constants brigade. Purge magic GEP numbers in trans. Adjust obj_closure_rty (and its consumers) to be more explicit about the fact that it is a box.
2010-07-16 11:17:25 -07:00
Graydon Hoare
de8a7dc7dc
Merge branch 'contrib'
2010-07-15 23:58:13 -07:00
Jason Orendorff
7671828d45
Support nested for-each loops. Closes #79 .
2010-07-16 14:53:49 +08:00
Graydon Hoare
5d8430afa7
Fix a couple fails with wrong arg count (new arg from last gc change); expand vec_grow logging a bit.
2010-07-15 18:59:31 -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
Patrick Walton
91b4cae8da
Remove log-type-error; everything is loggable.
2010-07-15 18:18:58 -07:00
Graydon Hoare
60044bbcef
XFAIL jyasskin's new tests under LLVM backend.
2010-07-15 17:22:30 -07:00
Jeffrey Yasskin
b3ca7522bb
More destruction ordering tests.
2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
7dd464fdb5
Initial test that the compiler runs destructors in the right order.
2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
765a2b3ecf
Add a _vec.slice function that'll hold us over until .(a,b) syntax is
...
implemented. This could actually replace .(a,b) syntax if the language grows
optional function parameters.
2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
c866672a99
Add a test for std._vec.init_elt, and an XFAILed test for std._vec.init_fn.
2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
3e63343fbc
Let the compiler find libraries that aren't in the current directory.
2010-07-16 08:13:07 +08:00
Jeffrey Yasskin
29d0458814
Remove the __PAGEZERO segment from shared MachO libraries. This avoids a
...
segfault in dlclose() and fixes the tests on OSX 10.5.8.
2010-07-16 08:13:07 +08:00
Jeffrey Yasskin
9c4bc7b872
In Mach-O shared libraries, avoid counting an extra load command. Closes #99 .
2010-07-16 08:13:07 +08:00
Graydon Hoare
6cf1fe8dd5
Merge branch 'master' of git@github.com:graydon/rust
2010-07-15 17:00:36 -07:00
Graydon Hoare
3b9286cb65
XFAIL use-import-export.rs on the LLVM backend.
2010-07-15 16:57:28 -07:00
Roy Frostig
d2b845d29c
Define (in Abi) and use named constants for indices of elements of an obj IL referent type.
2010-07-15 16:54:38 -07:00
Graydon Hoare
c218d06601
Merge branch 'contrib'
2010-07-15 16:49:02 -07:00
Adam Bozanich
7a13a61e02
use,import,export parse fixes
...
* use,import,export must come before all other items.
* disallow use,import in "native" declarations.
2010-07-16 07:23:16 +08:00
Adam Bozanich
b096b0e308
permit use before import. closes #48
2010-07-16 07:19:14 +08:00
Patrick Walton
0b675a021a
Make mutability no longer a type constructor
2010-07-15 15:20:04 -07:00
Roy Frostig
f02f9cbf29
Correct the way we get typarams when dropping an obj type in drop_ty by using get_tydesc_params.
2010-07-15 12:30:46 -07:00
Roy Frostig
25a38ee4f7
Modify copy_fn_args not to bother with dynamic GEP to get the indirect args cell in a calltup. It's now possible to obtain it with just regular GEP.
2010-07-15 12:30:46 -07:00
Roy Frostig
373f904c92
Explicitly provide an optional closure/obj pointer to trans_call_glue so that it can push one in the right position when calling glue, instead of always pushing a null. As far as I can tell this only affects calls to obj drop glue, since only that makes use of an object binding passed as closure/obj, so pass the binding there as needed.
2010-07-15 12:30:46 -07:00
Roy Frostig
df75165cf4
Make the x86 backend push an extra word as closure/obj arg when emitting any code that amounts to a glue or native call.
2010-07-15 12:30:46 -07:00
Roy Frostig
5d10a264de
Add another null byte preceding commandline args passed to the root task, in position of closure/obj pointer.
2010-07-15 12:30:46 -07:00
Roy Frostig
dbb109853f
Adjust trans_call_glue to push/pop an extra null word implicit arg, in position of closure/obj pointer.
2010-07-15 12:30:46 -07:00
Roy Frostig
7c8c98a6d7
Adjust call args laid out by fake frame created in rust_task::start to reflect new position of closure-or-obj pointer.
2010-07-15 12:30:46 -07:00
Roy Frostig
e21865a440
Begin moving closure-or-obj pointer out to front of call args by changing the order within the call-arg tup referent type. This breaks the world quite a bit, since it remains to fix custom call paths: glue, upcalls, natives.
2010-07-15 12:30:46 -07:00
Roy Frostig
44d719d5fb
Make the call args referent type always have a closure word (non-optional, null in case of no closure) in preparation for shifting it inward from its current position at end-of-call-tup.
2010-07-15 12:30:46 -07:00
Graydon Hoare
b0ee41064c
Minimize pointless logging during walk.
2010-07-14 17:05:17 -07:00
Graydon Hoare
d0da083c5b
Fix support for profiling the compiler.
2010-07-14 17:03:08 -07:00
Graydon Hoare
872f588ccb
Sketch some not-quite-compiling code into comp/fe/lexer.rs.
2010-07-14 09:41:36 -07:00
Graydon Hoare
0fdad302b8
Fix ret/put mis-identification in typechecker. Closes #87 .
2010-07-14 09:41: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
405cd282a3
Typo fixes to docs, from Ralph Giles.
2010-07-13 16:04:31 -07:00
Graydon Hoare
2eba370aa2
Fix the next typo in mlist-cycle.rs; still doesn't work.
2010-07-13 14:27:23 -07:00
Graydon Hoare
1d1a7985a8
Add some (non-functional) input-readingn to rustc.rs.
2010-07-13 14:26:59 -07:00
Graydon Hoare
bb243b3aef
Desugar the head stmts all the way out of STMT_for, rather than stashing them in the node. That's only necessary for STMT_while.
2010-07-13 14:26:38 -07:00
Graydon Hoare
15ef6c12d9
Modify _io's fd_buf_reader to do something slightly more useful: produce multiple buffers on demand.
2010-07-13 14:24:47 -07:00
Graydon Hoare
40d6aacb82
Add differently-typed refcount synonyms to _str and _vec.
2010-07-13 14:23:49 -07:00
Graydon Hoare
5063f0db96
Accept effect-qualified local item declarations.
2010-07-13 14:23:00 -07:00
Graydon Hoare
c3945da2e4
Add another pile of LLVM bindings.
2010-07-12 23:48:44 -07:00
Graydon Hoare
8e6c1aad82
Delete some dead code in x86.
2010-07-12 23:48:14 -07:00
Graydon Hoare
cd0c9dd4fb
Start bringing in LLVM bindings.
2010-07-12 17:47:40 -07:00
Graydon Hoare
5860a25548
Merge branch 'contrib'
2010-07-12 15:14:27 -07:00
Graydon Hoare
d5ba0c3410
Wrap long line.
2010-07-12 13:30:46 -07:00
Graydon Hoare
1843c99b66
Revert previous wrong-change on issue #106 ; was papering over wrongness in the runtime. Sad times. Closes #106 more correctly (and adds comment to explain).
2010-07-12 13:26:28 -07:00
Graydon Hoare
7c837b8c9b
Correct doubly-linked list management logic; bug exposed during conversation on issue #106 .
2010-07-12 13:26:28 -07:00
Graydon Hoare
314b906679
Add more tracing code to trans for refcount events.
2010-07-12 13:26:28 -07:00
Jason Orendorff
1d9212ba85
Fix formatting trivia in Ast.fmt_stmt_body.
2010-07-13 02:59:36 +08:00
Patrick Walton
b172862d21
Add a ty_children function to enumerate the children of any type
2010-07-12 10:40:37 -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
Chris Double
2fcd99c3e6
Fix for compile error when using gcc 4.5.0
2010-07-11 11:10:56 +08: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
ab3921f27e
Catch cyclic imports harder. Add 2 tests to confirm.
2010-07-09 11:59:00 -07:00
Graydon Hoare
fdaa723c4a
Encode and decode DW_AT_rust_iterator on DW_TAG_subprogram DIEs.
2010-07-08 22:58:11 -07:00
Graydon Hoare
fc4338e584
Add rule for building shootout tests.
2010-07-08 21:56:09 -07:00
Graydon Hoare
cbc31ea01e
Add detection for cyclic imports.
2010-07-08 21:56:08 -07:00
Roy Frostig
063f388534
Err kindly instead of asserting on duplicate mod declarations in crates.
2010-07-08 15:13:25 -07:00
Matt Brubeck
d344f151f9
Fix typo in token.ml.
2010-07-09 05:28:10 +08:00
Graydon Hoare
3f354b24dc
Clean out rustc so it doesn't give the false impression of doing anything yet.
2010-07-08 10:45:34 -07:00
Graydon Hoare
48488b0dcf
Build fix from jmuizelaar (on ocamlc versions that notice this bug; drat, not all do)
2010-07-08 08:25:12 -07:00
Matt Brubeck
244ea68082
Issue 66: Multi-line comments
2010-07-08 22:43:15 +08:00
Graydon Hoare
115e14a32c
Some more typestate tests.
2010-07-08 07:33:25 -07:00
Graydon Hoare
e813388df8
Numerous bug fixes to typestate algorithm.
2010-07-06 23:18:29 -07:00
Graydon Hoare
d3cfbdaddd
Correct flow-graph wiring for STMT_if.
2010-07-06 18:07:52 -07:00
Graydon Hoare
6302e18056
Wrap long line.
2010-07-06 17:06:46 -07:00
Graydon Hoare
d4975a198b
Add init(arg) to STMT_call precondition for each arg.
2010-07-06 13:52:41 -07:00
Graydon Hoare
a3f2609630
Add native-clean target.
2010-07-06 13:51:39 -07:00
Graydon Hoare
b1eeb9b825
Change from 'spawner' to 'supervisor' in rust_task, and add an unsupervise call.
2010-07-05 14:43:40 -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
f360d222c8
Uint-ify various bits of _str and _vec, enrich _vec a bit.
2010-07-05 14:42:12 -07:00
Graydon Hoare
fdf2eaac91
Divide vec fill by element size when reporting vec len.
2010-07-05 14:40:01 -07:00
Graydon Hoare
0fe1508a8a
Use typed slot rather than AST slot in trans_for_loop.
2010-07-05 14:39:08 -07:00
Graydon Hoare
b0aba6510a
Teach the dwarf readers to handle udata, so we can link with util.option; add util.rs to std.rc.
2010-07-05 14:38:02 -07:00
Graydon Hoare
ad61f02d36
Rename some stuff in lib/util.rs.
2010-07-05 14:36:39 -07:00
Graydon Hoare
6014384a5d
Log completion on the many.rs test.
2010-07-04 22:41:57 -07:00
Graydon Hoare
75f0c36931
Perform valgrind-specific timing tweaks in a platform-sensitive manner.
2010-07-04 22:41:42 -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
f2861448ab
Fix bug in win32 command-line arg processing.
2010-07-04 20:06:18 -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
1833fa1df2
Fix generic-derived-type.rs and generic-obj-with-derived-type.rs.
2010-07-04 16:42:58 -07:00
Graydon Hoare
8217ce6228
Improve type.ml logging.
2010-07-04 16:42:11 -07:00
Graydon Hoare
ff6278f51a
Fix rec-extend.rs test.
2010-07-04 16:11:56 -07:00
Graydon Hoare
cae60cbaba
Fix compile-fail/log-type-error.rs.
2010-07-04 16:02:12 -07:00
Graydon Hoare
1fa468460d
Fix typo in upcall_recv log message.
2010-07-04 02:15:11 -07:00
Graydon Hoare
1ac6a5038d
Comment-out glue interrupt-flag test; unclear why it breaks, but glue call-tree is always finite anyways so not a big deal for now.
2010-07-04 02:14:46 -07:00
Graydon Hoare
5db3f6ef6a
Spill immediates with proper IL type (was making valgrind dislike obj-with-vec.rs).
2010-07-04 01:06:29 -07:00
Graydon Hoare
bd514114cf
Fix bug crashing valgrind in obj-recursion.rs.
2010-07-04 00:45:56 -07:00
Graydon Hoare
51c38d5903
Improve logging in drop paths.
2010-07-04 00:45:35 -07:00
Graydon Hoare
5b2cc21e4f
More corrections to drop/free path to accommodate TY_box.
2010-07-03 23:55:21 -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
cf19c5132a
Hey, what's a coding sprint without an uncovered register allocation bug? No fun, I say.
2010-07-02 22:44:21 -07:00
Patrick Walton
667d46bef9
Add an arr_iter2 function to common.ml
2010-07-02 18:02:46 -07:00
Graydon Hoare
50e75e049b
Deja vu all over again. Something makes me think this is a usability hazard.
2010-07-02 17:14:46 -07:00
Graydon Hoare
233be40e25
Terminology mop-up.
2010-07-02 17:13:02 -07:00
Graydon Hoare
46ebf12f40
You may get the feeling that all these changes look eerily the same. You would be correct.
2010-07-02 17:04:16 -07:00
Graydon Hoare
3070725cce
Simplify type before deciding how to free it. Hint: calling free() on a running task is usually a bad idea.
2010-07-02 16:42:42 -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
026cdf9747
Fix bug in clone logic; was ignoring the mutability-strip step in later rule.
2010-07-02 16:16:57 -07:00
Graydon Hoare
0be19e8a95
Teach severing logic to handle obj and fn types.
2010-07-02 16:12:58 -07:00
Graydon Hoare
ec0de963e0
Wrap long line.
2010-07-02 16:12:34 -07:00
Graydon Hoare
63f9bd7b63
Trace mark and sever steps in GC.
2010-07-02 16:12:10 -07:00
Graydon Hoare
b1d3e9697a
Return LLVM to at least being able to run hello world.
2010-07-02 15:11:44 -07:00
Graydon Hoare
6d58987538
Walk (mut/constr stripped) TY_iso edges when boxed. Fault on non-boxed edges; they should not have made it past resolve.
2010-07-02 14:58:55 -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
f522605f6b
Permit mutables as comparable in all contexts.
2010-07-02 12:52:58 -07:00
Graydon Hoare
f955d06ca9
Don't unify the *input* to init-box with a box constraint, nurr.
2010-07-02 12:33:51 -07:00
Graydon Hoare
0efce5ebe2
Improve logging in type.
2010-07-02 12:32:49 -07:00
Graydon Hoare
74775eff7e
Box the args entering the vec-drop test.
2010-07-02 12:32:28 -07:00
Graydon Hoare
41fa7a404e
Merge branch 'exterior_and_mutable_types' of git@github.com:graydon/rust into exterior_and_mutable_types
2010-07-02 12:03:46 -07:00
Graydon Hoare
285a4735b9
Parse effect-qualified type definitions.
2010-07-02 12:02:56 -07:00
Patrick Walton
a343133511
Allow formatting individual decl_params
2010-07-02 11:57:04 -07:00
Roy Frostig
49656f68b8
Gut the box[m][o] family from util.
2010-07-02 11:03:33 -07:00
Graydon Hoare
a7665b2ae1
Correct drop-ty path; many tests now run.
2010-07-02 09:46:27 -07:00
Graydon Hoare
d9037af22d
Improve drop-path logging and simplify box_rc_cell.
2010-07-02 09:45:24 -07:00
Graydon Hoare
b2692ef2ec
Actually link GC allocations onto the gc_alloc_chain, der.
2010-07-02 08:17:41 -07:00
Graydon Hoare
c7ef0ded81
Improve logging on upcall_malloc.
2010-07-02 08:17:09 -07:00
Graydon Hoare
c33a522097
Handle DW_FORM_blcok4 in runtime dwarf reader, which we started emitting a while ago.
2010-07-02 08:16:34 -07:00
Graydon Hoare
113c31a26d
Trap missing attr forms during dwarf-scan and shut down dwarf reader, don't crash.
2010-07-02 08:16:04 -07:00
Graydon Hoare
99be02a28d
Indent/outdent when logging dwarf at runtime.
2010-07-02 08:15:27 -07:00
Graydon Hoare
8370b947a4
Wrap long lines.
2010-07-01 23:53:32 -07:00
Graydon Hoare
60c6ae3ad5
Box arguments that are supposed to be boxed.
2010-07-01 23:50:58 -07:00
Graydon Hoare
f0faeaed25
Yeah. Not even a semantic mix-up: just a damn typo.
2010-07-01 23:45:16 -07:00
Graydon Hoare
27d69a88b1
Teach clone_ty to tolerate cloning a mutable (though not state) type.
2010-07-01 23:20:28 -07:00
Graydon Hoare
a2e4d45600
Improve mangling.
2010-07-01 23:15:42 -07:00
Graydon Hoare
f3de4ee2a7
Teach the associative_binary_op_ty_fold about box, mutable and tys.
2010-07-01 23:12:34 -07:00
Graydon Hoare
01cfcfab13
Strip outer 'mutable' off slot when deciding if pred can apply.
2010-07-01 21:20:30 -07:00
Graydon Hoare
2d40bc669c
Retire defunct copy_ty in favour of trans_copy_ty, which invokes the same logic at the bottom.
2010-07-01 21:02:49 -07:00
Graydon Hoare
d0a1b6e914
Reinstate disgusting, filthy workarounds for deriving missing type information. It existed before, we will survive if it exists now.
2010-07-01 20:24:23 -07:00
Graydon Hoare
4273986623
Remove similar over-application of auto-deref from type.
2010-07-01 19:30:35 -07:00
Graydon Hoare
65a87a55a1
Remove too-optimistic (and not harmless) over application of auto-deref in trans.
2010-07-01 19:29:51 -07:00
Graydon Hoare
314af0a44b
Split out and improve trans_init_box.
2010-07-01 19:29:03 -07:00
Graydon Hoare
7df949af40
Add logging to trans_init_slot_from_atom.
2010-07-01 19:28:11 -07:00
Graydon Hoare
6c9832d3ec
Catch ast pretty-printer up with init-tup syntax.
2010-07-01 19:27:20 -07:00
Graydon Hoare
bb018b24f5
Fox the clauses that actually satisfy box and mutable constraints; in all the confusion I had got those wrong.
2010-07-01 18:39:58 -07:00
Graydon Hoare
c27879a1aa
Of course, the LHS constraint on an init-box statement is mutable @.
2010-07-01 18:39:08 -07:00
Graydon Hoare
fdafec39de
Clarify in type logging when we have a constraint vs. a resolved type.
2010-07-01 18:38:28 -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
Graydon Hoare
f72774db7a
Correct existing reliance on auto-box / unbox behavior in tests.
2010-07-01 18:37:30 -07:00
Graydon Hoare
792d96474e
Box the integer passed to the handle in obj-drop.rs. No more implicit arg-boxing.
2010-07-01 18:04:21 -07:00
Graydon Hoare
2120599387
Establish the box constraint on the dst in STMT_init_box before propagating it to the rval.
2010-07-01 18:03:37 -07:00
Graydon Hoare
c30353d4f9
Remove TYSPEC_loggable. Everything's loggable (or will be, eventually; the backend can catch unimplemented cases until then).
2010-07-01 17:56:20 -07:00
Graydon Hoare
4bec9538cc
Check the simplified type used in check-expr in trans.
2010-07-01 17:55:28 -07:00
Graydon Hoare
ae25e66a7f
Extract pattern-slot variables in lval typecheck context (mutable ok).
2010-07-01 17:11:01 -07:00
Graydon Hoare
abfeefc662
Relax alias-analysis pass to permit literal-aliasing.
2010-07-01 17:10:30 -07:00
Graydon Hoare
bcc7ec18b8
Remove the catch-all in type.ml, add cases for every stmt (a couple more handled; mostly still stubs).
2010-07-01 16:56:39 -07:00
Graydon Hoare
9138438620
Convey auto-deref judgments made in typechecker to trans layer; control the decision in one place.
2010-07-01 15:59:29 -07:00
Graydon Hoare
90b36dcd26
Correct overzealous bulk-edit to LLVM code.
2010-07-01 15:26:00 -07:00
Graydon Hoare
2122b59ea2
Some work on teaching trans to differentiate between auto-deref and explicit-deref contexts.
2010-07-01 13:20:57 -07:00
Graydon Hoare
ef61c458fa
Add more logging to copy/init paths.
2010-07-01 11:11:34 -07:00
Graydon Hoare
bb3aad72c4
Remove redundant indirection-function.
2010-07-01 11:11:07 -07:00
Graydon Hoare
a7016ade65
Implement STMT_init_box in trans, clean up some of the semant table-accessors.
2010-07-01 10:44:27 -07:00
Graydon Hoare
8acb2cf47d
Add STMT_init_box to typestate pass.
2010-07-01 10:14:38 -07:00
Graydon Hoare
a61e85ca34
Simplify types before analyzing call structure; 2 more tests compile.
2010-07-01 10:09:04 -07:00
Graydon Hoare
cb04275afa
Add machine-dependent 'float' type.
2010-07-01 09:35:48 -07:00
Graydon Hoare
afc0dc8bfc
Fix lexer's definition of numeric literals.
2010-07-01 09:03:47 -07:00
Roy Frostig
5a07e98c5d
Fix two bugs in tag patterns: 1. Look up the tag constructor function item using lval_item, not lval_to_referent; 2. Correct the form of the name used to query the tag or iso ty_tag when obtaining the corresponding type tuple.
2010-07-01 00:09:11 -07:00
Graydon Hoare
6a0b06e562
Rename 'exterior' to 'box' and 'interior' to 'local' (at least wrt. slots; keep MEM_interior for describing interior-parts-of-allocations)
2010-06-30 22:45:54 -07:00
Graydon Hoare
8b8186db87
No more "transplant" behavior in "let @x = y", gotta box explicitly.
2010-06-30 21:17:45 -07:00
Graydon Hoare
e460da3889
Auto-deref on lval-ext terms (x.y == x->y, if you like)
2010-06-30 21:16:13 -07:00
Graydon Hoare
0b252a96b1
De-duplicate code in get_resolved_ty, make recursive, add a case for tup.
2010-06-30 21:01:28 -07:00
Graydon Hoare
d2e7c1a5dc
Add two move variants of "acceptable mismatches to recover from" when the mut_ok or ext_ok flags are set.
2010-06-30 21:00:57 -07:00
Graydon Hoare
edfcd3a723
Add relaxed init-context in which we're willing to auto-deref.
2010-06-30 21:00:09 -07:00
Graydon Hoare
f6fda46020
Add TYSPEC_mutable, merge control-flag for it and auto_deref into unify_ctx structure.
2010-06-30 19:45:40 -07:00
Graydon Hoare
cab674447f
Make type-cast decisions based on simplified types.
2010-06-30 19:30:12 -07:00
Graydon Hoare
4765d1e358
Fix another type bug I introduced yesterday; found through wondrous logging technology.
2010-06-30 15:26:34 -07:00
Graydon Hoare
335053eb68
Improve logging in type.
2010-06-30 15:25:24 -07:00
Graydon Hoare
77cf4a880c
Pick out error in type due to delightfully clear logging.
2010-06-30 15:16:37 -07:00
Graydon Hoare
4cd49c0ab0
Improve logging in type.ml, give it indentation and per-statement context.
2010-06-30 15:13:29 -07:00
Graydon Hoare
b450838c46
Fix recently-broken lval formatter.
2010-06-30 15:12:42 -07:00
Graydon Hoare
6c3a2491d8
Add support for parsing COMP_deref lval components (*foo).
2010-06-30 14:51:36 -07:00
Graydon Hoare
9fb3e128da
Fix formatting string.
2010-06-30 14:51:03 -07:00
Graydon Hoare
0ac6be85a9
Add a COMP_deref to lvals for explicit-derefs, modify typechecker to implicitly deref in only *some* contexts.
2010-06-30 12:39:11 -07:00
Graydon Hoare
8e4a10790f
rewrite 'mutable &' as '& mutable', corresponding to grammar shift.
2010-06-30 02:30:17 -07:00
Graydon Hoare
e828b2a94d
Tidy up (I think) a couple typos from patrick's last commit.
2010-06-30 01:45:36 -07:00
Graydon Hoare
df0eebcf1e
Improve error message.
2010-06-30 01:42:40 -07:00
Graydon Hoare
5a8d93c652
Remove redundant (and misnamed) function "without_exterior" in trans.
2010-06-30 00:58:15 -07:00
Graydon Hoare
d796673c11
Reimplement backup scheme for handling lvals not yet resolved by typechecker.
2010-06-30 00:57:28 -07:00
Graydon Hoare
8120a59097
Init the exterior ty, not the inner ty.
2010-06-30 00:56:44 -07:00
Graydon Hoare
6ee16b588d
Fix error-message typo.
2010-06-30 00:55:53 -07:00
Graydon Hoare
992f344c83
Use simplified_ty in effect.
2010-06-30 00:55:27 -07:00
Graydon Hoare
7e853457df
Move simplified_ty from trans to semant and use it a few places.
2010-06-30 00:55:04 -07:00
Graydon Hoare
861423989d
Add logging to type and effect.
2010-06-30 00:53:33 -07:00
Graydon Hoare
2a1d88ae00
Fix exterior formatter.
2010-06-30 00:52:52 -07:00
Graydon Hoare
7d076bcaa0
Get compiler to the point of building std.rc and rustc.rc.
2010-06-30 00:07:37 -07:00
Graydon Hoare
675f90eca3
Handle constrained types in type.ml while we're at it.
2010-06-30 00:07:05 -07:00
Graydon Hoare
fc1b86e1ca
Wrap long lines.
2010-06-30 00:06:31 -07:00
Patrick Walton
c2d4c1116f
Teach the typechecker about the auto-dereference and auto-promote-to-mutable semantics we're going with
2010-06-29 19:56:04 -07:00
Graydon Hoare
f05fc6b9d7
Different, not quite correct yet, but I think slightly closer to correct, approach to convincing the typechecker to get along with this new type grammar.
2010-06-29 18:25:16 -07:00
Graydon Hoare
2a00a61ef3
Thread a 'simplification' flag through unifier, attempt to strip off layers of ignorable types when simplification is permitted.
...
Gets std.rc through typechecking, but assigns some wrong types to lvals (the simplified types, not the correct ones).
2010-06-29 16:46:07 -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
7b11a52a37
Update LLVM translation to match changes to slot and ty.
2010-06-29 14:06:50 -07:00
Graydon Hoare
17c293bbaa
Merge branch 'master' of git@github.com:graydon/rust
2010-06-29 12:06:18 -07:00
Graydon Hoare
1f9fd2710e
Initial stab at lowering mutable and exterior into the type system.
2010-06-29 12:00:15 -07:00
Graydon Hoare
ffdcd67c25
Fix underlying failure to signal errors when dep'ing.
2010-06-29 10:32:11 -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
Roy Frostig
023e5af639
The few and proud isolated bits from stdlib-work so far that don't break everything. Note util.rs hasn't yet been declared mod in the std crate. Don't do that yet, as it breaks make check.
2010-06-28 23:18:51 -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
Graydon Hoare
329a65530f
Canonicalize hashtables after running them through htab_map. Closes #77 .
2010-06-28 19:24:04 -07:00
Graydon Hoare
bd059a354d
Whitespace.
2010-06-28 19:21:09 -07:00
Graydon Hoare
5abc483d9a
Move more of the GC logic into the runtime.
2010-06-28 18:53:43 -07:00
Roy Frostig
a27cbd4ee8
Testcase (XFAILed) for mutable alias vec weirdness.
2010-06-28 16:36:24 -07:00
Roy Frostig
66d313d365
Teach the typechecker that uints are integral types. Closes #88 .
2010-06-28 15:27:05 -07:00
Graydon Hoare
d608c09168
Some fixme-to-issue housekeeping.
2010-06-28 09:39:43 -07:00
Graydon Hoare
e1f6749f9a
Once more with feeling. Closes #13 .
2010-06-27 20:54:33 -07:00
Graydon Hoare
8815c02005
Previous commit closes #13 . Trying to convince github of that fact automagically.
2010-06-27 20:53:07 -07:00
Graydon Hoare
1316312c0c
Only translate or dwarf-emit items or stubs locally defined or used. Avoids instantiating O(sizeof(standard-library)) worth of imports stubs on each 'use std'. Closes issue 13.
2010-06-27 20:48:28 -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
fb3e2fa4bf
Encode tag and iso types at dwarf level. Can't decode them yet.
2010-06-27 13:48:25 -07:00
Graydon Hoare
7ea416f4c3
Add callable gc method exposed to user code, use it in mlist-cycle.rs test (still not quite working; some memory corruption in the recursive tag constructors, not the GC)
2010-06-25 23:57:30 -07:00
Graydon Hoare
9236ad2846
Further attempts to convince mem_ctrl to be sane.
2010-06-25 23:55:36 -07:00
Graydon Hoare
50e96414d2
Fix register-use bugs in sweep pass, factor sweep pass out and call twice for separate sever/free phases.
2010-06-25 23:07:34 -07:00
Graydon Hoare
90eaaf666b
Improve sever_slot logging.
2010-06-25 23:03:06 -07:00
Graydon Hoare
49ac5e6312
Fix copy-paste error in logging function.
2010-06-25 23:02:19 -07:00
Graydon Hoare
37426e42cf
Add sever-glue, for missing first stage of sweep.
2010-06-25 21:57:46 -07:00
Graydon Hoare
0cf3c2ad93
Pass type parameters to free function called from sweep loop.
2010-06-25 21:20:32 -07:00
Graydon Hoare
3718055276
Align emitted DATA_* elements -- tydescs in particular -- to 16 byte boundaries, so we can get our tag bit freed up.
2010-06-25 20:47:16 -07:00
Graydon Hoare
dd2716f56c
Fix bad register use in GC sweep pass.
2010-06-25 20:46:11 -07:00
Graydon Hoare
968ec14527
Fix marking logic.
2010-06-25 19:56:29 -07:00
Graydon Hoare
34dc7053eb
Fix over-conservatism in alias analysis.
2010-06-25 19:55:40 -07:00
Graydon Hoare
c56a729ff1
Remove obsolete comment.
2010-06-25 17:32:35 -07:00
Graydon Hoare
eb7807c4fe
I hear actually loading the next pointer into the right register helps when walking a list.
2010-06-25 17:31:08 -07:00
Graydon Hoare
d601b357ec
Debug GC glue enough that marking passes.
2010-06-25 16:59:29 -07:00
Graydon Hoare
2a2474d497
Update comment to reflect slightly-improved GC situation.
2010-06-25 16:56:25 -07:00
Graydon Hoare
eed5c0aa24
Add rust_task::gc(size_t args) method that drops us back into the GC glue.
2010-06-25 16:54:03 -07:00
Graydon Hoare
67d1f0a9aa
Emit gc glue and rearrange crate glue offsets slightly to have a regular order.
2010-06-25 15:43:55 -07:00
Graydon Hoare
2e3fa5bd68
Return at end of GC glue.
2010-06-25 15:43:03 -07:00
Graydon Hoare
a9c639ec8a
Fix forgotten llvm xfail in Makefile.
2010-06-25 15:42:24 -07:00
Graydon Hoare
c06ea8f944
Add test of recursive object types (ha, work by default) and fix effect-walker bug revealed by it.
2010-06-25 12:15:40 -07:00
Graydon Hoare
422b8a6be4
Unlink (doubly) gc chain on free.
2010-06-25 11:48:17 -07:00
Graydon Hoare
e875993471
Doubly-link gc chain on alloc.
2010-06-25 11:00:23 -07:00
Graydon Hoare
63b5e18207
Enlarge gc header to doubly-link the gc chain.
2010-06-25 09:00:08 -07:00
Graydon Hoare
5dfe101e51
Revert "Add intrinsic calling convention." Isn't going to work.
...
This reverts commit 72c6c60d80
.
2010-06-25 01:33:00 -07:00
Graydon Hoare
287d69ddac
Sketch out gc glue.
2010-06-25 01:32:59 -07:00
Roy Frostig
85a701c8f6
Add testcases for item name conflict at the same path level.
2010-06-25 01:26:44 -07:00
Roy Frostig
241305caab
Resolve and typecheck patterns in pattern alt redux. This time featuring way more correctness.
2010-06-25 00:47:23 -07:00
Graydon Hoare
0d9565a4c1
Rearrange pexp-custom stuff a bit.
2010-06-25 00:00:31 -07:00
Graydon Hoare
72c6c60d80
Add intrinsic calling convention.
2010-06-24 19:21:40 -07:00
Graydon Hoare
c483808e0f
Factor out some trans bits.
2010-06-24 19:21:15 -07:00
Graydon Hoare
1c60be2f32
Fix bad output-slot logic in tag constructors.
2010-06-24 18:25:10 -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
24d5ff75c3
Fix output-slot handling for real. It's been broken for a long time.
2010-06-24 16:19:55 -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
69a34503f4
Remove redundant copy of comment.
2010-06-24 11:18:02 -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
Graydon Hoare
4a1f86ccd7
Merge timer loop functions, fix win32 build broken by logger change.
2010-06-24 08:52:52 -07:00
Graydon Hoare
935442babc
Fix hg dependency in testsuite.
2010-06-24 08:44:14 -07:00
Roy Frostig
1f3cff91f6
Remove bogus FIXME.
2010-06-24 08:23:17 -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