Skip to content
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

New scoping rules for safe destruction; not ready to land #20539

Closed
wants to merge 65 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
41771d3
keep factored out and early: bug fix to avoid hitting region resoluti…
pnkfelix Nov 28, 2014
315d181
add debug output for region_inference, gather_loans, mem_categorization.
pnkfelix Nov 25, 2014
7d599e1
Checkpoint pcwalton's dtor checker with `SafeDestructor` in enum `inf…
pnkfelix Oct 27, 2014
26a1144
add debug output to check_safey_of_destructor (just for drop-lts).
pnkfelix Nov 25, 2014
8489d3d
factored drop-checking code out into dropck module.
pnkfelix Nov 26, 2014
bda56d4
FIXME checkpoint pcwalton factoring out of `fn mem_categorization::sc…
pnkfelix Oct 27, 2014
1efff70
checkpoint pcwalton removal of `#[unsafe_destructor]` check.
pnkfelix Oct 27, 2014
6ca149c
checkpoint pcwalton test of new destructor static semantics.
pnkfelix Oct 27, 2014
7b475d3
Add `CodeExtent::Remainder` variant to track a suffix of a block.
pnkfelix Nov 25, 2014
079dab3
add debug output to gather_loans.
pnkfelix Nov 25, 2014
15b11e4
Add debug output to expr_use_visitor.
pnkfelix Nov 25, 2014
46bd59a
add debug output to regionck
pnkfelix Nov 25, 2014
2193a6e
add more debug instrumentation to mem_categorization.
pnkfelix Nov 25, 2014
f8ccbc0
instrument the new cat_expr calls that were added to middle::typeck::…
pnkfelix Nov 25, 2014
47dd7c5
more debug instrumentation in mem_categorization.
pnkfelix Nov 26, 2014
b459fe2
more debug instrumentation in regionck
pnkfelix Nov 26, 2014
587f300
"fix" pcwalton changes to avoid premature return from regionck::visit…
pnkfelix Nov 26, 2014
04003a4
region_inference: debug instrumentation of other sites where RegionRe…
pnkfelix Nov 28, 2014
bb5c3fa
regionck: bug fix to instrumentation I added in an earlier commit.
pnkfelix Nov 28, 2014
713d755
Add Closure variant to CodeExtent to lay foundation for special-case
pnkfelix Nov 28, 2014
f1fd35b
`fn constrain_region_for_destructor_safety`: Use `ReFunction` as
pnkfelix Nov 28, 2014
00cfcb5
REMOVE ME: annotate core::panicking to avoid a problem downstream in …
pnkfelix Nov 25, 2014
977bc4b
added libst2 as libstd stubs.
pnkfelix Nov 27, 2014
1c42d2d
re-add pipe::read impl to libst2.
pnkfelix Dec 9, 2014
c110f29
rustc::middle::borrowck::gather_loans::lifetime: revise debug instrum…
pnkfelix Dec 9, 2014
968be6f
rustc::middle::typeck::infer::region_inference add more debug instrum…
pnkfelix Dec 9, 2014
6e5fff0
rustc::middle::typeck::check::dropck remove source of ReFunction.
pnkfelix Dec 9, 2014
b9ebb3e
rustc::middle::region local check for trivial cyclic encl region scope.
pnkfelix Dec 9, 2014
b522963
rustc::middle::region added debug instrumentation to `fn ancestors_of`.
pnkfelix Dec 9, 2014
0e77b13
rustc::middle::region attempt to introduce CodeExtent::Closure and
pnkfelix Dec 9, 2014
b1d0a79
fixes for new rules for lifetimes and destructors.
pnkfelix Dec 13, 2014
b0b8cac
Added DestructionScope variant to CodeExtent, representing the area
pnkfelix Dec 13, 2014
ec5a321
improved descriptions and `.repr(tcx)` output for DestructionScope an…
pnkfelix Dec 13, 2014
b9b36cb
fix typo in comment in region_inference/mod.rs.
pnkfelix Dec 13, 2014
7540ac9
Switch to constructing DestructionScope rather than Misc in a number …
pnkfelix Dec 13, 2014
3333410
`debug!` instrumentation in rustc::middle::borrowck::check_loans.
pnkfelix Dec 13, 2014
9a8c11b
`debug!` instrumentation in rustc::middle::resolve_lifetime.
pnkfelix Dec 13, 2014
c453c3b
Removed `ty::ReFunction` from rustc::middle::typeck::check::dropck.
pnkfelix Dec 13, 2014
c0fe43f
insert DestructionScope and block Remainder into enclosing CodeExtent…
pnkfelix Dec 13, 2014
c87a033
FIXME loosened an assertion in `rustc_trans::trans::cleanup` to accou…
pnkfelix Dec 13, 2014
f5324d2
rustc::middle::typeck::check::wf debug instrumentation and a FIXME co…
pnkfelix Dec 13, 2014
5230f86
middle::resolve_lifetime: Map BlockScope to DestructionScope in `fn r…
pnkfelix Dec 15, 2014
5eae778
FIXME Fallout from changes to rules for lifetimes and Drop.
pnkfelix Dec 18, 2014
700cf12
Fix to earlier instrumentation: `loop_count` was not getting incremen…
pnkfelix Dec 18, 2014
ae0dadf
rustc stage2 bootstrap cleanup: Remove unused imports and bindings.
pnkfelix Dec 18, 2014
5dd63c1
Checkpoint: Refactored librustc_trans, avoid stack-crossing ref cycle.
pnkfelix Dec 19, 2014
4351a7b
librustc_trans: Accomodate new lifetime restrictions.
pnkfelix Dec 19, 2014
fc18f8b
librustdoc: Accomodate new lifetime restrictions.
pnkfelix Dec 19, 2014
f186759
Fixes for compile-fail/ tests in wake of destructor lifetime changes.
pnkfelix Dec 22, 2014
8df61aa
improve `compiletest` error message when path option missing.
pnkfelix Dec 22, 2014
a322029
FIXME some compiler error messages that are newly emitted in drop-lts…
pnkfelix Dec 22, 2014
2c02fd9
fix exponential time blowup on compile-fail/huge-struct.rs by keeping
pnkfelix Jan 4, 2015
ecf6a6c
libregex: accomodate new lifetime rules for droppable things.
pnkfelix Jan 4, 2015
73ae146
remove outdated test.
pnkfelix Jan 4, 2015
7695573
update flowgraph graphviz test output to include new destruction scopes.
pnkfelix Jan 4, 2015
31cec27
std::io::process test: ensure that `path_val` outlives the container …
pnkfelix Jan 4, 2015
f08a619
remove span_note output from dropck; at this point it is more noise t…
pnkfelix Jan 4, 2015
a63ae49
fallout from new scoping rules for destructors.
pnkfelix Jan 5, 2015
20372ae
make `record_encl_scope` pub to accommodate src/librustc_trans/test.rs
pnkfelix Jan 5, 2015
b79ed77
accommodate new scoping rules for destructors.
pnkfelix Jan 5, 2015
c134e3a
work-around for a wart in the current implementation of new destructo…
pnkfelix Jan 5, 2015
1a67901
remove the (temporary from the start) libst2 tree.
pnkfelix Jan 5, 2015
e392169
a new regression test discovered during bootstrapping.
pnkfelix Jan 5, 2015
5f07c00
more regression tests extracted while bootstrapping.
pnkfelix Jan 5, 2015
50c318a
placate `make tidy`
pnkfelix Jan 5, 2015
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
re-add pipe::read impl to libst2.
pnkfelix committed Dec 9, 2014
commit 1c42d2dbcd82f45cdf2d19a34ea2e0a0be7f9d44
13 changes: 12 additions & 1 deletion src/libst2/sys/unix/pipe.rs
Original file line number Diff line number Diff line change
@@ -73,7 +73,18 @@ impl UnixStream {
#[cfg(not(target_os = "linux"))]
fn lock_nonblocking<'a>(&'a self) -> Guard<'a> { unimplemented!() }

pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { unimplemented!() }
pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
let fd = self.fd();
let dolock = || self.lock_nonblocking();
let doread = |nb| unsafe {
let flags = if nb {c::MSG_DONTWAIT} else {0};
libc::recv(fd,
buf.as_mut_ptr() as *mut libc::c_void,
buf.len() as libc::size_t,
flags) as libc::c_int
};
read(fd, self.read_deadline, dolock, doread)
}

pub fn write(&mut self, buf: &[u8]) -> IoResult<()> { unimplemented!() }