86 */
87 public static final GraalHotSpotVMConfig INJECTED_VMCONFIG = null;
88 public static final MetaAccessProvider INJECTED_METAACCESS = null;
89 public static final OptionValues INJECTED_OPTIONVALUES = null;
90 public static final IntrinsicContext INJECTED_INTRINSIC_CONTEXT = null;
91
92 public final String osName = getHostOSName();
93 public final String osArch = getHostArchitectureName();
94 public final boolean windowsOs = getProperty("os.name", "").startsWith("Windows");
95 public final boolean linuxOs = getProperty("os.name", "").startsWith("Linux");
96
97 /**
98 * Gets the host operating system name.
99 */
100 private static String getHostOSName() {
101 String osName = getProperty("os.name");
102 switch (osName) {
103 case "Linux":
104 osName = "linux";
105 break;
106 case "SunOS":
107 osName = "solaris";
108 break;
109 case "Mac OS X":
110 osName = "bsd";
111 break;
112 default:
113 // Of course Windows is different...
114 if (osName.startsWith("Windows")) {
115 osName = "windows";
116 } else {
117 throw new JVMCIError("Unexpected OS name: " + osName);
118 }
119 }
120 return osName;
121 }
122
123 private static String getHostArchitectureName() {
124 String arch = getProperty("os.arch");
125 switch (arch) {
126 case "x86_64":
127 arch = "amd64";
128 break;
129 case "sparcv9":
130 arch = "sparc";
131 break;
132 }
133 return arch;
134 }
135
136 protected final Integer intRequiredOnAMD64 = osArch.equals("amd64") ? null : 0;
137 protected final Long longRequiredOnAMD64 = osArch.equals("amd64") ? null : 0L;
138 }
|
86 */
87 public static final GraalHotSpotVMConfig INJECTED_VMCONFIG = null;
88 public static final MetaAccessProvider INJECTED_METAACCESS = null;
89 public static final OptionValues INJECTED_OPTIONVALUES = null;
90 public static final IntrinsicContext INJECTED_INTRINSIC_CONTEXT = null;
91
92 public final String osName = getHostOSName();
93 public final String osArch = getHostArchitectureName();
94 public final boolean windowsOs = getProperty("os.name", "").startsWith("Windows");
95 public final boolean linuxOs = getProperty("os.name", "").startsWith("Linux");
96
97 /**
98 * Gets the host operating system name.
99 */
100 private static String getHostOSName() {
101 String osName = getProperty("os.name");
102 switch (osName) {
103 case "Linux":
104 osName = "linux";
105 break;
106 case "Mac OS X":
107 osName = "bsd";
108 break;
109 default:
110 // Of course Windows is different...
111 if (osName.startsWith("Windows")) {
112 osName = "windows";
113 } else {
114 throw new JVMCIError("Unexpected OS name: " + osName);
115 }
116 }
117 return osName;
118 }
119
120 private static String getHostArchitectureName() {
121 String arch = getProperty("os.arch");
122 switch (arch) {
123 case "x86_64":
124 arch = "amd64";
125 break;
126 }
127 return arch;
128 }
129
130 protected final Integer intRequiredOnAMD64 = osArch.equals("amd64") ? null : 0;
131 protected final Long longRequiredOnAMD64 = osArch.equals("amd64") ? null : 0L;
132 }
|