private boolean processStoreIndexed(StoreIndexedNode store, PEReadEliminationBlockState state, GraphEffectList effects) { int index = store.index().isConstant() ? ((JavaConstant) store.index().asConstant()).asInt() : -1; JavaKind elementKind = store.elementKind(); LocationIdentity arrayLocation = NamedLocationIdentity.getArrayLocation(elementKind); if (index != -1) { return processStore(store, store.array(), arrayLocation, index, elementKind, false, store.value(), state, effects); } else { state.killReadCache(arrayLocation, -1); } return false; }
while (successor instanceof StoreIndexedNode) { StoreIndexedNode store = (StoreIndexedNode) successor; assert store.array().equals(newArray); ValueNode valueNode = store.value(); if (valueNode.isConstant() && !valueNode.isNullConstant()) {
@Override public void virtualize(VirtualizerTool tool) { ValueNode alias = tool.getAlias(array()); if (alias instanceof VirtualObjectNode) { ValueNode indexValue = tool.getAlias(index()); int idx = indexValue.isConstant() ? indexValue.asJavaConstant().asInt() : -1; VirtualArrayNode virtual = (VirtualArrayNode) alias; if (idx >= 0 && idx < virtual.entryCount()) { ResolvedJavaType componentType = virtual.type().getComponentType(); if (componentType.isPrimitive() || StampTool.isPointerAlwaysNull(value) || componentType.isJavaLangObject() || (StampTool.typeReferenceOrNull(value) != null && componentType.isAssignableFrom(StampTool.typeOrNull(value)))) { tool.setVirtualEntry(virtual, idx, value()); tool.delete(); } } } }
AnalysisType arrayType = (AnalysisType) StampTool.typeOrNull(node.array()); if (arrayType != null) { assert arrayType.isArray();
ValueNode array = storeIndexed.array();
StoreIndexedNode storeIndexedNode = (StoreIndexedNode) node; PEAppendGraphBuilderContext graphBuilderContext = new PEAppendGraphBuilderContext(methodScope, storeIndexedNode); ValueNode array = storeIndexedNode.array(); ValueNode index = storeIndexedNode.index(); ValueNode value = storeIndexedNode.value();
StoreIndexedNode node = (StoreIndexedNode) n; if (node.value().getStackKind() == JavaKind.Object) { AnalysisType arrayType = (AnalysisType) StampTool.typeOrNull(node.array()); AnalysisType componentType = arrayType != null ? arrayType.getComponentType() : null; TypeFlowBuilder<?> arrayBuilder = state.lookup(node.array()); TypeFlowBuilder<?> valueBuilder = state.lookup(node.value()); TypeFlowBuilder<?> storeIndexedBuilder = TypeFlowBuilder.create(bb, node, StoreIndexedTypeFlow.class, () -> {