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 5f59d00d authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano
Browse files

Modified swapstack IR

parent d0feec64
......@@ -656,7 +656,7 @@ pub fn estimate_insts_for_ir(inst: &Instruction) -> usize {
NewStack(_) | NewThread(_, _) | NewThreadExn(_, _) | NewFrameCursor(_) => 10,
ThreadExit => 10,
Throw(_) => 10,
SwapStack { .. } => 10,
SwapStackExpr { .. } | SwapStackExc { .. } | SwapStackKill { .. } => 10,
CommonInst_GetThreadLocal | CommonInst_SetThreadLocal(_) => 10,
CommonInst_Pin(_) | CommonInst_Unpin(_) => 10,
......
......@@ -307,7 +307,7 @@ fn dfs(cur: MuID, stack: &mut Vec<MuID>, visited: &mut Vec<MuID>, func: &mut MuF
// call
Call { ref resume, .. } |
CCall { ref resume, .. } |
SwapStack { ref resume, .. } |
SwapStackExc { ref resume, .. } |
ExnInstruction { ref resume, .. } => {
let ref normal = resume.normal_dest;
let ref exn = resume.exn_dest;
......
......@@ -216,7 +216,7 @@ fn emit_muir_dot_inner(file: &mut File, f_name: String, f_content: &FunctionCont
}
Call { ref resume, .. } |
CCall { ref resume, .. } |
SwapStack { ref resume, .. } |
SwapStackExc { ref resume, .. } |
ExnInstruction { ref resume, .. } => {
let ref normal = resume.normal_dest;
let ref exn = resume.exn_dest;
......@@ -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(_) => {}
Return(_) | Throw(_) | ThreadExit | TailCall(_) | SwapStackKill {..} => {}
_ => {
panic!("unexpected terminating instruction: {}", inst);
......
......@@ -234,7 +234,7 @@ impl CompilerPass for GenMovPhi {
}
Instruction_::Watchpoint { .. } => unimplemented!(),
Instruction_::WPBranch { .. } => unimplemented!(),
Instruction_::SwapStack { .. } => unimplemented!(),
Instruction_::SwapStackExc { .. } | Instruction_::SwapStackKill { .. } => unimplemented!(),
Instruction_::ExnInstruction { .. } => unimplemented!(),
_ => {
trace!("no rewrite");
......
......@@ -584,7 +584,7 @@ fn copy_inline_blocks(
&Instruction_::Watchpoint { .. } |
&Instruction_::WPBranch { .. } |
&Instruction_::SwapStack { .. } |
&Instruction_::SwapStackExc { .. } | // Should be safe, just inline it like a call...
&Instruction_::ExnInstruction { .. } => unimplemented!(),
_ => {
......
......@@ -181,25 +181,27 @@ pub struct NodeKeepaliveClause {
}
#[derive(Debug)]
pub struct NodeCscRetWith {
pub id: MuID,
pub rettys: Vec<MuVarNode>
}
#[derive(Debug)]
pub struct NodeCscKillOld {
pub id: MuID
pub enum NodeCurrentStackClause {
RetWith {
id: MuID,
rettys: Vec<MuTypeNode>
},
KillOld {
id: MuID,
}
}
#[derive(Debug)]
pub struct NodeNscPassValues {
pub id: MuID,
pub tys: Vec<MuTypeNode>,
pub vars: Vec<MuVarNode>
}
#[derive(Debug)]
pub struct NodeNscThrowExc {
pub id: MuID,
pub exc: MuVarNode
pub enum NodeNewStackClause {
PassValues {
id: MuID,
tys: Vec<MuTypeNode>,
vars: Vec<MuVarNode>
},
ThrowExc {
id: MuID,
exc: MuVarNode
}
}
#[derive(Debug)]
......
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