src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java Thu Nov 3 14:16:12 2016
--- new/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java Thu Nov 3 14:16:12 2016
*** 20,59 ****
--- 20,72 ----
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.vm.ci.hotspot;
/**
* Encapsulates the VM metadata generated by {@link CompilerToVM#getMetadata}.
*/
+ import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
+
+ import jdk.vm.ci.code.TargetDescription;
+
public class HotSpotMetaData {
- @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "field is set by the native part") private byte[] pcDescBytes;
- @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "field is set by the native part") private byte[] scopesDescBytes;
- @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "field is set by the native part") private byte[] relocBytes;
- @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "field is set by the native part") private byte[] exceptionBytes;
- @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "field is set by the native part") private byte[] oopMaps;
- @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "field is set by the native part") private String[] metadata;
+
+ public HotSpotMetaData(TargetDescription target, HotSpotCompiledCode compiledMethod) {
+ // Assign the fields default values...
+ pcDescBytes = new byte[0];
+ scopesDescBytes = new byte[0];
+ relocBytes = new byte[0];
+ exceptionBytes = new byte[0];
+ oopMaps = new byte[0];
+ metadata = new String[0];
+ // ...some of them will be overwritten by the VM:
+ runtime().getCompilerToVM().getMetadata(target, compiledMethod, this);
+ }
public byte[] pcDescBytes() {
- return pcDescBytes != null ? pcDescBytes : new byte[0];
}
public byte[] scopesDescBytes() {
- return scopesDescBytes != null ? scopesDescBytes : new byte[0];
}
public byte[] relocBytes() {
- return relocBytes != null ? relocBytes : new byte[0];
}
public byte[] exceptionBytes() {
- return exceptionBytes != null ? exceptionBytes : new byte[0];
}
public byte[] oopMaps() {
- return oopMaps != null ? oopMaps : new byte[0];
}
public String[] metadataEntries() {
- return metadata != null ? metadata : new String[0];
}
}
src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File