/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Makes and return a mutable copy of this instance. * * @return {@code non-null;} the mutable copy */ public RegisterSpecSet mutableCopy() { int len = specs.length; RegisterSpecSet copy = new RegisterSpecSet(len); for (int i = 0; i < len; i++) { RegisterSpec spec = specs[i]; if (spec != null) { copy.put(spec); } } copy.size = size; return copy; } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Put the entire contents of the given set into this one. * * @param set {@code non-null;} the set to put into this instance */ public void putAll(RegisterSpecSet set) { int max = set.getMaxSize(); for (int i = 0; i < max; i++) { RegisterSpec spec = set.get(i); if (spec != null) { put(spec); } } }
/** * Adds an entry to the result, updating the adjunct tables * accordingly. * * @param address {@code >= 0;} the address * @param disposition {@code non-null;} the disposition * @param spec {@code non-null;} spec representing the local */ private void add(int address, Disposition disposition, RegisterSpec spec) { int regNum = spec.getReg(); result.add(new Entry(address, disposition, spec)); if (disposition == Disposition.START) { regs.put(spec); endIndices[regNum] = -1; } else { regs.remove(spec); endIndices[regNum] = result.size() - 1; } }
/** * Adds an entry to the result, updating the adjunct tables * accordingly. * * @param address {@code >= 0;} the address * @param disposition {@code non-null;} the disposition * @param spec {@code non-null;} spec representing the local */ private void add(int address, Disposition disposition, RegisterSpec spec) { int regNum = spec.getReg(); result.add(new Entry(address, disposition, spec)); if (disposition == Disposition.START) { regs.put(spec); endIndices[regNum] = -1; } else { regs.remove(spec); endIndices[regNum] = result.size() - 1; } }
/** * * @param sources old register set * @return new mapped register set, or old if nothing has changed. */ public final RegisterSpecSet map(RegisterSpecSet sources) { int sz = sources.getMaxSize(); RegisterSpecSet newSources = new RegisterSpecSet(getNewRegisterCount()); for (int i = 0; i < sz; i++) { RegisterSpec registerSpec = sources.get(i); if (registerSpec != null) { newSources.put(map(registerSpec)); } } newSources.setImmutable(); // Return the old sources if nothing has changed. return newSources.equals(sources) ? sources : newSources; } }
/** * * @param sources old register set * @return new mapped register set, or old if nothing has changed. */ public final RegisterSpecSet map(RegisterSpecSet sources) { int sz = sources.getMaxSize(); RegisterSpecSet newSources = new RegisterSpecSet(getNewRegisterCount()); for (int i = 0; i < sz; i++) { RegisterSpec registerSpec = sources.get(i); if (registerSpec != null) { newSources.put(map(registerSpec)); } } newSources.setImmutable(); // Return the old sources if nothing has changed. return newSources.equals(sources) ? sources : newSources; } }