JDK-8059231 : Octane Raytrace fails when optimistic typing turned off
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8u40
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2014-09-26
  • Updated: 2015-06-04
  • Resolved: 2014-10-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u40 b10Fixed 9Fixed
Description
cmdline:
java jdk.nashorn.tools.Shell test/script/basic/run-octane.js --optimistic-types=false -scripting -- raytrace --runtime nashorn --verbose --iterations 5
-----------------
[nashorn] [raytrace] loading 'raytrace' [raytrace.js]...
[nashorn] [raytrace] running 'raytrace' for 5 iterations of no less than 5 seconds
[nashorn] [raytrace] *** Aborted and setting score to zero. Reason: TypeError: Cannot read property "red" from undefined
[nashorn] [raytrace] 0 ops/minute (0-0), warmup=0
-----------------
There is no problem in optimistic typing on any build. 
When optimistic typing turned off:
- jdk8u40b05 - passed
- jdk8u40b06 - fail
- jdk8u40b06 - fail
- custom build from 8u-dev repo (by 23 Sept) - passed
Comments
Works find with b08 for me. zann:make marcus$ sh ../bin/runopt.sh --optimistic-types=false --log=compiler:warning -scripting ../test/script/basic/run-octane.js -- raytrace --iterations 3 --verbose --runtime nashorn *** OPTIMISTIC: false [nashorn] [raytrace] loading 'raytrace' [raytrace.js]... /Users/marcus/src/jdk8u/nashorn/make/../test/script/basic/../external/octane/raytrace.js [nashorn] [raytrace] running 'raytrace' for 3 iterations of no less than 5 seconds [nashorn] [raytrace] warmup finished 141 ops/minute [nashorn] [raytrace] iteration 1 finished 911 ops/minute [nashorn] [raytrace] iteration 2 finished 4042 ops/minute [nashorn] [raytrace] iteration 3 finished 8073 ops/minute [nashorn] [raytrace] 4342 ops/minute (911-8073), warmup=141 zann:make marcus$ sh ../bin/runopt.sh --optimistic-types=false --log=compiler:warning -scripting ../test/script/basic/run-octane.js -- pdfjs --iterations 3 --verbose --runtime nashorn *** OPTIMISTIC: false [nashorn] [pdfjs] loading 'pdfjs' [pdfjs.js]... /Users/marcus/src/jdk8u/nashorn/make/../test/script/basic/../external/octane/pdfjs.js [nashorn] [pdfjs] running 'pdfjs' for 3 iterations of no less than 5 seconds [nashorn] [pdfjs] warmup finished 21 ops/minute [nashorn] [pdfjs] iteration 1 finished 45 ops/minute [nashorn] [pdfjs] iteration 2 finished 81 ops/minute [nashorn] [pdfjs] iteration 3 finished 102 ops/minute [nashorn] [pdfjs] 76 ops/minute (45-102), warmup=21 zann:make marcus$ java -version java version "1.8.0_40-ea" Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b12, mixed mode) zann:make marcus$
06-10-2014

double mentioned 8u40b06, I mean: - jdk8u40b07 - fail
26-09-2014