Patrick Walton
adce35acd4
rustc: Use polymorphic logging
2011-08-10 14:35:12 -07:00
Patrick Walton
8e6e6f5f89
rustc: Make iter_structural_ty_full and friends take one value, not two. Shaves a second off codegen.
2011-08-09 18:31:14 -07:00
Patrick Walton
044b16ad68
rustc: Remove the code to generate cmp glue
2011-08-09 18:31:13 -07:00
Graydon Hoare
a5997f2eb2
Actually perform handoff from caller to callee on move-mode args.
2011-08-09 17:56:26 -07:00
Patrick Walton
865ca749dc
rustc: Use shapes instead of codegen'd cmp glue
2011-08-09 17:02:17 -07:00
Lindsey Kuper
5d9680fc7e
Move object-system-related trans stuff to its own file.
2011-08-09 16:42:55 -07:00
Erick Tryzelaar
00ccd6ba42
Remove support for the ivec T[] syntax.
2011-08-09 15:53:26 -07:00
Erick Tryzelaar
8b15045224
Port the compiler to the ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Lindsey Kuper
d5c8bb9d86
A little backwarding cleanup/refactoring.
2011-08-09 11:19:24 -07:00
Lindsey Kuper
a334adaab9
Thread "self" through the stack. Backwarding! Closes #702 .
2011-08-09 10:59:13 -07:00
Michael Sullivan
059c66b9f7
Don't bother zeroing out slots in cleanups.
2011-08-08 16:17:09 -07:00
Graydon Hoare
b54e7e4506
Add new arg-passing mode 'move' denoted with '-T'. Translate as pass-by-value, doesn't deinit source yet nor get proper analysis in typestate, alias passes.
2011-08-08 15:53:41 -07:00
Paul Stansifer
a9471d8296
Revert "rustc: bzero in zero_alloca. Shaves off a second or three."
...
This causes trouble in Valgrind in drop glue in parsing.
This reverts commit 4d180793f0 .
2011-08-05 16:38:49 -07:00
Eric Holk
b62e80c1f0
Atomic ref counting for chans.
2011-08-05 15:27:28 -07:00
Patrick Walton
59e9b629c0
Revert "rustc: Introduce the concept of inline to the AST"
...
This reverts commit 9b9170f9fe .
2011-08-05 11:38:06 -07:00
Patrick Walton
9b9170f9fe
rustc: Introduce the concept of inline to the AST
2011-08-05 11:33:48 -07:00
Patrick Walton
a26c027731
Revert "rustc: Don't emit memset for non-structural types" due to crashes
...
This reverts commit 3d5a777fe1 .
2011-08-04 19:06:13 -07:00
Patrick Walton
3d5a777fe1
rustc: Don't emit memset for non-structural types
2011-08-04 18:24:57 -07:00
Michael Sullivan
66a255ac92
Add a cleanup for copying closures. Closes #804 .
2011-08-04 17:58:12 -07:00
Patrick Walton
6c0297cfe7
rustc: bzero in drop_slot
2011-08-04 16:47:20 -07:00
Lindsey Kuper
fcec628203
Enable creation of backwarding vtables (issue #702 ), but don't start
...
using them yet. Also, refactor process_fwding_mthd into separate
functions to handle backwarding and forwarding, and refactor
create_vtbl to be more digestible.
2011-08-04 16:40:17 -07:00
Patrick Walton
4d180793f0
rustc: bzero in zero_alloca. Shaves off a second or three.
2011-08-04 16:33:38 -07:00
Patrick Walton
ae3312002a
rustc: Use memmove in copy_ty. 45% LLVM codegen speed improvement.
2011-08-04 16:14:28 -07:00
Lindsey Kuper
d7d4b4fc38
trans_args no longer needs llobj argument.
2011-08-04 11:34:06 -07:00
Patrick Walton
2a3235b58c
rustc: Actually emit shapes
2011-08-04 11:25:46 -07:00
Patrick Walton
4061ca2bbd
rustc: Generate shapes
2011-08-04 10:46:10 -07:00
Lindsey Kuper
1b1d8e7b91
Killing an obsolete comment.
2011-08-03 20:03:05 -07:00
Lindsey Kuper
6df7c041bc
Pointer-ifying llenv. Step 1 of 2 steps to object system sanity.
2011-08-03 19:50:19 -07:00
Michael Sullivan
5d5a3ca52d
Fix trans_put to properly return (). Closes #773 .
2011-08-03 18:10:54 -07:00
Michael Sullivan
e33de59e47
Clean up how we deal with dynamic size function arguments/returns.
2011-08-03 14:24:41 -07:00
Michael Sullivan
7bcde7270d
Have trans_bind_thunk handle polymorphic but statically sized return values.
...
Closes #775 .
2011-08-03 14:24:41 -07:00
Tim Chevalier
001df3f0ca
Revert "Revert "Handle conditionals on _|_ - typed values correctly""
...
This reverts commit ea81c03960 .
Changed the case in trans_if where the conditional is _|_ - typed
but the block is terminated to return the result of the cond,
instead of nil.
This passes "make check" with optimization disabled as well as
enabled.
2011-08-03 13:07:41 -07:00
Brian Anderson
ea81c03960
Revert "Handle conditionals on _|_ - typed values correctly"
...
This reverts commit 13f8b3f2a6 .
run-pass/if-ret.rs does not translate correctly when unoptimized. Issue #797
2011-08-03 10:48:52 -07:00
Tim Chevalier
13f8b3f2a6
Handle conditionals on _|_ - typed values correctly
...
Closes #776
2011-08-02 18:34:44 -07:00
Tim Chevalier
7c34550931
Make _|_ type binopable
...
But don't actually generate code that does the operation. That means
hoisting the check I added in my last commit from trans_compare
up into trans_eager_binop (don't generate any code if one operand
has type _|_ ).
Closes #777
2011-08-02 18:06:46 -07:00
Tim Chevalier
731797d075
In trans, don't assume both sides of a binop have the same type
...
This was at least partially responsible for Issue 777.
The only solution I can think of is for trans to just not generate
code for a comparison if one or both sides has type _|_. Since
that means evaluating that subexpression diverges, it should be ok
to never do the comparison. Actually generating code for the
comparison would trip an LLVM assertion failure.
2011-08-02 17:36:41 -07:00
Lindsey Kuper
430a28bb49
Refactor: a backwarding vtable can only have one kind of method.
2011-08-02 16:59:49 -07:00
Lindsey Kuper
48467c4faa
Comment tweaks and re-flows.
2011-08-02 16:53:31 -07:00
Michael Sullivan
f371482593
Consolidate environment building/loading between closure types.
2011-08-02 16:30:56 -07:00
Michael Sullivan
4cf4e17e1d
Track the node_id of the function in trans_common::fn_ctxt.
2011-08-02 16:30:56 -07:00
Michael Sullivan
f8b0d3d7d2
Use GEPi a bunch.
2011-08-02 16:26:00 -07:00
Tim Chevalier
40c1b864c6
Use or-patterns in trans::trans_compare, eliminating a FIXME
2011-08-02 13:17:59 -07:00
Marijn Haverbeke
78a0d380cc
Do not try to save block result when the block is an iter body
...
Closes #791
2011-08-02 14:28:32 +02:00
Marijn Haverbeke
f8fa574864
Copy locals created by destructuring on the content of a box
...
This is required so that assigning to these locals doesn't clobber
the content of the box.
(A possible optimization would be to only do this copying for
locals that actually are assigned to.)
2011-08-02 12:09:15 +02:00
Paul Stansifer
fcc32797de
Fix incorrect uses of str::buf()
2011-08-01 18:51:56 -07:00
Michael Sullivan
7a05f1db7c
Fix closures over dynamically-sized polymorphic values.
2011-08-01 15:19:55 -07:00
Michael Sullivan
601c299d52
Fix closures over known-size polymorphic values.
2011-08-01 15:18:44 -07:00
Michael Sullivan
a32f287c8a
Add a GEPi function that wraps GEP with integer arguments.
2011-08-01 15:18:44 -07:00
Marijn Haverbeke
985c32ef4c
Partially implement destructuring locals
...
You can now say
let {bcx, val} = some_result_returner();
Similar for loop variables. Assigning to such variables is not safe
yet. Function arguments also remain a TODO.
2011-08-01 17:51:37 +02:00
Tim Chevalier
2971cfb145
Remove unused imports
2011-07-31 00:06:25 -07:00