/** * Creates a set of invocation plugins. * * @param parent if non-null, this object will be searched first when looking up plugins */ public InvocationPlugins(InvocationPlugins parent) { InvocationPlugins p = parent; this.parent = p; this.registrations = EconomicMap.create(); this.resolvedRegistrations = null; }
/** * Creates a new map that guarantees insertion order on the key set with the default * {@link Equivalence#DEFAULT} comparison strategy for keys. * * @since 1.0 */ static <K, V> EconomicMap<K, V> create() { return EconomicMap.create(Equivalence.DEFAULT); }
/** * Creates a new map that guarantees insertion order on the key set with the default * {@link Equivalence#DEFAULT} comparison strategy for keys. * * @since 1.0 */ static <K, V> EconomicMap<K, V> create() { return EconomicMap.create(Equivalence.DEFAULT); }
/** * Creates a new map that guarantees insertion order on the key set with the default * {@link Equivalence#DEFAULT} comparison strategy for keys and copies all elements from the * specified existing map. * * @since 1.0 */ static <K, V> EconomicMap<K, V> create(UnmodifiableEconomicMap<K, V> m) { return EconomicMap.create(Equivalence.DEFAULT, m); }
/** * Creates a new map that guarantees insertion order on the key set with the default * {@link Equivalence#DEFAULT} comparison strategy for keys and initializes with a specified * capacity. * * @since 1.0 */ static <K, V> EconomicMap<K, V> create(int initialCapacity) { return EconomicMap.create(Equivalence.DEFAULT, initialCapacity); }
/** * Creates a new map that guarantees insertion order on the key set with the default * {@link Equivalence#DEFAULT} comparison strategy for keys and copies all elements from the * specified existing map. * * @since 1.0 */ static <K, V> EconomicMap<K, V> create(UnmodifiableEconomicMap<K, V> m) { return EconomicMap.create(Equivalence.DEFAULT, m); }
public void initJsrAlternatives() { JSRData data = this.getOrCreateJSRData(); if (data.jsrAlternatives == null) { data.jsrAlternatives = EconomicMap.create(Equivalence.DEFAULT); } }
public ReplacementsImpl(OptionValues options, DebugHandlersFactory debugHandlersFactory, Providers providers, SnippetReflectionProvider snippetReflection, BytecodeProvider bytecodeProvider, TargetDescription target) { this.options = options; this.providers = providers.copyWith(this); this.snippetReflection = snippetReflection; this.target = target; this.graphs = new ConcurrentHashMap<>(); this.snippetTemplateCache = EconomicMap.create(Equivalence.DEFAULT); this.defaultBytecodeProvider = bytecodeProvider; this.debugHandlersFactory = debugHandlersFactory; }
/** * Creates an encoder that uses {@link Object#equals(Object) object equality}. */ public static <T> FrequencyEncoder<T> createEqualityEncoder() { return new FrequencyEncoder<>(EconomicMap.create(Equivalence.DEFAULT)); }
public InliningLog(ResolvedJavaMethod rootMethod, boolean enabled) { this.root = new Callsite(null, null); this.root.target = rootMethod; this.leaves = EconomicMap.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE); this.enabled = enabled; }
public void set(EndNode end, InfoElement infoElement) { if (infoElements == null) { infoElements = EconomicMap.create(Equivalence.IDENTITY); } infoElements.put(end, infoElement); }
public PostOrderNodeIterator(FixedNode start, T initialState) { StructuredGraph graph = start.graph(); visitedEnds = graph.createNodeBitMap(); nodeQueue = new ArrayDeque<>(); nodeStates = EconomicMap.create(Equivalence.IDENTITY); this.start = start; this.state = initialState; }
public SinglePassNodeIterator(StartNode start, T initialState) { StructuredGraph graph = start.graph(); visitedEnds = graph.createNodeBitMap(); nodeQueue = new ArrayDeque<>(); nodeStates = EconomicMap.create(Equivalence.IDENTITY); this.start = start; this.state = initialState; }
public GraphDecoder(Architecture architecture, StructuredGraph graph) { this.architecture = architecture; this.graph = graph; this.options = graph.getOptions(); this.debug = graph.getDebug(); reusableFloatingNodes = EconomicMap.create(Equivalence.IDENTITY); }
public EconomicMap<LocationIdentity, MemoryNode> toMap() { EconomicMap<LocationIdentity, MemoryNode> res = EconomicMap.create(Equivalence.DEFAULT, locationIdentities.size()); for (int i = 0; i < nodes.size(); i++) { res.put(locationIdentities.get(i), (MemoryNode) nodes.get(i)); } return res; }
public static TruffleRuntimeOptionsOverrideScope overrideOptions(OptionKey<?> key1, Object value1, Object... extraOverrides) { final EconomicMap<OptionKey<?>, Object> map = EconomicMap.create(); map.put(key1, value1); if ((extraOverrides.length & 1) == 1) { throw new IllegalArgumentException("extraOverrides.length must be even: " + extraOverrides.length); } for (int i = 0; i < extraOverrides.length; i += 2) { map.put((OptionKey<?>) extraOverrides[i], extraOverrides[i + 1]); } return new TruffleRuntimeOptionsOverrideScope(map); }
/** * Adds a comment to a {@link LIRInstruction}. Existing comments are replaced. */ public final void setComment(LIRInstruction op, String comment) { DebugContext debug = lir.getDebug(); if (debug.isDumpEnabled(DebugContext.BASIC_LEVEL)) { if (comments == null) { comments = EconomicMap.create(Equivalence.IDENTITY); } comments.put(op, comment); } }
public OptionValuesImpl( final OptionDescriptors descriptors, final UnmodifiableEconomicMap<OptionKey<?>, Object> values) { this.descriptors = descriptors; this.values = EconomicMap.create(); final UnmodifiableMapCursor<OptionKey<?>, Object> cursor = values.getEntries(); while (cursor.advance()) { this.values.put(cursor.getKey(), maskNull(cursor.getValue())); } }
protected RawConditionalEliminationVisitor(StructuredGraph graph, ScheduleResult schedule, MetaAccessProvider metaAccess, boolean replaceInputsWithConstants) { this.graph = graph; this.debug = graph.getDebug(); this.schedule = schedule; this.metaAccess = metaAccess; blockActionStart = new BlockMap<>(schedule.getCFG()); endMaps = EconomicMap.create(); stampMap = graph.createNodeMap(); undoOperations = new NodeStack(); replaceConstantInputs = replaceInputsWithConstants && GraalOptions.ReplaceInputsWithConstantsBasedOnStamps.getValue(graph.getOptions()); }