diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index 2c64c06ddca6..eb5afcd249d4 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -2455,3 +2455,57 @@ def svm_libcontainer_namespace(args): libcontainer_project = mx.project("com.oracle.svm.native.libcontainer") for src_dir in libcontainer_project.source_dirs(): mx.command_function("svm_namespace")(args + ["--directory", src_dir , "--namespace", "svm_container"]) + +@mx.command(suite, 'capnp-compile', usage_msg="Compile Cap'n Proto schema files to source code.") +def capnp_compile(args): + capnpcjava_home = os.environ.get('CAPNPROTOJAVA_HOME') + if capnpcjava_home is None or not exists(capnpcjava_home + '/capnpc-java'): + mx.abort('Clone and build capnproto/capnproto-java from GitHub and point CAPNPROTOJAVA_HOME to its path.') + srcdir = 'src/com.oracle.svm.hosted/resources/' + outdir = 'src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/' + command = ['capnp', 'compile', + '--import-path=' + capnpcjava_home + '/compiler/src/main/schema/', + '--output=' + capnpcjava_home + '/capnpc-java:' + outdir, + '--src-prefix=' + srcdir, + srcdir + 'SharedLayerSnapshotCapnProtoSchema.capnp'] + mx.run(command) + # Remove huge unused schema chunks from generated code + outpath = outdir + 'SharedLayerSnapshotCapnProtoSchemaHolder.java' # name specified in schema + with open(outpath, 'r') as f: + lines = f.readlines() + with open(outpath, 'w') as f: + f.write( +"""/* + * Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +//@formatter:off +//Checkstyle: stop +""") + for line in lines: + if line.startswith("public final class "): + f.write('@SuppressWarnings("all")\n') + if 'public static final class Schemas {' in line: + break + f.write(line) + f.write('}\n') diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index 0b2b476975d8..427bb744604f 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -202,6 +202,15 @@ "path": "mx.substratevm/jar-with-space-in-resource-dir.jar", "digest": "sha512:270bffd158c92b04b16db147f4ef336dcb4d830bf3503cc25be1227b351597a3254544b3c4a5183dcc53f2f3ab10b282722dbf7f1b5e9d9a2741878a7057eb40", }, + + "CAPNPROTO_RUNTIME": { + "digest" : "sha512:94a7776511c344da60a1acdc346c133522a43c239d067d0d5d86c21291e0252a19bd4fa74e4b1d3a93e75dadd41af6557a5d118a1584e39d34c092485ce065b2", + "maven" : { + "groupId" : "org.capnproto", + "artifactId" : "runtime", + "version" : "0.1.16", + }, + }, }, "projects": { @@ -537,6 +546,7 @@ "sourceDirs": ["src"], "dependencies": [ "com.oracle.svm.common", + "CAPNPROTO_RUNTIME" ], "requires" : [ "jdk.internal.vm.ci" @@ -1656,6 +1666,9 @@ "java.management": [ "sun.management", ], + "org.graalvm.nativeimage.pointsto": [ + "org.capnproto" + ] }, }, "noMavenJavadoc": True, @@ -2089,6 +2102,7 @@ "NATIVE_IMAGE_BASE", ], "exclude": [ + # "CAPNPROTO_RUNTIME", ], "moduleInfo" : { "name" : "org.graalvm.nativeimage.pointsto", diff --git a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapConstant.java b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapConstant.java index 13448acb5b1c..9151f5162ea5 100644 --- a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapConstant.java +++ b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapConstant.java @@ -52,7 +52,7 @@ @Platforms(Platform.HOSTED_ONLY.class) public abstract class ImageHeapConstant implements JavaConstant, TypedConstant, CompressibleConstant, VMConstant { - private static final AtomicInteger currentId = new AtomicInteger(0); + private static final AtomicInteger currentId = new AtomicInteger(1); public static final VarHandle isReachableHandle = ReflectionUtil.unreflectField(ConstantData.class, "isReachable", MethodHandles.lookup()); diff --git a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageLayerLoader.java b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageLayerLoader.java index 7494e0d1ec54..47ee090ab228 100644 --- a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageLayerLoader.java +++ b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageLayerLoader.java @@ -24,95 +24,18 @@ */ package com.oracle.graal.pointsto.heap; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ANALYSIS_PARSED_GRAPH_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ARGUMENTS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ARGUMENT_IDS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ARRAY_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CAN_BE_STATICALLY_BOUND_TAG; import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CLASS_INIT_NAME; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CLASS_JAVA_NAME_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CLASS_NAME_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CODE_SIZE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CODE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.COMPONENT_TYPE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CONSTANTS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CONSTANTS_TO_RELINK_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CONSTANT_TYPE_TAG; import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.CONSTRUCTOR_NAME; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.DATA_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ENCLOSING_TYPE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ENUM_CLASS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ENUM_NAME_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.FIELDS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.FIELD_ACCESSED_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.FIELD_FOLDED_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.FIELD_READ_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.FIELD_TYPE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.FIELD_WRITTEN_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.HUB_IDENTITY_HASH_CODE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IDENTITY_HASH_CODE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.ID_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IMAGE_HEAP_SIZE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.INSTANCE_FIELDS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.INSTANCE_FIELDS_WITH_SUPER_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.INSTANCE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.INTERFACES_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.INTRINSIC_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_CONSTRUCTOR_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_DIRECT_ROOT_METHOD; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_ENUM_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_IMPLEMENTATION_INVOKED; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_INITIALIZED_AT_BUILD_TIME_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_INITIALIZED_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_INSTANTIATED; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_INTERFACE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_INTERNAL_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_INTRINSIC_METHOD; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_INVOKED; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_LINKED_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_REACHABLE; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_STATIC_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_SYNTHETIC_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_UNSAFE_ALLOCATED; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_VAR_ARGS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.IS_VIRTUAL_ROOT_METHOD; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.LOCATION_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.METHODS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.METHOD_HANDLE_INTRINSIC_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.MODIFIERS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.NAME_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.NEXT_CONSTANT_ID_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.NEXT_FIELD_ID_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.NEXT_METHOD_ID_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.NEXT_TYPE_ID_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.NOT_MATERIALIZED_CONSTANT; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.NULL_POINTER_CONSTANT; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.OBJECT_OFFSET_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.OBJECT_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.PARENT_CONSTANT_ID_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.PARENT_CONSTANT_INDEX_TAG; import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.PERSISTED; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.PRIMITIVE_ARRAY_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.RELOCATED_CONSTANT_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.RETURN_TYPE_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.SIMULATED_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.SOURCE_FILE_NAME_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.STATIC_OBJECT_FIELDS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.STATIC_PRIMITIVE_FIELDS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.STRENGTHENED_GRAPH_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.SUPER_CLASS_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.TID_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.TYPES_TAG; -import static com.oracle.graal.pointsto.heap.ImageLayerSnapshotUtil.VALUE_TAG; import static com.oracle.graal.pointsto.util.AnalysisError.guarantee; -import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStreamReader; import java.lang.annotation.Annotation; +import java.lang.reflect.Array; import java.lang.reflect.Executable; import java.lang.reflect.Field; import java.nio.ByteBuffer; +import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import java.nio.file.Path; import java.util.Arrays; @@ -121,13 +44,31 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.BiConsumer; +import java.util.function.Function; import java.util.function.Supplier; -import java.util.stream.Collectors; - -import org.graalvm.collections.EconomicMap; -import org.graalvm.collections.MapCursor; +import java.util.function.ToIntFunction; +import java.util.stream.IntStream; +import java.util.stream.Stream; + +import org.capnproto.ListReader; +import org.capnproto.PrimitiveList; +import org.capnproto.ReaderOptions; +import org.capnproto.Serialize; +import org.capnproto.StructList; +import org.capnproto.StructReader; +import org.capnproto.Text; +import org.capnproto.TextList; import com.oracle.graal.pointsto.flow.AnalysisParsedGraph; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.ConstantReference; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.PersistedAnalysisField; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.PersistedAnalysisMethod; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.PersistedAnalysisType; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.PersistedConstant; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.PersistedConstant.Object.Relinking.EnumConstant; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.PersistedConstant.Object.Relinking.StringConstant; +import com.oracle.graal.pointsto.heap.SharedLayerSnapshotCapnProtoSchemaHolder.SharedLayerSnapshot; import com.oracle.graal.pointsto.heap.value.ValueSupplier; import com.oracle.graal.pointsto.infrastructure.ResolvedSignature; import com.oracle.graal.pointsto.meta.AnalysisField; @@ -147,167 +88,11 @@ import jdk.graal.compiler.debug.GraalError; import jdk.graal.compiler.nodes.EncodedGraph; import jdk.graal.compiler.util.ObjectCopier; -import jdk.graal.compiler.util.json.JsonParser; import jdk.vm.ci.meta.JavaConstant; -import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.MethodHandleAccessProvider.IntrinsicMethod; -import jdk.vm.ci.meta.PrimitiveConstant; import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaType; -/** - * Loads the base layer persisted by {@link ImageLayerWriter}. The format of the json file is the - * following: - * - *
- * {
- * "next type id": nextTypeId,
- * "next method id": nextMethodId,
- * "next field id": nextFieldId,
- * "static primitive fields": staticPrimitiveFields.id,
- * "static object fields": staticObjectFields.id,
- * "image heap size": imageHeapSize,
- * "constants to relink": [ids...],
- * "types": {
- * typeIdentifier: {
- * "id": id,
- * "fields": [ids...],
- * "hub identityHashCode": System.identityHashCode(hub),
- * "class java name": type.toJavaName(),
- * "class name": type.getName(),
- * "modifiers": modifiers,
- * "is interface": isInterface,
- * "is enum": isEnum,
- * "is initialized": isInitialized,
- * "is initialized at build time": isInitializedAtBuildTime,
- * "is linked": isLinked,
- * "source file name": sourceFileName,
- * "enclosing type": enclosingTid,
- * "component type": componentTid,
- * "super class": superClassTid,
- * "is instantiated": isInstantiated,
- * "is unsafe allocated": isUnsafeAllocated,
- * "is reachable": isReachable,
- * "interfaces": [
- * interfaceTid,
- * ...
- * ],
- * "annotations": [
- * annotationName,
- * ...
- * ]
- * },
- * ...
- * },
- * "methods": {
- * methodIdentifier: {
- * "id": id,
- * ("arguments": [
- * argumentName,
- * ...
- * ],
- * "class name": className,)
- * "tid": tid,
- * "argument ids": [
- * argumentId,
- * ...
- * ],
- * "id": id,
- * "name": name,
- * "return type": returnTypeId,
- * "is varArg": isVarArg,
- * "can be statically bound": canBeStaticallyBound,
- * "modifiers": modifiers,
- * "is constructor": isConstructor,
- * "is synthetic": isSynthetic,
- * "code": code,
- * "code size": codeSize,
- * "method handle intrinsic": methodHandleIntrinsic,
- * "compiled": compiled,
- * "is virtual root method": isVirtualRootMethod,
- * "is direct root method": isDirectRootMethod,
- * "is invoked": isInvoked,
- * "is implementation invoked": isImplementationInvoked,
- * "is intrinsic method": isIntrinsicMethod,
- * "annotations": [
- * annotationName,
- * ...
- * ]
- * },
- * ...
- * },
- * "fields": {
- * tid: {
- * name: {
- * "id": id,
- * "accessed": accessed,
- * "read": read,
- * "written": written,
- * "folded": folded,
- * "is internal": isInternal,
- * "field type": typeId,
- * "modifiers": modifiers,
- * "position": position,
- * "annotations": [
- * annotationName,
- * ...
- * ]
- * (,"class name": className)
- * (,"location": location)
- * },
- * ...
- * },
- * ...
- * },
- * "constants": {
- * id: {
- * "tid": tid,
- * "identityHashCode": identityHashCode,
- * "constant type": constantType,
- * "data": [
- * [constantType, value],
- * ...
- * ],
- * "simulated": simulated
- * (,"object offset": offset)
- * (,"value": string)
- * (,"enum class": enumClass)
- * (,"enum name": enumValue)
- * (,"class id": cid)
- * }
- * },
- * "image singleton objects" : [
- * objectID,
- * "class name",
- * { (key_value_store) }
- * ],
- * "image singleton keys" : [
- * "key class name",
- * persist_flags,
- * objectID
- * ]
- * }
- *
- *
- * For an {@link ImageHeapInstance} or an {@link ImageHeapObjectArray}, the "data" entry contains
- * constant ids, markers from {@link ImageLayerSnapshotUtil} or primitive value, stored in the form
- * of a two elements array. The first element is the constant type, which is the string
- * representation of the kind of the primitive value or a custom tag. The second element is the
- * primitive value, the constant id, the method id or a custom marker. For an
- * {@link ImageHeapPrimitiveArray} it contains the array itself. Interned {@link String} constants
- * are relinked in the extension image using their base layer "value". {@link Enum} values are
- * relinked in the extension image using their "enum class" and "enum name". {@link Class} constants
- * (DynamicHub) are relinked in the extension image using their type id.
- * - * Relinking a base layer {@link ImageHeapConstant} is finding the corresponding hosted object in - * the extension image build process and storing it in the constant. This is only done for object - * that can be created or found using a specific recipe. Those constants are then called parent - * constants. Some fields of their field values can then be relinked using the value of the hosted - * object. The produced constants are called child constants, and they have to be consistent across - * image builds. - *
- * The "offset object" is the offset of the constant in the heap from the base layer.
- */
public class ImageLayerLoader {
private final Map> instanceData = get(baseLayerConstant, DATA_TAG);
- JavaConstant foundHostedObject = lookupHostedObject(baseLayerConstant, type);
- if (foundHostedObject != null && parentReachableHostedObject != null) {
- Object foundObject = hostedValuesProvider.asObject(Object.class, foundHostedObject);
- Object reachableObject = hostedValuesProvider.asObject(Object.class, parentReachableHostedObject);
- AnalysisError.guarantee(foundObject == reachableObject, "Found discrepancy between recipe-found hosted value %s and parent-reachable hosted value %s.", foundObject,
- reachableObject);
- }
+ switch (baseLayerConstant.which()) {
+ case OBJECT -> {
+ switch (baseLayerConstant.getObject().which()) {
+ case INSTANCE -> {
+ StructList.Reader
> arrayData = get(baseLayerConstant, DATA_TAG);
- addBaseLayerObject(id, objectOffset, () -> {
- ImageHeapObjectArray imageHeapObjectArray = new ImageHeapObjectArray(type, null, arrayData.size(), identityHashCode, id);
- Object[] elementsValues = getReferencedValues(constantsMap, imageHeapObjectArray, arrayData, Set.of());
- imageHeapObjectArray.setElementValues(elementsValues);
- return imageHeapObjectArray;
- });
+ case OBJECT_ARRAY -> {
+ StructList.Reader