SYNTHETIC flag for internal members
This commit is contained in:
@@ -212,7 +212,7 @@ public class AsmUtil {
|
|||||||
flags |= ACC_ABSTRACT;
|
flags |= ACC_ABSTRACT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JetTypeMapper.isAccessor(functionDescriptor)) {
|
if (JetTypeMapper.isAccessor(functionDescriptor) || functionDescriptor.getVisibility() == Visibilities.INTERNAL) {
|
||||||
flags |= ACC_SYNTHETIC;
|
flags |= ACC_SYNTHETIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -331,6 +331,10 @@ public class PropertyCodegen {
|
|||||||
modifiers |= ACC_PRIVATE;
|
modifiers |= ACC_PRIVATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (propertyDescriptor.getVisibility() == Visibilities.INTERNAL) {
|
||||||
|
modifiers |= ACC_SYNTHETIC;
|
||||||
|
}
|
||||||
|
|
||||||
if (AsmUtil.isPropertyWithBackingFieldCopyInOuterClass(propertyDescriptor)) {
|
if (AsmUtil.isPropertyWithBackingFieldCopyInOuterClass(propertyDescriptor)) {
|
||||||
ImplementationBodyCodegen parentBodyCodegen = (ImplementationBodyCodegen) memberCodegen.getParentCodegen();
|
ImplementationBodyCodegen parentBodyCodegen = (ImplementationBodyCodegen) memberCodegen.getParentCodegen();
|
||||||
parentBodyCodegen.addCompanionObjectPropertyToCopy(propertyDescriptor, defaultValue);
|
parentBodyCodegen.addCompanionObjectPropertyToCopy(propertyDescriptor, defaultValue);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ private fun createModifierList(text: String, owner: JetModifierListOwner): JetMo
|
|||||||
return owner.addBefore(newModifierList, anchor) as JetModifierList
|
return owner.addBefore(newModifierList, anchor) as JetModifierList
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun addModifier(owner: JetModifierListOwner, modifier: JetModifierKeywordToken) {
|
fun addModifier(owner: JetModifierListOwner, modifier: JetModifierKeywordToken) {
|
||||||
val modifierList = owner.modifierList
|
val modifierList = owner.modifierList
|
||||||
if (modifierList == null) {
|
if (modifierList == null) {
|
||||||
createModifierList(modifier.value, owner)
|
createModifierList(modifier.value, owner)
|
||||||
@@ -43,7 +43,7 @@ internal fun addModifier(owner: JetModifierListOwner, modifier: JetModifierKeywo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun addAnnotationEntry(owner: JetModifierListOwner, annotationEntry: JetAnnotationEntry): JetAnnotationEntry {
|
fun addAnnotationEntry(owner: JetModifierListOwner, annotationEntry: JetAnnotationEntry): JetAnnotationEntry {
|
||||||
val modifierList = owner.modifierList
|
val modifierList = owner.modifierList
|
||||||
return if (modifierList == null) {
|
return if (modifierList == null) {
|
||||||
createModifierList(annotationEntry.text, owner).annotationEntries.first()
|
createModifierList(annotationEntry.text, owner).annotationEntries.first()
|
||||||
@@ -90,7 +90,7 @@ internal fun addModifier(modifierList: JetModifierList, modifier: JetModifierKey
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun removeModifier(owner: JetModifierListOwner, modifier: JetModifierKeywordToken) {
|
fun removeModifier(owner: JetModifierListOwner, modifier: JetModifierKeywordToken) {
|
||||||
owner.getModifierList()?.let {
|
owner.getModifierList()?.let {
|
||||||
it.getModifier(modifier)?.delete()
|
it.getModifier(modifier)?.delete()
|
||||||
if (it.firstChild == null) {
|
if (it.firstChild == null) {
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.name.FqName
|
|||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.storage.StorageManager
|
import org.jetbrains.kotlin.storage.StorageManager
|
||||||
|
|
||||||
public class FileBasedPackageMemberDeclarationProvider internal constructor(
|
public class FileBasedPackageMemberDeclarationProvider(
|
||||||
storageManager: StorageManager,
|
storageManager: StorageManager,
|
||||||
private val fqName: FqName,
|
private val fqName: FqName,
|
||||||
private val factory: FileBasedDeclarationProviderFactory,
|
private val factory: FileBasedDeclarationProviderFactory,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import kotlin.reflect.jvm.internal.pcollections.HashPMap
|
|||||||
private var FOREIGN_K_CLASSES = HashPMap.empty<String, Any>()
|
private var FOREIGN_K_CLASSES = HashPMap.empty<String, Any>()
|
||||||
|
|
||||||
// This function is invoked on each reflection access to Java classes, properties, etc. Performance is critical here.
|
// This function is invoked on each reflection access to Java classes, properties, etc. Performance is critical here.
|
||||||
internal fun <T : Any> foreignKotlinClass(jClass: Class<T>): KClassImpl<T> {
|
fun <T : Any> foreignKotlinClass(jClass: Class<T>): KClassImpl<T> {
|
||||||
val name = jClass.getName()
|
val name = jClass.getName()
|
||||||
val cached = FOREIGN_K_CLASSES[name]
|
val cached = FOREIGN_K_CLASSES[name]
|
||||||
if (cached is WeakReference<*>) {
|
if (cached is WeakReference<*>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user