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