massive refactoring of CodegenUtil
- generation method names standartized on genXXX - many methods moved to newly created AsmUtil - some methods moved to CodegenContext - got rid of almost trivial StubCodegen
This commit is contained in:
@@ -29,7 +29,6 @@ import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.codegen.CodegenUtil;
|
||||
import org.jetbrains.jet.codegen.NamespaceCodegen;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.java.JavaPsiFacadeKotlinHacks;
|
||||
@@ -41,6 +40,8 @@ import org.jetbrains.jet.util.QualifiedNamesUtil;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static org.jetbrains.jet.codegen.CodegenUtil.getLocalNameForObject;
|
||||
|
||||
public class JavaElementFinder extends PsiElementFinder implements JavaPsiFacadeKotlinHacks.KotlinFinderMarker {
|
||||
private final Project project;
|
||||
private final PsiManager psiManager;
|
||||
@@ -166,7 +167,7 @@ public class JavaElementFinder extends PsiElementFinder implements JavaPsiFacade
|
||||
if (given != null) return given;
|
||||
|
||||
if (declaration instanceof JetObjectDeclaration) {
|
||||
return CodegenUtil.getLocalNameForObject((JetObjectDeclaration) declaration);
|
||||
return getLocalNameForObject((JetObjectDeclaration) declaration);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -266,7 +266,7 @@ public class JetLightClass extends AbstractLightClass implements JetJavaMirrorMa
|
||||
public static PsiMethod wrapMethod(@NotNull JetNamedFunction function) {
|
||||
//noinspection unchecked
|
||||
if (PsiTreeUtil.getParentOfType(function, JetFunction.class, JetProperty.class) != null) {
|
||||
// Don't generate method wrappers for internal declarations. Their classes are not generated during calcStub
|
||||
// Don't genClassOrObject method wrappers for internal declarations. Their classes are not generated during calcStub
|
||||
// with ClassBuilderMode.SIGNATURES mode, and this produces "Class not found exception" in getDelegate()
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user