Name class
In the most places in frontend identifier is stored in Name class, was in String. Name has two advantages over String: * validation: you cannot accidentally create identifier with dot, for example * readability: if you see String, you don't now whether it is identifier, fq name, jvm class name or something else Name's disadvantage is (small) performance overhead. We have no value types in JVM.
This commit is contained in:
@@ -135,7 +135,7 @@ public class AllInjectorsGenerator {
|
||||
generator.addField(JavaBridgeConfiguration.class);
|
||||
generator.addPublicField(PsiClassFinderForJvm.class);
|
||||
generator.addField(false, ModuleDescriptor.class, null,
|
||||
new GivenExpression("new org.jetbrains.jet.lang.descriptors.ModuleDescriptor(\"<dummy>\")"));
|
||||
new GivenExpression("new org.jetbrains.jet.lang.descriptors.ModuleDescriptor(org.jetbrains.jet.lang.resolve.name.Name.special(\"<dummy>\"))"));
|
||||
generator.addParameter(CompilerDependencies.class);
|
||||
generator.addField(false, CompilerSpecialMode.class, null, new GivenExpression("compilerDependencies.getCompilerSpecialMode()"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user