Michael Sullivan
f17ca3f73e
Some box cleanup that doesn't break the build.
2012-06-26 13:58:21 -07:00
Patrick Walton
481267299d
rustc: Make trans no longer insist that there be exactly one impl scope per module
...
Conflicts:
src/rustc/middle/trans/base.rs
2012-06-26 13:45:18 -07:00
Michael Sullivan
f85fbcb67f
Revert "Clean up a bunch of box related code."
...
This reverts commit bacf9e9887
.
2012-06-26 12:58:58 -07:00
Tim Chevalier
91e44ea056
Be a little more clever about calculating sizes for class types
...
We could try to calculate the size of a partially-converted class type,
and run into an LLVM error because we were trying to calculate the size
of a named struct whose fields hadn't yet be filled in. The issue can be
dodged by extending simplify_type to convert classes to isomorphic
structural records, just for the purposes of size calculations.
(for real this time) Closes #2718
2012-06-26 11:14:39 -07:00
Michael Sullivan
bacf9e9887
Clean up a bunch of box related code.
2012-06-26 10:03:10 -07:00
Eric Holk
b9d3ad0736
Getting rid of lots more vector +=. (issue #2719 )
2012-06-26 00:39:18 -07:00
Michael Sullivan
15b60ac56b
Comments only: fix some comments that got spurious /~s
2012-06-25 20:35:32 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Tim Chevalier
da470ff5b8
Merge
2012-06-25 13:29:41 -07:00
Tim Chevalier
25b8b35c57
Finish compare glue for classes
...
This tests == and !=. I don't know what <, >, etc. should do.
Closes #2601
2012-06-25 12:20:10 -07:00
Tim Chevalier
487cbf8e90
Remove resources
...
Also fixed shapes for classes with dtors, as well as handling
offsets for classes with dtors correctly in take glue.
Closes #2485
2012-06-24 15:09:57 -07:00
Eric Holk
26c11f7b50
Use must_have_lock instead of private functions. (Issue #2700 )
...
I hereby declare that messages sent from the same source arrive in order (Issue #2605 )
Removing FIXME, owned is the correct type here. (Issue #2704 )
Remove outdated FIXME (Issue #2703 )
Updating test for spawning native functions (Issue #2602 )
Removing bogus FIXME (Issue #2599 )
2012-06-22 15:14:42 -07:00
Tim Chevalier
21399dca12
Change resources to classes in libstd and rustc
2012-06-22 11:53:25 -07:00
Tim Chevalier
a141f58e9b
In reachability, traverse all classes that have dtors
...
since dtors always have external linkage
2012-06-21 21:46:12 -07:00
Graydon Hoare
312faf31df
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
2012-06-21 16:44:10 -07:00
Eric Holk
0e5cfd9f33
Move vector addition out of trans and into libcore.
2012-06-21 16:11:11 -07:00
Eric Holk
f8fa0a2437
Generate a temporary for assign_ops. Issue #2581
2012-06-21 16:11:10 -07:00
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