/// <summary> /// Add a branch from a location to a target label /// </summary> /// <param name="ilg"></param> /// <param name="target"></param> /// <remarks></remarks> public void AddBranch(FleeILGenerator ilg, Label target) { ILLocation startLoc = new ILLocation(ilg.Length); BranchInfo bi = new BranchInfo(startLoc, target); MyBranchInfos.Add(bi); }
/// <summary> /// Determine if a branch from a point to a label will be long /// </summary> /// <param name="ilg"></param> /// <param name="target"></param> /// <returns></returns> /// <remarks></remarks> public bool IsLongBranch(FleeILGenerator ilg, Label target) { ILLocation startLoc = new ILLocation(ilg.Length); BranchInfo bi = new BranchInfo(startLoc, target); int index = MyBranchInfos.IndexOf(bi); bi = MyBranchInfos[index]; return(bi.IsLongBranch); }
public BranchInfo(ILLocation startLocation, Label endLabel) { _myStart = startLocation; _myLabel = endLabel; _myEnd = new ILLocation(); }