Skip to content

Commit

Permalink
Remove special treatment of <init> for value types
Browse files Browse the repository at this point in the history
Early prototype handling of value type classes used <init> as a special
factory method name distinct from its use as an instance initialization
method name.  That has been dropped in favor of <vnew> as a factory
method name for value type classes.  This change removes the special
treatment of <init> as a value type factory method name from
TR_ResolvedJ9Method::isConstructor.

Signed-off-by:  Henry Zongaro <[email protected]>
  • Loading branch information
hzongaro committed Dec 5, 2022
1 parent 7c8cdf7 commit ff992e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions runtime/compiler/env/j9method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4846,10 +4846,7 @@ TR_ResolvedJ9Method::methodModifiers()
bool
TR_ResolvedJ9Method::isConstructor()
{
if (!TR::Compiler->om.areValueTypesEnabled())
return (nameLength()==6 && !strncmp(nameChars(), "<init>", 6));
else
return (nameLength()==6 && !isStatic() && (returnType()==TR::NoType) && !strncmp(nameChars(), "<init>", 6));
return (nameLength()==6 && !strncmp(nameChars(), "<init>", 6));
}

bool TR_ResolvedJ9Method::isStatic() { return methodModifiers() & J9AccStatic ? true : false; }
Expand Down

0 comments on commit ff992e8

Please sign in to comment.