JDK-8063037 : Trivial bugfixing and exception reuse in ApplySpecialization
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8u40
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-11-05
  • Updated: 2015-06-04
  • Resolved: 2014-11-12
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
8u40Fixed 9 b40Fixed
Description
From Hannes.

Issue 1 just adds compile time. Issue 2 should be investigated.

1) I think the NodeVisitor in ApplySpecialization#hasApplies will enter into nested functions. Shouldn't it just look at the current function?

2) I wonder how hot the TransformFailedException constructor may get. Should we worry about string concatenation there?

Comments
Verified that after not descending into nested functions, --log=apply2call shows the same functions are still being transformed.
12-11-2014

I wouldn't worry about the TransformFailedExceptions. They only come into play if checkValidTransform() is invoked, and that only happens if hasApplies() returned true. It is never invoked for functions that don't have an apply in them.
12-11-2014