Replace OBJECT$ usages in code and test data
This commit is contained in:
@@ -1908,7 +1908,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
||||
if (descriptor instanceof PropertyDescriptor) {
|
||||
PropertyDescriptor propertyDescriptor = (PropertyDescriptor) descriptor;
|
||||
|
||||
Collection<ExpressionCodegenExtension> codegenExtensions = ExpressionCodegenExtension.OBJECT$.getInstances(state.getProject());
|
||||
Collection<ExpressionCodegenExtension> codegenExtensions = ExpressionCodegenExtension.Companion.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.OBJECT$.getInstances(state.getProject());
|
||||
Collection<ExpressionCodegenExtension> codegenExtensions = ExpressionCodegenExtension.Companion.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.OBJECT$.getInstances(state.getProject())) {
|
||||
for (ExpressionCodegenExtension extension : ExpressionCodegenExtension.Companion.getInstances(state.getProject())) {
|
||||
extension.generateClassSyntheticParts(v, state, myClass, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public abstract class MemberCodegen<T extends JetElement/* TODO: & JetDeclaratio
|
||||
writeInnerClasses();
|
||||
|
||||
if (sourceMapper != null) {
|
||||
SourceMapper.OBJECT$.flushToClassBuilder(sourceMapper, v);
|
||||
SourceMapper.Companion.flushToClassBuilder(sourceMapper, v);
|
||||
}
|
||||
|
||||
v.done();
|
||||
@@ -520,7 +520,7 @@ public abstract class MemberCodegen<T extends JetElement/* TODO: & JetDeclaratio
|
||||
@NotNull
|
||||
public SourceMapper getOrCreateSourceMapper() {
|
||||
if (sourceMapper == null) {
|
||||
sourceMapper = new DefaultSourceMapper(SourceInfo.OBJECT$.createInfo(element, getClassName()), null);
|
||||
sourceMapper = new DefaultSourceMapper(SourceInfo.Companion.createInfo(element, getClassName()), null);
|
||||
}
|
||||
return sourceMapper;
|
||||
}
|
||||
|
||||
+2
-2
@@ -161,7 +161,7 @@ public class AnonymousObjectTransformer {
|
||||
|
||||
if (!inliningContext.isInliningLambda) {
|
||||
if (debugInfo != null && !debugInfo.isEmpty()) {
|
||||
sourceMapper = SourceMapper.OBJECT$.createFromSmap(SMAPParser.parse(debugInfo));
|
||||
sourceMapper = SourceMapper.Companion.createFromSmap(SMAPParser.parse(debugInfo));
|
||||
}
|
||||
else {
|
||||
//seems we can't do any clever mapping cause we don't know any about original class name
|
||||
@@ -195,7 +195,7 @@ public class AnonymousObjectTransformer {
|
||||
|
||||
result.addAllClassesToRemove(constructorResult);
|
||||
|
||||
SourceMapper.OBJECT$.flushToClassBuilder(sourceMapper, classBuilder);
|
||||
SourceMapper.Companion.flushToClassBuilder(sourceMapper, classBuilder);
|
||||
|
||||
classBuilder.done();
|
||||
|
||||
|
||||
@@ -299,8 +299,8 @@ public class JetCoreEnvironment {
|
||||
|
||||
project.registerService(VirtualFileFinderFactory.class, new CliVirtualFileFinderFactory(classPath));
|
||||
|
||||
ExternalDeclarationsProvider.OBJECT$.registerExtensionPoint(project);
|
||||
ExpressionCodegenExtension.OBJECT$.registerExtensionPoint(project);
|
||||
ExternalDeclarationsProvider.Companion.registerExtensionPoint(project);
|
||||
ExpressionCodegenExtension.Companion.registerExtensionPoint(project);
|
||||
|
||||
for (ComponentRegistrar registrar : configuration.getList(ComponentRegistrar.PLUGIN_COMPONENT_REGISTRARS)) {
|
||||
registrar.registerProjectComponents(project, configuration);
|
||||
|
||||
@@ -2,13 +2,13 @@ package test;
|
||||
|
||||
class ClassObject {
|
||||
void accessToClassObject() {
|
||||
WithClassObject.OBJECT$.foo();
|
||||
WithClassObject.OBJECT$.getValue();
|
||||
WithClassObject.OBJECT$.getValueWithGetter();
|
||||
WithClassObject.OBJECT$.getVariable();
|
||||
WithClassObject.OBJECT$.setVariable(0);
|
||||
WithClassObject.OBJECT$.getVariableWithAccessors();
|
||||
WithClassObject.OBJECT$.setVariableWithAccessors(0);
|
||||
WithClassObject.Companion.foo();
|
||||
WithClassObject.Companion.getValue();
|
||||
WithClassObject.Companion.getValueWithGetter();
|
||||
WithClassObject.Companion.getVariable();
|
||||
WithClassObject.Companion.setVariable(0);
|
||||
WithClassObject.Companion.getVariableWithAccessors();
|
||||
WithClassObject.Companion.setVariableWithAccessors(0);
|
||||
}
|
||||
|
||||
void accessToPackageObject() {
|
||||
|
||||
Reference in New Issue
Block a user