[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-graal-dev
Subject:    Re: StringSubstitutions are disabled in 1.9
From:       Doug Simon <doug.simon () oracle ! com>
Date:       2018-02-01 16:17:43
Message-ID: CDA5118B-3FFF-45BA-BAAD-FCBD674F5471 () oracle ! com
[Download RAW message or body]



> On 1 Feb 2018, at 17:01, Dmitry Samersoff <dms@samersoff.net> wrote:
> 
> Hi Everybody,
> 
> 1.
> I found following remark in StringSubstitutionTest.java
> 
> if (!Java8OrEarlier) {
> // StringSubstitutions are disabled in 1.9
> return;
> }
> 
> 
> What is the reason for disabling StringSubstitutions in jdk9 and should
> we enable it for jdk11?

The reason is was disabled is because String internals changed in JDK 9 \
(http://openjdk.java.net/jeps/254). That should have been in the comment about them \
being disabled. New substitutions would be needed to support the compact strings. And \
they would have to be enabled in \
org.graalvm.compiler.replacements.StandardGraphBuilderPlugins.registerStringPlugins.

> 
> 2.
> StringSubstitutionTest.testSubstitution method is almost identical to
> one in its baseclass, MethodSubstitutionTest.testSubstitution.
> 
> What is the reason of that slight diverge?

I'm not sure why MethodSubstitutionTest.testSubstitution was not modified to \
accommodate StringSubstitutionTest's requirements. Cleaning that up would be \
preferable.

> 
> Should we create more specific StringSubstitutionTest class?

Why? If it's to test compact string substitutions (when they are added), then I would \
just modify StringSubstitutionTest.

-Doug=


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic