Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java @ 23996:11f0412408cd
8173912: [JVMCI] fix memory overhead of JVMCI
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 03 Feb 2017 21:08:05 +0100 |
parents | ebce30b702eb |
children |
comparison
equal
deleted
inserted
replaced
23995:988dc143e0bf | 23996:11f0412408cd |
---|---|
279 Object value; | 279 Object value; |
280 String cppType; | 280 String cppType; |
281 if (entry == null) { | 281 if (entry == null) { |
282 // Fall back to VM call | 282 // Fall back to VM call |
283 value = store.compilerToVm.getFlagValue(name); | 283 value = store.compilerToVm.getFlagValue(name); |
284 if (value == null) { | 284 if (value == store.compilerToVm) { |
285 if (notPresent != null) { | 285 if (notPresent != null) { |
286 return notPresent; | 286 return notPresent; |
287 } | 287 } |
288 throw new JVMCIError("expected VM flag not found: " + name); | 288 throw new JVMCIError("expected VM flag not found: " + name); |
289 } else { | 289 } else { |
313 if (value instanceof Integer) { | 313 if (value instanceof Integer) { |
314 return value; | 314 return value; |
315 } else if (value instanceof Long) { | 315 } else if (value instanceof Long) { |
316 return (int) (long) value; | 316 return (int) (long) value; |
317 } | 317 } |
318 } else if (toType == String.class) { | |
319 if (value == null || value instanceof String) { | |
320 return value; | |
321 } | |
318 } else if (toType == Long.class) { | 322 } else if (toType == Long.class) { |
319 return value; | 323 return value; |
320 } | 324 } |
321 | 325 |
322 throw new JVMCIError("cannot convert " + name + " of type " + value.getClass().getSimpleName() + (cppType == null ? "" : " [" + cppType + "]") + " to " + toType.getSimpleName()); | 326 throw new JVMCIError("cannot convert " + name + " of type " + value.getClass().getSimpleName() + (cppType == null ? "" : " [" + cppType + "]") + " to " + toType.getSimpleName()); |