Erick Tryzelaar
9c80cf548a
rustc: Remove ty::arg
2013-05-14 20:10:45 -07:00
Erick Tryzelaar
191fdda46a
rustc: minor cleanup
2013-05-14 20:10:45 -07:00
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Patrick Walton
5d3559e645
librustc: Make self
and static
into keywords
2013-05-12 16:35:18 -07:00
Björn Steinbrink
1393c3a3f4
Use a specialized string interner to reduce the need for owned strings
...
&str can be turned into @~str on demand, using to_owned(), so for
strings, we can create a specialized interner that accepts &str for
intern() and find() but stores and returns @~str.
2013-05-09 14:40:19 +02:00
Youngmin Yoo
c02064d153
librustc: rename vec::each(var) to var.each
2013-05-09 14:20:04 +09:00
Niko Matsakis
4300d4d2fa
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
...
Conflicts:
src/libcore/core.rc
src/libcore/hashmap.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/num.rs
src/libcore/num/strconv.rs
src/libcore/num/uint-template.rs
src/libcore/ops.rs
src/libcore/os.rs
src/libcore/prelude.rs
src/libcore/rt/mod.rs
src/libcore/unstable/lang.rs
src/librustc/driver/session.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/gather_loans.rs
src/librustc/middle/borrowck/loan.rs
src/librustc/middle/borrowck/preserve.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/region.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/inline.rs
src/librustc/middle/trans/reachable.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/regionck.rs
src/librustc/util/ppaux.rs
src/libstd/arena.rs
src/libstd/ebml.rs
src/libstd/json.rs
src/libstd/serialize.rs
src/libstd/std.rc
src/libsyntax/ast_map.rs
src/libsyntax/parse/parser.rs
src/test/compile-fail/borrowck-uniq-via-box.rs
src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs
src/test/run-pass/borrowck-nested-calls.rs
2013-05-05 15:11:04 -04:00
Niko Matsakis
0b0b8018a6
add warning for #6248 and remove instances of it
2013-05-05 12:17:59 -04:00
Daniel Ralston
c64471ab86
Add trait object field types to back/abi.rs, and use them
...
I've added trt_field_vtable, trt_field_box, and trt_field_tydesc, and
inserted them in place of the "magic numbers" used to access trait
object fields through GEPi().
2013-05-01 15:25:17 -07:00
Niko Matsakis
a896440ca1
new borrow checker (mass squash)
2013-04-30 06:59:32 -04:00
Patrick Walton
f30f54e9d0
librustc: Remove the concept of modes from the compiler.
...
This commit does not remove `ty::arg`, although that should be
possible to do now.
2013-04-29 14:30:55 -07:00
Daniel Micay
f792baba42
only use #[no_core] in libcore
2013-04-27 21:34:24 -04:00
Alex Crichton
1e4a439f7f
rustc: de-mode + fallout from libsyntax changes
2013-04-19 23:23:23 -04:00
Patrick Walton
f903ae9e72
librustc: Implement fast-ffi and use it in various places
2013-04-19 11:53:31 -07:00
Niko Matsakis
9963bd2413
Cleanup substitutions and treatment of generics around traits in a number of ways.
...
- In a TraitRef, use the self type consistently to refer to the Self type:
- trait ref in `impl Trait<A,B,C> for S` has a self type of `S`.
- trait ref in `A:Trait` has the self type `A`
- trait ref associated with a trait decl has self type `Self`
- trait ref associated with a supertype has self type `Self`
- trait ref in an object type `@Trait` has no self type
- Rewrite `each_bound_traits_and_supertraits` to perform
substitutions as it goes, and thus yield a series of trait refs
that are always in the same 'namespace' as the type parameter
bound given as input. Before, we left this to the caller, but
this doesn't work because the caller lacks adequare information
to perform the type substitutions correctly.
- For provided methods, substitute the generics involved in the provided
method correctly.
- Introduce TypeParameterDef, which tracks the bounds declared on a type
parameter and brings them together with the def_id and (in the future)
other information (maybe even the parameter's name!).
- Introduce Subst trait, which helps to cleanup a lot of the
repetitive code involved with doing type substitution.
- Introduce Repr trait, which makes debug printouts far more convenient.
Fixes #4183 . Needed for #5656 .
2013-04-09 08:06:10 -07:00
Niko Matsakis
d28f734412
Refactor so that references to traits are not represented using a type with a
...
bare function store (which is not in fact a kind of value) but rather
ty::TraitRef. Removes many uses of fail!() and other telltale signs of
type-semantic mismatch.
cc #4183 (not a fix, but related)
2013-04-05 05:36:02 -04:00
Niko Matsakis
0a0525e366
Pass around a pointer to the ty::method rather than the individual bits of info
2013-04-05 05:36:02 -04:00
Niko Matsakis
007abe9352
Rather than storing a list of ty::method per trait, store one ty::method
...
per method and list of def-ids per trait.
2013-04-05 05:36:02 -04:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Alex Crichton
be57d745d2
Removing unused imports
2013-03-28 23:56:46 -04:00
Niko Matsakis
aa67deff33
remove sty_by_ref, though traces still remain due to dtors
2013-03-27 07:09:16 -04:00
Alex Crichton
dbe1354321
Move ast_map::map to LinearMap
2013-03-26 19:21:05 -04:00
Alex Crichton
6f812fef1b
rustc: Remove uses of oldmap::HashMap
2013-03-26 19:21:04 -04:00
Niko Matsakis
3ca7c225e5
Stop writing directly to the final type/method/vtable sidetables from astconv
...
and from typeck, which is verboten. We are supposed to write inference results
into the FnCtxt and then these get copied over in writeback. Add assertions
that no inference by-products are added to this table.
Fixes #3888
Fixes #4036
Fixes #4492
2013-03-26 15:39:12 -04:00
Niko Matsakis
6f2783d515
Add various debug statements to trans that I used to help track down the
...
problem and which seem like they could be useful in the future.
2013-03-26 15:16:58 -04:00
Patrick Walton
4634f7edae
librustc: Remove all uses of static
from functions. rs=destatic
2013-03-22 10:27:39 -07:00
Alex Crichton
3fac7cce8f
rustc: Remove some bad copies throughout
2013-03-20 01:28:32 -04:00
Niko Matsakis
a6187c62e9
Make &self permit explicit lifetimes, but don't really use them
...
(this will be needed for snapshotting at some point).
2013-03-18 15:03:37 -04:00
Patrick Walton
24a0de4e7f
librustc: Separate out trait storage from evec/estr storage
2013-03-13 20:07:08 -07:00
Niko Matsakis
852619d5d7
Remove ++
mode from the compiler (it is parsed as +
mode)
...
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-13 17:00:09 -04:00
Niko Matsakis
6d764cc361
Make object types not implement associated trait. Fixes #5087 .
2013-03-06 11:02:19 -05:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00
Erick Tryzelaar
85fecd0ba7
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-03-01 07:01:48 -08:00
Niko Matsakis
4ecb672d7f
Remove legacy object creation mode, and convert remaining uses of it
2013-02-28 20:28:04 -05:00
Alex Crichton
2df07ddc25
Fix implicit leaks of imports throughout libraries
...
Also touch up use of 'pub' and move some tests around so the tested functions
don't have to be 'pub'
2013-02-28 18:00:34 -05:00
Erick Tryzelaar
3953bdd812
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-28 07:25:31 -08:00
Niko Matsakis
c623d21e38
Introduce lifetime declarations into the lists of type parameters.
...
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;
cc #4846
2013-02-27 19:42:09 -05:00
Erick Tryzelaar
7d0ec86c4a
Merge remote-tracking branch 'remotes/origin/incoming' into incoming
2013-02-27 11:03:21 -08:00
John Clements
ca147a029e
Change imported macros to use leaky modules rather than leaky functions.
2013-02-26 10:26:41 -08:00
Erick Tryzelaar
f14409c528
libsyntax: progress on making syntax::visit vecs_implicitly_copyable-free
2013-02-25 07:49:34 -08:00
Graydon Hoare
0309af458c
Put unique allocs in managed heap when they might contain managed boxes.
2013-02-21 23:01:17 -08:00
Luqman Aden
cd82c4566b
librustc: Get rid of structural records save for front/test.rs.
2013-02-20 18:45:50 -08:00
Erick Tryzelaar
68746cd4fb
librustc: change driver::session::Session::str_of to return @~str
2013-02-19 10:11:05 -08:00
Tim Chevalier
43dc67b74a
rustc: Less copy in trans, rs=removing copies
2013-02-18 15:53:37 -08:00
Nick Desaulniers
5d62a4a52e
Convert all uses of vec::slice to vec::view Issue #3869
...
Rename const_view to const_slice
Renamed mut_view to mut_slice
2013-02-14 16:14:32 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
Daniel Micay
a32c5c73ee
oldmap: get rid of legacy _ref suffixes
2013-02-08 19:12:51 -05:00
Niko Matsakis
a32498d846
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
...
correct handling of moves for struct-record update.
Part of #3678 . Fixes #2828 , #3904 , #4719 .
2013-02-07 05:53:30 -08:00
Patrick Walton
801f3225b2
oldmap: use &K instead of K in find and get
...
This reverts commit a4250a96fd
.
This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd
Revert "oldmap: use &K instead of K in find and get"
...
This reverts commit 8e643525d4
.
2013-02-05 14:30:53 -08:00