src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java

Print this page




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package org.graalvm.compiler.nodes;
  24 
  25 import java.util.List;
  26 
  27 import org.graalvm.compiler.graph.NodeClass;
  28 
  29 import jdk.vm.ci.meta.Assumptions;
  30 import jdk.vm.ci.meta.ResolvedJavaMethod;
  31 
  32 /**
  33  * A {@link StructuredGraph} encoded in a compact binary representation as a byte[] array. See
  34  * {@link GraphEncoder} for a description of the encoding format. Use {@link GraphDecoder} for
  35  * decoding.
  36  */
  37 public class EncodedGraph {
  38 
  39     private final byte[] encoding;
  40     private final long startOffset;
  41     private final Object[] objects;
  42     private final NodeClass<?>[] types;
  43     private final Assumptions assumptions;
  44     private final List<ResolvedJavaMethod> inlinedMethods;
  45 
  46     /**
  47      * The "table of contents" of the encoded graph, i.e., the mapping from orderId numbers to the
  48      * offset in the encoded byte[] array. Used as a cache during decoding.
  49      */
  50     protected long[] nodeStartOffsets;
  51 
  52     public EncodedGraph(byte[] encoding, long startOffset, Object[] objects, NodeClass<?>[] types, Assumptions assumptions, List<ResolvedJavaMethod> inlinedMethods) {
  53         this.encoding = encoding;
  54         this.startOffset = startOffset;
  55         this.objects = objects;
  56         this.types = types;
  57         this.assumptions = assumptions;
  58         this.inlinedMethods = inlinedMethods;
  59     }
  60 
  61     public byte[] getEncoding() {
  62         return encoding;
  63     }
  64 
  65     public long getStartOffset() {
  66         return startOffset;
  67     }
  68 
  69     public Object[] getObjects() {
  70         return objects;
  71     }
  72 
  73     public NodeClass<?>[] getNodeClasses() {
  74         return types;
  75     }
  76 
  77     public Assumptions getAssumptions() {
  78         return assumptions;
  79     }
  80 
  81     public List<ResolvedJavaMethod> getInlinedMethods() {
  82         return inlinedMethods;
  83     }
  84 }


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package org.graalvm.compiler.nodes;
  24 
  25 import java.util.List;
  26 
  27 import org.graalvm.compiler.graph.NodeClass;
  28 
  29 import jdk.vm.ci.meta.Assumptions;
  30 import jdk.vm.ci.meta.ResolvedJavaMethod;
  31 
  32 /**
  33  * A {@link StructuredGraph} encoded in a compact binary representation as a byte[] array. See
  34  * {@link GraphEncoder} for a description of the encoding format. Use {@link GraphDecoder} for
  35  * decoding.
  36  */
  37 public class EncodedGraph {
  38 
  39     private final byte[] encoding;
  40     private final int startOffset;
  41     private final Object[] objects;
  42     private final NodeClass<?>[] types;
  43     private final Assumptions assumptions;
  44     private final List<ResolvedJavaMethod> inlinedMethods;
  45 
  46     /**
  47      * The "table of contents" of the encoded graph, i.e., the mapping from orderId numbers to the
  48      * offset in the encoded byte[] array. Used as a cache during decoding.
  49      */
  50     protected int[] nodeStartOffsets;
  51 
  52     public EncodedGraph(byte[] encoding, int startOffset, Object[] objects, NodeClass<?>[] types, Assumptions assumptions, List<ResolvedJavaMethod> inlinedMethods) {
  53         this.encoding = encoding;
  54         this.startOffset = startOffset;
  55         this.objects = objects;
  56         this.types = types;
  57         this.assumptions = assumptions;
  58         this.inlinedMethods = inlinedMethods;
  59     }
  60 
  61     public byte[] getEncoding() {
  62         return encoding;
  63     }
  64 
  65     public int getStartOffset() {
  66         return startOffset;
  67     }
  68 
  69     public Object[] getObjects() {
  70         return objects;
  71     }
  72 
  73     public NodeClass<?>[] getNodeClasses() {
  74         return types;
  75     }
  76 
  77     public Assumptions getAssumptions() {
  78         return assumptions;
  79     }
  80 
  81     public List<ResolvedJavaMethod> getInlinedMethods() {
  82         return inlinedMethods;
  83     }
  84 }
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File