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