hg: amber/amber: adding method Class::isRecord

Vicente Romero vicente.romero at oracle.com
Wed Jul 11 21:58:26 UTC 2018



On 07/11/2018 05:08 PM, Brian Goetz wrote:
> I don’t think burning an ACC_RECORD flag is a terribly good use of some very expensive real estate.
>
> But, I had a different wonder: why not just do this from the Java side as:
>
>      boolean isRecord() { return AbstractRecord.class.isAssignableFrom(this); }

yep that was what Paul also suggested in an offline conversation. I have 
reversed the original patch and applied redone this as:

public boolean isRecord() {
  return this.getSuperclass() == java.lang.AbstractRecord.class;
}

Vicente

>
> ?
>
>
>
>> On Jul 11, 2018, at 4:54 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>>
>> Hi Vicente,
>> usually for the Java side (Class.java), to avoid a native call, one of the bit of the class modifier flags, let's call it ACC_RECORD is reserved.
>>
>> Rémi
>>
>> ----- Mail original -----
>>> De: "Vicente Romero" <vicente.romero at oracle.com>
>>> À: "amber-dev" <amber-dev at openjdk.java.net>
>>> Envoyé: Mercredi 11 Juillet 2018 22:28:10
>>> Objet: hg: amber/amber: adding method Class::isRecord
>>> Changeset: 2c5938e024ed
>>> Author:    vromero
>>> Date:      2018-07-11 13:02 -0700
>>> URL:       http://hg.openjdk.java.net/amber/amber/rev/2c5938e024ed
>>>
>>> adding method Class::isRecord
>>>
>>> ! make/hotspot/symbols/symbols-unix
>>> ! src/hotspot/share/classfile/systemDictionary.hpp
>>> ! src/hotspot/share/classfile/vmSymbols.hpp
>>> ! src/hotspot/share/include/jvm.h
>>> ! src/hotspot/share/oops/klass.cpp
>>> ! src/hotspot/share/oops/klass.hpp
>>> ! src/hotspot/share/prims/jvm.cpp
>>> ! src/java.base/share/classes/java/lang/Class.java
>>> ! src/java.base/share/native/libjava/Class.c



More information about the amber-dev mailing list