diff jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java @ 23346:39f25354aeee

Sync speculation log changes with JDK9 version
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Thu, 07 Apr 2016 11:09:49 -0700
parents 32d6bceb9adc
children b5557b757040
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java	Thu Apr 07 13:56:58 2016 +0200
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java	Thu Apr 07 11:09:49 2016 -0700
@@ -120,8 +120,9 @@
             resultInstalledCode = installedCode;
         }
 
-        HotSpotSpeculationLog hsLog = (HotSpotSpeculationLog) log;
-        int result = runtime.getCompilerToVM().installCode(target, (HotSpotCompiledCode) compiledCode, resultInstalledCode, hsLog.hasSpeculations() ? hsLog : null);
+        HotSpotSpeculationLog speculationLog = (log != null && log.hasSpeculations()) ? (HotSpotSpeculationLog) log : null;
+
+        int result = runtime.getCompilerToVM().installCode(target, (HotSpotCompiledCode) compiledCode, resultInstalledCode, speculationLog);
         if (result != config.codeInstallResultOk) {
             String resultDesc = config.getCodeInstallResultDescription(result);
             if (compiledCode instanceof HotSpotCompiledNmethod) {