core: Un-legacy-export stackwalk, cmath
This commit is contained in:
@@ -3,16 +3,10 @@
|
|||||||
#[forbid(deprecated_mode)];
|
#[forbid(deprecated_mode)];
|
||||||
#[forbid(deprecated_pattern)];
|
#[forbid(deprecated_pattern)];
|
||||||
|
|
||||||
export c_float;
|
|
||||||
export c_double;
|
|
||||||
|
|
||||||
// uncomment once #1433 is fixed
|
// uncomment once #1433 is fixed
|
||||||
// FIXME (#1433): export c_float_math_consts;
|
// FIXME (#1433): export c_float_math_consts;
|
||||||
// FIXME (#1433): export c_double_math_consts;
|
// FIXME (#1433): export c_double_math_consts;
|
||||||
|
|
||||||
export c_float_targ_consts;
|
|
||||||
export c_double_targ_consts;
|
|
||||||
|
|
||||||
use libc::c_int;
|
use libc::c_int;
|
||||||
use libc::c_float;
|
use libc::c_float;
|
||||||
use libc::c_double;
|
use libc::c_double;
|
||||||
@@ -22,8 +16,7 @@ use libc::c_double;
|
|||||||
|
|
||||||
#[link_name = "m"]
|
#[link_name = "m"]
|
||||||
#[abi = "cdecl"]
|
#[abi = "cdecl"]
|
||||||
extern mod c_double {
|
pub extern mod c_double {
|
||||||
#[legacy_exports];
|
|
||||||
|
|
||||||
// Alpabetically sorted by link_name
|
// Alpabetically sorted by link_name
|
||||||
|
|
||||||
@@ -98,8 +91,7 @@ extern mod c_double {
|
|||||||
|
|
||||||
#[link_name = "m"]
|
#[link_name = "m"]
|
||||||
#[abi = "cdecl"]
|
#[abi = "cdecl"]
|
||||||
extern mod c_float {
|
pub extern mod c_float {
|
||||||
#[legacy_exports];
|
|
||||||
|
|
||||||
// Alpabetically sorted by link_name
|
// Alpabetically sorted by link_name
|
||||||
|
|
||||||
@@ -167,36 +159,34 @@ extern mod c_float {
|
|||||||
|
|
||||||
// FIXME obtain machine float/math constants automatically (Issue #1986)
|
// FIXME obtain machine float/math constants automatically (Issue #1986)
|
||||||
|
|
||||||
mod c_float_targ_consts {
|
pub mod c_float_targ_consts {
|
||||||
#[legacy_exports];
|
pub const radix: uint = 2u;
|
||||||
const radix: uint = 2u;
|
pub const mantissa_digits: uint = 24u;
|
||||||
const mantissa_digits: uint = 24u;
|
pub const digits: uint = 6u;
|
||||||
const digits: uint = 6u;
|
pub const min_exp: uint = -125u;
|
||||||
const min_exp: uint = -125u;
|
pub const max_exp: uint = 128u;
|
||||||
const max_exp: uint = 128u;
|
pub const min_10_exp: int = -37;
|
||||||
const min_10_exp: int = -37;
|
pub const max_10_exp: int = 38;
|
||||||
const max_10_exp: int = 38;
|
|
||||||
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
|
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
|
||||||
// below.
|
// below.
|
||||||
const min_value: f32 = 1.175494e-38_f32;
|
pub const min_value: f32 = 1.175494e-38_f32;
|
||||||
const max_value: f32 = 3.402823e+38_f32;
|
pub const max_value: f32 = 3.402823e+38_f32;
|
||||||
const epsilon: f32 = 0.000000_f32;
|
pub const epsilon: f32 = 0.000000_f32;
|
||||||
}
|
}
|
||||||
|
|
||||||
mod c_double_targ_consts {
|
pub mod c_double_targ_consts {
|
||||||
#[legacy_exports];
|
pub const radix: uint = 2u;
|
||||||
const radix: uint = 2u;
|
pub const mantissa_digits: uint = 53u;
|
||||||
const mantissa_digits: uint = 53u;
|
pub const digits: uint = 15u;
|
||||||
const digits: uint = 15u;
|
pub const min_exp: uint = -1021u;
|
||||||
const min_exp: uint = -1021u;
|
pub const max_exp: uint = 1024u;
|
||||||
const max_exp: uint = 1024u;
|
pub const min_10_exp: int = -307;
|
||||||
const min_10_exp: int = -307;
|
pub const max_10_exp: int = 308;
|
||||||
const max_10_exp: int = 308;
|
|
||||||
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
|
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
|
||||||
// below.
|
// below.
|
||||||
const min_value: f64 = 2.225074e-308_f64;
|
pub const min_value: f64 = 2.225074e-308_f64;
|
||||||
const max_value: f64 = 1.797693e+308_f64;
|
pub const max_value: f64 = 1.797693e+308_f64;
|
||||||
const epsilon: f64 = 2.220446e-16_f64;
|
pub const epsilon: f64 = 2.220446e-16_f64;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -340,9 +340,7 @@ mod rt;
|
|||||||
mod unicode;
|
mod unicode;
|
||||||
#[legacy_exports]
|
#[legacy_exports]
|
||||||
mod private;
|
mod private;
|
||||||
#[legacy_exports]
|
|
||||||
mod cmath;
|
mod cmath;
|
||||||
#[legacy_exports]
|
|
||||||
mod stackwalk;
|
mod stackwalk;
|
||||||
|
|
||||||
// Local Variables:
|
// Local Variables:
|
||||||
|
|||||||
@@ -8,19 +8,19 @@ use cast::reinterpret_cast;
|
|||||||
use ptr::offset;
|
use ptr::offset;
|
||||||
use sys::size_of;
|
use sys::size_of;
|
||||||
|
|
||||||
type Word = uint;
|
pub type Word = uint;
|
||||||
|
|
||||||
struct Frame {
|
pub struct Frame {
|
||||||
fp: *Word
|
fp: *Word
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Frame(fp: *Word) -> Frame {
|
pub fn Frame(fp: *Word) -> Frame {
|
||||||
Frame {
|
Frame {
|
||||||
fp: fp
|
fp: fp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn walk_stack(visit: fn(Frame) -> bool) {
|
pub fn walk_stack(visit: fn(Frame) -> bool) {
|
||||||
|
|
||||||
debug!("beginning stack walk");
|
debug!("beginning stack walk");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user