Michael Sullivan
393f739990
Rename upcall_malloc_dyn to just upcall_malloc.
2012-06-21 10:47:45 -07:00
Niko Matsakis
287f163136
Issue #2657 : track mutability of bindings, also prevent move from bindings
2012-06-21 09:45:01 -07:00
Tim Chevalier
b02172971f
Make trans give correct types to monomorphic dtors
...
Irritatingly, class dtors have a different type from resource
dtors (because class dtors have a self argument), and the monomorphic
case wasn't reflecting that. Fixed.
2012-06-20 20:12:14 -07:00
Tim Chevalier
6db7843f46
Monomorphize dtors correctly
...
The same dtor was getting re-used for different instances, which
didn't always work right. Fixed.
2012-06-20 20:12:14 -07:00
Brian Anderson
4dcf84e4f4
Remove bind. Issue #2189
2012-06-20 17:27:28 -07:00
Niko Matsakis
6e73e45e37
first steps to autoderef on method calls
2012-06-19 11:52:39 -07:00
Brian Anderson
1ec5a5c635
Add 'do' expressions
2012-06-18 17:42:30 -07:00
Michael Sullivan
30dd32d4db
Fix generation of str/@. Closes #2638 .
2012-06-18 15:54:37 -07:00
Michael Sullivan
797856cbde
Use unboxed vecs for string shape glue.
2012-06-18 15:54:37 -07:00
Niko Matsakis
b0e66a6f3b
Undo workaround for #2633 since it is fixed.
...
This reverts commit a14df270dc
.
Conflicts:
src/rustc/middle/trans/base.rs
2012-06-17 16:38:13 -07:00
Tim Chevalier
416b3bfea4
Comments only
2012-06-16 15:16:31 -07:00
Tim Chevalier
a14df270dc
Make move_val take its first argument by copy
...
Workaround for #2633 -- should allow changes on eholk's branch to
compile without segfaulting.
2012-06-16 14:30:20 -07:00
Michael Sullivan
6e63e2fd5f
Fix copying of fixed length vectors. Closes #2630 .
2012-06-15 15:31:19 -07:00
Eric Holk
56bd689767
Merge branch 'incoming' of github.com:mozilla/rust into newsnap
2012-06-14 21:03:41 -07:00
Eric Holk
8ab15c0266
Merge branch 'incoming' into newsnap
2012-06-14 20:36:16 -07:00
Lindsey Kuper
77e6573929
Further work on integer literal suffix inference ( #1425 )
...
In this commit:
* Change the lit_int_unsuffixed AST node to not carry a type, since
it doesn't need one
* Don't print "(unsuffixed)" when pretty-printing unsuffixed integer
literals
* Just print "I" instead of "(integral)" for integral type variables
* Set up trans to use the information that will be gathered during
typeck to construct the appropriate constants for unsuffixed int
literals
* Add logic for handling int_ty_sets in typeck::infer
* Clean up unnecessary code in typeck::infer
* Add missing mk_ functions to middle::ty
* Add ty_var_integral to a few of the type utility functions it was
missing from in middle::ty
2012-06-14 20:24:36 -07:00
Graydon Hoare
d953462d03
Complete a data visitor type that does proper pointer-walking.
2012-06-14 19:58:34 -07:00
Eric Holk
52c38ba886
Merge branch 'incoming' into newsnap
2012-06-14 19:36:22 -07:00
Patrick Walton
6969f0f2fc
Issue #2572 : (trans) Fix self-referential classes.
2012-06-14 18:51:31 -07:00
Tim Chevalier
dce5d6ab9c
whitespace
2012-06-14 18:46:10 -07:00
Michael Sullivan
af60716281
Get an initial implementation of boxed vectors working.
2012-06-14 18:01:05 -07:00
Graydon Hoare
aeb9a2b72c
Add zero check/fail paths on div/mod paths. Close #944 .
2012-06-14 15:39:24 -07:00
Tim Chevalier
c6462eec30
Comments only: annotate FIXMEs in reflect
2012-06-14 14:13:52 -07:00
Eric Holk
74d2f56f21
Adding move_val and move_val_init intrinsics.
2012-06-14 13:49:41 -07:00
Michael Sullivan
591b2802ff
Make trans only generate calls to the _dyn malloc upcalls, so we can get rid of the non dyn ones.
2012-06-13 18:00:17 -07:00
Tim Chevalier
6f95c79b95
Traverse types in reachability
...
Issue 2526 showed a test case where a library exported only a type
that was a synonym for a class. Because the class's destructor wasn't
getting marked as reachable, its linkage was wrongly getting set to
"internal". The solution is for reachability to traverse types.
Closes #2526 .
2012-06-13 11:57:01 -07:00
Brian Anderson
ce750a7dbc
Box AST idents
2012-06-13 11:30:45 -07:00
Michael Sullivan
bdd2000066
Some cleanup in tvec.
2012-06-13 11:17:02 -07:00
Tim Chevalier
aa9d2d88d3
Handle class destructors correctly in metadata
...
This allows destructors to be inlined, which is necessary since
classes can have both ty params and destructors.
2012-06-12 17:37:04 -07:00
Michael Sullivan
35dd717352
Simplify a bunch of trans functions to not need the rust type. Remove some PointerCasts.
2012-06-12 17:01:13 -07:00
Michael Sullivan
ccf4e8cf9a
Make vectors contain the right type descriptor. Closes #2536 .
2012-06-12 17:01:13 -07:00
Michael Sullivan
4f61dcb026
Introduce an unboxed_vec type
2012-06-12 17:01:13 -07:00
Michael Sullivan
e67b5b25a6
Introduce a SHAPE_UNBOXED_VEC shape in order to seperate out vector logic.
2012-06-12 17:01:13 -07:00
Tim Chevalier
72360970fc
Change trans::common::block to be a class
...
And replace trans::common::block_parent with option<block>. To handle
the recursive self-reference in the block_ class, I had to add a
newtype-like enum "block" which is equivalent to @block_ -- which due
to an interaction with borrowck, resulted in having to change a few
functions in trans::base to take their block argument in ++ mode,
irritatingly enough (but not that irritatingly, since we're supposed to
get rid of modes).
2012-06-12 14:55:44 -07:00
Graydon Hoare
9f3b12b6c6
Change llsize_real to use LLVMSizeOfTypeInBits. Add comments.
2012-06-11 18:34:24 -07:00
Lindsey Kuper
8467279fac
Add a new AST node for unsuffixed integer types.
2012-06-11 16:34:56 -07:00
Michael Sullivan
baf58a764b
Stop emitting type parameters in shape.rs.
2012-06-11 12:52:49 -07:00
Michael Sullivan
665ba3531d
Clean up tydesc declaration to make it clear what is unused.
2012-06-11 12:29:04 -07:00
Michael Sullivan
b22620624c
Get rid of a bunch of dead shape code. Closes #2552 .
2012-06-11 12:19:40 -07:00
Tim Chevalier
87d57e4919
Don't treat all class fields as mutable, except in trans
...
Closes #2550
2012-06-11 10:16:17 -07:00
Niko Matsakis
013fc92423
remove alias analysis and replace with borrowck
...
This reverts commit 7ef825bb60
.
2012-06-08 20:39:11 -07:00
Niko Matsakis
a628f7f47e
make ccx/tcx/sess methods on bcx pure
2012-06-08 20:39:10 -07:00
Lindsey Kuper
7c0fd858db
Get rid of little-used logging fns in util::common. Closes #2553 .
...
Also got rid of a bunch of commented-out logging statements and
generally cleaned up the logging situation, mostly in typestate.
2012-06-08 17:22:19 -07:00
Graydon Hoare
7a699852cb
Pass names of fields and variants when reflecting.
2012-06-08 16:41:38 -07:00
Graydon Hoare
d182c14247
Visit the substructure for classes and enums as well.
2012-06-08 15:36:02 -07:00
Niko Matsakis
fc9eadf75b
profile LLVM cleanup insns
2012-06-08 14:34:55 -07:00
Graydon Hoare
dc94ccc4a4
More work on reflect, only missing enum and class substructures.
2012-06-08 13:26:15 -07:00
Brian Anderson
7a74545e97
Convert reinterpret_cast + forget to 'transmute'
2012-06-08 10:58:46 -07:00
Brian Anderson
95b9d538b8
Use #[cfg(unix)] and #[cfg(windows)] everywhere
2012-06-07 22:28:00 -07:00
Brian Anderson
7ef825bb60
Revert "remove alias analysis and replace with borrowck"
...
18s perf regression compiling rustc with opts
This reverts commit 7f6ee0ce0d
.
2012-06-07 19:42:27 -07:00