retool inline encoding to handle methods, fix tests

This commit is contained in:
Niko Matsakis
2012-03-01 10:36:22 -08:00
parent 12c68bcd6d
commit def72bda47
17 changed files with 596 additions and 404 deletions

View File

@@ -20,12 +20,15 @@ native mod rustrt {
fn unsupervise();
fn shape_log_str<T>(t: *sys::type_desc, data: T) -> str;
fn rust_set_exit_status(code: ctypes::intptr_t);
fn rust_frame_address() -> ctypes::uintptr_t;
}
#[abi = "rust-intrinsic"]
native mod rusti {
fn get_type_desc<T>() -> *type_desc;
// Invokes __builtin_frame_address().
// See <http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html>.
fn frame_address(n: ctypes::c_uint) -> ctypes::uintptr_t;
}
/*
@@ -78,10 +81,6 @@ fn log_str<T>(t: T) -> str {
rustrt::shape_log_str(get_type_desc::<T>(), t)
}
fn frame_address() -> uint {
rustrt::rust_frame_address()
}
#[doc(
brief = "Sets the process exit code",
desc = "Sets the exit code returned by the process if all supervised \