public static ActionLocation locationLessOrEqualTo(ActionLocation location, ActionList list, int offset) { int at = findLessOrEqualTo(list, offset); if (at > -1) { // we hit so mark it and extract a constant pool if any location.at = at; location.actions = list; Action a = list.getAction(0); if (a.code == ActionConstants.sactionConstantPool) { location.pool = (ConstantPool)a; } // then see if we need to traverse a = list.getAction(at); if ((a.code == ActionConstants.sactionDefineFunction) || (a.code == ActionConstants.sactionDefineFunction2)) { location.function = (DefineFunction)a; locationLessOrEqualTo(location, ((DefineFunction)a).actionList, offset); } else if (a is DummyAction) { // our dummy container, then we drop in locationLessOrEqualTo(location, ((DummyAction)a).ActionList, offset); } } return(location); }
/// <summary> Return a path to an ActionList that contains the given offset /// if an exact match is not found then return the largest /// that does not exceed offset. /// </summary> public virtual ActionLocation locationLessOrEqualTo(int offset) { ActionLocation l = new ActionLocation(); locationLessOrEqualTo(l, m_master, offset); return(l); }
public ActionLocation(ActionLocation loc) { init(loc.at, loc.actions, loc.pool, loc.className, loc.function); }
public static ActionLocation locationLessOrEqualTo(ActionLocation location, ActionList list, int offset) { int at = findLessOrEqualTo(list, offset); if (at > - 1) { // we hit so mark it and extract a constant pool if any location.at = at; location.actions = list; Action a = list.getAction(0); if (a.code == ActionConstants.sactionConstantPool) location.pool = (ConstantPool) a; // then see if we need to traverse a = list.getAction(at); if ((a.code == ActionConstants.sactionDefineFunction) || (a.code == ActionConstants.sactionDefineFunction2)) { location.function = (DefineFunction) a; locationLessOrEqualTo(location, ((DefineFunction) a).actionList, offset); } else if (a is DummyAction) { // our dummy container, then we drop in locationLessOrEqualTo(location, ((DummyAction) a).ActionList, offset); } } return location; }
/// <summary> Return a path to an ActionList that contains the given offset /// if an exact match is not found then return the largest /// that does not exceed offset. /// </summary> public virtual ActionLocation locationLessOrEqualTo(int offset) { ActionLocation l = new ActionLocation(); locationLessOrEqualTo(l, m_master, offset); return l; }