/** * Creates a new set guaranteeing insertion order when iterating over its elements with the * default {@link Equivalence#DEFAULT} comparison strategy. * * @since 1.0 */ static <E> EconomicSet<E> create() { return EconomicSet.create(Equivalence.DEFAULT); }
/** * Creates a new set guaranteeing insertion order when iterating over its elements with the * default {@link Equivalence#DEFAULT} comparison strategy and inserts all elements of the * specified collection. * * @since 1.0 */ static <E> EconomicSet<E> create(UnmodifiableEconomicSet<E> c) { return EconomicSet.create(Equivalence.DEFAULT, c); }
/** * Creates a new set guaranteeing insertion order when iterating over its elements with the * default {@link Equivalence#DEFAULT} comparison strategy and inserts all elements of the * specified collection. * * @since 1.0 */ static <E> EconomicSet<E> create(int initialCapacity) { return EconomicSet.create(Equivalence.DEFAULT, initialCapacity); }
/** * Creates a new set guaranteeing insertion order when iterating over its elements with the * default {@link Equivalence#DEFAULT} comparison strategy and inserts all elements of the * specified collection. * * @since 1.0 */ static <E> EconomicSet<E> create(int initialCapacity) { return EconomicSet.create(Equivalence.DEFAULT, initialCapacity); }
/** * Creates a new set guaranteeing insertion order when iterating over its elements with the * default {@link Equivalence#DEFAULT} comparison strategy. * * @since 1.0 */ static <E> EconomicSet<E> create() { return EconomicSet.create(Equivalence.DEFAULT); }
/** * Creates a new set guaranteeing insertion order when iterating over its elements with the * default {@link Equivalence#DEFAULT} comparison strategy and inserts all elements of the * specified collection. * * @since 1.0 */ static <E> EconomicSet<E> create(UnmodifiableEconomicSet<E> c) { return EconomicSet.create(Equivalence.DEFAULT, c); }
private static EconomicSet<ResolvedJavaField> createFieldSet(EconomicSet<ResolvedJavaField> init) { // Multiple ResolvedJavaField objects can represent the same field so they // need to be compared with equals(). if (init != null) { return EconomicSet.create(Equivalence.DEFAULT, init); } return EconomicSet.create(Equivalence.DEFAULT); }
/** * Creates a {@link NodeEventListener} that collects nodes from all events that match a given * filter. */ public EconomicSetNodeEventListener(Set<NodeEvent> filter) { this.nodes = EconomicSet.create(Equivalence.IDENTITY); this.filter = filter; }
@Override protected EconomicSet<FloatingReadNode> getInitialState() { return EconomicSet.create(Equivalence.IDENTITY); }
InitializedTypes() { types = EconomicSet.create(); }
/** * Creates a {@link NodeEventListener} that collects nodes from all events. */ public EconomicSetNodeEventListener() { this.nodes = EconomicSet.create(Equivalence.IDENTITY); this.filter = EnumSet.allOf(NodeEvent.class); }
public EconomicSet<String> getRuntimeOptionNames() { EconomicSet<String> res = EconomicSet.create(allRuntimeOptions.size()); allRuntimeOptions.keySet().forEach(res::add); return res; } }
@Override protected EconomicSet<FloatingReadNode> cloneState(EconomicSet<FloatingReadNode> oldState) { EconomicSet<FloatingReadNode> result = EconomicSet.create(Equivalence.IDENTITY); if (oldState != null) { result.addAll(oldState); } return result; }
@Override public EconomicSet<Reference<ClassLoader>> apply(EconomicSet<Reference<ClassLoader>> t) { EconomicSet<Reference<ClassLoader>> newLoaders = EconomicSet.create(RefEquivalence.INSTANCE, t); newLoaders.add(addNewRef); return newLoaders; } });
private void addObjectConstants(List<NodeSourcePosition> deoptimzationSourcePositions) { EconomicSet<NodeSourcePosition> processedPositions = EconomicSet.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE); for (NodeSourcePosition sourcePosition : deoptimzationSourcePositions) { addObjectConstants(sourcePosition, processedPositions); } }
/** * @see #getFixedParams() */ private EconomicSet<ParameterNode> fixedParamsAt(BitSet freshlyInstantiatedArguments) { if (freshlyInstantiatedArguments == null || freshlyInstantiatedArguments.isEmpty()) { return EconomicSet.create(Equivalence.IDENTITY); } EconomicSet<ParameterNode> result = EconomicSet.create(Equivalence.IDENTITY); for (ParameterNode p : graph.getNodes(ParameterNode.TYPE)) { if (freshlyInstantiatedArguments.get(p.index())) { result.add(p); } } return result; }
private static boolean assertUniqueTypes(ArrayList<ProfiledType> ptypes) { EconomicSet<ResolvedJavaType> set = EconomicSet.create(Equivalence.DEFAULT); for (ProfiledType ptype : ptypes) { set.add(ptype.getType()); } return set.size() == ptypes.size(); }
protected void verifyStackSlotMapping() { EconomicSet<Value> usedRegs = EconomicSet.create(Equivalence.DEFAULT); for (int i = 0; i < mappingFrom.size(); i++) { Interval interval = mappingFrom.get(i); if (interval != null && !isRegister(interval.location())) { usedRegs.add(interval.location()); } } for (int i = 0; i < mappingTo.size(); i++) { Interval interval = mappingTo.get(i); assert !usedRegs.contains(interval.location()) || checkIntervalLocation(mappingFrom.get(i), interval, mappingFromOpr.get(i)) : "stack slots used in mappingFrom must be disjoint to mappingTo"; } }
FixPointIntervalBuilder(LIR lir, StackInterval[] stackSlotMap, int maxOpId) { this.lir = lir; this.stackSlotMap = stackSlotMap; this.maxOpId = maxOpId; liveInMap = new BlockMap<>(lir.getControlFlowGraph()); liveOutMap = new BlockMap<>(lir.getControlFlowGraph()); this.usePos = EconomicSet.create(Equivalence.IDENTITY); }
private void processNodeWithState(NodeWithState nodeWithState, BlockT state, GraphEffectList effects) { for (FrameState fs : nodeWithState.states()) { FrameState frameState = getUniqueFramestate(nodeWithState, fs); EconomicSet<VirtualObjectNode> virtual = EconomicSet.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE); frameState.applyToNonVirtual(new CollectVirtualObjectsClosure(virtual, effects, state)); collectLockedVirtualObjects(state, virtual); collectReferencedVirtualObjects(state, virtual); addVirtualMappings(frameState, virtual, state, effects); } }