Skip to content

Rollup of 15 pull requests #30883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Jan 14, 2016
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cf23dae
We actually require python 2.7
steveklabnik Dec 29, 2015
416267f
Derive Hash for Duration
sfackler Jan 11, 2016
30779d4
rustdoc: remove dead link from issue-less unstable entries.
wheals Jan 11, 2016
757f57b
Add set_oom_handler and use it print a message when out of memory
Amanieu Jan 9, 2016
5fb15d0
Replace --show-span with -Z show-span
kraai Jan 12, 2016
cb3999c
switch from syscall(2) to getentropy(2)
semarie Dec 23, 2015
4689595
HW_AVAILCPU is unavailable under openbsd
semarie Dec 23, 2015
a545eac
make siginfo_si_addr() returns a usize
semarie Dec 23, 2015
667ee8a
openbsd has dirent d_namlen field now
semarie Dec 23, 2015
59df1d8
Fix the Debug impl of PhantomData requiring Sized on T
tomaka Jan 12, 2016
965b0bf
Issue 30530: initialize allocas for `Datum::to_lvalue_datum_in_scope`.
pnkfelix Jan 8, 2016
cec7280
debug instrumentation (can remove)
pnkfelix Jan 8, 2016
e3abc3c
Don't use dropflag hints when the type is dropless
jonas-schievink Jan 12, 2016
fb82398
Remove dead `InternalBufWriter` implementation
ranma42 Jan 12, 2016
b6cc099
Add some examples to std::string
steveklabnik Jan 7, 2016
a8514d3
resolve: use arena allocation instead of reference counting for `Modu…
jseyfried Jan 11, 2016
f251ff4
bug fixes for issues 30018 and 30822.
pnkfelix Jan 11, 2016
df1283c
Unit/regression tests for issues #29092, #30018, #30530, #30822.
pnkfelix Jan 11, 2016
8168765
Factored out private routine for emitting LLVM lifetime intrinsic calls.
pnkfelix Jan 12, 2016
7706e23
revise lifetime handling for alloca's that are initialized as "dropped."
pnkfelix Jan 12, 2016
decc286
add doc for new `fn alloc_ty_init`.
pnkfelix Jan 12, 2016
98bef2b
Add missing newline character to callers of dumb_print
Amanieu Jan 9, 2016
40f06b4
Rollup merge of #30626 - steveklabnik:gh30618, r=luqmana
Manishearth Jan 13, 2016
6581563
Rollup merge of #30770 - steveklabnik:gh30345, r=brson
Manishearth Jan 13, 2016
6f4ede4
Rollup merge of #30801 - Amanieu:oom_print, r=alexcrichton
Manishearth Jan 13, 2016
3e248aa
Rollup merge of #30818 - sfackler:duration-hash, r=alexcrichton
Manishearth Jan 13, 2016
9036c82
Rollup merge of #30823 - pnkfelix:put-back-alloca-zeroing-for-issue-3…
Manishearth Jan 13, 2016
98c7519
Rollup merge of #30828 - wheals:fix-dead-links, r=steveklabnik
Manishearth Jan 13, 2016
4ff1d20
Rollup merge of #30835 - kraai:show-span, r=sanxiyn
Manishearth Jan 13, 2016
837a8de
Rollup merge of #30837 - semarie:openbsd-libc, r=alexcrichton
Manishearth Jan 13, 2016
2484884
Rollup merge of #30839 - tomaka:debug-phantomdata, r=nikomatsakis
Manishearth Jan 13, 2016
6ceaa2f
Rollup merge of #30850 - ranma42:cleanup-io, r=alexcrichton
Manishearth Jan 13, 2016
e51de04
Rollup merge of #30851 - jonas-schievink:unneeded-dropflags, r=pnkfelix
Manishearth Jan 13, 2016
1246f43
Rollup merge of #30863 - jseyfried:no_rc, r=eddyb
Manishearth Jan 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't use dropflag hints when the type is dropless
  • Loading branch information
jonas-schievink committed Jan 12, 2016
commit e3abc3cfe746c0ab078f33bc4566f6fb9773f489
21 changes: 16 additions & 5 deletions src/librustc_trans/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,7 @@ pub fn init_function<'a, 'tcx>(fcx: &'a FunctionContext<'a, 'tcx>,
// Create the drop-flag hints for every unfragmented path in the function.
let tcx = fcx.ccx.tcx();
let fn_did = tcx.map.local_def_id(fcx.id);
let tables = tcx.tables.borrow();
let mut hints = fcx.lldropflag_hints.borrow_mut();
let fragment_infos = tcx.fragment_infos.borrow();

Expand All @@ -1588,12 +1589,22 @@ pub fn init_function<'a, 'tcx>(fcx: &'a FunctionContext<'a, 'tcx>,
let (var, datum) = match info {
ty::FragmentInfo::Moved { var, .. } |
ty::FragmentInfo::Assigned { var, .. } => {
let datum = seen.get(&var).cloned().unwrap_or_else(|| {
let datum = make_datum(var);
seen.insert(var, datum.clone());
datum
let opt_datum = seen.get(&var).cloned().unwrap_or_else(|| {
let ty = tables.node_types[&var];
if fcx.type_needs_drop(ty) {
let datum = make_datum(var);
seen.insert(var, Some(datum.clone()));
Some(datum)
} else {
// No drop call needed, so we don't need a dropflag hint
None
}
});
(var, datum)
if let Some(datum) = opt_datum {
(var, datum)
} else {
continue
}
}
};
match info {
Expand Down