Stuart Pernsteiner
428d5ac5b9
Revert "avoid redundant translation of items during monomorphization"
...
This reverts commit f97f65f7b7
.
Conflicts:
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/foreign.rs
src/librustc/middle/trans/monomorphize.rs
2014-08-12 16:14:27 -07:00
Luqman Aden
71e19d5286
librustc: Don't use an alloca per return if the function doesn't have nested returns.
2014-08-11 21:53:54 -07:00
Luqman Aden
68cbd6c929
librustc: Use separate stack slot for each return.
2014-08-11 19:20:10 -07:00
Stuart Pernsteiner
f97f65f7b7
avoid redundant translation of items during monomorphization
2014-07-30 12:07:26 -07:00
Luqman Aden
17256197a9
librustc: Use builder for llvm attributes.
2014-07-25 16:06:44 -07:00
Luqman Aden
ad27e2625a
librustc: Set enum discriminant only after field translation.
2014-07-18 11:58:45 -07:00
Patrick Walton
02adaca4dc
librustc: Implement unboxed closures with mutable receivers
2014-07-18 09:01:37 -07:00
Brian Anderson
3096d9bf94
rustc_llvm: Remove the inner llvm module
...
This makes it much saner for clients to use the library since
they don't have to worry about shadowing one llvm with another.
2014-07-14 12:27:08 -07:00
Richo Healey
12c334a77b
std: Rename the ToStr
trait to ToString
, and to_str
to to_string
.
...
[breaking-change]
2014-07-08 13:01:43 -07:00
Björn Steinbrink
f463a19cbc
Remove entry_bcx from FunctionContext
...
We no longer need to refer to the entry block from arbitrary places, so
we can drop it from FunctionContext.
2014-07-05 01:52:12 +02:00
Niko Matsakis
bc5eb7d98c
Stop passing around Option<&substs> in trans and just pass &substs, making the code more regular
2014-06-06 19:51:23 -04:00
Niko Matsakis
0f03b5608c
Move Def out of syntax crate, where it does not belong
2014-06-06 19:51:23 -04:00
Kevin Butler
09fc34066b
librustc: Fix snake case errors.
...
A number of functions/methods have been moved or renamed to align
better with rust standard conventions.
rustc:🔙 🔗 :WriteOutputFile => write_output_file
rustc::middle::ty::EmptyBuiltinBounds => empty_builtin_bounds
rustc::middle::ty::AllBuiltinBounds => all_builtin_bounds
rustc::middle::liveness::IrMaps => IrMaps::new
rustc::middle::liveness::Liveness => Liveness::new
rustc::middle::resolve::NameBindings => NameBindings::new
rustc::middle::resolve::PrimitiveTypeTable => PrimitiveTypeTable::new
rustc::middle::resolve::Resolver => Resolver::new
rustc::middle::trans::datum::Datum => Datum::new
rustc::middle::trans::datum::DatumBlock => DatumBlock::new
rustc::middle::trans::datum::Rvalue => Rvalue::new
rustc::middle::typeck::infer::new_ValsAndBindings => ::infer::unify::ValsAndBindings::new
rustc::middle::typeck::infer::region_inference::RegionVarBindings => RegionVarBindings::new
[breaking-change]
2014-05-30 17:55:42 +01:00
Alex Crichton
42aed6bde2
std: Remove format_strbuf!()
...
This was only ever a transitionary macro.
2014-05-28 08:35:41 -07:00
Richo Healey
553074506e
core: rename strbuf::StrBuf to string::String
...
[breaking-change]
2014-05-24 21:48:10 -07:00
Luqman Aden
3cae434f5c
librustc: Consolidate the attribute handling for tagging function arguments and returns.
2014-05-23 22:32:30 -04:00
Patrick Walton
36195eb91f
libstd: Remove ~str
from all libstd
modules except fmt
and str
.
2014-05-22 14:42:01 -07:00
Patrick Walton
6559a3675e
librustc: Remove all uses of ~str
from librustc.
2014-05-12 11:28:57 -07:00
Nick Cameron
37ca36783c
Reorganise driver code.
...
The goal of this refactoring is to make the rustc driver code easier to understand and use. Since this is as close to an API as we have, I think it is important that it is nice. On getting stuck in, I found that there wasn't as much to change as I'd hoped to make the stage... fns easier to use by tools.
This patch only moves code around - mostly just moving code to different files, but a few extracted method refactorings too. To summarise the changes: I added driver::config which handles everything about configuring the compiler. driver::session now just defines and builds session objects. I moved driver code from librustc/lib.rs to librustc/driver/mod.rs so all the code is one place. I extracted methods to make emulating the compiler without being the compiler a little easier. Within the driver directory, I moved code around to more logically fit in the modules.
2014-05-11 11:08:01 +12:00
Nick Cameron
5854811082
Refactor rslt
to Result::new
2014-05-03 23:14:56 +12:00
Niko Matsakis
96dfed2b62
Pre-step towards issue #12624 and others: Introduce ExprUseVisitor, remove the
...
moves computation. ExprUseVisitor is a visitor that walks the AST for a
function and calls a delegate to inform it where borrows, copies, and moves
occur.
In this patch, I rewrite the gather_loans visitor to use ExprUseVisitor, but in
future patches, I think we could rewrite regionck, check_loans, and possibly
other passes to use it as well. This would refactor the repeated code between
those places that tries to determine where copies/moves/etc occur.
2014-04-24 19:59:49 -04:00
Eduard Burtescu
3fbc57894a
rustc: de-@ param_substs.
2014-04-22 19:06:56 +03:00
Joseph Crail
809f13ea94
Fix misspellings in comments.
2014-04-21 00:49:39 -04:00
Richo Healey
919889a1d6
Replace all ~"" with "".to_owned()
2014-04-18 17:25:34 -07:00
Eduard Burtescu
9d570ad8c1
rustc: remove the last mentions of @fn.
2014-04-11 18:03:16 +03:00
Eduard Burtescu
402d946868
rustc: fix fallout from removing ast::Sigil and use ty::TraitStore in ty::ClosureTy.
2014-04-11 18:03:10 +03:00
Eduard Burtescu
2d22243b0c
rustc: remove ty_unboxed_vec.
2014-04-06 14:05:32 +03:00
Erick Tryzelaar
7bcfe2ee10
std: Remove RefCell::get()
...
It's surprising that `RefCell::get()` is implicitly doing a clone
on a value. This patch removes it and replaces all users with
either `.borrow()` when we can autoderef, or `.borrow().clone()`
when we cannot.
2014-04-03 20:28:55 -07:00
Marvin Löbel
6200e761f0
Changed iter::Extendable
and iter::FromIterator
to take a Iterator
by value
2014-03-25 21:49:55 +01:00
Alex Crichton
3fb1ed0e04
rustc: Remove all usage of manual deref()
...
Favor using '*' instead
2014-03-22 08:48:34 -07:00
Alex Crichton
0dbb909bf7
rustc: Fix fallout of removing get()
2014-03-22 08:48:20 -07:00
Alex Crichton
da3625161d
Removing imports of std::vec_ng::Vec
...
It's now in the prelude.
2014-03-20 09:30:14 -07:00
Daniel Micay
14f656d1a7
rename std::vec_ng -> std::vec
...
Closes #12771
2014-03-20 04:25:32 -04:00
Eduard Burtescu
0bb6de3076
De-@ move maps and rework parts of trans.
2014-03-17 09:53:08 +02:00
Eduard Burtescu
6c42ef31dc
De-@ trans contexts.
2014-03-17 09:53:07 +02:00
Eduard Burtescu
9b1fee898f
De-@ ty::ctxt usage.
2014-03-17 09:53:06 +02:00
Eduard Burtescu
4fae06824c
De-@ Session usage.
2014-03-17 09:53:06 +02:00
Eduard Burtescu
cdc18b96d6
Remove Rc's borrow method to avoid conflicts with RefCell's borrow in Rc<RefCell<T>>.
2014-03-13 14:21:45 +02:00
Felix S. Klock II
43c07244b3
librustc: Fix up fallout from the automatic conversion.
2014-03-08 21:41:32 +01:00
Patrick Walton
3b6e9d4a7a
librustc: Automatically change uses of ~[T]
to Vec<T>
in rustc.
2014-03-08 21:24:27 +01:00
Michael Woerister
1938e87393
debuginfo: Re-introduce the notion of line-table-only debuginfo.
2014-03-06 07:57:18 +01:00
Eduard Burtescu
a02b10a062
Refactored ast_map and friends, mainly to have Paths without storing them.
2014-02-14 08:43:29 +02:00
Eduard Burtescu
54760b9f27
Removed ty_type (previously used to represent *tydesc).
2014-02-12 14:17:06 +02:00
Alex Crichton
071ee96277
Consolidate codegen-related compiler flags
...
Move them all behind a new -C switch. This migrates some -Z flags and some
top-level flags behind this -C codegen option.
The -C flag takes values of the form "-C name=value" where the "=value" is
optional for some flags.
Flags affected:
* --llvm-args => -C llvm-args
* --passes => -C passes
* --ar => -C ar
* --linker => -C linker
* --link-args => -C link-args
* --target-cpu => -C target-cpu
* --target-feature => -C target-fature
* --android-cross-path => -C android-cross-path
* --save-temps => -C save-temps
* --no-rpath => -C no-rpath
* -Z no-prepopulate => -C no-prepopulate-passes
* -Z no-vectorize-loops => -C no-vectorize-loops
* -Z no-vectorize-slp => -C no-vectorize-slp
* -Z soft-float => -C soft-float
* -Z gen-crate-map => -C gen-crate-map
* -Z prefer-dynamic => -C prefer-dynamic
* -Z no-integrated-as => -C no-integrated-as
As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g
or --debuginfo flag.
* -Z debug-info => removed
* -Z extra-debug-info => -g or --debuginfo
Closes #9770
Closes #12000
2014-02-10 00:50:39 -08:00
Huon Wilson
f8734df515
rustc: remove use of @[].
2014-02-02 02:59:03 +11:00
Niko Matsakis
81d8328517
Introduce marker types for indicating variance and for opting out
...
of builtin bounds.
Fixes #10834 .
Fixes #11385 .
cc #5922 .
2014-01-31 21:18:48 -05:00
Eduard Burtescu
e81ab4198c
Removed take_glue from tydesc, inlining the equivalent refcount increment code instead.
2014-01-27 22:32:30 +02:00
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
Salem Talha
cc61fc0994
Removed all instances of XXX in preparation for relaxing of FIXME rule
2014-01-26 14:42:53 -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