Skip to content

Commit

Permalink
Purge borrowck from libstd
Browse files Browse the repository at this point in the history
This hasn't been in use since `@mut` was removed
  • Loading branch information
alexcrichton committed Jan 21, 2014
1 parent 57f8073 commit a880777
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 271 deletions.
220 changes: 0 additions & 220 deletions src/libstd/rt/borrowck.rs

This file was deleted.

3 changes: 0 additions & 3 deletions src/libstd/rt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ mod util;
// Global command line argument storage
pub mod args;

// Support for dynamic borrowck
pub mod borrowck;

/// The default error code of the rust runtime if the main task fails instead
/// of exiting cleanly.
pub static DEFAULT_ERROR_CODE: int = 101;
Expand Down
8 changes: 0 additions & 8 deletions src/libstd/rt/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ use option::{Option, Some, None};
use prelude::drop;
use result::{Result, Ok, Err};
use rt::Runtime;
use rt::borrowck::BorrowRecord;
use rt::borrowck;
use rt::local::Local;
use rt::local_heap::LocalHeap;
use rt::rtio::LocalIo;
Expand All @@ -52,8 +50,6 @@ pub struct Task {
death: Death,
destroyed: bool,
name: Option<SendStr>,
// Dynamic borrowck debugging info
borrow_list: Option<~[BorrowRecord]>,

logger: Option<~Logger>,
stdout: Option<~Writer>,
Expand Down Expand Up @@ -93,7 +89,6 @@ impl Task {
death: Death::new(),
destroyed: false,
name: None,
borrow_list: None,
logger: None,
stdout: None,
stderr: None,
Expand Down Expand Up @@ -182,9 +177,6 @@ impl Task {

unsafe { (*handle).unwinder.try(try_block); }

// Cleanup the dynamic borrowck debugging info
borrowck::clear_task_borrow_list();

// Here we must unsafely borrow the task in order to not remove it from
// TLS. When collecting failure, we may attempt to send on a channel (or
// just run aribitrary code), so we must be sure to still have a local
Expand Down
40 changes: 0 additions & 40 deletions src/libstd/unstable/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use c_str::ToCStr;
use libc::{c_char, size_t, uintptr_t};
use rt::borrowck;

#[cold]
#[lang="fail_"]
Expand Down Expand Up @@ -42,42 +41,3 @@ pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
pub unsafe fn local_free(ptr: *c_char) {
::rt::local_heap::local_free(ptr);
}

#[lang="borrow_as_imm"]
#[inline]
pub unsafe fn borrow_as_imm(a: *u8, file: *c_char, line: size_t) -> uint {
borrowck::borrow_as_imm(a, file, line)
}

#[lang="borrow_as_mut"]
#[inline]
pub unsafe fn borrow_as_mut(a: *u8, file: *c_char, line: size_t) -> uint {
borrowck::borrow_as_mut(a, file, line)
}

#[lang="record_borrow"]
pub unsafe fn record_borrow(a: *u8, old_ref_count: uint,
file: *c_char, line: size_t) {
borrowck::record_borrow(a, old_ref_count, file, line)
}

#[lang="unrecord_borrow"]
pub unsafe fn unrecord_borrow(a: *u8, old_ref_count: uint,
file: *c_char, line: size_t) {
borrowck::unrecord_borrow(a, old_ref_count, file, line)
}

#[lang="return_to_mut"]
#[inline]
pub unsafe fn return_to_mut(a: *u8, orig_ref_count: uint,
file: *c_char, line: size_t) {
borrowck::return_to_mut(a, orig_ref_count, file, line)
}

#[lang="check_not_borrowed"]
#[inline]
pub unsafe fn check_not_borrowed(a: *u8,
file: *c_char,
line: size_t) {
borrowck::check_not_borrowed(a, file, line)
}

0 comments on commit a880777

Please sign in to comment.