To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 2978ec91 authored by Isaac Gariano's avatar Isaac Gariano
Browse files

Revert "Formating"

This reverts commit a72984a8
parent a72984a8
......@@ -295,7 +295,7 @@ fn emit_muir_dot_inner(file: &mut File, f_name: String, f_content: &FunctionCont
vec_utils::as_str(&enable_dest.get_arguments(&ops))
).unwrap();
}
Return(_) | Throw(_) | ThreadExit | TailCall(_) | SwapStackKill { .. } => {}
Return(_) | Throw(_) | ThreadExit | TailCall(_) | SwapStackKill {..} => {}
_ => {
panic!("unexpected terminating instruction: {}", inst);
......
......@@ -234,8 +234,7 @@ impl CompilerPass for GenMovPhi {
}
Instruction_::Watchpoint { .. } => unimplemented!(),
Instruction_::WPBranch { .. } => unimplemented!(),
Instruction_::SwapStackExc { .. } |
Instruction_::SwapStackKill { .. } => unimplemented!(),
Instruction_::SwapStackExc { .. } | Instruction_::SwapStackKill { .. } => unimplemented!(),
Instruction_::ExnInstruction { .. } => unimplemented!(),
_ => {
trace!("no rewrite");
......
......@@ -182,8 +182,13 @@ pub struct NodeKeepaliveClause {
#[derive(Debug)]
pub enum NodeCurrentStackClause {
RetWith { id: MuID, rettys: Vec<MuTypeNode> },
KillOld { id: MuID }
RetWith {
id: MuID,
rettys: Vec<MuTypeNode>
},
KillOld {
id: MuID,
}
}
#[derive(Debug)]
......@@ -193,7 +198,10 @@ pub enum NodeNewStackClause {
tys: Vec<MuTypeNode>,
vars: Vec<MuVarNode>
},
ThrowExc { id: MuID, exc: MuVarNode }
ThrowExc {
id: MuID,
exc: MuVarNode
}
}
#[derive(Debug)]
......
This diff is collapsed.
......@@ -75,20 +75,18 @@ pub struct VM {
name_id_map: RwLock<HashMap<MuName, MuID>>, // +64
/// types declared to the VM
types: RwLock<HashMap<MuID, P<MuType>>>, // +120
/// Ref types declared by 'make_strong_type', the key is the ID of the Referant
ref_types: RwLock<HashMap<MuID, P<MuType>>>,
/// types that are resolved as BackendType
backend_type_info: RwLock<HashMap<MuID, Box<BackendType>>>,
backend_type_info: RwLock<HashMap<MuID, Box<BackendType>>>, // +176
/// constants declared to the VM
constants: RwLock<HashMap<MuID, P<Value>>>,
constants: RwLock<HashMap<MuID, P<Value>>>, // +232
/// globals declared to the VM
globals: RwLock<HashMap<MuID, P<Value>>>,
globals: RwLock<HashMap<MuID, P<Value>>>, // +288
/// function signatures declared
func_sigs: RwLock<HashMap<MuID, P<MuFuncSig>>>,
func_sigs: RwLock<HashMap<MuID, P<MuFuncSig>>>, // +400
/// functions declared to the VM
funcs: RwLock<HashMap<MuID, RwLock<MuFunction>>>,
funcs: RwLock<HashMap<MuID, RwLock<MuFunction>>>, // +456
/// primordial function that is set to make boot image
primordial: RwLock<Option<PrimordialThreadInfo>>,
primordial: RwLock<Option<PrimordialThreadInfo>>, // +568
/// current options for this VM
pub vm_options: VMOptions, // +624
......@@ -131,7 +129,6 @@ unsafe impl rodal::Dump for VM {
dumper.dump_object(&self.id_name_map);
dumper.dump_object(&self.name_id_map);
dumper.dump_object(&self.types);
dumper.dump_object(&self.ref_types);
dumper.dump_object(&self.backend_type_info);
dumper.dump_object(&self.constants);
dumper.dump_object(&self.globals);
......@@ -216,7 +213,6 @@ impl<'a> VM {
name_id_map: RwLock::new(HashMap::new()),
constants: RwLock::new(HashMap::new()),
types: RwLock::new(HashMap::new()),
ref_types: RwLock::new(HashMap::new()),
backend_type_info: RwLock::new(HashMap::new()),
globals: RwLock::new(HashMap::new()),
global_locations: RwLock::new(hashmap!{}),
......@@ -793,27 +789,6 @@ impl<'a> VM {
}
}
pub fn make_strong_type(&self, ty: P<MuType>) -> P<MuType> {
match &ty.v {
&MuType_::WeakRef(ref t) => {
let res = self.ref_types
.read()
.unwrap()
.get(&t.id())
.map(|x| x.clone());
match res {
Some(ty) => ty,
None => {
let ty = P(MuType::new(self.next_id(), MuType_::muref(t.clone())));
self.ref_types.write().unwrap().insert(t.id(), ty.clone());
ty
}
}
}
_ => ty.clone()
}
}
/// adds a new bundle into VM.
/// This function will drain the contents of all arguments. Ideally, this function should
/// happen atomically. e.g. The client should not see a new type added without also seeing
......
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