WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit ef19bc34 authored by qinsoon's avatar qinsoon
Browse files

[wip] more debugging info

parent 9c0d8d0a
......@@ -763,7 +763,7 @@ impl Value {
}
}
const DISPLAY_TYPE : bool = false;
const DISPLAY_TYPE : bool = true;
const PRINT_ABBREVIATE_NAME: bool = true;
impl fmt::Debug for Value {
......
......@@ -66,22 +66,19 @@ pub fn emit_mu_types(vm: &VM) {
let hybrid_map = HYBRID_TAG_MAP.read().unwrap();
for ty in ty_guard.values() {
match ty.name() {
Some(name) => file.write_fmt(format_args!("{} = ", name)).unwrap(),
None => {}
}
if ty.is_struct() {
file.write_fmt(format_args!("{}", ty)).unwrap();
let struct_ty = struct_map.get(&ty.get_struct_hybrid_tag().unwrap()).unwrap();
file.write_fmt(format_args!(" -> {}\n", struct_ty)).unwrap();
file.write_fmt(format_args!(" {}\n", vm.get_backend_type_info(ty.id()))).unwrap();
} else if ty.is_hybrid() {
file.write_fmt(format_args!("{}", ty)).unwrap();
let hybrid_ty = hybrid_map.get(&ty.get_struct_hybrid_tag().unwrap()).unwrap();
file.write_fmt(format_args!(" -> {}\n", hybrid_ty)).unwrap();
file.write_fmt(format_args!(" {}\n", vm.get_backend_type_info(ty.id()))).unwrap();
} else {
file.write_fmt(format_args!("{}\n", ty)).unwrap();
// we only care about struct
}
}
}
......
......@@ -289,6 +289,21 @@ impl BackendTypeInfo {
}
}
use std::fmt;
impl fmt::Display for BackendTypeInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{} bytes ({} bytes aligned), ", self.size, self.alignment).unwrap();
if self.struct_layout.is_some() {
use utils::vec_utils;
let layout = self.struct_layout.as_ref().unwrap();
write!(f, "field offsets: ({})", vec_utils::as_str(layout)).unwrap();
}
Ok(())
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
pub enum RegGroup {GPR, FPR}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment