Skip to content

Commit 226a0d2

Browse files
committed
Use isSpecializedNode() in NodeParser#forceInlineByDefault() too
1 parent cdfd591 commit 226a0d2

File tree

1 file changed

+2
-2
lines changed
  • truffle/src/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser

1 file changed

+2
-2
lines changed

truffle/src/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4144,7 +4144,7 @@ private List<InlineFieldData> parseInlineMethod(MessageContainer errorContainer,
41444144
* on. This enables that @Cached InlinedBranchProfile inlines by default even if a cached
41454145
* version is generated and no warning is printed.
41464146
*/
4147-
private boolean forceInlineByDefault(CacheExpression cache) {
4147+
private static boolean forceInlineByDefault(CacheExpression cache) {
41484148
AnnotationMirror cacheAnnotation = cache.getMessageAnnotation();
41494149
TypeElement parameterType = ElementUtils.castTypeElement(cache.getParameter().getType());
41504150
if (parameterType == null) {
@@ -4154,7 +4154,7 @@ private boolean forceInlineByDefault(CacheExpression cache) {
41544154
if (defaultCached && !hasDefaultCreateCacheMethod(parameterType.asType())) {
41554155
return hasInlineMethod(cache);
41564156
}
4157-
if (ElementUtils.isAssignable(parameterType.asType(), types.Node)) {
4157+
if (NodeCodeGenerator.isSpecializedNode(parameterType.asType())) {
41584158
AnnotationMirror inlineAnnotation = getGenerateInlineAnnotation(parameterType.asType());
41594159
if (inlineAnnotation != null) {
41604160
return getAnnotationValue(Boolean.class, inlineAnnotation, "value") &&

0 commit comments

Comments
 (0)