Patrick Walton
015c0d0d59
rustc: Allow dereference expressions to be used as lvalues. Add a test case.
2011-04-07 12:51:27 -07:00
Rafael Ávila de Espíndola
b4422cca21
Add a -O option and change the Makefile to use it.
2011-04-07 15:42:06 -04:00
Patrick Walton
ddf96ac3a8
rustc: Reindent line. Puts out burning tinderbox.
2011-04-07 12:01:48 -07:00
Patrick Walton
cd6962f29d
rustc: Link to external tag discriminants. Un-XFAIL test/run-pass/lib-option.rs.
2011-04-07 11:42:40 -07:00
Patrick Walton
2a894cabc2
Merge branch 'master' of github.com:graydon/rust
2011-04-07 10:14:25 -07:00
Rafael Ávila de Espíndola
25320da099
Run optimizations.
...
It is always on for now just to make sure the bots are happy. If they
are, I will add a -O option and update the makefile.
2011-04-07 12:12:21 -04:00
Tim Chevalier
2e90bd94de
Continued sketching out code for checking states against preconditions.
...
It's still sketchy. I added a typestate annotation field to statements
tagged stmt_decl or stmt_expr, because a stmt_decl statement has a typestate
that's different from that of its child node. This necessitated trivial
changes to a bunch of other files all over to the compiler. I also added a
few small standard library functions, some of which I didn't actually end
up using but which I thought might be useful anyway.
2011-04-06 17:58:18 -07:00
Patrick Walton
d9da43984b
Merge branch 'master' of github.com:graydon/rust
2011-04-06 10:25:32 -07:00
Graydon Hoare
36d75d6391
Minimal testcase for next bootstrap blocker.
2011-04-06 08:33:24 -07:00
Graydon Hoare
5e98cd9472
Remove reference to nonexistent ast.module from typestate_check.rs, stage1 doesn't like it.
2011-04-06 04:18:12 +00:00
Graydon Hoare
52abd912c0
Brute force and ignorance workaround for tag-and-generic-obj; un-XFAIL it.
2011-04-05 21:08:13 -07:00
Graydon Hoare
8382990627
Add new minimal test for current blocker on bootstrapping.
2011-04-05 17:27:55 -07:00
Tim Chevalier
86d4601827
More work on typestate. Sketched out code for computing and checking prestates and poststates. Still a long ways away.
2011-04-06 00:17:06 +00:00
Lindsey Kuper
4fc8de1969
Last pieces of self-call support.
...
The last few pieces of the hack that lets us use trans.trans_call() to
translate self-calls, plus a fix for the parser buy that was
preventing self-call expressions from getting past parsing.
test/run-pass/obj-self.rs works now (as in it actually prints "hi!"
twice!).
2011-04-05 16:26:31 -07:00
Lindsey Kuper
b8bb2e118e
Further on the path toward self-awareness.
...
Mostly:
* Merciless refactoring of trans.rs so that trans_call can work for
self-calls as well as other kinds of calls
Also:
* Various changes to go with having idents, rather than exprs, in
expr_call_self AST nodes
* Added missing case for SELF token to token.to_str()
2011-04-05 14:54:48 -07:00
Graydon Hoare
8703c8067f
FIx native wrapper generation to handle more arg types.
2011-04-05 21:52:48 +00:00
Lindsey Kuper
361ee5a68b
Oops -- if we're going to use the pretty-printer, we need it to work.
2011-04-05 11:55:14 -07:00
Lindsey Kuper
ba537fa5f5
Knocking out a quick fixme: pretty-printing exprs in error messages.
2011-04-05 11:55:12 -07:00
Tim Chevalier
d64b72f6ec
More statement-to-expression edits
2011-04-04 17:35:10 -07:00
Lindsey Kuper
5de3f441d0
A trivial documentation commit.
2011-04-04 17:29:49 -07:00
Tim Chevalier
512bba264e
Change 'statement' to 'expression' in a bunch of places
2011-04-04 17:02:31 -07:00
Graydon Hoare
70e5457d7c
Make box prefix operator and box type carry mutability flag.
2011-04-04 15:44:15 -07:00
Patrick Walton
f10a5bbad0
rustc: Make type_of() return the type of the wrapper for native functions. lib-map now compiles, but fails to work properly.
2011-04-03 15:23:58 -07:00
Brian Anderson
bd9f45446a
Begin comparing vectors from the correct address
...
Start at the first element instead of the address of the vector.
2011-04-03 03:09:20 -04:00
Graydon Hoare
8e9c5b96fb
Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. Major perf win.
2011-04-02 19:05:12 -07:00
Brian Anderson
f6763efb02
Gitignore the recommended build directory
2011-04-02 21:31:55 -04:00
Brian Anderson
1326d424c9
Add more tests for alt expressions
2011-04-02 20:35:51 -04:00
Brian Anderson
99901bdbc4
Add FIXMEs around type handling in trans_if, trans_alt
2011-04-02 20:35:51 -04:00
Brian Anderson
21fb49ad95
Join the results of alt arms so alt can be used as an expression.
...
Un-XFAIL expr-alt.rs.
2011-04-02 20:35:50 -04:00
Brian Anderson
203e33b611
Make join_results branch into the join block even when only one edge is live.
...
I don't don't totally understand the implications of this but it makes the
behavior consistent for all live edges, which is going to make joining the
arms of an alt expression work correctly.
2011-04-02 20:35:50 -04:00
Brian Anderson
6e6acaa39a
Fail on non-exhaustive alt matches
2011-04-02 20:35:50 -04:00
Brian Anderson
9d0a505d61
Terminate fail blocks by making their ends unreachable.
...
This will make implementing default alt arms simpler.
2011-04-02 20:35:50 -04:00
Graydon Hoare
4f90c88b4d
Write typarams for variants. Typecheck gets as far as ty.rs now.
2011-04-01 18:53:08 -07:00
Graydon Hoare
5b7961b641
Encode ty_native ebml node for native types so typechecker has something to work with.
2011-04-01 18:34:13 -07:00
Graydon Hoare
c077da553d
Remove typestate_check reference to nonexistent ast.init node; rustc compiling itself notices what rustboot did not :)
2011-04-01 18:33:47 -07:00
Graydon Hoare
23f18a096f
Re-enable typestate_check in build, was lost during merge. Sorry.
2011-04-01 17:23:56 -07:00
Graydon Hoare
0397c05f42
Support for passing native types through metadata/creader.
2011-04-01 17:04:51 -07:00
Graydon Hoare
2a2ea6351d
Comment out import for not-yet-compiling typestate_check.
2011-04-01 17:04:07 -07:00
Graydon Hoare
3971110d7f
Guh. Actually commit the staged undo-of-indentation. Forgotten git staging wins again.
2011-04-01 16:04:22 -07:00
Graydon Hoare
7d88e63ec8
Switch private linkage to local, re-indent trans.rs.
2011-04-01 15:01:46 -07:00
Patrick Walton
3a8b0be1cb
rustc: Write symbols for native items into the crate metadata
2011-04-01 14:18:46 -07:00
Patrick Walton
a0eb9c814b
rustc: Don't try to write symbols into the metadata for nullary tags. Puts out burning tinderbox.
2011-04-01 14:14:10 -07:00
Patrick Walton
6dc452335a
rustc: Get tag variants from the crate metadata
2011-04-01 13:02:44 -07:00
Patrick Walton
ec9d7abf8c
rustc: Have tag_variants() return a new variant_info structure instead of an AST node
2011-04-01 11:37:31 -07:00
Tim Chevalier
8b211f4782
added Mac .DS_Store directory to .gitignore
2011-04-01 11:27:32 -07:00
Tim Chevalier
3130348ee1
Started adding support for typestate checking.
...
I added a new field to the ast "ann" type for typestate information.
Currently, the field contains a record of a precondition bit vector and
postcondition vector, but I tried to structure things so as to make
it easy to change the representation of the typestate annotation type.
I also had to add annotations to some syntactic forms that didn't have
them before (fail, ret, be...), with all the boilerplate changes
that that would imply.
The main call to the typestate_check entry point is commented out and
the actual pre-postcondition algorithm only has a few cases
implemented, though the overall AST traversal is there. The rest of
the typestate algorithm isn't implemented yet.
2011-04-01 11:27:32 -07:00
Patrick Walton
69a34b992b
rustc: Remove useless call to tag_variant_with_id()
2011-04-01 10:59:59 -07:00
Brian Anderson
1bc06bc59b
Cleanup typos and newlines
2011-04-01 00:05:13 -04:00
Brian Anderson
efb738153c
Add an XFAILed test for treating alts as expressions
2011-03-31 23:23:27 -04:00
Brian Anderson
dcf04ffbad
Un-XFAIL expr-if-box.rs
2011-03-31 23:15:11 -04:00