/** {@inheritDoc} */ @Override public boolean equals(Object other) { if (!(other instanceof RegisterSpecSet)) { return false; } RegisterSpecSet otherSet = (RegisterSpecSet) other; RegisterSpec[] otherSpecs = otherSet.specs; int len = specs.length; if ((len != otherSpecs.length) || (size() != otherSet.size())) { return false; } for (int i = 0; i < len; i++) { RegisterSpec s1 = specs[i]; RegisterSpec s2 = otherSpecs[i]; if (s1 == s2) { continue; } if ((s1 == null) || !s1.equals(s2)) { return false; } } return true; }
/** {@inheritDoc} */ @Override public boolean equals(Object other) { if (!(other instanceof RegisterSpecSet)) { return false; } RegisterSpecSet otherSet = (RegisterSpecSet) other; RegisterSpec[] otherSpecs = otherSet.specs; int len = specs.length; if ((len != otherSpecs.length) || (size() != otherSet.size())) { return false; } for (int i = 0; i < len; i++) { RegisterSpec s1 = specs[i]; RegisterSpec s2 = otherSpecs[i]; if (s1 == s2) { continue; } if ((s1 == null) || !s1.equals(s2)) { return false; } } return true; }
/** {@inheritDoc} */ @Override public boolean equals(Object other) { if (!(other instanceof RegisterSpecSet)) { return false; } RegisterSpecSet otherSet = (RegisterSpecSet) other; RegisterSpec[] otherSpecs = otherSet.specs; int len = specs.length; if ((len != otherSpecs.length) || (size() != otherSet.size())) { return false; } for (int i = 0; i < len; i++) { RegisterSpec s1 = specs[i]; RegisterSpec s2 = otherSpecs[i]; if (s1 == s2) { continue; } if ((s1 == null) || !s1.equals(s2)) { return false; } } return true; }
/** {@inheritDoc} */ @Override public boolean equals(Object other) { if (!(other instanceof RegisterSpecSet)) { return false; } RegisterSpecSet otherSet = (RegisterSpecSet) other; RegisterSpec[] otherSpecs = otherSet.specs; int len = specs.length; if ((len != otherSpecs.length) || (size() != otherSet.size())) { return false; } for (int i = 0; i < len; i++) { RegisterSpec s1 = specs[i]; RegisterSpec s2 = otherSpecs[i]; if (s1 == s2) { continue; } if ((s1 == null) || !s1.equals(s2)) { return false; } } return true; }
/** {@inheritDoc} */ @Override public boolean equals(Object other) { if (!(other instanceof RegisterSpecSet)) { return false; } RegisterSpecSet otherSet = (RegisterSpecSet) other; RegisterSpec[] otherSpecs = otherSet.specs; int len = specs.length; if ((len != otherSpecs.length) || (size() != otherSet.size())) { return false; } for (int i = 0; i < len; i++) { RegisterSpec s1 = specs[i]; RegisterSpec s2 = otherSpecs[i]; if (s1 == s2) { continue; } if ((s1 == null) || !s1.equals(s2)) { return false; } } return true; }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuffer sb = new StringBuffer(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuffer sb = new StringBuffer(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); } }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuffer sb = new StringBuffer(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuffer sb = new StringBuffer(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); } }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuilder sb = new StringBuilder(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuffer sb = new StringBuffer(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuffer sb = new StringBuffer(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); } }
/** {@inheritDoc} */ @Override protected String listingString0(boolean noteIndices) { int sz = locals.size(); int max = locals.getMaxSize(); StringBuffer sb = new StringBuffer(100 + sz * 40); sb.append("local-snapshot"); for (int i = 0; i < max; i++) { RegisterSpec spec = locals.get(i); if (spec != null) { sb.append("\n "); sb.append(LocalStart.localString(spec)); } } return sb.toString(); } }
/** * Helper for {@link #getAllConstants} which adds all the info for * a single instruction. * * @param result {@code non-null;} result set to add to * @param insn {@code non-null;} instruction to scrutinize */ private static void addConstants(HashSet<Constant> result, DalvInsn insn) { if (insn instanceof CstInsn) { Constant cst = ((CstInsn) insn).getConstant(); result.add(cst); } else if (insn instanceof LocalSnapshot) { RegisterSpecSet specs = ((LocalSnapshot) insn).getLocals(); int size = specs.size(); for (int i = 0; i < size; i++) { addConstants(result, specs.get(i)); } } else if (insn instanceof LocalStart) { RegisterSpec spec = ((LocalStart) insn).getLocal(); addConstants(result, spec); } }
/** * Helper for {@link #getAllConstants} which adds all the info for * a single instruction. * * @param result {@code non-null;} result set to add to * @param insn {@code non-null;} instruction to scrutinize */ private static void addConstants(HashSet<Constant> result, DalvInsn insn) { if (insn instanceof CstInsn) { Constant cst = ((CstInsn) insn).getConstant(); result.add(cst); } else if (insn instanceof LocalSnapshot) { RegisterSpecSet specs = ((LocalSnapshot) insn).getLocals(); int size = specs.size(); for (int i = 0; i < size; i++) { addConstants(result, specs.get(i)); } } else if (insn instanceof LocalStart) { RegisterSpec spec = ((LocalStart) insn).getLocal(); addConstants(result, spec); } }
/** * Helper for {@link #getAllConstants} which adds all the info for * a single instruction. * * @param result {@code non-null;} result set to add to * @param insn {@code non-null;} instruction to scrutinize */ private static void addConstants(HashSet<Constant> result, DalvInsn insn) { if (insn instanceof CstInsn) { Constant cst = ((CstInsn) insn).getConstant(); result.add(cst); } else if (insn instanceof LocalSnapshot) { RegisterSpecSet specs = ((LocalSnapshot) insn).getLocals(); int size = specs.size(); for (int i = 0; i < size; i++) { addConstants(result, specs.get(i)); } } else if (insn instanceof LocalStart) { RegisterSpec spec = ((LocalStart) insn).getLocal(); addConstants(result, spec); } }
/** * Helper for {@link #getAllConstants} which adds all the info for * a single instruction. * * @param result {@code non-null;} result set to add to * @param insn {@code non-null;} instruction to scrutinize */ private static void addConstants(HashSet<Constant> result, DalvInsn insn) { if (insn instanceof CstInsn) { Constant cst = ((CstInsn) insn).getConstant(); result.add(cst); } else if (insn instanceof LocalSnapshot) { RegisterSpecSet specs = ((LocalSnapshot) insn).getLocals(); int size = specs.size(); for (int i = 0; i < size; i++) { addConstants(result, specs.get(i)); } } else if (insn instanceof LocalStart) { RegisterSpec spec = ((LocalStart) insn).getLocal(); addConstants(result, spec); } }
/** * Helper for {@link #getAllConstants} which adds all the info for * a single instruction. * * @param result {@code non-null;} result set to add to * @param insn {@code non-null;} instruction to scrutinize */ private static void addConstants(HashSet<Constant> result, DalvInsn insn) { if (insn instanceof CstInsn) { Constant cst = ((CstInsn) insn).getConstant(); result.add(cst); } else if (insn instanceof LocalSnapshot) { RegisterSpecSet specs = ((LocalSnapshot) insn).getLocals(); int size = specs.size(); for (int i = 0; i < size; i++) { addConstants(result, specs.get(i)); } } else if (insn instanceof LocalStart) { RegisterSpec spec = ((LocalStart) insn).getLocal(); addConstants(result, spec); } }
/** * Helper for {@link #add} which scrutinizes a single * instruction for local variable information. * * @param insn {@code non-null;} instruction to scrutinize * @return {@code true} iff the instruction refers to any * named locals */ private static boolean hasLocalInfo(DalvInsn insn) { if (insn instanceof LocalSnapshot) { RegisterSpecSet specs = ((LocalSnapshot) insn).getLocals(); int size = specs.size(); for (int i = 0; i < size; i++) { if (hasLocalInfo(specs.get(i))) { return true; } } } else if (insn instanceof LocalStart) { RegisterSpec spec = ((LocalStart) insn).getLocal(); if (hasLocalInfo(spec)) { return true; } } return false; }
/** * Helper for {@link #add} which scrutinizes a single * instruction for local variable information. * * @param insn {@code non-null;} instruction to scrutinize * @return {@code true} iff the instruction refers to any * named locals */ private static boolean hasLocalInfo(DalvInsn insn) { if (insn instanceof LocalSnapshot) { RegisterSpecSet specs = ((LocalSnapshot) insn).getLocals(); int size = specs.size(); for (int i = 0; i < size; i++) { if (hasLocalInfo(specs.get(i))) { return true; } } } else if (insn instanceof LocalStart) { RegisterSpec spec = ((LocalStart) insn).getLocal(); if (hasLocalInfo(spec)) { return true; } } return false; }