comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java @ 22781:5d06abd6d35b

Backport isImmutablePIC field from jvmci-9, and add documentation.
author Roland Schatz <roland.schatz@oracle.com>
date Wed, 20 Jan 2016 11:13:45 +0100
parents b4ff1a18d19c
children 805d58f2cd8c
comparison
equal deleted inserted replaced
22780:b4ff1a18d19c 22781:5d06abd6d35b
66 * {@code null}, then the compilation did not record method dependencies. Otherwise, the first 66 * {@code null}, then the compilation did not record method dependencies. Otherwise, the first
67 * element of this array is the root method of the compilation. 67 * element of this array is the root method of the compilation.
68 */ 68 */
69 protected final ResolvedJavaMethod[] methods; 69 protected final ResolvedJavaMethod[] methods;
70 70
71 /**
72 * A list of comments that will be included in code dumps.
73 */
71 protected final Comment[] comments; 74 protected final Comment[] comments;
72 75
76 /**
77 * The data section containing constants for the emitted machine code.
78 */
73 protected final byte[] dataSection; 79 protected final byte[] dataSection;
80
81 /**
82 * The minimum alignment of the data section.
83 */
74 protected final int dataSectionAlignment; 84 protected final int dataSectionAlignment;
85
86 /**
87 * A list of relocations in the {@link #dataSection}.
88 */
75 protected final DataPatch[] dataSectionPatches; 89 protected final DataPatch[] dataSectionPatches;
76 90
91 /**
92 * A flag determining whether this code is immutable and position independent.
93 */
94 protected final boolean isImmutablePIC;
95
96 /**
97 * The total size of the stack frame of this compiled method.
98 */
77 protected final int totalFrameSize; 99 protected final int totalFrameSize;
100
101 /**
102 * Offset in bytes for the custom stack area (relative to sp).
103 */
78 protected final int customStackAreaOffset; 104 protected final int customStackAreaOffset;
79 105
80 public static class Comment { 106 public static class Comment {
81 107
82 public final String text; 108 public final String text;
87 this.pcOffset = pcOffset; 113 this.pcOffset = pcOffset;
88 } 114 }
89 } 115 }
90 116
91 public HotSpotCompiledCode(String name, byte[] targetCode, int targetCodeSize, Site[] sites, Assumption[] assumptions, ResolvedJavaMethod[] methods, Comment[] comments, byte[] dataSection, 117 public HotSpotCompiledCode(String name, byte[] targetCode, int targetCodeSize, Site[] sites, Assumption[] assumptions, ResolvedJavaMethod[] methods, Comment[] comments, byte[] dataSection,
92 int dataSectionAlignment, DataPatch[] dataSectionPatches, int totalFrameSize, int customStackAreaOffset) { 118 int dataSectionAlignment, DataPatch[] dataSectionPatches, boolean isImmutablePIC, int totalFrameSize, int customStackAreaOffset) {
93 this.name = name; 119 this.name = name;
94 this.targetCode = targetCode; 120 this.targetCode = targetCode;
95 this.targetCodeSize = targetCodeSize; 121 this.targetCodeSize = targetCodeSize;
96 this.sites = sites; 122 this.sites = sites;
97 this.assumptions = assumptions; 123 this.assumptions = assumptions;
99 125
100 this.comments = comments; 126 this.comments = comments;
101 this.dataSection = dataSection; 127 this.dataSection = dataSection;
102 this.dataSectionAlignment = dataSectionAlignment; 128 this.dataSectionAlignment = dataSectionAlignment;
103 this.dataSectionPatches = dataSectionPatches; 129 this.dataSectionPatches = dataSectionPatches;
130 this.isImmutablePIC = isImmutablePIC;
104 this.totalFrameSize = totalFrameSize; 131 this.totalFrameSize = totalFrameSize;
105 this.customStackAreaOffset = customStackAreaOffset; 132 this.customStackAreaOffset = customStackAreaOffset;
106 133
107 assert validateFrames(); 134 assert validateFrames();
108 } 135 }