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

Changed MuName and CName to Arc<String>

parent 2e8bb439
...@@ -37,7 +37,7 @@ gcc = "*" ...@@ -37,7 +37,7 @@ gcc = "*"
mu_ast = {path = "src/ast"} mu_ast = {path = "src/ast"}
mu_utils = {path = "src/utils"} mu_utils = {path = "src/utils"}
#mu_gc = {path = "src/gc"} #mu_gc = {path = "src/gc"}
rodal = { git = "https://gitlab.anu.edu.au/mu/rodal", version = ">= 0.0.5" } rodal = { git = "https://gitlab.anu.edu.au/mu/rodal", version = ">= 0.0.10" }
#rodal = { path = "../rodal_test/rodal", version = ">= 0.0.5" } #rodal = { path = "../rodal_test/rodal", version = ">= 0.0.5" }
libc="*" libc="*"
......
...@@ -25,6 +25,6 @@ mu_utils = {path = "../utils"} ...@@ -25,6 +25,6 @@ mu_utils = {path = "../utils"}
lazy_static = "*" lazy_static = "*"
log = "*" log = "*"
simple_logger = "*" simple_logger = "*"
rodal = { git = "https://gitlab.anu.edu.au/mu/rodal", version = ">= 0.0.5" } rodal = { git = "https://gitlab.anu.edu.au/mu/rodal", version = ">= 0.0.10" }
regex = "*" regex = "*"
#rodal = { path = "../../../rodal_test/rodal", version = ">= 0.0.5" } #rodal = { path = "../../../rodal_test/rodal", version = ">= 0.0.5" }
...@@ -22,21 +22,22 @@ use utils::LinkedHashSet; ...@@ -22,21 +22,22 @@ use utils::LinkedHashSet;
use std; use std;
use std::fmt; use std::fmt;
pub use std::sync::Arc;
use std::default; use std::default;
use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
pub type WPID = usize; pub type WPID = usize;
pub type MuID = usize; pub type MuID = usize;
pub type MuName = String; pub type MuName = Arc<String>;
pub type CName = MuName; pub type CName = MuName;
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub fn Mu(str: &'static str) -> MuName { pub fn Mu(str: &'static str) -> MuName {
str.to_string() Arc::new(str.to_string())
} }
#[allow(non_snake_case)] #[allow(non_snake_case)]
pub fn C(str: &'static str) -> CName { pub fn C(str: &'static str) -> CName {
str.to_string() Arc::new(str.to_string())
} }
pub type OpIndex = usize; pub type OpIndex = usize;
...@@ -460,7 +461,7 @@ impl FunctionContent { ...@@ -460,7 +461,7 @@ impl FunctionContent {
} }
} }
pub fn get_block_by_name(&self, name: String) -> &Block { pub fn get_block_by_name(&self, name: MuName) -> &Block {
for block in self.blocks.values() { for block in self.blocks.values() {
if block.name() == name { if block.name() == name {
return block; return block;
...@@ -1466,7 +1467,7 @@ pub fn is_valid_c_identifier(name: &MuName) -> bool { ...@@ -1466,7 +1467,7 @@ pub fn is_valid_c_identifier(name: &MuName) -> bool {
/// changes name to mangled name /// changes name to mangled name
/// This will always return a valid C identifier /// This will always return a valid C identifier
pub fn mangle_name(name: MuName) -> MuName { pub fn mangle_name(name: MuName) -> String {
let name = name.replace('@', ""); let name = name.replace('@', "");
if name.starts_with("__mu_") { if name.starts_with("__mu_") {
// TODO: Get rid of this, since it will be triggered if a client provides a name // TODO: Get rid of this, since it will be triggered if a client provides a name
...@@ -1488,7 +1489,7 @@ pub fn mangle_name(name: MuName) -> MuName { ...@@ -1488,7 +1489,7 @@ pub fn mangle_name(name: MuName) -> MuName {
/// demangles a Mu name /// demangles a Mu name
// WARNING: This only reverses mangle_name above when no warning is issued) // WARNING: This only reverses mangle_name above when no warning is issued)
pub fn demangle_name(mut name: MuName) -> MuName { pub fn demangle_name(mut name: String) -> MuName {
let name = if cfg!(target_os = "macos") && name.starts_with("___mu_") { let name = if cfg!(target_os = "macos") && name.starts_with("___mu_") {
name.split_off(1) name.split_off(1)
} else { } else {
...@@ -1507,13 +1508,13 @@ pub fn demangle_name(mut name: MuName) -> MuName { ...@@ -1507,13 +1508,13 @@ pub fn demangle_name(mut name: MuName) -> MuName {
.replace("Zh", "-") .replace("Zh", "-")
.replace("Zd", ".") .replace("Zd", ".")
.replace("ZZ", "Z"); .replace("ZZ", "Z");
name Arc::new(name)
} }
extern crate regex; extern crate regex;
/// identifies mu names and demangles them /// identifies mu names and demangles them
pub fn demangle_text(text: String) -> String { pub fn demangle_text(text: &String) -> String {
use self::regex::Regex; use self::regex::Regex;
lazy_static!{ lazy_static!{
...@@ -1539,14 +1540,14 @@ impl MuEntityHeader { ...@@ -1539,14 +1540,14 @@ impl MuEntityHeader {
pub fn unnamed(id: MuID) -> MuEntityHeader { pub fn unnamed(id: MuID) -> MuEntityHeader {
MuEntityHeader { MuEntityHeader {
id: id, id: id,
name: format!("#{}", id) name: Arc::new(format!("#{}", id))
} }
} }
pub fn named(id: MuID, name: MuName) -> MuEntityHeader { pub fn named(id: MuID, name: MuName) -> MuEntityHeader {
MuEntityHeader { MuEntityHeader {
id: id, id: id,
name: name.replace('@', "") name: Arc::new(name.replace('@', ""))
} }
} }
...@@ -1559,7 +1560,7 @@ impl MuEntityHeader { ...@@ -1559,7 +1560,7 @@ impl MuEntityHeader {
} }
/// an abbreviate (easy reading) version of the name /// an abbreviate (easy reading) version of the name
fn abbreviate_name(&self) -> MuName { fn abbreviate_name(&self) -> String {
let split: Vec<&str> = self.name.split('.').collect(); let split: Vec<&str> = self.name.split('.').collect();
let mut ret = "".to_string(); let mut ret = "".to_string();
...@@ -1580,7 +1581,7 @@ impl MuEntityHeader { ...@@ -1580,7 +1581,7 @@ impl MuEntityHeader {
pub fn clone_with_id(&self, new_id: MuID) -> MuEntityHeader { pub fn clone_with_id(&self, new_id: MuID) -> MuEntityHeader {
let mut clone = self.clone(); let mut clone = self.clone();
clone.id = new_id; clone.id = new_id;
clone.name = format!("{}-#{}", clone.name, clone.id); clone.name = Arc::new(format!("{}-#{}", clone.name, clone.id));
clone clone
} }
} }
......
...@@ -3444,7 +3444,7 @@ pub fn emit_code(fv: &mut MuFunctionVersion, vm: &VM) { ...@@ -3444,7 +3444,7 @@ pub fn emit_code(fv: &mut MuFunctionVersion, vm: &VM) {
{ {
let mut demangled_path = path::PathBuf::new(); let mut demangled_path = path::PathBuf::new();
demangled_path.push(&vm.vm_options.flag_aot_emit_dir); demangled_path.push(&vm.vm_options.flag_aot_emit_dir);
demangled_path.push(func.name() + ".demangled.S"); demangled_path.push(*func.name() + ".demangled.S");
let mut demangled_file = match File::create(demangled_path.as_path()) { let mut demangled_file = match File::create(demangled_path.as_path()) {
Err(why) => { Err(why) => {
...@@ -3577,7 +3577,7 @@ use std::collections::HashMap; ...@@ -3577,7 +3577,7 @@ use std::collections::HashMap;
pub fn emit_context_with_reloc( pub fn emit_context_with_reloc(
vm: &VM, vm: &VM,
symbols: HashMap<Address, String>, symbols: HashMap<Address, MuName>,
fields: HashMap<Address, String> fields: HashMap<Address, String>
) { ) {
use std::path; use std::path;
......
...@@ -5957,7 +5957,7 @@ impl<'a> InstructionSelection { ...@@ -5957,7 +5957,7 @@ impl<'a> InstructionSelection {
self.backend.end_block(cur_block.clone()); self.backend.end_block(cur_block.clone());
} }
fn start_block(&mut self, block: String) { fn start_block(&mut self, block: MuName) {
self.current_block = Some(block.clone()); self.current_block = Some(block.clone());
self.backend.start_block(block.clone()); self.backend.start_block(block.clone());
} }
......
...@@ -59,7 +59,7 @@ macro_rules! REGISTER { ...@@ -59,7 +59,7 @@ macro_rules! REGISTER {
($id:expr, $name: expr, $ty: ident) => { ($id:expr, $name: expr, $ty: ident) => {
{ {
P(Value { P(Value {
hdr: MuEntityHeader::named($id, $name.to_string()), hdr: MuEntityHeader::named($id, Arc::new($name.to_string())),
ty: $ty.clone(), ty: $ty.clone(),
v: Value_::SSAVar($id) v: Value_::SSAVar($id)
}) })
......
...@@ -40,7 +40,7 @@ use std::usize; ...@@ -40,7 +40,7 @@ use std::usize;
use std::slice::Iter; use std::slice::Iter;
use std::ops; use std::ops;
use std::collections::HashSet; use std::collections::HashSet;
use std::sync::RwLock; use std::sync::{RwLock, Arc};
use std::any::Any; use std::any::Any;
/// ASMCode represents a segment of assembly machine code. Usually it is machine code for /// ASMCode represents a segment of assembly machine code. Usually it is machine code for
...@@ -199,7 +199,7 @@ impl ASMCode { ...@@ -199,7 +199,7 @@ impl ASMCode {
} }
/// finds block for a given instruction and returns the block /// finds block for a given instruction and returns the block
fn get_block_by_inst(&self, inst: usize) -> (&String, &ASMBlock) { fn get_block_by_inst(&self, inst: usize) -> (&MuName, &ASMBlock) {
for (name, block) in self.blocks.iter() { for (name, block) in self.blocks.iter() {
if inst >= block.start_inst && inst < block.end_inst { if inst >= block.start_inst && inst < block.end_inst {
return (name, block); return (name, block);
...@@ -830,7 +830,10 @@ impl MachineCode for ASMCode { ...@@ -830,7 +830,10 @@ impl MachineCode for ASMCode {
{ {
let asm = &mut self.code[inst]; let asm = &mut self.code[inst];
asm.code = format!("jmp {}", symbol(mangle_name(String::from(new_dest)))); asm.code = format!(
"jmp {}",
symbol(&mangle_name(Arc::new(new_dest.to_string())))
);
asm.succs.clear(); asm.succs.clear();
asm.succs.push(succ); asm.succs.push(succ);
} }
...@@ -958,7 +961,7 @@ impl MachineCode for ASMCode { ...@@ -958,7 +961,7 @@ impl MachineCode for ASMCode {
trace!( trace!(
"#{}\t{:60}\t\tdefine: {:?}\tuses: {:?}\tpred: {:?}\tsucc: {:?}", "#{}\t{:60}\t\tdefine: {:?}\tuses: {:?}\tpred: {:?}\tsucc: {:?}",
i, i,
demangle_text(self.code[i].code.clone()), demangle_text(&self.code[i].code),
self.get_inst_reg_defines(i), self.get_inst_reg_defines(i),
self.get_inst_reg_uses(i), self.get_inst_reg_uses(i),
self.code[i].preds, self.code[i].preds,
...@@ -968,7 +971,7 @@ impl MachineCode for ASMCode { ...@@ -968,7 +971,7 @@ impl MachineCode for ASMCode {
/// gets block livein /// gets block livein
fn get_ir_block_livein(&self, block: &str) -> Option<&Vec<MuID>> { fn get_ir_block_livein(&self, block: &str) -> Option<&Vec<MuID>> {
match self.blocks.get(block) { match self.blocks.get(&block.to_string()) {
Some(ref block) => Some(&block.livein), Some(ref block) => Some(&block.livein),
None => None None => None
} }
...@@ -976,7 +979,7 @@ impl MachineCode for ASMCode { ...@@ -976,7 +979,7 @@ impl MachineCode for ASMCode {
/// gets block liveout /// gets block liveout
fn get_ir_block_liveout(&self, block: &str) -> Option<&Vec<MuID>> { fn get_ir_block_liveout(&self, block: &str) -> Option<&Vec<MuID>> {
match self.blocks.get(block) { match self.blocks.get(&block.to_string()) {
Some(ref block) => Some(&block.liveout), Some(ref block) => Some(&block.liveout),
None => None None => None
} }
...@@ -984,13 +987,13 @@ impl MachineCode for ASMCode { ...@@ -984,13 +987,13 @@ impl MachineCode for ASMCode {
/// sets block livein /// sets block livein
fn set_ir_block_livein(&mut self, block: &str, set: Vec<MuID>) { fn set_ir_block_livein(&mut self, block: &str, set: Vec<MuID>) {
let block = self.blocks.get_mut(block).unwrap(); let block = self.blocks.get_mut(&block.to_string()).unwrap();
block.livein = set; block.livein = set;
} }
/// sets block liveout /// sets block liveout
fn set_ir_block_liveout(&mut self, block: &str, set: Vec<MuID>) { fn set_ir_block_liveout(&mut self, block: &str, set: Vec<MuID>) {
let block = self.blocks.get_mut(block).unwrap(); let block = self.blocks.get_mut(&block.to_string()).unwrap();
block.liveout = set; block.liveout = set;
} }
...@@ -1006,7 +1009,7 @@ impl MachineCode for ASMCode { ...@@ -1006,7 +1009,7 @@ impl MachineCode for ASMCode {
/// gets the range of a given block, returns [start_inst, end_inst) (end_inst not included) /// gets the range of a given block, returns [start_inst, end_inst) (end_inst not included)
fn get_block_range(&self, block: &str) -> Option<ops::Range<usize>> { fn get_block_range(&self, block: &str) -> Option<ops::Range<usize>> {
match self.blocks.get(block) { match self.blocks.get(&block.to_string()) {
Some(ref block) => Some(block.start_inst..block.end_inst), Some(ref block) => Some(block.start_inst..block.end_inst),
None => None None => None
} }
...@@ -1120,9 +1123,9 @@ pub struct ASMCodeGen { ...@@ -1120,9 +1123,9 @@ pub struct ASMCodeGen {
/// placeholder in assembly code for a temporary /// placeholder in assembly code for a temporary
const REG_PLACEHOLDER_LEN: usize = 5; const REG_PLACEHOLDER_LEN: usize = 5;
lazy_static! { lazy_static! {
pub static ref REG_PLACEHOLDER : String = { pub static ref REG_PLACEHOLDER : MuName = {
let blank_spaces = [' ' as u8; REG_PLACEHOLDER_LEN]; let blank_spaces = [' ' as u8; REG_PLACEHOLDER_LEN];
format!("%{}", str::from_utf8(&blank_spaces).unwrap()) Arc::new(format!("%{}", str::from_utf8(&blank_spaces).unwrap()))
}; };
} }
...@@ -1340,7 +1343,7 @@ impl ASMCodeGen { ...@@ -1340,7 +1343,7 @@ impl ASMCodeGen {
spill_info: Option<SpillMemInfo> spill_info: Option<SpillMemInfo>
) { ) {
let line = self.line(); let line = self.line();
trace!("asm: {}", demangle_text(code.clone())); trace!("asm: {}", demangle_text(&code));
trace!(" defines: {:?}", defines); trace!(" defines: {:?}", defines);
trace!(" uses: {:?}", uses); trace!(" uses: {:?}", uses);
let mc = self.cur_mut(); let mc = self.cur_mut();
...@@ -1509,11 +1512,11 @@ impl ASMCodeGen { ...@@ -1509,11 +1512,11 @@ impl ASMCodeGen {
}; };
if base.is_some() && base.as_ref().unwrap().id() == x86_64::RIP.id() && is_global { if base.is_some() && base.as_ref().unwrap().id() == x86_64::RIP.id() && is_global {
// pc relative address // pc relative address
let pic_symbol = pic_symbol(label.clone()); let pic_symbol = pic_symbol(&label.clone());
result_str.push_str(&pic_symbol); result_str.push_str(&pic_symbol);
loc_cursor += label.len(); loc_cursor += label.len();
} else { } else {
let symbol = symbol(label.clone()); let symbol = symbol(&label.clone());
result_str.push_str(&symbol); result_str.push_str(&symbol);
loc_cursor += label.len(); loc_cursor += label.len();
} }
...@@ -1573,7 +1576,7 @@ impl ASMCodeGen { ...@@ -1573,7 +1576,7 @@ impl ASMCodeGen {
format!("%{}", op.name()) format!("%{}", op.name())
} else { } else {
// virtual register, use place holder // virtual register, use place holder
REG_PLACEHOLDER.clone() (**REG_PLACEHOLDER).clone()
} }
} }
...@@ -1586,8 +1589,8 @@ impl ASMCodeGen { ...@@ -1586,8 +1589,8 @@ impl ASMCodeGen {
fn unmangle_block_label(fn_name: MuName, label: String) -> MuName { fn unmangle_block_label(fn_name: MuName, label: String) -> MuName {
// input: _fn_name_BLOCK_NAME // input: _fn_name_BLOCK_NAME
// return BLOCK_NAME // return BLOCK_NAME
let split: Vec<&str> = label.splitn(2, &(fn_name + "_")).collect(); let split: Vec<&str> = label.splitn(2, &((*fn_name).clone() + "_")).collect();
String::from(split[1]) Arc::new(String::from(split[1]))
} }
/// finishes current code sequence, and returns Box<ASMCode> /// finishes current code sequence, and returns Box<ASMCode>
...@@ -2343,10 +2346,10 @@ impl CodeGenerator for ASMCodeGen { ...@@ -2343,10 +2346,10 @@ impl CodeGenerator for ASMCodeGen {
})); }));
// to link with C sources via gcc // to link with C sources via gcc
let func_symbol = symbol(mangle_name(func_name.clone())); let func_symbol = symbol(&mangle_name(func_name.clone()));
self.add_asm_global_label(func_symbol.clone()); self.add_asm_global_label(func_symbol.clone());
if is_valid_c_identifier(&func_name) { if is_valid_c_identifier(&func_name) {
self.add_asm_global_equiv(symbol(func_name.clone()), func_symbol); self.add_asm_global_equiv(symbol(&func_name.clone()), func_symbol);
} }
ValueLocation::Relocatable(RegGroup::GPR, func_name) ValueLocation::Relocatable(RegGroup::GPR, func_name)
...@@ -2357,11 +2360,11 @@ impl CodeGenerator for ASMCodeGen { ...@@ -2357,11 +2360,11 @@ impl CodeGenerator for ASMCodeGen {
func_name: MuName func_name: MuName
) -> (Box<MachineCode + Sync + Send>, ValueLocation) { ) -> (Box<MachineCode + Sync + Send>, ValueLocation) {
let func_end = { let func_end = {
let mut symbol = func_name.clone(); let mut symbol = (*func_name).clone();
symbol.push_str(":end"); symbol.push_str(":end");
symbol Arc::new(symbol)
}; };
self.add_asm_global_label(symbol(mangle_name(func_end.clone()))); self.add_asm_global_label(symbol(&mangle_name(func_end.clone())));
self.cur.as_mut().unwrap().control_flow_analysis(); self.cur.as_mut().unwrap().control_flow_analysis();
( (
...@@ -2372,8 +2375,8 @@ impl CodeGenerator for ASMCodeGen { ...@@ -2372,8 +2375,8 @@ impl CodeGenerator for ASMCodeGen {
fn start_code_sequence(&mut self) { fn start_code_sequence(&mut self) {
self.cur = Some(Box::new(ASMCode { self.cur = Some(Box::new(ASMCode {
name: "snippet".to_string(), name: Arc::new("snippet".to_string()),
entry: "none".to_string(), entry: Arc::new("none".to_string()),
code: vec![], code: vec![],
blocks: linked_hashmap!{}, blocks: linked_hashmap!{},
frame_size_patchpoints: vec![] frame_size_patchpoints: vec![]
...@@ -2404,12 +2407,12 @@ impl CodeGenerator for ASMCodeGen { ...@@ -2404,12 +2407,12 @@ impl CodeGenerator for ASMCodeGen {
} }
fn start_block(&mut self, block_name: MuName) { fn start_block(&mut self, block_name: MuName) {
self.add_asm_label(symbol(mangle_name(block_name.clone()))); self.add_asm_label(symbol(&mangle_name(block_name.clone())));
self.start_block_internal(block_name); self.start_block_internal(block_name);
} }
fn start_exception_block(&mut self, block_name: MuName) -> ValueLocation { fn start_exception_block(&mut self, block_name: MuName) -> ValueLocation {
self.add_asm_global_label(symbol(mangle_name(block_name.clone()))); self.add_asm_global_label(symbol(&mangle_name(block_name.clone())));
self.start_block_internal(block_name.clone()); self.start_block_internal(block_name.clone());
ValueLocation::Relocatable(RegGroup::GPR, block_name) ValueLocation::Relocatable(RegGroup::GPR, block_name)
...@@ -3199,90 +3202,90 @@ impl CodeGenerator for ASMCodeGen { ...@@ -3199,90 +3202,90 @@ impl CodeGenerator for ASMCodeGen {
trace!("emit: jmp {}", dest_name); trace!("emit: jmp {}", dest_name);
// symbolic label, we dont need to patch it // symbolic label, we dont need to patch it
let asm = format!("jmp {}", symbol(mangle_name(dest_name.clone()))); let asm = format!("jmp {}", symbol(&mangle_name(dest_name.clone())));
self.add_asm_branch(asm, dest_name) self.add_asm_branch(asm, dest_name)
} }
fn emit_je(&mut self, dest_name: MuName) { fn emit_je(&mut self, dest_name: MuName) {
trace!("emit: je {}", dest_name); trace!("emit: je {}", dest_name);
let asm = format!("je {}", symbol(mangle_name(dest_name.clone()))); let asm = format!("je {}", symbol(&mangle_name(dest_name.clone())));
self.add_asm_branch2(asm, dest_name); self.add_asm_branch2(asm, dest_name);
} }
fn emit_jne(&mut self, dest_name: MuName) { fn emit_jne(&mut self, dest_name: MuName) {
trace!("emit: jne {}", dest_name); trace!("emit: jne {}", dest_name);
let asm = format!("jne {}", symbol(mangle_name(dest_name.clone()))); let asm = format!("jne {}", symbol(&mangle_name(dest_name.clone())));
self.add_asm_branch2(asm, dest_name); self.add_asm_branch2(asm, dest_name);
} }
fn emit_ja(&mut self, dest_name: MuName) { fn emit_ja(&mut self, dest_name: MuName) {
trace!("emit: ja {}", dest_name); trace!("emit: ja {}", dest_name);
let asm = format!("ja {}", symbol(mangle_name(dest_name.clone()))); let asm = format!("ja {}", symbol(&mangle_name(dest_name.clone())));
self.add_asm_branch2(asm, dest_name); self.add_asm_branch2(asm, dest_name);
} }
fn emit_jae(&mut self, dest_name: MuName) { fn emit_jae(&mut self, dest_name: MuName) {
trace!("emit: jae {}", dest_name); trace!("emit: jae {}", dest_name);
let asm = format!("jae {}", symbol(mangle_name(dest_name.clone()))); let asm = format!("jae {}", symbol(&mangle_name(dest_name.clone())));
self.add_asm_branch2(asm, dest_name); self.add_asm_branch2(asm, dest_name);
} }
fn emit_jb(&mut self, dest_name: MuName) { fn emit_jb(&mut self, dest_name: MuName) {
trace!("emit: jb {}", dest_name); trace!("emit: jb {}", dest_name);
let asm = format!("jb {}", symbol(mangle_name(dest_name.clone()))); let asm = format!("jb {}", symbol(&mangle_name(dest_name.clone())));
self.add_asm_branch2(asm, dest_name); self.add_asm_branch2(asm, dest_name);