Patrick Walton
f6f7f61908
rustc: Implement logging in DPS
2011-07-15 18:00:59 -07:00
Patrick Walton
0bd7b803f6
rustc: Translate literals in DPS style; no constification of strings yet.
2011-07-15 16:40:55 -07:00
Patrick Walton
6e114a367f
rustc: Write names of local variables into the LLVM IR when debug mode is on
2011-07-15 16:40:55 -07:00
Graydon Hoare
fafb42e6b1
Merge the stage1,2,3.mk files into a common definition in stageN.mk, more rearrangement of host/target libs.
2011-07-15 16:16:51 -07:00
Michael Sullivan
c610d027d9
gather_locals shouldn't descend down into fns and items.
2011-07-15 14:42:59 -05:00
Michael Sullivan
7caf8a0929
Convert gather_locals to use visit.
2011-07-15 14:24:09 -05:00
Patrick Walton
9fadab64a2
rustc: Introduce a stub destination-passing-style translation engine, accessible via the --dps switch for now
2011-07-15 11:38:46 -07:00
Patrick Walton
917afa4cc9
rustc: Remove a bunch of exterior vectors
2011-07-15 11:38:46 -07:00
Lindsey Kuper
a716eb28ec
Getting rid of unnecessary casts for objects.
...
Now that all objects are of rust_object_type in the wake of the LLVM
type system rewrite, we don't need this cast anymore.
2011-07-15 10:55:31 -07:00
Eric Holk
827e300485
refactor: Move the task and communication-related translation functions to a new module.
2011-07-14 17:33:28 -07:00
Michael Sullivan
e9a6fc94d5
Make collect_upvars know about function args.
...
Closes #697 .
2011-07-14 19:18:56 -05:00
Michael Sullivan
a3301f74f9
Generalize collect_upvars to work over any type of ast node.
2011-07-14 19:18:56 -05:00
Eric Holk
8afb1a7c63
refactor: Move the LLVM type and constant constructors into a new module.
2011-07-14 17:08:45 -07:00
Michael Sullivan
e2fcd29bbd
Consolidate some arguments in typeck by just passing the record they came from.
2011-07-14 18:45:55 -05:00
Michael Sullivan
53c4cb6a2f
Factor out build_environment's code to find a variable in a function context.
2011-07-14 18:45:02 -05:00
Michael Sullivan
759317ca8b
Factor out closure construction from trans_for_each.
2011-07-14 18:45:01 -05:00
Michael Sullivan
0957525cc6
Fix array out of bounds index in load_environment.
...
Closes #696 .
2011-07-14 18:34:43 -05:00
Patrick Walton
1a6419bd73
rustc: Move metadata::encoder over to interior vectors
2011-07-14 15:39:35 -07:00
Brian Anderson
b3dee95514
Add a facility for ignoring tests. Issue #428
...
Adding the #[ignore] attribute will cause the test not to be run, though it
will still show up in the list of tests.
2011-07-14 13:51:30 -07:00
Graydon Hoare
49da7da441
Fix long line.
2011-07-14 12:55:17 -07:00
Rafael Ávila de Espíndola
c124a025bf
Move rustc to the new llvm type system. Requires an update to llvm trunk.
2011-07-14 15:19:17 -04:00
Patrick Walton
be489ee9e2
rustc: Move much of metadata reading over to interior vectors
2011-07-14 12:00:48 -07:00
Patrick Walton
e76f44453b
rustc: First stab at interior string literals, untested as of yet
2011-07-14 11:47:20 -07:00
Brian Anderson
4038010bc6
The test runner's main returns unit, not int. Issue #428
...
The appropriate way to indicate failure from main is to fail.
2011-07-14 10:51:38 -07:00
Brian Anderson
f4beac4a43
Revert "Allow main to return int"
...
This reverts commit 8c94d8fd54ba864e6a603ba6d90d41ccfaa62f53.
There's no mechanism to actually return the value from main, so all this does
is allow main -> int to compile. Per #688 , the program returns non-zero on
failure, so it's not obvious that this change is appropriate at this time.
2011-07-14 10:37:28 -07:00
Brian Anderson
8d2706cca8
Flag --test implies '--cfg test'. Issue #428
...
So certain code can be conditionally compiled only when building for testing
2011-07-14 10:27:02 -07:00
Rafael Ávila de Espíndola
7376e751ae
Keep a pointer to rust_object_type.
2011-07-14 12:07:51 -04:00
Rafael Ávila de Espíndola
40f617390d
Main part of the type system rewrite:
...
Change the type of all objects to be { {}*, {}* }.
2011-07-14 00:34:45 -04:00
Brian Anderson
8c94d8fd54
Allow main to return int
2011-07-13 19:22:53 -07:00
Tim Chevalier
f26ca025de
Make resolve and the typechecker check for a main fn of the
...
correct type
This means if a non-library program leaves out the main program,
the error gets caught earlier than link.
Closes #626 .
2011-07-13 18:30:53 -07:00
Patrick Walton
196753e4c3
rustc: Remove some interior vectors from ty, except the ones that I think were causing crashes before
2011-07-13 17:39:33 -07:00
Rafael Ávila de Espíndola
c94fc7aad8
Small cleanups that were missing in the last patch.
2011-07-13 20:21:17 -04:00
Rafael Ávila de Espíndola
9036758191
Next step in the type system change. Add task_type to the context.
2011-07-13 20:07:16 -04:00
Patrick Walton
2a3ab10f20
rustc: Remove exterior vectors from resolve again
...
This reverts commit 6390c43dc465b7c89eb542855bdfe12103ee330f.
2011-07-13 16:44:39 -07:00
Rafael Ávila de Espíndola
3d353f76a9
First step in the typesystem rewrite:
...
Create the typedesc type in one place. That is where it will be named.
2011-07-13 19:37:19 -04:00
Graydon Hoare
39151f2ad8
Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.
2011-07-13 15:44:09 -07:00
Tim Chevalier
04b239f3cb
Use more precise spans in error messages for bad FRU exprs
...
The type error message for an expression using FRU where a field
expression had the wrong type was using the span for the entire
expression. Fixed it to use the span for the individual field.
Closes #628 .
2011-07-13 15:30:30 -07:00
Tim Chevalier
5e1a6dac44
Parse nullary ret correctly
...
ret is similar to fail: if not followed by an expression, it
should be parsed as a ret without an argument. The old version would
fail if ret was followed by a close paren (for example). Fixed it.
Closes #676 .
2011-07-13 15:00:59 -07:00
Tim Chevalier
0c913e63d9
Add some missing cases to token::can_begin_expr
2011-07-13 15:00:23 -07:00
Marijn Haverbeke
8d68b0462a
Refactor out some repetetive code in trans_alt
2011-07-13 11:33:46 +02:00
Marijn Haverbeke
be4f7354b4
Add box patterns
...
An @ can now be prepended to a pattern to unbox something during
pattern matching.
Closes #661
2011-07-13 11:11:43 +02:00
Marijn Haverbeke
6cb5c0980a
box patterns, expect for the trans part
2011-07-13 10:50:16 +02:00
Marijn Haverbeke
6914d32acc
Do not allow moving out of obj fields, properly check move inits
...
Closes #591
2011-07-13 10:23:13 +02:00
Patrick Walton
729fa81d3b
Revert "rustc: Remove some exterior vectors from ty.rs"
...
This reverts commit 01ea0647bb9773f44a8100c461af30046c3293aa.
2011-07-12 18:47:26 -07:00
Patrick Walton
6390c43dc4
Revert "rustc: Remove exterior vectors from resolve"
...
This reverts commit 0ffe8c81c31f00e7a032d88d5397930fefbfc97f.
2011-07-12 18:42:58 -07:00
Patrick Walton
79ee267ef4
rustc: Remove the last few exterior vectors from typeck
2011-07-12 18:41:27 -07:00
Patrick Walton
f7ba28573f
rustc: Remove a few scattered uses of exterior vectors from typestate
2011-07-12 18:34:22 -07:00
Patrick Walton
0ffe8c81c3
rustc: Remove exterior vectors from resolve
2011-07-12 18:29:03 -07:00
Patrick Walton
01ea0647bb
rustc: Remove some exterior vectors from ty.rs
2011-07-12 18:21:50 -07:00
Patrick Walton
cdda0fd6d6
rustc: Remove some useless std::vec imports
2011-07-12 18:07:12 -07:00