Eduard Burtescu
15ba0c310a
Demote self to an (almost) regular argument and remove the env param.
...
Fixes #10667 and closes #10259 .
2014-01-27 14:31:24 +02:00
Niko Matsakis
5e7657fafb
Distinguish zero-size types from those that we return as void
2014-01-16 19:10:17 -05:00
Niko Matsakis
4b52d899ff
Further refine treatment of voidish arrays
2014-01-16 16:29:52 -05:00
Niko Matsakis
14b0abfd82
Consider all zero-sized data structures to be voidish, bypassing some "quirky" parts of LLVM (see e.g. LLVM bug 9900) but also generating better code
2014-01-16 15:11:22 -05:00
Niko Matsakis
419ac4a1b8
Issue #3511 - Rationalize temporary lifetimes.
...
Major changes:
- Define temporary scopes in a syntax-based way that basically defaults
to the innermost statement or conditional block, except for in
a `let` initializer, where we default to the innermost block. Rules
are documented in the code, but not in the manual (yet).
See new test run-pass/cleanup-value-scopes.rs for examples.
- Refactors Datum to better define cleanup roles.
- Refactor cleanup scopes to not be tied to basic blocks, permitting
us to have a very large number of scopes (one per AST node).
- Introduce nascent documentation in trans/doc.rs covering datums and
cleanup in a more comprehensive way.
2014-01-15 18:34:38 -05:00
Daniel Micay
6809b172e0
remove borrow_offset
as ~ is now free of headers
2014-01-14 22:01:44 -05:00
Daniel Micay
0e885e42b1
remove reference counting headers from ~
...
Unique pointers and vectors currently contain a reference counting
header when containing a managed pointer.
This `{ ref_count, type_desc, prev, next }` header is not necessary and
not a sensible foundation for tracing. It adds needless complexity to
library code and is responsible for breakage in places where the branch
has been left out.
The `borrow_offset` field can now be removed from `TyDesc` along with
the associated handling in the compiler.
Closes #9510
Closes #11533
2014-01-14 22:01:40 -05:00
Eduard Burtescu
08ac616d37
Use the right type for self in methods and remove obsoleted items.
...
Fixes #7411 , #10615 .
2014-01-11 16:40:23 +02:00
Eduard Burtescu
7a305f9e83
Removed free_glue from tydesc (the code is still generated, but inlined in drop_glue).
2014-01-11 16:40:23 +02:00
Eduard Burtescu
5ad2a7825b
Removed obsolete 'e' prefix on ty_evec and ty_estr.
2014-01-11 16:40:23 +02:00
Eduard Burtescu
6b221768cf
libsyntax: Renamed types, traits and enum variants to CamelCase.
2014-01-09 22:25:28 +02:00
Patrick Walton
5e637a890c
librustc: Move block contexts into per-function arenas, and
...
stack-allocate function contexts.
2014-01-07 17:00:47 -08:00
Patrick Walton
88281290ff
librustc: Remove @mut
support from the typechecker and borrow checker
2014-01-03 14:02:01 -08:00
Patrick Walton
cc0584731a
librustc: De-@mut
the def map.
...
This is the last `@mut` in `librustc` that does not depend on libsyntax.
2013-12-26 15:54:37 -08:00
Patrick Walton
9f6706975b
librustc: De-@mut
fn_stats
in the stats
2013-12-26 15:54:36 -08:00
Patrick Walton
e84f79feb1
librustc: De-@mut
llvm_insns
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
8c3a552ac5
librustc: Remove the unused llvm_insn_ctxt
from the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
97ceac7377
librustc: De-@mut
n_llvm_insns
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
21e4e410a9
librustc: De-@mut
n_closures
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
c010d08cd5
librustc: De-@mut
n_inlines
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
8c7804ffac
librustc: De-@mut
n_monos
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
38572f4981
librustc: De-@mut
n_fns
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
16828bb1dc
librustc: De-@mut
n_real_glues
2013-12-26 15:54:35 -08:00
Patrick Walton
75efa0725d
librustc: De-@mut
n_null_glues
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
26d1394767
librustc: De-@mut
n_glues_created
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
091bfa9cc3
librustc: De-@mut
n_static_tydescs
in the stats
2013-12-26 15:54:35 -08:00
Patrick Walton
e9b9c828b1
librustc: De-@mut
the various glues in the type descriptor info
2013-12-26 15:54:32 -08:00
Patrick Walton
abbee6decd
librustc: De-@mut
ScopeInfo
2013-12-26 15:54:32 -08:00
Patrick Walton
8728b09e78
librustc: De-@mut
ScopeInfo::landing_pad
2013-12-26 15:54:32 -08:00
Patrick Walton
7acaa73377
librustc: De-@mut
ScopeInfo::cleanup_paths
2013-12-26 15:54:32 -08:00
Patrick Walton
89a85e45c5
librustc: De-@mut
ScopeInfo::cleanups
2013-12-26 15:54:32 -08:00
Patrick Walton
8ae01fc0ae
librustc: De-@mut
the translation FunctionContext
2013-12-26 15:54:30 -08:00
Patrick Walton
7437a56f3b
librustc: De-@mut
FunctionContext::entry_bcx
2013-12-26 15:54:30 -08:00
Patrick Walton
05e57db348
librustc: De-@mut
FunctionContext::personality
2013-12-26 15:54:30 -08:00
Patrick Walton
cd5168b7cd
librustc: De-@mut
FunctionContext::llself
2013-12-26 15:54:30 -08:00
Patrick Walton
bd6a2236e1
librustc: De-@mut
FunctionContext::llreturn
2013-12-26 15:54:29 -08:00
Patrick Walton
a07cee26a4
librustc: De-@mut
FunctionContext::alloca_insert_pt
2013-12-26 15:54:29 -08:00
Patrick Walton
5b0401f0e8
librustc: De-@mut
FunctionContext::llretptr
2013-12-26 15:54:29 -08:00
Patrick Walton
d7392bd3ae
librustc: De-@mut
FunctionContext::llenv
2013-12-26 15:54:29 -08:00
Patrick Walton
82f5a380a4
librustc: De-@mut
llargs
and lllocals
in the function context
2013-12-26 15:54:28 -08:00
Patrick Walton
7ffba5c3e1
librustc: De-@mut
llupvars
in the translation crate context
2013-12-26 13:01:29 -08:00
Patrick Walton
4fe1cb1aff
librustc: De-@mut
the vtable map
2013-12-26 13:01:28 -08:00
Patrick Walton
b941677ea3
librustc: De-@mut
the crate context
2013-12-26 13:01:26 -08:00
Patrick Walton
2418cc0212
librustc: De-@mut
the crate context's do_not_commit_warning_issued
2013-12-26 13:01:26 -08:00
Patrick Walton
0e2041c54b
librustc: De-@mut
CrateContext::const_cstr_cache
.
2013-12-26 13:01:23 -08:00
Patrick Walton
c9432327c4
librustc: Change @mut Block
to @Block
.
2013-12-26 13:01:21 -08:00
Huon Wilson
17ac2aa523
std::str: replace .as_imm_buf with .as_ptr.
2013-12-19 10:18:02 +11:00
Huon Wilson
4c79b22ef2
std::vec: remove .as_imm_buf, replaced by .as_ptr & .len.
...
There's no need for the restrictions of a closure with the above methods.
2013-12-19 09:26:13 +11:00
Huon Wilson
164f7a290e
std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut [].
2013-12-15 23:37:41 +11:00
Alex Crichton
ab387a6838
Register new snapshots
2013-11-28 20:27:56 -08:00