/** * Returns the number of distinct objects that have been added, i.e., the length of the array. */ public int getLength() { return map.size() + (containsNull ? 1 : 0); }
@Override public int size() { return map.size(); }
@Override public int size() { return map.size(); }
/** * Determines if this object currently contains any plugins (in any state of registration). If * this object has any {@link #defer(Runnable) deferred registrations}, it is assumed that * executing them will result in at least one plugin being registered. */ public boolean isEmpty() { if (parent != null && !parent.isEmpty()) { return false; } UnmodifiableEconomicMap<ResolvedJavaMethod, InvocationPlugin> resolvedRegs = resolvedRegistrations; if (resolvedRegs != null) { if (!resolvedRegs.isEmpty()) { return false; } } List<Runnable> deferred = deferredRegistrations; if (deferred != null) { if (!deferred.isEmpty()) { return false; } } for (LateClassPlugins late = lateRegistrations; late != null; late = late.next) { if (!late.bindings.isEmpty()) { return false; } } return registrations.size() == 0; }
public MemoryMapNode(EconomicMap<LocationIdentity, MemoryNode> mmap) { super(TYPE, StampFactory.forVoid()); int size = mmap.size(); locationIdentities = new ArrayList<>(size); nodes = new NodeInputList<>(this, size); int index = 0; MapCursor<LocationIdentity, MemoryNode> cursor = mmap.getEntries(); while (cursor.advance()) { locationIdentities.add(cursor.getKey()); nodes.initialize(index, (ValueNode) cursor.getValue()); index++; } assert checkOrder(mmap); }
StackSlot stackSlot = (StackSlot) dest; Integer offset = getOffset(stackSlot); if (!stackIndices.containsKey(offset) && stackIndices.size() < maxStackLocations) { stackIndices.put(offset, stackIndices.size()); int numLocations = numRegs + stackIndices.size(); debug.log("num locations = %d (regs = %d, stack = %d)", numLocations, numRegs, stackIndices.size()); for (AbstractBlockBase<?> block : blocks) { BlockData data = new BlockData(numLocations);
if (resultDeDuplicationMap.size() == 1) { preCalculatedResults = new PreCalculatedResultFactory[]{resultList.get(0)}; } else {
if (result.size() == 0) { return null;
public LIRFrameState build(FrameState topState, LabelRef exceptionEdge) { assert virtualObjects.size() == 0; assert objectStates.size() == 0; assert pendingVirtualObjects.size() == 0; if (virtualObjects.size() != 0) { virtualObjectsArray = new VirtualObject[virtualObjects.size()]; int index = 0; for (VirtualObject value : virtualObjects.getValues()) {
VirtualObject vobject = virtualObjects.get(obj); if (vobject == null) { vobject = VirtualObject.get(obj.type(), virtualObjects.size()); virtualObjects.put(obj, vobject); pendingVirtualObjects.add(obj);
if (loopScope.iterationStates.size() == 0 && loopScope.loopDepth == 1) { if (methodScope.loopExplosionHead != null) { throw new PermanentBailoutException("Graal implementation restriction: Method with %s loop explosion must not have more than one top-level loop", LoopExplosionKind.MERGE_EXPLODE);
assert initialState != null; assert mergedStates != null; if (initialState.readCache.size() > 0) { LoopKillCache loopKilledLocations = loopLocationKillCache.get(loop);
assert initialState != null; assert mergedStates != null; if (initialState.readCache.size() > 0) { LoopKillCache loopKilledLocations = loopLocationKillCache.get(loop);
ReadCacheEntry[] entries = new ReadCacheEntry[initialState.getReadCache().size()]; int z = 0; for (ReadCacheEntry entry : initialState.getReadCache().getKeys()) {