Tim Chevalier
d68c5cc399
Use c_ulonglong now that it works in FFI, etc...
...
Annotate FIXMEs; remove obsolete FIXMEs; remove an unnecessary
PointerCast.
2012-06-07 15:13:35 -07:00
Tim Chevalier
dc77386494
Remove obsolete comment
...
This comment seems to be no longer relevant, since we do have
user-defined vector sizes now (and they don't use the T_vec type)
2012-06-07 15:13:35 -07:00
Tim Chevalier
88f03743b0
Comments only: annotate FIXMEs
2012-06-07 15:13:35 -07:00
Graydon Hoare
9ee0137018
Refactor reflect.rs, begin visiting type substructures.
2012-06-07 13:51:41 -07:00
Tim Chevalier
a494cc1598
Comments only: annotate FIXMEs
2012-06-07 13:49:01 -07:00
Tim Chevalier
b0f01727fe
Annotate FIXMEs in resolve
...
And fix one FIXME (use fk_ctor to visit a constructor)
2012-06-07 13:48:35 -07:00
Tim Chevalier
d8c16df153
Merge pull request #2523 from crabtw/freebsd
...
fix compiletest deadlock on freebsd
2012-06-07 09:25:34 -07:00
Jyun-Yan You
8f5f45bfe1
fix compiletest deadlock on freebsd
2012-06-07 16:38:10 +08:00
Brian Anderson
5f4837ad6a
core: Start on a stack walker
2012-06-06 23:39:56 -07:00
Brian Anderson
125552fb19
rustc: Add frame_address intrinsic
2012-06-06 23:39:56 -07:00
Brian Anderson
469ff08e64
rustc: Enable #[cfg(windows)] and #[cfg(unix)]
2012-06-06 23:39:09 -07:00
Brian Anderson
eed3a36511
rustc: Add 'target_family' to default configuration
2012-06-06 23:39:09 -07:00
Graydon Hoare
c56b8f8924
Remove unused middle::ty::sort_methods function.
2012-06-06 20:20:22 -07:00
Graydon Hoare
3251bd690e
Fix some copy-paste bugs in visit glue, un-xfail reflect-visit-type.
2012-06-06 19:38:56 -07:00
Tim Chevalier
f4fb0f9eea
Handle regions correctly in class ctors and dtors
...
Class ctors and dtors were always getting assigned the empty region
before, which meant a reference to the "self" region in a ctor argument
got resolved to a named region called "self" rather than the class's
self region, which led to a rather confusing error message as documented
in #2502 .
Closes #2502
2012-06-06 19:23:26 -07:00
Niko Matsakis
3b4cfdeee2
Merge remote-tracking branch 'mozilla/incoming'
...
Conflicts:
src/rustc/middle/tstate/auxiliary.rs
2012-06-06 19:00:34 -07:00
Niko Matsakis
ab8fa495d0
some (very little) work on commenting
2012-06-06 18:42:09 -07:00
Niko Matsakis
e8dfe179da
move tstate to dvec
2012-06-06 18:37:55 -07:00
Niko Matsakis
9be612f7ee
move resolve to dvec, remove unnecessary mut annotations
2012-06-06 18:37:52 -07:00
Niko Matsakis
594e01d007
add pure, copies to liveness
2012-06-06 18:37:46 -07:00
Niko Matsakis
7d17c2d87f
move check_const to dvec
2012-06-06 18:37:43 -07:00
Niko Matsakis
08520a1697
move borrowck to dvec, insert a few minor copies
2012-06-06 18:37:35 -07:00
Niko Matsakis
d9db4f02a4
move to dvec in metadata
2012-06-06 18:37:31 -07:00
Niko Matsakis
22cf4b9ac3
move test to dvec
2012-06-06 18:37:22 -07:00
Niko Matsakis
3bc42d5661
distinguish by-val passes of pointer and non-pointer things
2012-06-06 18:36:47 -07:00
Niko Matsakis
64c7897187
exempt unsafe ptrs from by-val checks
2012-06-06 18:36:42 -07:00
Michael Sullivan
d542e67827
Do some cleanup of the allocation code.
2012-06-06 18:26:47 -07:00
Tim Chevalier
32e448e0da
Change subtypes_require to handle class fields correctly
2012-06-06 15:45:49 -07:00
Tim Chevalier
5e8ef74e22
Revert "Revert "Forbid classes with no fields" due to test failures"
...
This reverts commit e56a6e8cb0
.
2012-06-06 15:08:24 -07:00
Tim Chevalier
a6c92f0a17
Revert "Revert "Merge pull request #2516 from mozilla/incoming" due to failures"
...
This reverts commit 9fae95860de510f6874810cf43efb83f101246ef.
2012-06-06 15:08:24 -07:00
Tim Chevalier
d5d7b3b921
Merge branch 'master' into really-really-to-snap
2012-06-06 12:47:34 -07:00
Brian Anderson
9975ad073a
rustc: Add comments about linking to libm
2012-06-06 12:46:19 -07:00
Jyun-Yan You
b54c76c832
fix link error
2012-06-06 12:45:56 -07:00
Patrick Walton
055158d051
Revert "Merge pull request #2516 from mozilla/incoming" due to failures
...
This reverts commit adb717b5fa
, reversing
changes made to aabf84cdd8
.
2012-06-06 11:39:19 -07:00
Tim Chevalier
fec3b91a3c
In reachability, visit class ctors
2012-06-05 21:17:16 -07:00
Tim Chevalier
8fd9986f0f
Forbid classes with no fields
...
Classes with no fields don't really make sense, so forbid them
(just as records with no fields aren't allowed). Closes #2509
2012-06-05 20:47:55 -07:00
Michael Sullivan
167d726183
Get rid of spill_map and associated infrastructure.
2012-06-05 17:33:30 -07:00
Michael Sullivan
868e3f9180
Don't try to keep locals off of the stack. Closes #2408 .
...
There were bugs in the code path for initialization of non-spilled
locals, the code-path is hit approximately never, and mem2reg can do
it for us.
I think this will let us kill spill_map.
2012-06-05 17:33:30 -07:00
Patrick Walton
49c6dac47a
rustc: Fix some more cyclic imports
2012-06-05 15:50:46 -07:00
Tim Chevalier
8972588583
Dereference classes with dtors only on a field access
...
A class with a dtor has a different representation (a pair of a bit field
and a pointer to the class itself), and previously, the trans code
was selecting out the second field on any reference to a variable whose
type was a class with a dtor. This turned out to be wrong in the case where
a closure captures a variable with such a type. Changed the code to only
insert the field selection on a class field access.
2012-06-05 15:11:33 -07:00
Tim Chevalier
ebde93861f
Allow classes with dtors to be used before declaration
...
get_item_val could generate an internal compiler error if a class with
a dtor was used before the class itself got translated, because it was
assuming that the dtor's node ID was always in the item_symbols table. Fixed
it to create a new symbol if necessary, and use it subsequently.
2012-06-05 15:11:33 -07:00
Brian Anderson
d3c641678e
rustc: Put uniques into addrspace 1
2012-06-05 14:03:25 -07:00
Michael Sullivan
e86214830a
Make "no implicit copies" diagnostics controllable through lint settings. Closes #2503 .
2012-06-04 20:44:58 -07:00
Michael Sullivan
6396e2c3c3
Make vecs implicitly copyable for all of our projects.
2012-06-04 19:53:30 -07:00
Michael Sullivan
01a6c713c3
Make vecs/strs not implicitly copyable by default, but make it configurable. Closes #2450 .
2012-06-04 19:53:30 -07:00
Michael Sullivan
a405ff9bf6
Fix lint's handling of multiple warn attributes...
2012-06-04 19:53:30 -07:00
Eric Holk
1e8f501343
Machine types are different from int/uint, etc (Issue #2187 )
2012-06-04 19:16:47 -07:00
Niko Matsakis
903033bb03
handle fixed-length vecs in borrowck categorization
2012-06-04 16:40:09 -07:00
Michael Sullivan
6d9dd055d1
Get rid of warnings from instantiating typarams with non-implicitly copyable types.
2012-06-04 16:35:32 -07:00
Michael Sullivan
4d5d43beae
Warn when invoking polymorphic functions with non copyable types. Closes #2466 .
2012-06-04 16:30:41 -07:00
Michael Sullivan
5a4e53487f
Heavily rework lint infrastructure. Split it into two passes: one that builds the table and one that does the checks. Build the table early and make session know about it fo reasy use.
2012-06-04 16:08:07 -07:00
Niko Matsakis
3c4baf694e
better support for classes with polymorphic methods
2012-06-04 11:46:23 -07:00
Michael Sullivan
7213274e57
Make how lint handles unknown warn directives configurable by lint (default to warn). Closes #2480 .
2012-06-04 09:54:03 -07:00
Michael Sullivan
9be94f6650
Provide mechanisms to inspect warning settings from outside lint.
2012-06-04 09:54:03 -07:00
Niko Matsakis
01b5777c8b
prohibit type parameters in native fns and other minor fixes
...
trans now can safely assert that it never sees a type param
2012-06-03 20:03:08 -07:00
Niko Matsakis
3f6e6532ac
make vec fns/methods take imm slices.
...
this also repairs the unsoundness in typing of unpack_slice,
which was silently converting a const ptr to an imm one.
2012-06-02 19:14:57 -07:00
Lindsey Kuper
7d0755529e
Add ty_var_integral (WIP on issue #1425 ).
2012-06-02 11:19:27 -07:00
Niko Matsakis
77c470d183
Allow rcvrs to be borrowed; check rcvrs in borrowck properly
2012-06-02 10:08:04 -07:00
Niko Matsakis
cfac9b6833
improve borrowck to handle some frankly rather tricky cases
...
- receivers of method calls are also borrowed
- by-val arguments are also borrowed (needs tests)
- assignment to components can interfere with loans
2012-06-02 10:08:04 -07:00
Tim Chevalier
14e3fdea9c
Check that classes are instantiable
...
that is, check that there aren't any mutually recursive cycles between
classes and other types
2012-06-01 20:40:35 -07:00
Tim Chevalier
79787833bb
Make sure classes with dtors are still sendable (but not copyable)
2012-06-01 20:40:35 -07:00
Tim Chevalier
475013fcb6
Comment only: fix typo
2012-06-01 20:40:35 -07:00
Tim Chevalier
facb5c08c6
Enforce rule that classes with dtors aren't copyable
...
The test for this is copy-a-resource.
2012-06-01 20:40:35 -07:00
Tim Chevalier
bc5cb4deb3
Change type_needs_drop to say that any class w/ a dtor needs a drop
...
This was preventing dtors from running for class types that didn't
have pointer fields.
2012-06-01 20:40:34 -07:00
Michael Sullivan
8f7364b26d
Don't try to compute kinds of fictitious types. Indicate a bug instead.
2012-06-01 17:58:40 -07:00
Niko Matsakis
6c6ad229a3
break up borrowck into modules and begin to document how it works
2012-06-01 10:50:19 -07:00
Michael Sullivan
e47962f6a9
Have lint build up a table of the warning settings on a per item basis for later use.
2012-05-31 19:07:24 -07:00
Michael Sullivan
d1a65da835
Time lint in the driver like every other pass, instead of in lint.
2012-05-31 19:07:24 -07:00
Michael Sullivan
af228711e5
Make lint properly deal with nested items. Closes #2473 .
2012-05-31 19:07:24 -07:00
Michael Sullivan
84adcb9806
Rework lint to copy lint mode maps when changing them.
2012-05-31 19:07:24 -07:00
Michael Sullivan
7b02f29d47
Switch lint over to using a smallintmap.
2012-05-31 18:38:42 -07:00
Michael Sullivan
3dfb174793
Remove some dead code from kind checking.
2012-05-31 18:38:42 -07:00
Brian Anderson
89aa28289b
rustc: Use fewer boxes in typestate
2012-05-31 16:20:58 -07:00
Niko Matsakis
c2ce2741a7
allow mutable vectors and so forth to be used as immutable slices
2012-05-31 15:07:09 -07:00
Eric Holk
0470abe1d2
Allow some resources to be considered const.
2012-05-31 13:55:54 -07:00
Kevin Cantu
7dcbaedd32
Rename librustsyntax to libsyntax
...
Per issue #2418 .
2012-05-31 11:15:00 -07:00
Brian Anderson
41b02b7c57
Merge remote-tracking branch 'brson/self-describing-uniques'
...
Conflicts:
src/snapshots.txt
2012-05-31 01:26:05 -07:00
Brian Anderson
151de909c1
rustc: Do less work still in typestate
2012-05-30 23:20:31 -07:00
Brian Anderson
4b7e40d817
rustc: Remove debug logging
2012-05-30 21:23:34 -07:00
Brian Anderson
a2bbdd3f52
rt: Remove upcall_shared_malloc/free/realloc
2012-05-30 21:23:34 -07:00
Brian Anderson
80dc2e11a1
rustc: Remove the last use of upcall_shared_malloc
2012-05-30 21:23:34 -07:00
Brian Anderson
54d42c4d74
rustc: Make trans handle self-describing strings
2012-05-30 21:23:34 -07:00
Brian Anderson
09a1b94907
Various changes for self-describing vecs
2012-05-30 21:23:34 -07:00
Brian Anderson
c6a23cddfb
rustc: Make unique closures use the new unique allocator
2012-05-30 21:23:34 -07:00
Brian Anderson
654f7e3086
rustc: Make unique boxes self-describing
2012-05-30 21:23:34 -07:00
Brian Anderson
45933ca485
rustc: Add some methods for trans for mallocing uniques
2012-05-30 21:23:34 -07:00
Brian Anderson
508ccca014
rt: Add upcall_exchange_malloc/free
2012-05-30 21:23:33 -07:00
Brian Anderson
6d37c90ce6
rustc: Remove tuplify_cbox_ty. Unused
2012-05-30 21:23:33 -07:00
Brian Anderson
02dde781eb
rustc: Don't typestate fns that don't have constrained function calls
2012-05-30 17:48:05 -07:00
Michael Sullivan
ea8d4d7f17
Properly sign extend array indexes. Closes #2468 .
2012-05-30 17:09:52 -07:00
Michael Sullivan
7fee392de5
Handle differing signedness in constant shifts. Closes #2426 .
2012-05-30 15:03:24 -07:00
Eric Holk
f49b891ce5
Include capture clauses when generating metadata.
...
This may fix the bug that's blocking Issue #2441 .
2012-05-30 12:03:51 -07:00
Niko Matsakis
1f4b3cfc36
zero out alloca for preserving values
...
conservatively do it always for now
2012-05-30 11:26:15 -07:00
Niko Matsakis
555492e427
port alt to dvec
2012-05-30 11:26:15 -07:00
Niko Matsakis
79b3dedac3
allow for loop bodies
2012-05-30 11:26:15 -07:00
Niko Matsakis
653a1f8781
integrate purity into type
2012-05-30 11:26:15 -07:00
Niko Matsakis
22a10f0e4a
refactor region manip. to remove redundancy, get closer to fn subtyping
...
also: remove "auto-mode-matching" for implemented interfaces, as it
is complex and interacts poorly with classes
cc #2263
2012-05-30 11:04:12 -07:00
Niko Matsakis
e6b9db0884
refactor region manipulation routines to eliminate duplication
...
fn subtyping is starting to work, but it's exposing bugs in the
code which checks for iface conformance, which doesn't properly
skolemize the self region
2012-05-30 11:04:12 -07:00
Michael Sullivan
b744f52620
Make heap closures always require a capture clause to capture mutable variables. Closes #2446 .
2012-05-30 10:46:22 -07:00
Brian Anderson
736ff34e8a
rustc: Move filesearch into metadata mod
...
It's not that related to metadata, but metadata needs it and it will
probably be useful for doing dynamic loading.
2012-05-29 20:38:49 -07:00