auto merge of #9908 : alexcrichton/rust/snapshots, r=thestinger
This commit is contained in:
commit
d773a024a2
@ -673,24 +673,6 @@ impl<'self> Formatter<'self> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
fn getcount(&mut self, cnt: &parse::Count) -> Option<uint> {
|
||||
match *cnt {
|
||||
parse::CountIs(n) => { Some(n) }
|
||||
parse::CountImplied => { None }
|
||||
parse::CountIsParam(i) => {
|
||||
let v = self.args[i].value;
|
||||
unsafe { Some(*(v as *util::Void as *uint)) }
|
||||
}
|
||||
parse::CountIsNextParam => {
|
||||
let v = self.curarg.next().unwrap().value;
|
||||
unsafe { Some(*(v as *util::Void as *uint)) }
|
||||
}
|
||||
parse::CountIsName(*) => unreachable!()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
fn getcount(&mut self, cnt: &rt::Count) -> Option<uint> {
|
||||
match *cnt {
|
||||
rt::CountIs(n) => { Some(n) }
|
||||
|
@ -48,27 +48,6 @@ pub struct Argument<'self> {
|
||||
|
||||
/// Specification for the formatting of an argument in the format string.
|
||||
#[deriving(Eq)]
|
||||
#[cfg(stage0)]
|
||||
pub struct FormatSpec<'self> {
|
||||
/// Optionally specified character to fill alignment with
|
||||
fill: Option<char>,
|
||||
/// Optionally specified alignment
|
||||
align: Alignment,
|
||||
/// Packed version of various flags provided
|
||||
flags: uint,
|
||||
/// The integer precision to use
|
||||
precision: Count,
|
||||
/// The string width requested for the resulting format
|
||||
width: Count,
|
||||
/// The descriptor string representing the name of the format desired for
|
||||
/// this argument, this can be empty or any number of characters, although
|
||||
/// it is required to be one word.
|
||||
ty: &'self str
|
||||
}
|
||||
|
||||
/// Specification for the formatting of an argument in the format string.
|
||||
#[deriving(Eq)]
|
||||
#[cfg(not(stage0))]
|
||||
pub struct FormatSpec<'self> {
|
||||
/// Optionally specified character to fill alignment with
|
||||
fill: Option<char>,
|
||||
@ -113,18 +92,6 @@ pub enum Flag {
|
||||
/// can reference either an argument or a literal integer.
|
||||
#[deriving(Eq)]
|
||||
#[allow(missing_doc)]
|
||||
#[cfg(stage0)]
|
||||
pub enum Count {
|
||||
CountIs(uint),
|
||||
CountIsParam(uint),
|
||||
CountIsName(&'static str), // not actually used, see stage1
|
||||
CountIsNextParam,
|
||||
CountImplied,
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[allow(missing_doc)]
|
||||
#[cfg(not(stage0))]
|
||||
pub enum Count<'self> {
|
||||
CountIs(uint),
|
||||
CountIsName(&'self str),
|
||||
@ -594,20 +561,6 @@ impl<'self> Parser<'self> {
|
||||
/// Parses a Count parameter at the current position. This does not check
|
||||
/// for 'CountIsNextParam' because that is only used in precision, not
|
||||
/// width.
|
||||
#[cfg(stage0)]
|
||||
fn count(&mut self) -> Count {
|
||||
match self.integer() {
|
||||
Some(i) => {
|
||||
if self.consume('$') {
|
||||
CountIsParam(i)
|
||||
} else {
|
||||
CountIs(i)
|
||||
}
|
||||
}
|
||||
None => { CountImplied }
|
||||
}
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
fn count(&mut self) -> Count<'self> {
|
||||
match self.integer() {
|
||||
Some(i) => {
|
||||
|
@ -34,16 +34,6 @@ pub struct Argument<'self> {
|
||||
method: Option<&'self Method<'self>>
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
pub struct FormatSpec {
|
||||
fill: char,
|
||||
align: parse::Alignment,
|
||||
flags: uint,
|
||||
precision: parse::Count,
|
||||
width: parse::Count,
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
pub struct FormatSpec {
|
||||
fill: char,
|
||||
align: parse::Alignment,
|
||||
@ -52,7 +42,6 @@ pub struct FormatSpec {
|
||||
width: Count,
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
pub enum Count {
|
||||
CountIs(uint), CountIsParam(uint), CountIsNextParam, CountImplied,
|
||||
}
|
||||
|
@ -367,16 +367,6 @@ impl<'self> TyVisitor for ReprVisitor<'self> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
fn visit_evec_slice(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
|
||||
do self.get::<raw::Slice<()>> |this, s| {
|
||||
this.writer.write(['&' as u8]);
|
||||
this.write_mut_qualifier(mtbl);
|
||||
this.write_vec_range(s.data, s.len, inner);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
fn visit_evec_slice(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
|
||||
do self.get::<raw::Slice<()>> |this, s| {
|
||||
this.writer.write(['&' as u8]);
|
||||
|
@ -172,7 +172,6 @@ pub trait TyVisitor {
|
||||
|
||||
extern "rust-intrinsic" {
|
||||
/// Abort the execution of the process.
|
||||
#[cfg(not(stage0))]
|
||||
pub fn abort() -> !;
|
||||
|
||||
/// Atomic compare and exchange, sequentially consistent.
|
||||
|
@ -975,22 +975,6 @@ pub trait ImmutableVector<'self, T> {
|
||||
|
||||
impl<'self,T> ImmutableVector<'self, T> for &'self [T] {
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
fn slice(&self, start: uint, end: uint) -> &'self [T] {
|
||||
assert!(start <= end);
|
||||
assert!(end <= self.len());
|
||||
do self.as_imm_buf |p, _len| {
|
||||
unsafe {
|
||||
cast::transmute(Slice {
|
||||
data: ptr::offset(p, start as int),
|
||||
len: (end - start) * sys::nonzero_size_of::<T>(),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
fn slice(&self, start: uint, end: uint) -> &'self [T] {
|
||||
assert!(start <= end);
|
||||
assert!(end <= self.len());
|
||||
@ -1149,14 +1133,6 @@ impl<'self,T> ImmutableVector<'self, T> for &'self [T] {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
fn as_imm_buf<U>(&self, f: &fn(*T, uint) -> U) -> U {
|
||||
let s = self.repr();
|
||||
f(s.data, s.len / sys::nonzero_size_of::<T>())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
fn as_imm_buf<U>(&self, f: &fn(*T, uint) -> U) -> U {
|
||||
let s = self.repr();
|
||||
f(s.data, s.len)
|
||||
@ -1944,22 +1920,6 @@ pub trait MutableVector<'self, T> {
|
||||
|
||||
impl<'self,T> MutableVector<'self, T> for &'self mut [T] {
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
fn mut_slice(self, start: uint, end: uint) -> &'self mut [T] {
|
||||
assert!(start <= end);
|
||||
assert!(end <= self.len());
|
||||
do self.as_mut_buf |p, _len| {
|
||||
unsafe {
|
||||
cast::transmute(Slice {
|
||||
data: ptr::mut_offset(p, start as int) as *T,
|
||||
len: (end - start) * sys::nonzero_size_of::<T>()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
fn mut_slice(self, start: uint, end: uint) -> &'self mut [T] {
|
||||
assert!(start <= end);
|
||||
assert!(end <= self.len());
|
||||
@ -2052,14 +2012,6 @@ impl<'self,T> MutableVector<'self, T> for &'self mut [T] {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
fn as_mut_buf<U>(self, f: &fn(*mut T, uint) -> U) -> U {
|
||||
let Slice{ data, len } = self.repr();
|
||||
f(data as *mut T, len / sys::nonzero_size_of::<T>())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
fn as_mut_buf<U>(self, f: &fn(*mut T, uint) -> U) -> U {
|
||||
let Slice{ data, len } = self.repr();
|
||||
f(data as *mut T, len)
|
||||
@ -2151,22 +2103,6 @@ pub mod raw {
|
||||
* not bytes).
|
||||
*/
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
pub unsafe fn buf_as_slice<T,U>(p: *T,
|
||||
len: uint,
|
||||
f: &fn(v: &[T]) -> U) -> U {
|
||||
f(cast::transmute(Slice {
|
||||
data: p,
|
||||
len: len * sys::nonzero_size_of::<T>()
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* Form a slice from a pointer and length (as a number of units,
|
||||
* not bytes).
|
||||
*/
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub unsafe fn buf_as_slice<T,U>(p: *T,
|
||||
len: uint,
|
||||
f: &fn(v: &[T]) -> U) -> U {
|
||||
@ -2181,22 +2117,6 @@ pub mod raw {
|
||||
* not bytes).
|
||||
*/
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
pub unsafe fn mut_buf_as_slice<T,U>(p: *mut T,
|
||||
len: uint,
|
||||
f: &fn(v: &mut [T]) -> U) -> U {
|
||||
f(cast::transmute(Slice {
|
||||
data: p as *T,
|
||||
len: len * sys::nonzero_size_of::<T>()
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* Form a slice from a pointer and length (as a number of units,
|
||||
* not bytes).
|
||||
*/
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub unsafe fn mut_buf_as_slice<T,U>(p: *mut T,
|
||||
len: uint,
|
||||
f: &fn(v: &mut [T]) -> U) -> U {
|
||||
|
@ -1,3 +1,11 @@
|
||||
S 2013-10-16 6c08cc2
|
||||
freebsd-x86_64 03caf882078eff9b4e04d116732b41a3cdfc260f
|
||||
linux-i386 ce30bb90434e9eb9920028a5408e1f986ba2ad5d
|
||||
linux-x86_64 58b1d58a9bf4f0cd11ab479e84f6167cb623cd7a
|
||||
macos-i386 9efd28f2eabbc60f507f023faa4f20f3b87aab17
|
||||
macos-x86_64 5f877e0593925d488591e6f0386f4db9b76d2e34
|
||||
winnt-i386 ca2b4d24e992dc3178c5cde648305d5bc5c11676
|
||||
|
||||
S 2013-10-10 8015f9c
|
||||
freebsd-x86_64 e63594f61d24bec15bc6fa2401fbc76d3651a743
|
||||
linux-i386 7838768d94ba17866ac1e880b896372f08cb48e9
|
||||
|
Loading…
x
Reference in New Issue
Block a user