Patrick Walton
ce3d6339e0
rustc: Translate locals in DPS style
2011-07-18 18:28:36 -07:00
Patrick Walton
242ec22032
rustc: Remove obsolete TODO
2011-07-18 18:02:11 -07:00
Patrick Walton
07a68df3b7
rustc: Skip null when translating string concatenation
2011-07-18 18:00:45 -07:00
Patrick Walton
08eabde97b
rustc: First stab at implementing interior vector concat in the DPS engine
2011-07-18 17:43:24 -07:00
Lindsey Kuper
7d4903544e
Don't use 'obj_info' as an identifier for things not of type obj_info.
2011-07-18 17:05:41 -07:00
Lindsey Kuper
b6fc86ae5a
Sane error message for self-call in non-obj context. Closes #707 .
2011-07-18 15:58:36 -07:00
Brian Anderson
c40d6265ce
Support x86 stdcall convention
...
This allows rust to call the Win32 API
2011-07-18 13:56:15 -07:00
Patrick Walton
682875929e
rustc: Stub binary operator translation
2011-07-18 00:24:21 -07:00
Patrick Walton
437b776100
rustc: Simplify the destination format in the DPS backend; optimize aliases to interior strings to require no allocation at all
2011-07-17 22:30:13 -07:00
Patrick Walton
22db8b1d53
rustc: Use memmove instructions more aggressively in DPS mode. LLVM converts these to optimized block transfer instructions, significantly reducing code size.
2011-07-17 14:02:39 -07:00
Patrick Walton
652da4ca55
rustc: Implement immediates in the DPS engine; it should now always be at least as efficient as the original engine (and typically much more).
2011-07-16 10:54:12 -07:00
Patrick Walton
88574c3cea
rustc: Implement interior string logging in DPS
2011-07-15 18:37:57 -07:00
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
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
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
e76f44453b
rustc: First stab at interior string literals, untested as of yet
2011-07-14 11:47:20 -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
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
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