default -> companion: default object -> class object in project code, builtins and libs code

This commit is contained in:
Pavel V. Talanov
2015-03-16 14:51:11 +03:00
parent 444b461ba7
commit 2a6facaef6
151 changed files with 205 additions and 205 deletions
@@ -1908,7 +1908,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
if (descriptor instanceof PropertyDescriptor) {
PropertyDescriptor propertyDescriptor = (PropertyDescriptor) descriptor;
Collection<ExpressionCodegenExtension> codegenExtensions = ExpressionCodegenExtension.Default.getInstances(state.getProject());
Collection<ExpressionCodegenExtension> codegenExtensions = ExpressionCodegenExtension.OBJECT$.getInstances(state.getProject());
if (!codegenExtensions.isEmpty() && resolvedCall != null) {
ExpressionCodegenExtension.Context context = new ExpressionCodegenExtension.Context(typeMapper, v);
JetType returnType = propertyDescriptor.getReturnType();
@@ -2348,7 +2348,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
if (!(resolvedCall.getResultingDescriptor() instanceof ConstructorDescriptor)) { // otherwise already
receiver = StackValue.receiver(resolvedCall, receiver, this, callableMethod);
Collection<ExpressionCodegenExtension> codegenExtensions = ExpressionCodegenExtension.Default.getInstances(state.getProject());
Collection<ExpressionCodegenExtension> codegenExtensions = ExpressionCodegenExtension.OBJECT$.getInstances(state.getProject());
if (!codegenExtensions.isEmpty()) {
ExpressionCodegenExtension.Context context = new ExpressionCodegenExtension.Context(typeMapper, v);
for (ExpressionCodegenExtension extension : codegenExtensions) {
@@ -388,7 +388,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
genClosureFields(context.closure, v, typeMapper);
for (ExpressionCodegenExtension extension : ExpressionCodegenExtension.Default.getInstances(state.getProject())) {
for (ExpressionCodegenExtension extension : ExpressionCodegenExtension.OBJECT$.getInstances(state.getProject())) {
extension.generateClassSyntheticParts(v, state, myClass, descriptor);
}
}
@@ -76,7 +76,7 @@ class PlatformStaticGenerator(
)
}
default object {
class object {
[platformStatic]
public fun createStaticFunctionDescriptor(descriptor: FunctionDescriptor): FunctionDescriptor {
val memberDescriptor = if (descriptor is PropertyAccessorDescriptor) descriptor.getCorrespondingProperty() else descriptor
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.resolve.*
public trait ExpressionCodegenExtension {
default object : ProjectExtensionDescriptor<ExpressionCodegenExtension>("org.jetbrains.kotlin.expressionCodegenExtension", javaClass<ExpressionCodegenExtension>())
class object : ProjectExtensionDescriptor<ExpressionCodegenExtension>("org.jetbrains.kotlin.expressionCodegenExtension", javaClass<ExpressionCodegenExtension>())
public class Context(
public val typeMapper: JetTypeMapper,
@@ -34,7 +34,7 @@ import org.jetbrains.kotlin.resolve.DescriptorUtils
public class ReifiedTypeInliner(private val parametersMapping: ReifiedTypeParameterMappings?) {
default object {
class object {
public val NEW_ARRAY_MARKER_METHOD_NAME: String = "reifyNewArray"
public val CHECKCAST_MARKER_METHOD_NAME: String = "reifyCheckcast"
public val INSTANCEOF_MARKER_METHOD_NAME: String = "reifyInstanceof"