From dcc2728f0a17705abd01738eb896dc0ff1d70aef Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Sat, 28 Apr 2012 23:13:02 +0400 Subject: [PATCH 01/50] @NotNull is needed in tests, bringing it back Reverting c9edaa6b4ff2c7180f54f713c33594a6a72c6f84 --- compiler/tests/org/jetbrains/jet/JetTestUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/tests/org/jetbrains/jet/JetTestUtils.java b/compiler/tests/org/jetbrains/jet/JetTestUtils.java index 19d3ea3792b..2e3c6076d8e 100644 --- a/compiler/tests/org/jetbrains/jet/JetTestUtils.java +++ b/compiler/tests/org/jetbrains/jet/JetTestUtils.java @@ -171,7 +171,10 @@ public class JetTestUtils { } public static JetCoreEnvironment createEnvironmentWithMockJdk(Disposable disposable, @NotNull CompilerSpecialMode compilerSpecialMode) { - return new JetCoreEnvironment(disposable, CompileCompilerDependenciesTest.compilerDependenciesForTests(compilerSpecialMode, true)); + JetCoreEnvironment environment = + new JetCoreEnvironment(disposable, CompileCompilerDependenciesTest.compilerDependenciesForTests(compilerSpecialMode, true)); + environment.addToClasspath(getAnnotationsJar()); + return environment; } public static File findMockJdkRtJar() { From 08de6d8d0730201dfb845d1144a5e5b7c2297960 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Sat, 28 Apr 2012 23:13:41 +0400 Subject: [PATCH 02/50] KT-1863 Wrong nullability for class derived from java classes. #KT-1863 In progress --- .../resolve/java/JavaDescriptorResolver.java | 2 +- .../resolve/java/JavaTypeTransformer.java | 47 +++++++++++-------- ...umentsNullability-NotNull-SpecialTypes.jet | 23 +++++++++ ...ArgumentsNullability-NotNull-UserTypes.jet | 23 +++++++++ ...rtypeArgumentsNullability-SpecialTypes.jet | 21 +++++++++ ...upertypeArgumentsNullability-UserTypes.jet | 21 +++++++++ 6 files changed, 116 insertions(+), 21 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.jet create mode 100644 compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.jet create mode 100644 compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.jet create mode 100644 compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.jet diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java index c47411575c4..8ce7e33559e 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java @@ -959,7 +959,7 @@ public class JavaDescriptorResolver { continue; } - JetType transform = semanticServices.getTypeTransformer().transformToType(type, typeVariableResolver); + JetType transform = semanticServices.getTypeTransformer().transformToType(type, JavaTypeTransformer.TypeUsage.SUPERTYPE, typeVariableResolver); result.add(TypeUtils.makeNotNullable(transform)); } diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java index 0da95ba01fc..8b853b146f9 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java @@ -33,11 +33,9 @@ import org.jetbrains.jet.lang.types.lang.PrimitiveType; import org.jetbrains.jet.rt.signature.JetSignatureReader; import javax.inject.Inject; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; + +import static org.jetbrains.jet.lang.resolve.java.JavaTypeTransformer.TypeUsage.*; /** * @author abreslav @@ -66,9 +64,11 @@ public class JavaTypeTransformer { @NotNull - public TypeProjection transformToTypeProjection(@NotNull final PsiType javaType, + private TypeProjection transformToTypeProjection(@NotNull final PsiType javaType, @NotNull final TypeParameterDescriptor typeParameterDescriptor, - @NotNull final TypeVariableResolver typeVariableByPsiResolver) { + @NotNull final TypeVariableResolver typeVariableByPsiResolver, + @NotNull final TypeUsage howThisTypeIsUsed + ) { TypeProjection result = javaType.accept(new PsiTypeVisitor() { @Override @@ -85,12 +85,12 @@ public class JavaTypeTransformer { PsiType bound = wildcardType.getBound(); assert bound != null; - return new TypeProjection(variance, transformToType(bound, TypeUsage.UPPER_BOUND, typeVariableByPsiResolver)); + return new TypeProjection(variance, transformToType(bound, UPPER_BOUND, typeVariableByPsiResolver)); } @Override public TypeProjection visitType(PsiType type) { - return new TypeProjection(transformToType(type, TypeUsage.TYPE_ARGUMENT, typeVariableByPsiResolver)); + return new TypeProjection(transformToType(type, howThisTypeIsUsed, typeVariableByPsiResolver)); } }); return result; @@ -136,7 +136,7 @@ public class JavaTypeTransformer { if (psiMethod.isConstructor()) { Set supertypesJet = Sets.newHashSet(); for (PsiClassType supertype : typeParameter.getExtendsListTypes()) { - supertypesJet.add(transformToType(supertype, TypeUsage.UPPER_BOUND, typeVariableResolver)); + supertypesJet.add(transformToType(supertype, UPPER_BOUND, typeVariableResolver)); } return TypeUtils.intersect(JetTypeChecker.INSTANCE, supertypesJet); } @@ -144,20 +144,24 @@ public class JavaTypeTransformer { TypeParameterDescriptor typeParameterDescriptor = typeVariableResolver.getTypeVariable(typeParameter.getName()); - if (howThisTypeIsUsed == TypeUsage.TYPE_ARGUMENT || howThisTypeIsUsed == TypeUsage.UPPER_BOUND) { - // In Java: ArrayList - // In Kotlin: ArrayList, not ArrayList - // nullability will be taken care of in individual member signatures - return typeParameterDescriptor.getDefaultType(); + // In Java: ArrayList + // In Kotlin: ArrayList, not ArrayList + // nullability will be taken care of in individual member signatures + boolean nullable = !EnumSet.of(TYPE_ARGUMENT, UPPER_BOUND, SUPERTYPE_ARGUMENT).contains(howThisTypeIsUsed); + if (nullable) { + return TypeUtils.makeNullable(typeParameterDescriptor.getDefaultType()); } else { - return TypeUtils.makeNullable(typeParameterDescriptor.getDefaultType()); + return typeParameterDescriptor.getDefaultType(); } } else { + // 'L extends List' in Java is a List in Kotlin, not a List + boolean nullable = !EnumSet.of(SUPERTYPE_ARGUMENT, SUPERTYPE).contains(howThisTypeIsUsed); + JetType jetAnalog = getKotlinAnalog(new FqName(psiClass.getQualifiedName())); if (jetAnalog != null) { - return jetAnalog; + return TypeUtils.makeNullableAsSpecified(jetAnalog, nullable); } final ClassDescriptor classData = @@ -187,13 +191,15 @@ public class JavaTypeTransformer { PsiType psiArgument = psiArguments[i]; TypeParameterDescriptor typeParameterDescriptor = parameters.get(i); - arguments.add(transformToTypeProjection(psiArgument, typeParameterDescriptor, typeVariableResolver)); + TypeUsage howTheProjectionIsUsed = howThisTypeIsUsed == SUPERTYPE ? SUPERTYPE_ARGUMENT : TYPE_ARGUMENT; + arguments.add(transformToTypeProjection(psiArgument, typeParameterDescriptor, typeVariableResolver, howTheProjectionIsUsed)); } } + return new JetTypeImpl( Collections.emptyList(), classData.getTypeConstructor(), - true, + nullable, arguments, classData.getMemberScope(arguments)); } @@ -291,6 +297,7 @@ public class JavaTypeTransformer { MEMBER_SIGNATURE_COVARIANT, MEMBER_SIGNATURE_CONTRAVARIANT, MEMBER_SIGNATURE_INVARIANT, - SUPERTYPE + SUPERTYPE, + SUPERTYPE_ARGUMENT } } diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.jet b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.jet new file mode 100644 index 00000000000..e40bc8873a3 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.jet @@ -0,0 +1,23 @@ +// FILE: A.java +public class A {} + +// FILE: X.java +import org.jetbrains.annotations.NotNull; + +public class X { + @NotNull T fooN() {return null;} + void barN(@NotNull T a) {} +} + +// FILE: Y.java +public class Y extends X { + +} + +// FILE: test.kt + +fun main() { + Y().fooN() : Any + Y().barN(null); +} + diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.jet b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.jet new file mode 100644 index 00000000000..f44ffeaf690 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.jet @@ -0,0 +1,23 @@ +// FILE: A.java +public class A {} + +// FILE: X.java +import org.jetbrains.annotations.NotNull; + +public class X { + @NotNull T fooN() {return null;} + void barN(@NotNull T a) {} +} + +// FILE: Y.java +public class Y extends X { + +} + +// FILE: test.kt + +fun main() { + Y().fooN() : Any + Y().barN(null); +} + diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.jet b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.jet new file mode 100644 index 00000000000..32114bfd2cf --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.jet @@ -0,0 +1,21 @@ +// FILE: A.java +public class A {} + +// FILE: X.java +public class X { + T foo() {return null;} + void bar(T a) {} +} + +// FILE: Y.java +public class Y extends X { + +} + +// FILE: test.kt + +fun main() { + Y().foo().length + Y().bar(null) +} + diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.jet b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.jet new file mode 100644 index 00000000000..2d86a647a05 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.jet @@ -0,0 +1,21 @@ +// FILE: A.java +public class A {} + +// FILE: X.java +public class X { + T foo() {return null;} + void bar(T a) {} +} + +// FILE: Y.java +public class Y extends X { + +} + +// FILE: test.kt + +fun main() { + Y().foo().hashCode() + Y().bar(null) +} + From c484e37b02dcc646e44fd1fb532863167159a321 Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Sun, 29 Apr 2012 15:54:39 +0400 Subject: [PATCH 03/50] integration tests: .gold -> .expected --- .../{hello.compile.gold => hello.compile.expected} | 0 .../data/{hello.run.gold => hello.run.expected} | 0 .../data/{help.gold => help.expected} | 0 .../jetbrains/kotlin/KotlinIntegrationTestBase.java | 11 ++++++----- 4 files changed, 6 insertions(+), 5 deletions(-) rename compiler/integration-tests/data/{hello.compile.gold => hello.compile.expected} (100%) rename compiler/integration-tests/data/{hello.run.gold => hello.run.expected} (100%) rename compiler/integration-tests/data/{help.gold => help.expected} (100%) diff --git a/compiler/integration-tests/data/hello.compile.gold b/compiler/integration-tests/data/hello.compile.expected similarity index 100% rename from compiler/integration-tests/data/hello.compile.gold rename to compiler/integration-tests/data/hello.compile.expected diff --git a/compiler/integration-tests/data/hello.run.gold b/compiler/integration-tests/data/hello.run.expected similarity index 100% rename from compiler/integration-tests/data/hello.run.gold rename to compiler/integration-tests/data/hello.run.expected diff --git a/compiler/integration-tests/data/help.gold b/compiler/integration-tests/data/help.expected similarity index 100% rename from compiler/integration-tests/data/help.gold rename to compiler/integration-tests/data/help.expected diff --git a/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java b/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java index 8f5ab4b894a..107b96d279f 100644 --- a/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java +++ b/compiler/integration-tests/src/org/jetbrains/kotlin/KotlinIntegrationTestBase.java @@ -111,18 +111,19 @@ public abstract class KotlinIntegrationTestBase { protected void check(String baseName, StringBuilder content) throws IOException { final File tmpFile = new File(getTestDataDirectory(), baseName + ".tmp"); - final File goldFile = new File(getTestDataDirectory(), baseName + ".gold"); + final File expectedFile = new File(getTestDataDirectory(), baseName + ".expected"); - if (!goldFile.isFile()) { + if (!expectedFile.isFile()) { Files.write(content, tmpFile, Charsets.UTF_8); - fail("No gold file " + goldFile); + fail("No .expected file " + expectedFile); } else { - final String goldContent = Files.toString(goldFile, UTF_8); + final String goldContent = Files.toString(expectedFile, UTF_8); if (!goldContent.equals(content.toString())) { Files.write(content, tmpFile, Charsets.UTF_8); - fail("tmp and gold differ, tmp file: " + tmpFile); + fail(".tmp and .expected files differ, tmp file: " + tmpFile); } + tmpFile.delete(); } } From 4cd2ce81a9b9c9882ade03a4c9261ca31cebdcac Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Sun, 29 Apr 2012 19:30:43 +0400 Subject: [PATCH 04/50] pack compiler into one jar (without js yet) --- .gitignore | 2 +- TeamCityBuild.xml | 2 +- build.xml | 79 +++++++++++++++++++++++++++++++++++++--- build/jarjar-1.2.jar | Bin 113619 -> 0 bytes lib/jsr305-1.3.9.jar | Bin 0 -> 33015 bytes update_dependencies.xml | 46 ++++++++++++++++++----- 6 files changed, 112 insertions(+), 17 deletions(-) delete mode 100644 build/jarjar-1.2.jar create mode 100644 lib/jsr305-1.3.9.jar diff --git a/.gitignore b/.gitignore index 927b20cd726..57a2b37fbb5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ patches-master out dist ideaSDK -PluginVerifier +dependencies .idea/dictionaries/yozh.xml .idea/workspace.xml tmp diff --git a/TeamCityBuild.xml b/TeamCityBuild.xml index a37cd929ec5..212ce07014f 100644 --- a/TeamCityBuild.xml +++ b/TeamCityBuild.xml @@ -14,7 +14,7 @@ - + diff --git a/build.xml b/build.xml index cdee4e237a9..1496e46461a 100644 --- a/build.xml +++ b/build.xml @@ -166,9 +166,12 @@ - + + - + + + @@ -176,6 +179,19 @@ + + + + + + + + + + + + + @@ -189,11 +205,13 @@ + - - + - + + + @@ -213,8 +231,57 @@ - + + + + + + (kotlinc.internal.com.intellij.lang.ASTNode); + } + + # Keep the special static methods that are required in enumeration classes. + -keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); + } + + -keepclassmembers class * { + ** toString(); + ** hashCode(); + ** project(); + + ** TYPE; + ** ourInstance; + } + ]]> + diff --git a/build/jarjar-1.2.jar b/build/jarjar-1.2.jar deleted file mode 100644 index e32d30cd2ac4fb9699c12daa7849c17aa8e2fdba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 113619 zcmbSyV|ZoVvTi!g3OY7Awylo2V%xUuq+{E*)v;~c?ATW4_ILJv&bfQvd%lac#{9L$ zs5wWiQC07Jt4a{pTxOCBP5zKYd_8z(J%%lmuucWJKwIkAZ-Ifye=&p#Pcy z`p;={|G8M`-xj0(nem^Cr3GXpL`4*p=%huZqdO7$zaa*?l5F|c;cgZ;H1rq|=R=s!l)SZuPgq{(V;remRpfzHrM-_bEk*;;X36wyZpT^>==Eri6ztjGKs2Z@AVSIQiQa4-?1 z3I^uIWds9}7#QhPcvy3<*!^J1J9-jxsM(ge7VT6mgmIVPGl6OU%be) zTv**Uo3@pxW1jsTob%|lI@5Hf;cx?8h$>^f-VT0~%;}!tK6{_$&MYPu{yyzkECvEa zJ8Oo)Y?q2FiA9RRVLA#kydtGU*0>HM0`Bnq2NZkDhUUE+Y7*UUzT`=aqAOT?N7sD; zF+w5EGo%f3HUo9?TSg`GEJDZrV`uBCZU zDCNq{K#|s>TwAviZ^=bitr_lT8y;R}YkE|4F^=v_u1>q3dIK_UaJ1W=haf>w#jL=- zL^qhl$jRYK$xyb{c0y%uKCgD2U@|~Gn@~hWkHI%!>s|BSHb-v264q!mmi!&tOSzEMFvkDYx)u2AwU*w5INIWt{o=vBoeHHals5J*%~>nEZ? zsX@Ff%`=2-Tv$j>Vm>m%C%V_HTtmzG61rq0D^cErgxMG^{}T&tzSNW^6JbYibuXs|v(|MG`~U;(S8U?3o^P=DtSN&m(R{IPyfa~q?7n0}G! zsw;{z=I18cg;5$hg(cz-BA|kqkS3xyP+l@GiOvcg3|b~34^N8Bp6N??X!u^hUI6ta zH7>!88Py~1O&An`*M3rWP{Hp@DGg)|t6oQ@yUmv_&+fOkCC|H~?d}hRT%;6m^x^rk z&@8q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 zW)>2b!FE}e<%;Gm^J)H|ImL$0i#PQFehglmPblm!#zIknVM5WG{h4#kdFIu1{k0D~ zmm+wILviusoAWF`(7U@696893<;0%qm*e7LSwEU_J?>eLW+28JAo(&v>fLeOq~>tJmX6CKyJLe?8%p#asN;og?x?WCmD=XE1H|JxN+lhO7 zXqdU*jEB*jCH>BC8u!AU$GY^gA<*z_fZ8lhOH`jift?Oe6Xz_@_CNE2}N`IMwwkM$N zR82=diIJehZ8}9_9;)4+y4HLMh@$pe05`VcX7?)E5Bl?=mUo_jkcYZz_yxgv1TWnOJ2_k z#!YYvZT7&Z1hh~kJKR%J@-Ww8o~GHq4q4l3`G*NwIIys0_mp39y$fVE2xsA4e@5(L z=(2`J3vC>|v9;qp0Hp$xy5iz=F=lvwiqI9_{b#4OV;~vB^pm>c+AR{;qFBjW`_eiU zRZnQPasB7QtSHcajN#^L?mbxU{~Eq1gD-M)=i<}uEHS9%+AZt0DTN)&en61SMqJZw z>(3U$qS`c>Trte6OM5F_2s#g3n@yT}C0C5ORH;`@76Tb*Uv0cz179h*F+aWJKrkNL!y`h7k;CKCmJzXx5i`%D^h;=6iLQs!@xpkMx^td?#31d&iJ z{9$=&QgR?>CM)R}`y-PC)b>^}5#k|y65rSx{MlZ*YBVB=7M!8T2m!$l;g7go`9*B-`ZVDY;imj3%>RF0;5IzZcw&mTz>|ijgc{Wjl}OA zq-6H3F_J}YH#J(uZ{%61n}ts+w#7&$F<$Wd3Q7puTr6pd#*6=BXJT$OkrfQ}<|GWr SHd_sT-bu6BQeMHZZ~G7RBHnud diff --git a/lib/jsr305-1.3.9.jar b/lib/jsr305-1.3.9.jar new file mode 100644 index 0000000000000000000000000000000000000000..a9afc6619b4b9369f0501d06ceb1cf82a1e47cdd GIT binary patch literal 33015 zcma%@WmFz%)~*TePH=a3cXxMpcXxM!y9W~7fP)j+-e25PyyG!Zj}|3lN1wGR-uy>yO8}lA|p*pHwhhIw_%>8miZ zBaMX2n1m`&)Em-K!KpFP(n!)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*+5dy~yLkTh zM2FC~hu$**qK7g6C;CSK8x#q>5&=YdpMpW25RL!4s?c=tAh!;H6uOBpdGsvPKhGYHI1;Y*@Xu4t$=0*Yo`=6p)*g~L5d%;46 zfh-7rjMIN>O<_xbCaMKXkRkn_CHx_Gge?M^n-wggk_@hh6QVd+9yA>($ioK&XMZ#b zOmb4_1cPRV1c`3|l>0h5wXxcsy)lUnDI+4T=`hL)KbRbHa z9tQPO!~xs-&>U~s+7f3q_nfp8K#ECv^ zEujgoKrStCjT|f&I0`tC{tE1nKdpcxf!L3qBP&1v@OJzGJaNPTl71Kj(Bx4+S$Vz= z|APccB?SdT6DWb;Hb5TnuPTD4d9aNMO)Lb0Q31p2U*O-5S771LTst6K4M@H7FZc<6 zJ%s#cmmOuG`SEkqWpTi*YJZTAw*k;Lg=VDrNy+o={3`>Jp9YGAW^)0N)4*vJe6{3m z{hr$e%7i9D0hv319|xZKn;Qpyc0yBmfY=CNOZy+NKfObc{`oNxpgAi*IwBC4@gL~F zoFcGzXl4fxFABs3{0BU^9f##ZlN^BjXo0`+k9V1W(2m@v&^UFFMlK9P`)!+W^e!hy z#1Rh~01om9ME=41|K$yi2n}Zji3z~{yMMGNY;ZHQme8n=n*Z5 z^uPKy(V=HFAU)3VKhZ%G5e^SM ic>wX0)_=qQI)_kKLIoU~KpZRZNB9f^LZQvkzy1%>O8F)L literal 0 HcmV?d00001 diff --git a/update_dependencies.xml b/update_dependencies.xml index 6de46208e56..b41756d66b9 100644 --- a/update_dependencies.xml +++ b/update_dependencies.xml @@ -1,24 +1,44 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - - - - @@ -40,8 +60,16 @@ + + + + + + + + - + @@ -25,12 +25,12 @@ - + + dest="dependencies/download/plugin-verifier-1.0-SNAPSHOT.jar" usetimestamp="true"/> From a8e3e991cbe35b6f7e2d0c7dcf33e848d6943279 Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Sun, 29 Apr 2012 20:00:08 +0400 Subject: [PATCH 07/50] fix update_dependencies.xml --- update_dependencies.xml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/update_dependencies.xml b/update_dependencies.xml index 85548a29035..e7e9c20c8ca 100644 --- a/update_dependencies.xml +++ b/update_dependencies.xml @@ -36,8 +36,10 @@ - + + + @@ -46,17 +48,18 @@ - - - - - - - - - - + + + + + + + + + + + @@ -65,7 +68,6 @@ - @@ -78,7 +80,7 @@ - + From 655ac949babc4ba2237f0d9f59660e5fcb502ed3 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:02:36 +0400 Subject: [PATCH 08/50] 'invoke' method added to standard function types --- .../descriptors/FunctionDescriptorUtil.java | 12 +++++++- .../lang/types/lang/JetStandardClasses.java | 29 +++++++++++++++---- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java index 95b0446da29..3e5650d8ee6 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/descriptors/FunctionDescriptorUtil.java @@ -127,10 +127,20 @@ public class FunctionDescriptorUtil { JetStandardClasses.getValueParameters(functionDescriptor, functionType), JetStandardClasses.getReturnTypeFromFunctionType(functionType), Modality.FINAL, - Visibilities.LOCAL); + Visibilities.PUBLIC); } public static D alphaConvertTypeParameters(D candidate) { return (D) candidate.substitute(MAKE_TYPE_PARAMETERS_FRESH); } + + public static FunctionDescriptor getInvokeFunction(@NotNull JetType functionType) { + assert JetStandardClasses.isFunctionType(functionType); + + ClassifierDescriptor classDescriptorForFunction = functionType.getConstructor().getDeclarationDescriptor(); + assert classDescriptorForFunction instanceof ClassDescriptor; + Set invokeFunctions = ((ClassDescriptor) classDescriptorForFunction).getMemberScope(functionType.getArguments()).getFunctions("invoke"); + assert invokeFunctions.size() == 1; + return invokeFunctions.iterator().next(); + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/lang/JetStandardClasses.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/lang/JetStandardClasses.java index 4074771ecb7..c34da66c0f7 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/lang/JetStandardClasses.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/lang/JetStandardClasses.java @@ -18,6 +18,7 @@ package org.jetbrains.jet.lang.types.lang; import com.google.common.collect.Lists; import com.google.common.collect.Sets; +import com.intellij.openapi.util.Pair; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.descriptors.*; @@ -25,6 +26,8 @@ import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor; import org.jetbrains.jet.lang.resolve.DescriptorUtils; import org.jetbrains.jet.lang.resolve.FqName; import org.jetbrains.jet.lang.resolve.scopes.*; +import org.jetbrains.jet.lang.resolve.scopes.receivers.ClassReceiver; +import org.jetbrains.jet.lang.resolve.scopes.receivers.ExtensionReceiver; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; import org.jetbrains.jet.lang.types.JetType; import org.jetbrains.jet.lang.types.JetTypeImpl; @@ -189,16 +192,23 @@ public class JetStandardClasses { STANDARD_CLASSES_NAMESPACE, Collections.emptyList(), "Function" + i); + + SimpleFunctionDescriptorImpl invoke = new SimpleFunctionDescriptorImpl(function, Collections.emptyList(), "invoke", CallableMemberDescriptor.Kind.DECLARATION); + WritableScope scopeForInvoke = createScopeForInvokeFunction(function, invoke); + List typeParameters = createTypeParameters(i, function); FUNCTION[i] = function.initialize( false, - createTypeParameters(i, function), - Collections.singleton(getAnyType()), STUB, Collections.emptySet(), null); + typeParameters, + Collections.singleton(getAnyType()), scopeForInvoke, Collections.emptySet(), null); FUNCTION_TYPE_CONSTRUCTORS.add(FUNCTION[i].getTypeConstructor()); + FunctionDescriptorUtil.initializeFromFunctionType(invoke, function.getDefaultType(), new ClassReceiver(FUNCTION[i])); ClassDescriptorImpl receiverFunction = new ClassDescriptorImpl( STANDARD_CLASSES_NAMESPACE, Collections.emptyList(), "ExtensionFunction" + i); + SimpleFunctionDescriptorImpl invokeWithReceiver = new SimpleFunctionDescriptorImpl(receiverFunction, Collections.emptyList(), "invoke", CallableMemberDescriptor.Kind.DECLARATION); + WritableScope scopeForInvokeWithReceiver = createScopeForInvokeFunction(receiverFunction, invokeWithReceiver); List parameters = createTypeParameters(i, receiverFunction); parameters.add(0, TypeParameterDescriptor.createWithDefaultBound( receiverFunction, @@ -207,11 +217,19 @@ public class JetStandardClasses { RECEIVER_FUNCTION[i] = receiverFunction.initialize( false, parameters, - Collections.singleton(getAnyType()), STUB, Collections.emptySet(), null); + Collections.singleton(getAnyType()), scopeForInvokeWithReceiver, Collections.emptySet(), null); RECEIVER_FUNCTION_TYPE_CONSTRUCTORS.add(RECEIVER_FUNCTION[i].getTypeConstructor()); + FunctionDescriptorUtil.initializeFromFunctionType(invokeWithReceiver, receiverFunction.getDefaultType(), new ClassReceiver(RECEIVER_FUNCTION[i])); } } + private static WritableScope createScopeForInvokeFunction(ClassDescriptorImpl function, SimpleFunctionDescriptorImpl invoke) { + WritableScope scopeForInvoke = new WritableScopeImpl(STUB, function, RedeclarationHandler.THROW_EXCEPTION).setDebugName("Scope for function type"); + scopeForInvoke.addFunctionDescriptor(invoke); + scopeForInvoke.changeLockLevel(WritableScope.LockLevel.READING); + return scopeForInvoke; + } + private static List createTypeParameters(int parameterCount, ClassDescriptorImpl function) { List parameters = new ArrayList(); for (int j = 0; j < parameterCount; j++) { @@ -411,8 +429,9 @@ public class JetStandardClasses { } arguments.add(defaultProjection(returnType)); int size = parameterTypes.size(); - TypeConstructor constructor = receiverType == null ? FUNCTION[size].getTypeConstructor() : RECEIVER_FUNCTION[size].getTypeConstructor(); - return new JetTypeImpl(annotations, constructor, false, arguments, STUB); + ClassDescriptor classDescriptor = receiverType == null ? FUNCTION[size] : RECEIVER_FUNCTION[size]; + TypeConstructor constructor = classDescriptor.getTypeConstructor(); + return new JetTypeImpl(annotations, constructor, false, arguments, classDescriptor.getMemberScope(arguments)); } private static TypeProjection defaultProjection(JetType returnType) { From 28526afbdeb1c0d0b235591f1aeaf2717a18205d Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:07:15 +0400 Subject: [PATCH 09/50] interface ResolvedCallWithTrace added --- .../calls/OverloadResolutionResultsImpl.java | 18 ++++++------ .../calls/OverloadResolutionResultsUtil.java | 6 ++-- .../calls/OverloadingConflictResolver.java | 14 +++++----- .../lang/resolve/calls/ResolvedCallImpl.java | 28 +++++++++---------- ...itizer.java => ResolvedCallWithTrace.java} | 16 ++++------- .../lang/resolve/calls/TracingStrategy.java | 17 +++++------ 6 files changed, 48 insertions(+), 51 deletions(-) rename compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/{MemberPrioritizer.java => ResolvedCallWithTrace.java} (64%) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsImpl.java index 5e90d79d572..6487e96c36c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsImpl.java @@ -27,42 +27,42 @@ import java.util.Collections; */ /*package*/ class OverloadResolutionResultsImpl implements OverloadResolutionResults { - public static OverloadResolutionResultsImpl success(@NotNull ResolvedCallImpl descriptor) { + public static OverloadResolutionResultsImpl success(@NotNull ResolvedCallWithTrace descriptor) { return new OverloadResolutionResultsImpl(Code.SUCCESS, Collections.singleton(descriptor)); } public static OverloadResolutionResultsImpl nameNotFound() { - return new OverloadResolutionResultsImpl(Code.NAME_NOT_FOUND, Collections.>emptyList()); + return new OverloadResolutionResultsImpl(Code.NAME_NOT_FOUND, Collections.>emptyList()); } - public static OverloadResolutionResultsImpl singleFailedCandidate(ResolvedCallImpl candidate) { + public static OverloadResolutionResultsImpl singleFailedCandidate(ResolvedCallWithTrace candidate) { return new OverloadResolutionResultsImpl(Code.SINGLE_CANDIDATE_ARGUMENT_MISMATCH, Collections.singleton(candidate)); } - public static OverloadResolutionResultsImpl manyFailedCandidates(Collection> failedCandidates) { + public static OverloadResolutionResultsImpl manyFailedCandidates(Collection> failedCandidates) { return new OverloadResolutionResultsImpl(Code.MANY_FAILED_CANDIDATES, failedCandidates); } - public static OverloadResolutionResultsImpl ambiguity(Collection> descriptors) { + public static OverloadResolutionResultsImpl ambiguity(Collection> descriptors) { return new OverloadResolutionResultsImpl(Code.AMBIGUITY, descriptors); } - private final Collection> results; + private final Collection> results; private final Code resultCode; - private OverloadResolutionResultsImpl(@NotNull Code resultCode, @NotNull Collection> results) { + private OverloadResolutionResultsImpl(@NotNull Code resultCode, @NotNull Collection> results) { this.results = results; this.resultCode = resultCode; } @Override @NotNull - public Collection> getResultingCalls() { + public Collection> getResultingCalls() { return results; } @Override @NotNull - public ResolvedCallImpl getResultingCall() { + public ResolvedCallWithTrace getResultingCall() { assert isSingleResult(); return results.iterator().next(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsUtil.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsUtil.java index 44e46111f33..07d259f9f5c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsUtil.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadResolutionResultsUtil.java @@ -30,9 +30,9 @@ import java.util.Collection; public class OverloadResolutionResultsUtil { @NotNull public static OverloadResolutionResults ambiguity(OverloadResolutionResults results1, OverloadResolutionResults results2) { - Collection> resultingCalls = Lists.newArrayList(); - resultingCalls.addAll((Collection>) results1.getResultingCalls()); - resultingCalls.addAll((Collection>) results2.getResultingCalls()); + Collection> resultingCalls = Lists.newArrayList(); + resultingCalls.addAll((Collection>) results1.getResultingCalls()); + resultingCalls.addAll((Collection>) results2.getResultingCalls()); return OverloadResolutionResultsImpl.ambiguity(resultingCalls); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadingConflictResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadingConflictResolver.java index 1edce3205fa..360e117c08c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadingConflictResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/OverloadingConflictResolver.java @@ -39,23 +39,23 @@ import java.util.Set; public class OverloadingConflictResolver { @Nullable - public ResolvedCallImpl findMaximallySpecific(Set> candidates, boolean discriminateGenericDescriptors) { + public ResolvedCallWithTrace findMaximallySpecific(Set> candidates, boolean discriminateGenericDescriptors) { // Different autocasts may lead to the same candidate descriptor wrapped into different ResolvedCallImpl objects - Set> maximallySpecific = new THashSet>(new TObjectHashingStrategy>() { + Set> maximallySpecific = new THashSet>(new TObjectHashingStrategy>() { @Override - public boolean equals(ResolvedCallImpl o1, ResolvedCallImpl o2) { + public boolean equals(ResolvedCallWithTrace o1, ResolvedCallWithTrace o2) { return o1 == null ? o2 == null : o1.getResultingDescriptor().equals(o2.getResultingDescriptor()); } @Override - public int computeHashCode(ResolvedCallImpl object) { + public int computeHashCode(ResolvedCallWithTrace object) { return object == null ? 0 : object.getResultingDescriptor().hashCode(); } }); meLoop: - for (ResolvedCallImpl candidateCall : candidates) { + for (ResolvedCallWithTrace candidateCall : candidates) { D me = candidateCall.getResultingDescriptor(); - for (ResolvedCallImpl otherCall : candidates) { + for (ResolvedCallWithTrace otherCall : candidates) { D other = otherCall.getResultingDescriptor(); if (other == me) continue; if (!moreSpecific(me, other, discriminateGenericDescriptors) || moreSpecific(other, me, discriminateGenericDescriptors)) { @@ -65,7 +65,7 @@ public class OverloadingConflictResolver { maximallySpecific.add(candidateCall); } if (maximallySpecific.size() == 1) { - ResolvedCallImpl result = maximallySpecific.iterator().next(); + ResolvedCallWithTrace result = maximallySpecific.iterator().next(); result.getTrace().commit(); return result; } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolvedCallImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolvedCallImpl.java index 2bf2516e751..e6399ea151d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolvedCallImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolvedCallImpl.java @@ -16,7 +16,6 @@ package org.jetbrains.jet.lang.resolve.calls; -import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.intellij.util.Function; import org.jetbrains.annotations.NotNull; @@ -28,7 +27,6 @@ import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; import org.jetbrains.jet.lang.types.JetType; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Map; @@ -37,25 +35,30 @@ import static org.jetbrains.jet.lang.resolve.calls.ResolutionStatus.UNKNOWN_STAT /** * @author abreslav */ -public class ResolvedCallImpl implements ResolvedCall { +public class ResolvedCallImpl implements ResolvedCallWithTrace { - public static final Function, CallableDescriptor> MAP_TO_CANDIDATE = new Function, CallableDescriptor>() { + public static final Function, CallableDescriptor> MAP_TO_CANDIDATE = new Function, CallableDescriptor>() { @Override - public CallableDescriptor fun(ResolvedCallImpl resolvedCall) { + public CallableDescriptor fun(ResolvedCallWithTrace resolvedCall) { return resolvedCall.getCandidateDescriptor(); } }; - public static final Function, CallableDescriptor> MAP_TO_RESULT = new Function, CallableDescriptor>() { + public static final Function, CallableDescriptor> MAP_TO_RESULT = new Function, CallableDescriptor>() { @Override - public CallableDescriptor fun(ResolvedCallImpl resolvedCall) { + public CallableDescriptor fun(ResolvedCallWithTrace resolvedCall) { return resolvedCall.getResultingDescriptor(); } }; @NotNull - public static ResolvedCallImpl create(@NotNull ResolutionCandidate candidate) { - return new ResolvedCallImpl(candidate.getDescriptor(), candidate.getThisObject(), candidate.getReceiverArgument()); + public static ResolvedCallImpl create(@NotNull ResolutionCandidate candidate, @NotNull TemporaryBindingTrace trace) { + return create(candidate.getDescriptor(), candidate.getThisObject(), candidate.getReceiverArgument(), trace); + } + + @NotNull + public static ResolvedCallImpl create(@NotNull D descriptor, @NotNull ReceiverDescriptor thisObject, @NotNull ReceiverDescriptor receiverArgument, @NotNull TemporaryBindingTrace trace) { + return new ResolvedCallImpl(descriptor, thisObject, receiverArgument, trace); } private final D candidateDescriptor; @@ -70,10 +73,11 @@ public class ResolvedCallImpl implements ResolvedC private TemporaryBindingTrace trace; private ResolutionStatus status = UNKNOWN_STATUS; - private ResolvedCallImpl(@NotNull D candidateDescriptor, @NotNull ReceiverDescriptor thisObject, @NotNull ReceiverDescriptor receiverArgument) { + private ResolvedCallImpl(@NotNull D candidateDescriptor, @NotNull ReceiverDescriptor thisObject, @NotNull ReceiverDescriptor receiverArgument, @NotNull TemporaryBindingTrace trace) { this.candidateDescriptor = candidateDescriptor; this.thisObject = thisObject; this.receiverArgument = receiverArgument; + this.trace = trace; } @NotNull @@ -90,10 +94,6 @@ public class ResolvedCallImpl implements ResolvedC return trace; } - public void setTrace(@NotNull TemporaryBindingTrace trace) { - this.trace = trace; - } - @Override @NotNull public D getCandidateDescriptor() { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/MemberPrioritizer.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolvedCallWithTrace.java similarity index 64% rename from compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/MemberPrioritizer.java rename to compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolvedCallWithTrace.java index 14dace99c4d..ae3d5798dbd 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/MemberPrioritizer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolvedCallWithTrace.java @@ -18,21 +18,17 @@ package org.jetbrains.jet.lang.resolve.calls; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.descriptors.CallableDescriptor; -import org.jetbrains.jet.lang.resolve.scopes.JetScope; -import org.jetbrains.jet.lang.types.JetType; - -import java.util.Collection; +import org.jetbrains.jet.lang.resolve.TemporaryBindingTrace; /** * @author svtk */ -public interface MemberPrioritizer { - @NotNull - Collection getNonExtensionsByName(JetScope scope, String name); +public interface ResolvedCallWithTrace extends ResolvedCall { @NotNull - Collection getMembersByName(@NotNull JetType receiver, String name); + ResolutionStatus getStatus(); - @NotNull - Collection getExtensionsByName(JetScope scope, String name); + boolean isDirty(); + + TemporaryBindingTrace getTrace(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TracingStrategy.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TracingStrategy.java index a1551908809..9207e24747b 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TracingStrategy.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TracingStrategy.java @@ -34,14 +34,15 @@ import java.util.List; */ /*package*/ interface TracingStrategy { TracingStrategy EMPTY = new TracingStrategy() { + @Override - public void bindReference(@NotNull BindingTrace trace, @NotNull ResolvedCallImpl resolvedCall) {} + public void bindResolvedCall(@NotNull BindingTrace trace, @NotNull ResolvedCallWithTrace resolvedCall) {} @Override public void unresolvedReference(@NotNull BindingTrace trace) {} @Override - public void recordAmbiguity(BindingTrace trace, Collection> candidates) {} + public void recordAmbiguity(BindingTrace trace, Collection> candidates) {} @Override public void missingReceiver(@NotNull BindingTrace trace, @NotNull ReceiverDescriptor expectedReceiver) {} @@ -59,10 +60,10 @@ import java.util.List; public void wrongNumberOfTypeArguments(@NotNull BindingTrace trace, int expectedTypeArgumentCount) {} @Override - public void ambiguity(@NotNull BindingTrace trace, @NotNull Collection> descriptors) {} + public void ambiguity(@NotNull BindingTrace trace, @NotNull Collection> descriptors) {} @Override - public void noneApplicable(@NotNull BindingTrace trace, @NotNull Collection> descriptors) {} + public void noneApplicable(@NotNull BindingTrace trace, @NotNull Collection> descriptors) {} @Override public void instantiationOfAbstractClass(@NotNull BindingTrace trace) {} @@ -83,11 +84,11 @@ import java.util.List; public void invisibleMember(@NotNull BindingTrace trace, @NotNull DeclarationDescriptor descriptor) {} }; - void bindReference(@NotNull BindingTrace trace, @NotNull ResolvedCallImpl resolvedCall); + void bindResolvedCall(@NotNull BindingTrace trace, @NotNull ResolvedCallWithTrace resolvedCall); void unresolvedReference(@NotNull BindingTrace trace); - void recordAmbiguity(BindingTrace trace, Collection> candidates); + void recordAmbiguity(BindingTrace trace, Collection> candidates); void missingReceiver(@NotNull BindingTrace trace, @NotNull ReceiverDescriptor expectedReceiver); @@ -99,9 +100,9 @@ import java.util.List; void wrongNumberOfTypeArguments(@NotNull BindingTrace trace, int expectedTypeArgumentCount); - void ambiguity(@NotNull BindingTrace trace, @NotNull Collection> descriptors); + void ambiguity(@NotNull BindingTrace trace, @NotNull Collection> descriptors); - void noneApplicable(@NotNull BindingTrace trace, @NotNull Collection> descriptors); + void noneApplicable(@NotNull BindingTrace trace, @NotNull Collection> descriptors); void instantiationOfAbstractClass(@NotNull BindingTrace trace); From e2c7267ecc7552bf0f2a1f97d6c50b03b946459d Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:17:37 +0400 Subject: [PATCH 10/50] added VariableAsFunctionResolvedCall containing two calls (for variable and for 'invoke' function) --- .../calls/VariableAsFunctionResolvedCall.java | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/VariableAsFunctionResolvedCall.java diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/VariableAsFunctionResolvedCall.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/VariableAsFunctionResolvedCall.java new file mode 100644 index 00000000000..1cd94383246 --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/VariableAsFunctionResolvedCall.java @@ -0,0 +1,119 @@ +/* + * Copyright 2010-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.lang.resolve.calls; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.lang.descriptors.*; +import org.jetbrains.jet.lang.resolve.TemporaryBindingTrace; +import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; +import org.jetbrains.jet.lang.types.JetType; +import org.jetbrains.jet.lang.types.lang.JetStandardClasses; + +import java.util.List; +import java.util.Map; + +/** + * @author svtk + */ +public class VariableAsFunctionResolvedCall implements ResolvedCallWithTrace { + private final ResolvedCallWithTrace functionCall; + private final ResolvedCallWithTrace variableCall; + private final VariableAsFunctionDescriptor variableAsFunctionDescriptor; + + public VariableAsFunctionResolvedCall(@NotNull ResolvedCallWithTrace functionCall, + @NotNull ResolvedCallWithTrace variableCall) { + this.functionCall = functionCall; + this.variableCall = variableCall; + if (JetStandardClasses.isFunctionType(variableCall.getResultingDescriptor().getType())) { + variableAsFunctionDescriptor = VariableAsFunctionDescriptor.create(variableCall.getResultingDescriptor()); + } + else { + variableAsFunctionDescriptor = null; + } + } + + public ResolvedCallWithTrace getFunctionCall() { + return functionCall; + } + + public ResolvedCallWithTrace getVariableCall() { + return variableCall; + } + + @NotNull + @Override + public FunctionDescriptor getCandidateDescriptor() { + return variableAsFunctionDescriptor != null ? variableAsFunctionDescriptor : functionCall.getResultingDescriptor(); + } + + @NotNull + @Override + public FunctionDescriptor getResultingDescriptor() { + return variableAsFunctionDescriptor != null ? variableAsFunctionDescriptor : functionCall.getResultingDescriptor(); + } + + @NotNull + @Override + public ReceiverDescriptor getReceiverArgument() { + ReceiverDescriptor receiverArgument = variableCall.getReceiverArgument(); + return receiverArgument.exists() ? receiverArgument : functionCall.getReceiverArgument(); + } + + @NotNull + @Override + public ReceiverDescriptor getThisObject() { + return variableCall.getThisObject(); + } + + @NotNull + @Override + public Map getValueArguments() { + return functionCall.getValueArguments(); + } + + @NotNull + @Override + public List getValueArgumentsByIndex() { + return functionCall.getValueArgumentsByIndex(); + } + + @NotNull + @Override + public Map getTypeArguments() { + return functionCall.getTypeArguments(); + } + + @NotNull + @Override + public ResolutionStatus getStatus() { + if (variableCall.getStatus() == ResolutionStatus.SUCCESS) { + return functionCall.getStatus(); + } + return variableCall.getStatus(); + } + + @Override + public boolean isDirty() { + return functionCall.isDirty(); + } + + @Override + public TemporaryBindingTrace getTrace() { + //functionCall.trace is temporary trace above variableCall.trace and is committed already + return variableCall.getTrace(); + } +} From 5b49869cac78f7787c90d88c4e77e988f5cd5a58 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:21:13 +0400 Subject: [PATCH 11/50] changed CallTransformer responsible for resolving second call ('invoke') for 'variable as function' case --- .../calls/CallTransformationStrategy.java | 118 --------- .../lang/resolve/calls/CallTransformer.java | 239 ++++++++++++++++++ 2 files changed, 239 insertions(+), 118 deletions(-) delete mode 100644 compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformationStrategy.java create mode 100644 compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformationStrategy.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformationStrategy.java deleted file mode 100644 index 5fc68364ae5..00000000000 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformationStrategy.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2010-2012 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.jet.lang.resolve.calls; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.jet.lang.descriptors.CallableDescriptor; -import org.jetbrains.jet.lang.descriptors.FunctionDescriptor; -import org.jetbrains.jet.lang.descriptors.VariableDescriptor; -import org.jetbrains.jet.lang.psi.*; -import org.jetbrains.jet.lang.resolve.BindingTrace; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -/** - * @author svtk - */ -public interface CallTransformationStrategy { - - @NotNull - CallResolutionContext createCallContext(@NotNull ResolutionCandidate candidate, - @NotNull ResolutionTask task, - @NotNull BindingTrace trace, - @NotNull TracingStrategy tracing); - - @NotNull - Collection> transformResultCall(@NotNull CallResolutionContext callResolutionContext, - @NotNull CallResolver callResolver, - @NotNull ResolutionTask task); - - CallTransformationStrategy - PROPERTY_CALL_TRANSFORMATION_STRATEGY = new CallTransformationStrategy() { - @NotNull - @Override - public CallResolutionContext createCallContext(@NotNull ResolutionCandidate candidate, - @NotNull ResolutionTask task, @NotNull BindingTrace trace, @NotNull TracingStrategy tracing) { - ResolvedCallImpl candidateCall = ResolvedCallImpl.create(candidate); - return new CallResolutionContext(candidateCall, task, trace, tracing); - } - - @NotNull - @Override - public Collection> transformResultCall(@NotNull CallResolutionContext context, - @NotNull CallResolver callResolver, @NotNull ResolutionTask task) { - return Collections.singleton(context.candidateCall); - } - }; - - CallTransformationStrategy - FUNCTION_CALL_TRANSFORMATION_STRATEGY = new CallTransformationStrategy() { - @NotNull - @Override - public CallResolutionContext createCallContext(@NotNull ResolutionCandidate candidate, - @NotNull ResolutionTask task, - @NotNull BindingTrace trace, - @NotNull TracingStrategy tracing) { - if (candidate.getDescriptor() instanceof FunctionDescriptor) { - return new CallResolutionContext(ResolvedCallImpl.create(candidate), task, trace, tracing); - } - assert candidate.getDescriptor() instanceof VariableDescriptor; - Call propertyCall = new DelegatingCall(task.call) { - @Override - public JetValueArgumentList getValueArgumentList() { - return null; - } - - @NotNull - @Override - public List getFunctionLiteralArguments() { - return Collections.emptyList(); - } - - @NotNull - @Override - public List getTypeArguments() { - return Collections.emptyList(); - } - - @Override - public JetTypeArgumentList getTypeArgumentList() { - return null; - } - }; - return new CallResolutionContext(ResolvedCallImpl.create(candidate), task, trace, tracing, propertyCall); - } - - @NotNull - @Override - public Collection> transformResultCall(@NotNull CallResolutionContext context, - @NotNull CallResolver callResolver, @NotNull ResolutionTask task) { - FunctionDescriptor descriptor = context.candidateCall.getCandidateDescriptor(); - if (descriptor instanceof FunctionDescriptor) { - return Collections.singleton(context.candidateCall); - } - assert descriptor instanceof VariableDescriptor; - BasicResolutionContext basicResolutionContext = - BasicResolutionContext.create(context.trace, context.scope, task.call, context.expectedType, context.dataFlowInfo); - OverloadResolutionResults results = - callResolver.resolveCallWithGivenName(basicResolutionContext, task.reference, "invoke"); - return ((OverloadResolutionResultsImpl)results).getResultingCalls(); - } - }; -} diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java new file mode 100644 index 00000000000..adda74ced5e --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java @@ -0,0 +1,239 @@ +/* + * Copyright 2010-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.lang.resolve.calls; + +import com.google.common.base.Function; +import com.google.common.collect.Collections2; +import com.google.common.collect.Lists; +import com.intellij.psi.PsiElement; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.lang.descriptors.CallableDescriptor; +import org.jetbrains.jet.lang.descriptors.FunctionDescriptor; +import org.jetbrains.jet.lang.descriptors.VariableDescriptor; +import org.jetbrains.jet.lang.psi.*; +import org.jetbrains.jet.lang.resolve.*; +import org.jetbrains.jet.lang.resolve.scopes.receivers.ExpressionReceiver; +import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; +import org.jetbrains.jet.lang.types.JetType; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * CallTransformer treats specially 'variable as function' call case, other cases keeps unchanged (base realization). + * + * For the call 'b.foo(1)' where foo is a variable that has method 'invoke' (for example of function type) + * CallTransformer creates two contexts, two calls in each, and performs second ('invoke') call resolution: + * + * context#1. calls: 'b.foo' 'invoke(1)' + * context#2. calls: 'foo' 'b.invoke(1)' + * + * If success VariableAsFunctionResolvedCall is created. + * + * @author svtk + */ +public class CallTransformer { + private CallTransformer() {} + + /** + * Returns two contexts for 'variable as function' case (in FUNCTION_CALL_TRANSFORMER), one context otherwise + */ + @NotNull + public Collection> createCallContexts(@NotNull ResolutionCandidate candidate, + @NotNull ResolutionTask task, + @NotNull TemporaryBindingTrace temporaryTrace) { + + ResolvedCallImpl candidateCall = ResolvedCallImpl.create(candidate, temporaryTrace); + return Collections.singleton(CallResolutionContext.create(candidateCall, task, temporaryTrace, task.tracing)); + } + + /** + * Returns collection of resolved calls for 'invoke' for 'variable as function' case (in FUNCTION_CALL_TRANSFORMER), + * the resolved call from callResolutionContext otherwise + */ + @NotNull + public Collection> transformCall(@NotNull CallResolutionContext callResolutionContext, + @NotNull CallResolver callResolver, + @NotNull ResolutionTask task) { + + return Collections.singleton((ResolvedCallWithTrace)callResolutionContext.candidateCall); + } + + + public static CallTransformer PROPERTY_CALL_TRANSFORMER = new CallTransformer(); + + public static CallTransformer FUNCTION_CALL_TRANSFORMER = new CallTransformer() { + @NotNull + @Override + public Collection> createCallContexts(@NotNull ResolutionCandidate candidate, + @NotNull ResolutionTask task, @NotNull TemporaryBindingTrace temporaryTrace) { + + if (candidate.getDescriptor() instanceof FunctionDescriptor) { + return super.createCallContexts(candidate, task, temporaryTrace); + } + + assert candidate.getDescriptor() instanceof VariableDescriptor; + + boolean hasReceiver = candidate.getReceiverArgument().exists(); + Call variableCall = stripCallArguments(task); + if (!hasReceiver) { + CallResolutionContext context = CallResolutionContext.create( + ResolvedCallImpl.create(candidate, temporaryTrace), task, temporaryTrace, task.tracing, variableCall); + return Collections.singleton(context); + } + Call variableCallWithoutReceiver = stripReceiver(variableCall); + CallResolutionContext contextWithReceiver = createContextWithChainedTrace( + candidate, variableCall, temporaryTrace, task); + + ResolutionCandidate candidateWithoutReceiver = ResolutionCandidate.create( + candidate.getDescriptor(), candidate.getThisObject(), ReceiverDescriptor.NO_RECEIVER); + + CallResolutionContext contextWithoutReceiver = createContextWithChainedTrace( + candidateWithoutReceiver, variableCallWithoutReceiver, temporaryTrace, task); + + contextWithoutReceiver.delayedReceiverForVariableAsFunctionSecondCall = variableCall.getExplicitReceiver(); + + return Lists.newArrayList(contextWithReceiver, contextWithoutReceiver); + } + + private CallResolutionContext createContextWithChainedTrace(ResolutionCandidate candidate, + Call call, TemporaryBindingTrace temporaryTrace, ResolutionTask task) { + + ChainedTemporaryBindingTrace chainedTrace = ChainedTemporaryBindingTrace.create(temporaryTrace); + ResolvedCallImpl resolvedCall = ResolvedCallImpl.create(candidate, chainedTrace); + return CallResolutionContext.create(resolvedCall, task, chainedTrace, task.tracing, call); + } + + private Call stripCallArguments(@NotNull ResolutionTask task) { + return new DelegatingCall(task.call) { + @Override + public JetValueArgumentList getValueArgumentList() { + return null; + } + + @NotNull + @Override + public List getValueArguments() { + return Collections.emptyList(); + } + + @NotNull + @Override + public List getFunctionLiteralArguments() { + return Collections.emptyList(); + } + + @NotNull + @Override + public List getTypeArguments() { + return Collections.emptyList(); + } + + @Override + public JetTypeArgumentList getTypeArgumentList() { + return null; + } + }; + } + + private Call stripReceiver(@NotNull Call variableCall) { + return new DelegatingCall(variableCall) { + @NotNull + @Override + public ReceiverDescriptor getExplicitReceiver() { + return ReceiverDescriptor.NO_RECEIVER; + } + }; + } + + @NotNull + @Override + public Collection> transformCall(@NotNull final CallResolutionContext context, + @NotNull CallResolver callResolver, @NotNull final ResolutionTask task) { + + final CallableDescriptor descriptor = context.candidateCall.getCandidateDescriptor(); + if (descriptor instanceof FunctionDescriptor) { + return super.transformCall(context, callResolver, task); + } + + assert descriptor instanceof VariableDescriptor; + JetType returnType = descriptor.getReturnType(); + if (returnType == null) { + return Collections.emptyList(); + } + + final ResolvedCallWithTrace variableResolvedCall = (ResolvedCallWithTrace)context.candidateCall; + + Call functionCall = createFunctionCall(context, task, returnType); + + final TemporaryBindingTrace variableCallTrace = context.candidateCall.getTrace(); + BasicResolutionContext basicResolutionContext = BasicResolutionContext.create(variableCallTrace, context.scope, functionCall, context.expectedType, context.dataFlowInfo); + + // 'invoke' call resolve + OverloadResolutionResults results = callResolver.resolveCallWithGivenName(basicResolutionContext, task.reference, "invoke"); + Collection> calls = ((OverloadResolutionResultsImpl)results).getResultingCalls(); + + return Collections2.transform(calls, new Function, ResolvedCallWithTrace>() { + @Override + public ResolvedCallWithTrace apply(ResolvedCallWithTrace functionResolvedCall) { + return new VariableAsFunctionResolvedCall(functionResolvedCall, variableResolvedCall); + } + }); + } + + private Call createFunctionCall(final CallResolutionContext context, + final ResolutionTask task, JetType returnType) { + + final ExpressionReceiver receiverFromVariable = new ExpressionReceiver(task.reference, returnType); + final JetSimpleNameExpression invokeExpression = (JetSimpleNameExpression) JetPsiFactory.createExpression( + task.call.getCallElement().getProject(), "invoke"); + + return new DelegatingCall(task.call) { + @NotNull + @Override + public ReceiverDescriptor getExplicitReceiver() { + return context.delayedReceiverForVariableAsFunctionSecondCall; + } + + @NotNull + @Override + public ReceiverDescriptor getThisObject() { + return receiverFromVariable; + } + + @Override + public JetExpression getCalleeExpression() { + return invokeExpression; + } + + @NotNull + @Override + public PsiElement getCallElement() { + if (task.call.getCallElement() instanceof JetCallElement) { + //to report errors properly + JetValueArgumentList list = ((JetCallElement)task.call.getCallElement()).getValueArgumentList(); + if (list != null) { + return list; + } + } + return invokeExpression; + } + }; + } + }; +} From aeed586fba0f3542d243c1c5719ea0ce2bc3c79e Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:24:19 +0400 Subject: [PATCH 12/50] 'thisObject' is known in 'variable as function' call case, while constructing second 'invoke' call --- .../src/org/jetbrains/jet/lang/psi/Call.java | 3 +++ .../jetbrains/jet/lang/resolve/calls/CallMaker.java | 12 ++++++++++++ .../jet/lang/resolve/calls/DelegatingCall.java | 6 ++++++ 3 files changed, 21 insertions(+) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java index 4d5a1fa5937..d3c46683dbb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java @@ -36,6 +36,9 @@ public interface Call { @NotNull ReceiverDescriptor getExplicitReceiver(); + @NotNull + ReceiverDescriptor getThisObject(); + @Nullable JetExpression getCalleeExpression(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallMaker.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallMaker.java index abdb02465b6..98e42503e85 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallMaker.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallMaker.java @@ -98,6 +98,12 @@ public class CallMaker { return explicitReceiver; } + @NotNull + @Override + public ReceiverDescriptor getThisObject() { + return ReceiverDescriptor.NO_RECEIVER; + } + @Override public JetExpression getCalleeExpression() { return calleeExpression; @@ -199,6 +205,12 @@ public class CallMaker { return explicitReceiver; } + @NotNull + @Override + public ReceiverDescriptor getThisObject() { + return ReceiverDescriptor.NO_RECEIVER; + } + @Nullable public JetExpression getCalleeExpression() { return callElement.getCalleeExpression(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/DelegatingCall.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/DelegatingCall.java index 80cc4eb7f29..9c82f0829d8 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/DelegatingCall.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/DelegatingCall.java @@ -48,6 +48,12 @@ public class DelegatingCall implements Call { return delegate.getExplicitReceiver(); } + @NotNull + @Override + public ReceiverDescriptor getThisObject() { + return delegate.getThisObject(); + } + @Override @Nullable public JetExpression getCalleeExpression() { From 2fa8fd50fcc5d88601d225fcce27bbacab464228 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:26:28 +0400 Subject: [PATCH 13/50] 'getNonMembersByName' instead of 'getExtensionsByName' not to throw out invocation of variables with members-extensions --- .../calls/CallableDescriptorCollector.java | 38 ++++++++++ ...java => CallableDescriptorCollectors.java} | 70 ++++++------------- .../lang/resolve/calls/TaskPrioritizer.java | 37 +++++----- 3 files changed, 82 insertions(+), 63 deletions(-) create mode 100644 compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallableDescriptorCollector.java rename compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/{MemberPrioritizers.java => CallableDescriptorCollectors.java} (60%) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallableDescriptorCollector.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallableDescriptorCollector.java new file mode 100644 index 00000000000..27d9c77c400 --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallableDescriptorCollector.java @@ -0,0 +1,38 @@ +/* + * Copyright 2010-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.lang.resolve.calls; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.lang.descriptors.CallableDescriptor; +import org.jetbrains.jet.lang.resolve.scopes.JetScope; +import org.jetbrains.jet.lang.types.JetType; + +import java.util.Collection; + +/** + * @author svtk + */ +public interface CallableDescriptorCollector { + @NotNull + Collection getNonExtensionsByName(JetScope scope, String name); + + @NotNull + Collection getMembersByName(@NotNull JetType receiver, String name); + + @NotNull + Collection getNonMembersByName(JetScope scope, String name); +} diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/MemberPrioritizers.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallableDescriptorCollectors.java similarity index 60% rename from compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/MemberPrioritizers.java rename to compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallableDescriptorCollectors.java index a7e793dcb4a..9e018ec229c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/MemberPrioritizers.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallableDescriptorCollectors.java @@ -26,7 +26,6 @@ import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.resolve.DescriptorUtils; import org.jetbrains.jet.lang.resolve.scopes.JetScope; import org.jetbrains.jet.lang.types.ErrorUtils; -import org.jetbrains.jet.lang.types.lang.JetStandardClasses; import org.jetbrains.jet.lang.types.JetType; import java.util.*; @@ -34,11 +33,9 @@ import java.util.*; /** * @author abreslav */ -public class MemberPrioritizers { - - - /*package*/ static MemberPrioritizer FUNCTION_TASK_PRIORITIZER = new MemberPrioritizer() { +public class CallableDescriptorCollectors { + /*package*/ static CallableDescriptorCollector FUNCTIONS = new CallableDescriptorCollector() { @NotNull @Override @@ -51,8 +48,6 @@ public class MemberPrioritizers { } } addConstructors(scope, name, functions); - - addVariableAsFunction(scope, name, functions, false); return functions; } @@ -62,22 +57,13 @@ public class MemberPrioritizers { JetScope receiverScope = receiverType.getMemberScope(); Set members = Sets.newHashSet(receiverScope.getFunctions(name)); addConstructors(receiverScope, name, members); - addVariableAsFunction(receiverScope, name, members, false); return members; } @NotNull @Override - public Collection getExtensionsByName(JetScope scope, String name) { - Set extensionFunctions = Sets.newHashSet(scope.getFunctions(name)); - for (Iterator iterator = extensionFunctions.iterator(); iterator.hasNext(); ) { - FunctionDescriptor descriptor = iterator.next(); - if (!descriptor.getReceiverParameter().exists()) { - iterator.remove(); - } - } - addVariableAsFunction(scope, name, extensionFunctions, true); - return extensionFunctions; + public Collection getNonMembersByName(JetScope scope, String name) { + return scope.getFunctions(name); } private void addConstructors(JetScope scope, String name, Collection functions) { @@ -87,25 +73,9 @@ public class MemberPrioritizers { functions.addAll(classDescriptor.getConstructors()); } } - - private void addVariableAsFunction(JetScope scope, String name, Set functions, boolean receiverNeeded) { - VariableDescriptor variable = scope.getLocalVariable(name); - if (variable == null) { - variable = DescriptorUtils.filterNonExtensionProperty(scope.getProperties(name)); - } - if (variable != null) { - JetType outType = variable.getType(); - if (outType != null && JetStandardClasses.isFunctionType(outType)) { - VariableAsFunctionDescriptor functionDescriptor = VariableAsFunctionDescriptor.create(variable); - if ((functionDescriptor.getReceiverParameter().exists()) == receiverNeeded) { - functions.add(functionDescriptor); - } - } - } - } }; - /*package*/ static MemberPrioritizer VARIABLE_TASK_PRIORITIZER = new MemberPrioritizer() { + /*package*/ static CallableDescriptorCollector VARIABLES = new CallableDescriptorCollector() { @NotNull @Override @@ -126,17 +96,19 @@ public class MemberPrioritizers { @NotNull @Override - public Collection getExtensionsByName(JetScope scope, String name) { - return Collections2.filter(scope.getProperties(name), new Predicate() { - @Override - public boolean apply(@Nullable VariableDescriptor variableDescriptor) { - return (variableDescriptor != null) && variableDescriptor.getReceiverParameter().exists(); - } - }); + public Collection getNonMembersByName(JetScope scope, String name) { + Collection result = Sets.newLinkedHashSet(); + + VariableDescriptor localVariable = scope.getLocalVariable(name); + if (localVariable != null) { + result.add(localVariable); + } + result.addAll(scope.getProperties(name)); + return result; } }; - /*package*/ static MemberPrioritizer PROPERTY_TASK_PRIORITIZER = new MemberPrioritizer() { + /*package*/ static CallableDescriptorCollector PROPERTIES = new CallableDescriptorCollector() { private Collection filterProperties(Collection variableDescriptors) { ArrayList properties = Lists.newArrayList(); for (VariableDescriptor descriptor : variableDescriptors) { @@ -150,19 +122,23 @@ public class MemberPrioritizers { @NotNull @Override public Collection getNonExtensionsByName(JetScope scope, String name) { - return filterProperties(VARIABLE_TASK_PRIORITIZER.getNonExtensionsByName(scope, name)); + return filterProperties(VARIABLES.getNonExtensionsByName(scope, name)); } @NotNull @Override public Collection getMembersByName(@NotNull JetType receiver, String name) { - return filterProperties(VARIABLE_TASK_PRIORITIZER.getMembersByName(receiver, name)); + return filterProperties(VARIABLES.getMembersByName(receiver, name)); } @NotNull @Override - public Collection getExtensionsByName(JetScope scope, String name) { - return filterProperties(VARIABLE_TASK_PRIORITIZER.getExtensionsByName(scope, name)); + public Collection getNonMembersByName(JetScope scope, String name) { + return filterProperties(VARIABLES.getNonMembersByName(scope, name)); } + }; + + /*package*/ static List> FUNCTIONS_AND_VARIABLES = Lists.newArrayList( + FUNCTIONS, VARIABLES); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java index 6a1cd61c00f..eb3f565adab 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/TaskPrioritizer.java @@ -74,8 +74,8 @@ import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor } @NotNull - public static List> computePrioritizedTasks(@NotNull BasicResolutionContext context, @NotNull String name, - @NotNull JetReferenceExpression functionReference, @NotNull List> memberPrioritizers) { + public static List> computePrioritizedTasks(@NotNull BasicResolutionContext context, @NotNull String name, + @NotNull JetReferenceExpression functionReference, @NotNull List> callableDescriptorCollectors) { ReceiverDescriptor explicitReceiver = context.call.getExplicitReceiver(); final JetScope scope; if (explicitReceiver.exists() && explicitReceiver.getType() instanceof NamespaceType) { @@ -96,23 +96,26 @@ import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor } }; - ResolutionTaskHolder result = new ResolutionTaskHolder(functionReference, context, visibleStrategy ); - doComputeTasks(scope, explicitReceiver, name, result, context, memberPrioritizers); - + ResolutionTaskHolder result = new ResolutionTaskHolder(functionReference, context, visibleStrategy ); + for (CallableDescriptorCollector callableDescriptorCollector : callableDescriptorCollectors) { + doComputeTasks(scope, explicitReceiver, name, result, context, callableDescriptorCollector); + } return result.getTasks(); } - private static void doComputeTasks(@NotNull JetScope scope, @NotNull ReceiverDescriptor receiver, - @NotNull String name, @NotNull ResolutionTaskHolder result, - @NotNull BasicResolutionContext context, @NotNull List> memberPrioritizers) { - MemberPrioritizer memberPrioritizer = memberPrioritizers.get(0); + private static void doComputeTasks(@NotNull JetScope scope, @NotNull ReceiverDescriptor receiver, + @NotNull String name, @NotNull ResolutionTaskHolder result, + @NotNull BasicResolutionContext context, @NotNull CallableDescriptorCollector callableDescriptorCollector) { AutoCastServiceImpl autoCastService = new AutoCastServiceImpl(context.dataFlowInfo, context.trace.getBindingContext()); List implicitReceivers = Lists.newArrayList(); scope.getImplicitReceiversHierarchy(implicitReceivers); + if (context.call.getThisObject().exists()) { + implicitReceivers.add(context.call.getThisObject()); + } if (receiver.exists()) { List variantsForExplicitReceiver = autoCastService.getVariantsForReceiver(receiver); - Collection> extensionFunctions = convertWithImpliedThis(scope, variantsForExplicitReceiver, memberPrioritizer.getExtensionsByName(scope, name)); + Collection> extensionFunctions = convertWithImpliedThis(scope, variantsForExplicitReceiver, callableDescriptorCollector.getNonMembersByName(scope, name)); List> nonlocals = Lists.newArrayList(); List> locals = Lists.newArrayList(); //noinspection unchecked,RedundantTypeArguments @@ -120,7 +123,7 @@ import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor Collection> members = Lists.newArrayList(); for (ReceiverDescriptor variant : variantsForExplicitReceiver) { - Collection membersForThisVariant = memberPrioritizer.getMembersByName(variant.getType(), name); + Collection membersForThisVariant = callableDescriptorCollector.getMembersByName(variant.getType(), name); convertWithReceivers(membersForThisVariant, Collections.singletonList(variant), Collections.singletonList(NO_RECEIVER), members); } @@ -128,7 +131,8 @@ import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor result.addMembers(members); for (ReceiverDescriptor implicitReceiver : implicitReceivers) { - Collection memberExtensions = memberPrioritizer.getExtensionsByName(implicitReceiver.getType().getMemberScope(), name); + Collection memberExtensions = callableDescriptorCollector.getNonMembersByName( + implicitReceiver.getType().getMemberScope(), name); List variantsForImplicitReceiver = autoCastService.getVariantsForReceiver(implicitReceiver); result.addNonLocalExtensions(convertWithReceivers(memberExtensions, variantsForImplicitReceiver, variantsForExplicitReceiver)); } @@ -136,7 +140,8 @@ import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor result.addNonLocalExtensions(nonlocals); } else { - Collection> functions = convertWithImpliedThis(scope, Collections.singletonList(receiver), memberPrioritizer.getNonExtensionsByName(scope, name)); + Collection> functions = convertWithImpliedThis(scope, Collections.singletonList(receiver), callableDescriptorCollector + .getNonExtensionsByName(scope, name)); List> nonlocals = Lists.newArrayList(); List> locals = Lists.newArrayList(); @@ -147,18 +152,18 @@ import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor result.addNonLocalExtensions(nonlocals); for (ReceiverDescriptor implicitReceiver : implicitReceivers) { - doComputeTasks(scope, implicitReceiver, name, result, context, memberPrioritizers); + doComputeTasks(scope, implicitReceiver, name, result, context, callableDescriptorCollector); } } } - private static Collection> convertWithReceivers(Collection descriptors, Iterable thisObjects, Iterable receiverParameters) { + private static Collection> convertWithReceivers(Collection descriptors, Iterable thisObjects, Iterable receiverParameters) { Collection> result = Lists.newArrayList(); convertWithReceivers(descriptors, thisObjects, receiverParameters, result); return result; } - private static void convertWithReceivers(Collection descriptors, Iterable thisObjects, Iterable receiverParameters, Collection> result) { + private static void convertWithReceivers(Collection descriptors, Iterable thisObjects, Iterable receiverParameters, Collection> result) { for (ReceiverDescriptor thisObject : thisObjects) { for (ReceiverDescriptor receiverParameter : receiverParameters) { for (D extension : descriptors) { From 24082a67d795d6a7ac5a154923c313a156ed85b2 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:32:14 +0400 Subject: [PATCH 14/50] correspondence between CallableDescriptorCollector and CallTransformer (special treatment only for function invocations) --- .../jet/lang/resolve/calls/CallResolver.java | 146 +++++++++--------- .../resolve/calls/ResolutionDebugInfo.java | 2 +- .../resolve/calls/ResolutionTaskHolder.java | 8 +- 3 files changed, 80 insertions(+), 76 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java index 219f06d9156..1e699b0ca63 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java @@ -102,16 +102,16 @@ public class CallResolver { if (referencedName == null) { return OverloadResolutionResultsImpl.nameNotFound(); } - List> memberPrioritizers = Lists.newArrayList(); + List> callableDescriptorCollectors = Lists.newArrayList(); if (nameExpression.getReferencedNameElementType() == JetTokens.FIELD_IDENTIFIER) { referencedName = referencedName.substring(1); - memberPrioritizers.add(MemberPrioritizers.PROPERTY_TASK_PRIORITIZER); + callableDescriptorCollectors.add(CallableDescriptorCollectors.PROPERTIES); } else { - memberPrioritizers.add(MemberPrioritizers.VARIABLE_TASK_PRIORITIZER); + callableDescriptorCollectors.add(CallableDescriptorCollectors.VARIABLES); } - List> prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, referencedName, nameExpression, memberPrioritizers); - return doResolveCall(context, prioritizedTasks, CallTransformationStrategy.PROPERTY_CALL_TRANSFORMATION_STRATEGY, nameExpression); + List> prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, referencedName, nameExpression, callableDescriptorCollectors); + return doResolveCall(context, prioritizedTasks, CallTransformer.PROPERTY_CALL_TRANSFORMER, nameExpression); } @NotNull @@ -119,9 +119,8 @@ public class CallResolver { @NotNull BasicResolutionContext context, @NotNull final JetReferenceExpression functionReference, @NotNull String name) { - List> tasks = TaskPrioritizer.computePrioritizedTasks( - context, name, functionReference, Collections.singletonList(MemberPrioritizers.FUNCTION_TASK_PRIORITIZER)); - return doResolveCall(context, tasks, CallTransformationStrategy.FUNCTION_CALL_TRANSFORMATION_STRATEGY, functionReference); + List> tasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); + return doResolveCall(context, tasks, CallTransformer.FUNCTION_CALL_TRANSFORMER, functionReference); } @NotNull @@ -131,7 +130,7 @@ public class CallResolver { @NotNull public OverloadResolutionResults resolveFunctionCall(@NotNull BasicResolutionContext context) { - List> prioritizedTasks; + List> prioritizedTasks; JetExpression calleeExpression = context.call.getCalleeExpression(); final JetReferenceExpression functionReference; @@ -142,7 +141,7 @@ public class CallResolver { String name = expression.getReferencedName(); if (name == null) return checkArgumentTypesAndFail(context); - prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, Collections.singletonList(MemberPrioritizers.FUNCTION_TASK_PRIORITIZER)); + prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); ResolutionTask.DescriptorCheckStrategy abstractConstructorCheck = new ResolutionTask.DescriptorCheckStrategy() { @Override public boolean performAdvancedChecks(D descriptor, BindingTrace trace, TracingStrategy tracing) { @@ -184,8 +183,8 @@ public class CallResolver { context.trace.report(NO_CONSTRUCTOR.on(reportAbsenceOn)); return checkArgumentTypesAndFail(context); } - Collection> candidates = TaskPrioritizer.convertWithImpliedThis(context.scope, Collections.singletonList(NO_RECEIVER), constructors); - prioritizedTasks.add(new ResolutionTask(candidates, functionReference, context)); // !! DataFlowInfo.EMPTY + Collection> candidates = TaskPrioritizer.convertWithImpliedThis(context.scope, Collections.singletonList(NO_RECEIVER), constructors); + prioritizedTasks.add(new ResolutionTask(candidates, functionReference, context)); // !! DataFlowInfo.EMPTY } else { context.trace.report(NOT_A_CLASS.on(calleeExpression)); @@ -206,8 +205,8 @@ public class CallResolver { context.trace.report(NO_CONSTRUCTOR.on(reportAbsenceOn)); return checkArgumentTypesAndFail(context); } - List> candidates = ResolutionCandidate.convertCollection(constructors); - prioritizedTasks = Collections.singletonList(new ResolutionTask(candidates, functionReference, context)); // !! DataFlowInfo.EMPTY + List> candidates = ResolutionCandidate.convertCollection(constructors); + prioritizedTasks = Collections.singletonList(new ResolutionTask(candidates, functionReference, context)); // !! DataFlowInfo.EMPTY } else if (calleeExpression != null) { // Here we handle the case where the callee expression must be something of type function, e.g. (foo.bar())(1, 2) @@ -223,7 +222,7 @@ public class CallResolver { FunctionDescriptorImpl functionDescriptor = new ExpressionAsFunctionDescriptor(context.scope.getContainingDeclaration(), "[for expression " + calleeExpression.getText() + "]"); FunctionDescriptorUtil.initializeFromFunctionType(functionDescriptor, calleeType, NO_RECEIVER); - ResolutionCandidate resolutionCandidate = ResolutionCandidate.create(functionDescriptor); + ResolutionCandidate resolutionCandidate = ResolutionCandidate.create(functionDescriptor); resolutionCandidate.setReceiverArgument(context.call.getExplicitReceiver()); // strictly speaking, this is a hack: @@ -231,7 +230,7 @@ public class CallResolver { // so we wrap what we have into a fake reference and pass it on (unwrap on the other end) functionReference = new JetFakeReference(calleeExpression); - prioritizedTasks = Collections.singletonList(new ResolutionTask(Collections.singleton(resolutionCandidate), functionReference, context)); + prioritizedTasks = Collections.singletonList(new ResolutionTask(Collections.singleton(resolutionCandidate), functionReference, context)); } else { // checkTypesWithNoCallee(trace, scope, call); @@ -239,7 +238,7 @@ public class CallResolver { } } - return doResolveCall(context, prioritizedTasks, CallTransformationStrategy.FUNCTION_CALL_TRANSFORMATION_STRATEGY, functionReference); + return doResolveCall(context, prioritizedTasks, CallTransformer.FUNCTION_CALL_TRANSFORMER, functionReference); } private OverloadResolutionResults checkArgumentTypesAndFail(BasicResolutionContext context) { @@ -248,10 +247,10 @@ public class CallResolver { } @NotNull - private OverloadResolutionResults doResolveCall( + private OverloadResolutionResults doResolveCall( @NotNull final BasicResolutionContext context, - @NotNull final List> prioritizedTasks, // high to low priority - @NotNull CallTransformationStrategy callTransformationStrategy, + @NotNull final List> prioritizedTasks, // high to low priority + @NotNull CallTransformer callTransformer, @NotNull final JetReferenceExpression reference) { ResolutionDebugInfo.Data debugInfo = ResolutionDebugInfo.create(); @@ -265,10 +264,11 @@ public class CallResolver { debugInfo.set(ResolutionDebugInfo.TASKS, prioritizedTasks); TemporaryBindingTrace traceForFirstNonemptyCandidateSet = null; - OverloadResolutionResultsImpl resultsForFirstNonemptyCandidateSet = null; - for (ResolutionTask task : prioritizedTasks) { + OverloadResolutionResultsImpl resultsForFirstNonemptyCandidateSet = null; + for (ResolutionTask task : prioritizedTasks) { TemporaryBindingTrace temporaryTrace = TemporaryBindingTrace.create(context.trace); - OverloadResolutionResultsImpl results = performResolutionGuardedForExtraFunctionLiteralArguments(task.withTrace(temporaryTrace), callTransformationStrategy); + OverloadResolutionResultsImpl results = performResolutionGuardedForExtraFunctionLiteralArguments(task.withTrace(temporaryTrace), + callTransformer); if (results.isSuccess() || results.isAmbiguity()) { temporaryTrace.commit(); @@ -294,15 +294,15 @@ public class CallResolver { context.trace.report(UNRESOLVED_REFERENCE.on(reference)); checkTypesWithNoCallee(context); } - return resultsForFirstNonemptyCandidateSet != null ? resultsForFirstNonemptyCandidateSet : OverloadResolutionResultsImpl.nameNotFound(); + return resultsForFirstNonemptyCandidateSet != null ? resultsForFirstNonemptyCandidateSet : OverloadResolutionResultsImpl.nameNotFound(); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @NotNull - private OverloadResolutionResultsImpl performResolutionGuardedForExtraFunctionLiteralArguments(@NotNull ResolutionTask task, - @NotNull CallTransformationStrategy callTransformationStrategy) { - OverloadResolutionResultsImpl results = performResolution(task, callTransformationStrategy); + private OverloadResolutionResultsImpl performResolutionGuardedForExtraFunctionLiteralArguments(@NotNull ResolutionTask task, + @NotNull CallTransformer callTransformer) { + OverloadResolutionResultsImpl results = performResolution(task, callTransformer); // If resolution fails, we should check for some of the following situations: // class A { @@ -329,14 +329,14 @@ public class CallResolver { for (ResolutionCandidate candidate : task.getCandidates()) { newCandidates.add(ResolutionCandidate.create(candidate.getDescriptor())); } - ResolutionTask newContext = new ResolutionTask(newCandidates, task.reference, TemporaryBindingTrace.create(task.trace), task.scope, new DelegatingCall(task.call) { + ResolutionTask newContext = new ResolutionTask(newCandidates, task.reference, TemporaryBindingTrace.create(task.trace), task.scope, new DelegatingCall(task.call) { @NotNull @Override public List getFunctionLiteralArguments() { return Collections.emptyList(); } }, task.expectedType, task.dataFlowInfo); - OverloadResolutionResultsImpl resultsWithFunctionLiteralsStripped = performResolution(newContext, callTransformationStrategy); + OverloadResolutionResultsImpl resultsWithFunctionLiteralsStripped = performResolution(newContext, callTransformer); if (resultsWithFunctionLiteralsStripped.isSuccess() || resultsWithFunctionLiteralsStripped.isAmbiguity()) { task.tracing.danglingFunctionLiteralArgumentSuspected(task.trace, task.call.getFunctionLiteralArguments()); } @@ -346,23 +346,28 @@ public class CallResolver { } @NotNull - private OverloadResolutionResultsImpl performResolution(@NotNull ResolutionTask task, - @NotNull CallTransformationStrategy callTransformationStrategy) { + private OverloadResolutionResultsImpl performResolution(@NotNull ResolutionTask task, + @NotNull CallTransformer callTransformer) { for (ResolutionCandidate resolutionCandidate : task.getCandidates()) { TemporaryBindingTrace temporaryTrace = TemporaryBindingTrace.create(task.trace); - CallResolutionContext context = callTransformationStrategy.createCallContext(resolutionCandidate, task, temporaryTrace, task.tracing); - performResolutionForCandidateCall(context, task, temporaryTrace); + Collection> contexts = callTransformer.createCallContexts(resolutionCandidate, task, temporaryTrace); + Collection> calls = Lists.newArrayList(); + for (CallResolutionContext context : contexts) { - Collection> calls = callTransformationStrategy.transformResultCall(context, this, task); - for (ResolvedCallImpl call : calls) { - task.getResolvedCallMap().put(resolutionCandidate, call); + performResolutionForCandidateCall(context, task); + calls.addAll(callTransformer.transformCall(context, this, task)); + } + for (ResolvedCallWithTrace call : calls) { + + task.tracing.bindResolvedCall(call.getTrace(), call); + task.getResolvedCalls().add(call); } } - Set> successfulCandidates = Sets.newLinkedHashSet(); - Set> failedCandidates = Sets.newLinkedHashSet(); - for (ResolvedCallImpl candidateCall : task.getResolvedCallMap().values()) { + Set> successfulCandidates = Sets.newLinkedHashSet(); + Set> failedCandidates = Sets.newLinkedHashSet(); + for (ResolvedCallWithTrace candidateCall : task.getResolvedCalls()) { ResolutionStatus status = candidateCall.getStatus(); if (status.isSuccess()) { successfulCandidates.add(candidateCall); @@ -373,23 +378,19 @@ public class CallResolver { } } - OverloadResolutionResultsImpl results = computeResultAndReportErrors(task.trace, task.tracing, successfulCandidates, failedCandidates); + OverloadResolutionResultsImpl results = computeResultAndReportErrors(task.trace, task.tracing, successfulCandidates, failedCandidates); if (!results.isSingleResult()) { checkTypesWithNoCallee(task.toBasic()); } return results; } - private void performResolutionForCandidateCall(@NotNull CallResolutionContext context, - @NotNull ResolutionTask task, - @NotNull TemporaryBindingTrace temporaryTrace) { + private void performResolutionForCandidateCall(@NotNull CallResolutionContext context, + @NotNull ResolutionTask task) { + ResolvedCallImpl candidateCall = context.candidateCall; - - candidateCall.setTrace(temporaryTrace); D candidate = candidateCall.getCandidateDescriptor(); - context.tracing.bindReference(context.trace, candidateCall); - if (ErrorUtils.isError(candidate)) { candidateCall.addStatus(SUCCESS); checkTypesWithNoCallee(context.toBasic()); @@ -477,7 +478,7 @@ public class CallResolver { recordAutoCastIfNecessary(candidateCall.getThisObject(), candidateCall.getTrace()); } - private ResolutionStatus inferTypeArguments(CallResolutionContext context) { + private ResolutionStatus inferTypeArguments(CallResolutionContext context) { ResolvedCallImpl candidateCall = context.candidateCall; D candidate = candidateCall.getCandidateDescriptor(); @@ -624,7 +625,7 @@ public class CallResolver { } } - private ResolutionStatus checkAllValueArguments(CallResolutionContext context) { + private ResolutionStatus checkAllValueArguments(CallResolutionContext context) { ResolutionStatus result = checkValueArgumentTypes(context); ResolvedCall candidateCall = context.candidateCall; result = result.combine(checkReceiver(context, candidateCall.getResultingDescriptor().getReceiverParameter(), candidateCall.getReceiverArgument())); @@ -632,7 +633,7 @@ public class CallResolver { return result; } - private ResolutionStatus checkReceiver(CallResolutionContext context, ReceiverDescriptor receiverParameter, ReceiverDescriptor receiverArgument) { + private ResolutionStatus checkReceiver(CallResolutionContext context, ReceiverDescriptor receiverParameter, ReceiverDescriptor receiverArgument) { ResolutionStatus result = SUCCESS; if (receiverParameter.exists() && receiverArgument.exists()) { ASTNode callOperationNode = context.call.getCallOperationNode(); @@ -660,7 +661,7 @@ public class CallResolver { return result; } - private ResolutionStatus checkValueArgumentTypes(CallResolutionContext context) { + private ResolutionStatus checkValueArgumentTypes(CallResolutionContext context) { ResolutionStatus result = SUCCESS; for (Map.Entry entry : context.candidateCall.getValueArguments().entrySet()) { ValueParameterDescriptor parameterDescriptor = entry.getKey(); @@ -734,8 +735,8 @@ public class CallResolver { private OverloadResolutionResultsImpl computeResultAndReportErrors( BindingTrace trace, TracingStrategy tracing, - Set> successfulCandidates, - Set> failedCandidates) { + Set> successfulCandidates, + Set> failedCandidates) { // TODO : maybe it's better to filter overrides out first, and only then look for the maximally specific if (successfulCandidates.size() > 0) { @@ -756,8 +757,8 @@ public class CallResolver { // and some are not OK at all. In this case we'd like to say "unsafe call" rather than "none applicable" // Used to be: weak errors. Generalized for future extensions for (EnumSet severityLevel : SEVERITY_LEVELS) { - Set> thisLevel = Sets.newLinkedHashSet(); - for (ResolvedCallImpl candidate : failedCandidates) { + Set> thisLevel = Sets.newLinkedHashSet(); + for (ResolvedCallWithTrace candidate : failedCandidates) { if (severityLevel.contains(candidate.getStatus())) { thisLevel.add(candidate); } @@ -777,7 +778,7 @@ public class CallResolver { assert false : "Should not be reachable, cause every status must belong to some level"; - Set> noOverrides = OverridingUtil.filterOverrides(failedCandidates, MAP_TO_CANDIDATE); + Set> noOverrides = OverridingUtil.filterOverrides(failedCandidates, MAP_TO_CANDIDATE); if (noOverrides.size() != 1) { tracing.noneApplicable(trace, noOverrides); tracing.recordAmbiguity(trace, noOverrides); @@ -787,7 +788,7 @@ public class CallResolver { failedCandidates = noOverrides; } - ResolvedCallImpl failed = failedCandidates.iterator().next(); + ResolvedCallWithTrace failed = failedCandidates.iterator().next(); failed.getTrace().commit(); return OverloadResolutionResultsImpl.singleFailedCandidate(failed); } @@ -797,18 +798,18 @@ public class CallResolver { } } - private static boolean allClean(Collection> results) { - for (ResolvedCallImpl result : results) { + private static boolean allClean(Collection> results) { + for (ResolvedCallWithTrace result : results) { if (result.isDirty()) return false; } return true; } - private OverloadResolutionResultsImpl chooseAndReportMaximallySpecific(Set> candidates, boolean discriminateGenerics) { + private OverloadResolutionResultsImpl chooseAndReportMaximallySpecific(Set> candidates, boolean discriminateGenerics) { if (candidates.size() != 1) { - Set> cleanCandidates = Sets.newLinkedHashSet(candidates); - for (Iterator> iterator = cleanCandidates.iterator(); iterator.hasNext(); ) { - ResolvedCallImpl candidate = iterator.next(); + Set> cleanCandidates = Sets.newLinkedHashSet(candidates); + for (Iterator> iterator = cleanCandidates.iterator(); iterator.hasNext(); ) { + ResolvedCallWithTrace candidate = iterator.next(); if (candidate.isDirty()) { iterator.remove(); } @@ -817,27 +818,31 @@ public class CallResolver { if (cleanCandidates.isEmpty()) { cleanCandidates = candidates; } - ResolvedCallImpl maximallySpecific = overloadingConflictResolver.findMaximallySpecific(cleanCandidates, false); + ResolvedCallWithTrace maximallySpecific = overloadingConflictResolver.findMaximallySpecific(cleanCandidates, false); if (maximallySpecific != null) { return OverloadResolutionResultsImpl.success(maximallySpecific); } if (discriminateGenerics) { - ResolvedCallImpl maximallySpecificGenericsDiscriminated = overloadingConflictResolver.findMaximallySpecific(cleanCandidates, true); + ResolvedCallWithTrace maximallySpecificGenericsDiscriminated = overloadingConflictResolver.findMaximallySpecific(cleanCandidates, true); if (maximallySpecificGenericsDiscriminated != null) { return OverloadResolutionResultsImpl.success(maximallySpecificGenericsDiscriminated); } } - Set> noOverrides = OverridingUtil.filterOverrides(candidates, MAP_TO_RESULT); + Set> noOverrides = OverridingUtil.filterOverrides(candidates, MAP_TO_RESULT); return OverloadResolutionResultsImpl.ambiguity(noOverrides); } else { - ResolvedCallImpl result = candidates.iterator().next(); + ResolvedCallWithTrace result = candidates.iterator().next(); TemporaryBindingTrace temporaryTrace = result.getTrace(); temporaryTrace.commit(); + + if (result instanceof VariableAsFunctionResolvedCall) { + ((VariableAsFunctionResolvedCall)result).getVariableCall().getTrace().commit(); + } return OverloadResolutionResultsImpl.success(result); } } @@ -868,13 +873,12 @@ public class CallResolver { BindingTraceContext trace = new BindingTraceContext(); TemporaryBindingTrace temporaryBindingTrace = TemporaryBindingTrace.create(trace); - Set> calls = Sets.newLinkedHashSet(); + Set> calls = Sets.newLinkedHashSet(); for (ResolutionCandidate candidate : candidates) { - ResolvedCallImpl call = ResolvedCallImpl.create(candidate); - call.setTrace(temporaryBindingTrace); + ResolvedCallImpl call = ResolvedCallImpl.create(candidate, temporaryBindingTrace); calls.add(call); } - return computeResultAndReportErrors(trace, TracingStrategy.EMPTY, calls, Collections.>emptySet()); + return computeResultAndReportErrors(trace, TracingStrategy.EMPTY, calls, Collections.>emptySet()); } private List> findCandidatesByExactSignature(JetScope scope, ReceiverDescriptor receiver, diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionDebugInfo.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionDebugInfo.java index b61c04a5c65..b3c6b1d7839 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionDebugInfo.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionDebugInfo.java @@ -34,7 +34,7 @@ import java.util.Map; * @author abreslav */ public class ResolutionDebugInfo { - public static final WritableSlice>> TASKS = Slices.createSimpleSlice(); + public static final WritableSlice>> TASKS = Slices.createSimpleSlice(); public static final WritableSlice> RESULT = Slices.createSimpleSlice(); public static final WritableSlice, StringBuilder> ERRORS = Slices.createSimpleSlice(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTaskHolder.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTaskHolder.java index 4e39c8ccfde..5054e683c22 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTaskHolder.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTaskHolder.java @@ -31,7 +31,7 @@ import java.util.List; /** * @author svtk */ -public class ResolutionTaskHolder { +public class ResolutionTaskHolder { private final JetReferenceExpression reference; private final BasicResolutionContext basicResolutionContext; private final Predicate> visibleStrategy; @@ -40,7 +40,7 @@ public class ResolutionTaskHolder { private final Collection>> members = Sets.newLinkedHashSet(); private final Collection>> nonLocalExtensions = Sets.newLinkedHashSet(); - private List> tasks = null; + private List> tasks = null; public ResolutionTaskHolder(@NotNull JetReferenceExpression reference, @NotNull BasicResolutionContext basicResolutionContext, @@ -68,7 +68,7 @@ public class ResolutionTaskHolder { } } - public List> getTasks() { + public List> getTasks() { if (tasks == null) { tasks = Lists.newArrayList(); List>> candidateList = Lists.newArrayList(); @@ -89,7 +89,7 @@ public class ResolutionTaskHolder { for (Collection> candidates : candidateList) { Collection> filteredCandidates = Collections2.filter(candidates, visibilityStrategy); if (!filteredCandidates.isEmpty()) { - tasks.add(new ResolutionTask(filteredCandidates, reference, basicResolutionContext)); + tasks.add(new ResolutionTask(filteredCandidates, reference, basicResolutionContext)); } } } From a8f959fee828e72b389270fe695d2027690268e0 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:34:18 +0400 Subject: [PATCH 15/50] receiver for second ('invoke') call for 'variable as function' call case added to context --- .../lang/resolve/calls/CallResolutionContext.java | 14 ++++++++++---- .../jet/lang/resolve/calls/CallTransformer.java | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolutionContext.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolutionContext.java index 03c5013330a..e5f8c356056 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolutionContext.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolutionContext.java @@ -20,21 +20,27 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.descriptors.CallableDescriptor; import org.jetbrains.jet.lang.psi.Call; import org.jetbrains.jet.lang.resolve.BindingTrace; +import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; /** * @author svtk */ -public final class CallResolutionContext extends ResolutionContext { +public final class CallResolutionContext extends ResolutionContext { /*package*/ final ResolvedCallImpl candidateCall; /*package*/ final TracingStrategy tracing; + /*package*/ ReceiverDescriptor receiverForVariableAsFunctionSecondCall = ReceiverDescriptor.NO_RECEIVER; - public CallResolutionContext(@NotNull ResolvedCallImpl candidateCall, @NotNull ResolutionTask task, @NotNull BindingTrace trace, @NotNull TracingStrategy tracing, @NotNull Call call) { + private CallResolutionContext(@NotNull ResolvedCallImpl candidateCall, @NotNull ResolutionTask task, @NotNull BindingTrace trace, @NotNull TracingStrategy tracing, @NotNull Call call) { super(trace, task.scope, call, task.expectedType, task.dataFlowInfo); this.candidateCall = candidateCall; this.tracing = tracing; } - public CallResolutionContext(@NotNull ResolvedCallImpl candidateCall, @NotNull ResolutionTask task, @NotNull BindingTrace trace, @NotNull TracingStrategy tracing) { - this(candidateCall, task, trace, tracing, task.call); + public static CallResolutionContext create(@NotNull ResolvedCallImpl candidateCall, @NotNull ResolutionTask task, @NotNull BindingTrace trace, @NotNull TracingStrategy tracing, @NotNull Call call) { + return new CallResolutionContext(candidateCall, task, trace, tracing, call); + } + + public static CallResolutionContext create(@NotNull ResolvedCallImpl candidateCall, @NotNull ResolutionTask task, @NotNull BindingTrace trace, @NotNull TracingStrategy tracing) { + return create(candidateCall, task, trace, tracing, task.call); } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java index adda74ced5e..63486dee599 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java @@ -106,7 +106,7 @@ public class CallTransformer { CallResolutionContext contextWithoutReceiver = createContextWithChainedTrace( candidateWithoutReceiver, variableCallWithoutReceiver, temporaryTrace, task); - contextWithoutReceiver.delayedReceiverForVariableAsFunctionSecondCall = variableCall.getExplicitReceiver(); + contextWithoutReceiver.receiverForVariableAsFunctionSecondCall = variableCall.getExplicitReceiver(); return Lists.newArrayList(contextWithReceiver, contextWithoutReceiver); } @@ -207,7 +207,7 @@ public class CallTransformer { @NotNull @Override public ReceiverDescriptor getExplicitReceiver() { - return context.delayedReceiverForVariableAsFunctionSecondCall; + return context.receiverForVariableAsFunctionSecondCall; } @NotNull From a2e11821def3916b7fde78597ebee4b7d5631f41 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:36:14 +0400 Subject: [PATCH 16/50] resolvedCalls set instead of multiMap stored in ResolutionTask --- .../lang/resolve/calls/ResolutionTask.java | 45 +++++++++---------- .../resolvewindow/ResolveToolwindow.java | 8 ++-- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTask.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTask.java index 3f7468a0479..cb1b3e0f85b 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTask.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionTask.java @@ -16,7 +16,6 @@ package org.jetbrains.jet.lang.resolve.calls; -import com.google.common.collect.LinkedHashMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; import com.intellij.lang.ASTNode; @@ -39,6 +38,7 @@ import org.jetbrains.jet.lexer.JetTokens; import java.util.Collection; import java.util.List; +import java.util.Set; import static org.jetbrains.jet.lang.diagnostics.Errors.*; import static org.jetbrains.jet.lang.resolve.BindingContext.*; @@ -48,9 +48,9 @@ import static org.jetbrains.jet.lang.resolve.BindingContext.*; * * @author abreslav */ -public class ResolutionTask extends ResolutionContext { +public class ResolutionTask extends ResolutionContext { private final Collection> candidates; - private final Multimap, ResolvedCallImpl> resolvedCallMap = LinkedHashMultimap.create(); + private final Set> resolvedCalls = Sets.newLinkedHashSet(); /*package*/ final JetReferenceExpression reference; private DescriptorCheckStrategy checkingStrategy; @@ -71,8 +71,8 @@ public class ResolutionTask extends ResolutionCont } @NotNull - public Multimap, ResolvedCallImpl> getResolvedCallMap() { - return resolvedCallMap; + public Set> getResolvedCalls() { + return resolvedCalls; } public void setCheckingStrategy(DescriptorCheckStrategy strategy) { @@ -86,8 +86,8 @@ public class ResolutionTask extends ResolutionCont return true; } - public ResolutionTask withTrace(BindingTrace newTrace) { - ResolutionTask newTask = new ResolutionTask(candidates, reference, newTrace, scope, call, expectedType, dataFlowInfo); + public ResolutionTask withTrace(BindingTrace newTrace) { + ResolutionTask newTask = new ResolutionTask(candidates, reference, newTrace, scope, call, expectedType, dataFlowInfo); newTask.setCheckingStrategy(checkingStrategy); return newTask; } @@ -98,22 +98,15 @@ public class ResolutionTask extends ResolutionCont public final TracingStrategy tracing = new TracingStrategy() { @Override - public void bindReference(@NotNull BindingTrace trace, @NotNull ResolvedCallImpl resolvedCall) { - D descriptor = resolvedCall.getCandidateDescriptor(); - // if (descriptor instanceof VariableAsFunctionDescriptor) { - // VariableAsFunctionDescriptor variableAsFunctionDescriptor = (VariableAsFunctionDescriptor) descriptor; - // trace.record(REFERENCE_TARGET, reference, variableAsFunctionDescriptor.getVariableDescriptor()); - // } - // else { - // } + public void bindResolvedCall(@NotNull BindingTrace trace, @NotNull ResolvedCallWithTrace resolvedCall) { + trace.record(REFERENCE_TARGET, reference, resolvedCall.getResultingDescriptor()); trace.record(RESOLVED_CALL, call.getCalleeExpression(), resolvedCall); - trace.record(REFERENCE_TARGET, reference, descriptor); } @Override - public void recordAmbiguity(BindingTrace trace, Collection> candidates) { + public void recordAmbiguity(BindingTrace trace, Collection> candidates) { Collection descriptors = Sets.newHashSet(); - for (ResolvedCallImpl candidate : candidates) { + for (ResolvedCallWithTrace candidate : candidates) { descriptors.add(candidate.getCandidateDescriptor()); } trace.record(AMBIGUOUS_REFERENCE_TARGET, reference, descriptors); @@ -155,7 +148,14 @@ public class ResolutionTask extends ResolutionCont @Override public void noReceiverAllowed(@NotNull BindingTrace trace) { - trace.report(NO_RECEIVER_ADMITTED.on(reference)); + if (reference instanceof JetSimpleNameExpression) { + //todo temporary hack + //should be stored that the reference is unresolved (and not trace the candidate descriptor) + trace.report(UNRESOLVED_REFERENCE.on(reference)); + } + else { + trace.report(NO_RECEIVER_ADMITTED.on(reference)); + } } @Override @@ -170,12 +170,12 @@ public class ResolutionTask extends ResolutionCont } @Override - public void ambiguity(@NotNull BindingTrace trace, @NotNull Collection> descriptors) { + public void ambiguity(@NotNull BindingTrace trace, @NotNull Collection> descriptors) { trace.report(OVERLOAD_RESOLUTION_AMBIGUITY.on(call.getCallElement(), descriptors)); } @Override - public void noneApplicable(@NotNull BindingTrace trace, @NotNull Collection> descriptors) { + public void noneApplicable(@NotNull BindingTrace trace, @NotNull Collection> descriptors) { trace.report(NONE_APPLICABLE.on(reference, descriptors)); } @@ -233,8 +233,7 @@ public class ResolutionTask extends ResolutionCont @Override public void invisibleMember(@NotNull BindingTrace trace, @NotNull DeclarationDescriptor descriptor) { - JetExpression expression = call.getCalleeExpression(); - trace.report(INVISIBLE_MEMBER.on(expression != null ? expression : call.getCallElement(), descriptor, descriptor.getContainingDeclaration())); + trace.report(INVISIBLE_MEMBER.on(call.getCallElement(), descriptor, descriptor.getContainingDeclaration())); } }; } diff --git a/idea/src/org/jetbrains/jet/plugin/internal/resolvewindow/ResolveToolwindow.java b/idea/src/org/jetbrains/jet/plugin/internal/resolvewindow/ResolveToolwindow.java index d674edd60e0..0c456ff0f7b 100644 --- a/idea/src/org/jetbrains/jet/plugin/internal/resolvewindow/ResolveToolwindow.java +++ b/idea/src/org/jetbrains/jet/plugin/internal/resolvewindow/ResolveToolwindow.java @@ -192,9 +192,9 @@ public class ResolveToolwindow extends JPanel implements Disposable { StringBuilder result = new StringBuilder(); if (debugInfo != null) { - List> resolutionTasks = debugInfo.get(TASKS); - for (ResolutionTask resolutionTask : resolutionTasks) { - for (ResolvedCallImpl resolvedCall : resolutionTask.getResolvedCallMap().values()) { + List> resolutionTasks = debugInfo.get(TASKS); + for (ResolutionTask resolutionTask : resolutionTasks) { + for (ResolvedCallWithTrace resolvedCall : resolutionTask.getResolvedCalls()) { renderResolutionLogForCall(debugInfo, resolvedCall, result); } } @@ -212,7 +212,7 @@ public class ResolveToolwindow extends JPanel implements Disposable { return result.toString(); } - private void renderResolutionLogForCall(Data debugInfo, ResolvedCallImpl resolvedCall, StringBuilder result) { + private void renderResolutionLogForCall(Data debugInfo, ResolvedCallWithTrace resolvedCall, StringBuilder result) { result.append("Trying to call ").append(resolvedCall.getCandidateDescriptor()).append("\n"); StringBuilder errors = debugInfo.getByKey(ERRORS, resolvedCall); if (errors != null) { From 2654534edeefa29270be611653e49fedea61f57a Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:36:46 +0400 Subject: [PATCH 17/50] ChainedTemporaryBindingTrace added --- .../resolve/ChainedTemporaryBindingTrace.java | 37 +++++++++++++++++++ .../lang/resolve/TemporaryBindingTrace.java | 5 +-- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 compiler/frontend/src/org/jetbrains/jet/lang/resolve/ChainedTemporaryBindingTrace.java diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ChainedTemporaryBindingTrace.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ChainedTemporaryBindingTrace.java new file mode 100644 index 00000000000..b168498bb7e --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ChainedTemporaryBindingTrace.java @@ -0,0 +1,37 @@ +/* + * Copyright 2010-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.lang.resolve; + +/** + * @author svtk + */ +public class ChainedTemporaryBindingTrace extends TemporaryBindingTrace { + + public static ChainedTemporaryBindingTrace create(TemporaryBindingTrace trace) { + return new ChainedTemporaryBindingTrace(trace); + } + + private ChainedTemporaryBindingTrace(TemporaryBindingTrace trace) { + super(trace); + } + + @Override + public void commit() { + super.commit(); + ((TemporaryBindingTrace) trace).commit(); + } +} diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TemporaryBindingTrace.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TemporaryBindingTrace.java index e8c3425c812..3122f54397d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TemporaryBindingTrace.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/TemporaryBindingTrace.java @@ -25,10 +25,9 @@ public class TemporaryBindingTrace extends DelegatingBindingTrace { return new TemporaryBindingTrace(trace); } - private final BindingTrace trace; + protected final BindingTrace trace; - - private TemporaryBindingTrace(BindingTrace trace) { + protected TemporaryBindingTrace(BindingTrace trace) { super(trace.getBindingContext()); this.trace = trace; } From c698f791c85eb69ee5b41405b93cebbc742373da Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:38:15 +0400 Subject: [PATCH 18/50] navigate to variable (not to 'invoke' function) while 'variable as function' call resolve --- .../jet/lang/resolve/BindingContextUtils.java | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContextUtils.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContextUtils.java index b9479f4766a..c4cac2803cd 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContextUtils.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingContextUtils.java @@ -20,14 +20,10 @@ import com.google.common.collect.Lists; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.lang.descriptors.CallableMemberDescriptor; -import org.jetbrains.jet.lang.descriptors.ClassDescriptor; -import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor; -import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor; -import org.jetbrains.jet.lang.descriptors.SimpleFunctionDescriptor; -import org.jetbrains.jet.lang.descriptors.VariableAsFunctionDescriptor; -import org.jetbrains.jet.lang.descriptors.VariableDescriptor; +import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.psi.*; +import org.jetbrains.jet.lang.resolve.calls.ResolvedCall; +import org.jetbrains.jet.lang.resolve.calls.VariableAsFunctionResolvedCall; import org.jetbrains.jet.lang.types.lang.JetStandardClasses; import org.jetbrains.jet.util.slicedmap.ReadOnlySlice; import org.jetbrains.jet.util.slicedmap.Slices; @@ -68,7 +64,7 @@ public class BindingContextUtils { @Nullable public static PsiElement resolveToDeclarationPsiElement(@NotNull BindingContext bindingContext, @Nullable JetReferenceExpression referenceExpression) { - DeclarationDescriptor declarationDescriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, referenceExpression); + DeclarationDescriptor declarationDescriptor = referenceToDescriptor(bindingContext, referenceExpression); if (declarationDescriptor == null) { return bindingContext.get(BindingContext.LABEL_TARGET, referenceExpression); } @@ -88,7 +84,7 @@ public class BindingContextUtils { @NotNull public static List resolveToDeclarationPsiElements(@NotNull BindingContext bindingContext, @Nullable JetReferenceExpression referenceExpression) { - DeclarationDescriptor declarationDescriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, referenceExpression); + DeclarationDescriptor declarationDescriptor = referenceToDescriptor(bindingContext, referenceExpression); if (declarationDescriptor == null) { return Lists.newArrayList(bindingContext.get(BindingContext.LABEL_TARGET, referenceExpression)); } @@ -114,7 +110,7 @@ public class BindingContextUtils { descriptor = bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, element); } else if (element instanceof JetSimpleNameExpression) { - descriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, (JetSimpleNameExpression) element); + descriptor = referenceToDescriptor(bindingContext, (JetSimpleNameExpression) element); } else if (element instanceof JetQualifiedExpression) { descriptor = extractVariableDescriptorIfAny(bindingContext, ((JetQualifiedExpression) element).getSelectorExpression(), onlyReference); @@ -128,6 +124,16 @@ public class BindingContextUtils { return null; } + @Nullable + public static DeclarationDescriptor referenceToDescriptor(@NotNull BindingContext bindingContext, @Nullable JetReferenceExpression element) { + DeclarationDescriptor descriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, element); + ResolvedCall resolvedCall = bindingContext.get(BindingContext.RESOLVED_CALL, element); + if (resolvedCall instanceof VariableAsFunctionResolvedCall) { + descriptor = ((VariableAsFunctionResolvedCall) resolvedCall).getVariableCall().getResultingDescriptor(); + } + return descriptor; + } + // TODO these helper methods are added as a workaround to some compiler bugs in Kotlin... // NOTE this is used by KDoc From 2870c7980d52072a2e004bf35c45cd5421384c18 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:40:13 +0400 Subject: [PATCH 19/50] ResolvedCallImpl needs temporary trace now --- .../org/jetbrains/k2js/translate/reference/CallBuilder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java b/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java index 85a09258840..01186e92a35 100644 --- a/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java +++ b/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java @@ -21,6 +21,8 @@ import com.google.dart.compiler.backend.js.ast.JsExpression; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.descriptors.CallableDescriptor; +import org.jetbrains.jet.lang.resolve.BindingTraceContext; +import org.jetbrains.jet.lang.resolve.TemporaryBindingTrace; import org.jetbrains.jet.lang.resolve.calls.ResolutionCandidate; import org.jetbrains.jet.lang.resolve.calls.ResolvedCall; import org.jetbrains.jet.lang.resolve.calls.ResolvedCallImpl; @@ -104,7 +106,8 @@ public final class CallBuilder { private CallTranslator finish() { if (resolvedCall == null) { assert descriptor != null; - resolvedCall = ResolvedCallImpl.create(ResolutionCandidate.create(descriptor)); + resolvedCall = ResolvedCallImpl.create(ResolutionCandidate.create(descriptor), + TemporaryBindingTrace.create(new BindingTraceContext())); //todo } if (descriptor == null) { descriptor = resolvedCall.getCandidateDescriptor().getOriginal(); From 36224dd32cc0533921f96d2d49893b4bf85c740d Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:41:24 +0400 Subject: [PATCH 20/50] ResolutionCandidate's small change --- .../lang/resolve/calls/ResolutionCandidate.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionCandidate.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionCandidate.java index 829185e3e31..b134964b378 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionCandidate.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/ResolutionCandidate.java @@ -31,15 +31,21 @@ import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor */ public class ResolutionCandidate { private final D candidateDescriptor; - private ReceiverDescriptor thisObject = NO_RECEIVER; // receiver object of a method - private ReceiverDescriptor receiverArgument = NO_RECEIVER; // receiver of an extension function + private ReceiverDescriptor thisObject; // receiver object of a method + private ReceiverDescriptor receiverArgument; // receiver of an extension function - private ResolutionCandidate(@NotNull D descriptor) { - candidateDescriptor = descriptor; + private ResolutionCandidate(@NotNull D descriptor, @NotNull ReceiverDescriptor thisObject, @NotNull ReceiverDescriptor receiverArgument) { + this.candidateDescriptor = descriptor; + this.thisObject = thisObject; + this.receiverArgument = receiverArgument; } public static ResolutionCandidate create(@NotNull D descriptor) { - return new ResolutionCandidate(descriptor); + return new ResolutionCandidate(descriptor, NO_RECEIVER, NO_RECEIVER); + } + + public static ResolutionCandidate create(@NotNull D descriptor, @NotNull ReceiverDescriptor thisObject, @NotNull ReceiverDescriptor receiverArgument) { + return new ResolutionCandidate(descriptor, thisObject, receiverArgument); } public void setThisObject(@NotNull ReceiverDescriptor thisObject) { From 09c065b371bb53a1e4a96beaeafa80fbeea88a1d Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:42:26 +0400 Subject: [PATCH 21/50] usage 'call.getCallElement' instead of 'call.getCalleeExpression' while 'invisible member' error reporting --- .../org/jetbrains/jet/lang/diagnostics/Errors.java | 2 +- .../lang/diagnostics/PositioningStrategies.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java index 189655ec333..3877588b9fc 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java @@ -51,7 +51,7 @@ public interface Errors { //Elements with "INVISIBLE_REFERENCE" error are marked as unresolved, unlike elements with "INVISIBLE_MEMBER" error DiagnosticFactory2 INVISIBLE_REFERENCE = DiagnosticFactory2.create(ERROR); - DiagnosticFactory2 INVISIBLE_MEMBER = DiagnosticFactory2.create(ERROR); + DiagnosticFactory2 INVISIBLE_MEMBER = DiagnosticFactory2.create(ERROR, PositioningStrategies.CALL_ELEMENT); RedeclarationDiagnosticFactory REDECLARATION = new RedeclarationDiagnosticFactory(ERROR); RedeclarationDiagnosticFactory NAME_SHADOWING = new RedeclarationDiagnosticFactory(WARNING); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java index eb98b2857c4..457a66cb034 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java @@ -151,4 +151,18 @@ public class PositioningStrategies { return markNode(element.getDefaultValue().getNode()); } }; + + public static PositioningStrategy CALL_ELEMENT = new PositioningStrategy() { + @NotNull + @Override + public List mark(@NotNull PsiElement callElement) { + if (callElement instanceof JetCallElement) { + JetExpression calleeExpression = ((JetCallElement) callElement).getCalleeExpression(); + if (calleeExpression != null) { + return markElement(calleeExpression); + } + } + return markElement(callElement); + } + }; } \ No newline at end of file From 9c0eb285e25aead0cd0d5d2417f7ebbb988d84de Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:43:13 +0400 Subject: [PATCH 22/50] back end test for 'variable as function' call case --- compiler/testData/codegen/functions/invoke.kt | 22 +++++++++++++++++++ .../jet/codegen/FunctionGenTest.java | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 compiler/testData/codegen/functions/invoke.kt diff --git a/compiler/testData/codegen/functions/invoke.kt b/compiler/testData/codegen/functions/invoke.kt new file mode 100644 index 00000000000..4f85a25ef06 --- /dev/null +++ b/compiler/testData/codegen/functions/invoke.kt @@ -0,0 +1,22 @@ +package invoke + +fun test1(predicate: (Int) -> Int, i: Int) = predicate(i) + +fun test2(predicate: (Int) -> Int, i: Int) = predicate.invoke(i) + +class Method { + fun invoke(i: Int) = i +} + +fun test3(method: Method, i: Int) = method.invoke(i) + +//todo +//fun test4(method: Method, i: Int) = method(i) + +fun box() : String { + if (test1({ it }, 1) != 1) return "fail 1" + if (test2({ it }, 2) != 2) return "fail 2" + if (test3(Method(), 3) != 3) return "fail 3" + //if (test4(Method(), 4) != 4) return "fail 4" + return "OK" +} diff --git a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java index 1d2fbac51cd..9b5b8062251 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java @@ -101,4 +101,8 @@ public class FunctionGenTest extends CodegenTestCase { public void testLocalFunction () throws InvocationTargetException, IllegalAccessException { blackBoxFile("functions/localFunction.kt"); } + + public void testInvoke() { + blackBoxFile("functions/invoke.kt"); + } } From bd3d90499cfcccb433630a217a47cdba3950b8b7 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 15:44:11 +0400 Subject: [PATCH 23/50] stdlib tests temporary revert --- libraries/stdlib/test/CollectionTest.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/stdlib/test/CollectionTest.kt b/libraries/stdlib/test/CollectionTest.kt index b3b86928ca7..6134defaa22 100644 --- a/libraries/stdlib/test/CollectionTest.kt +++ b/libraries/stdlib/test/CollectionTest.kt @@ -331,9 +331,10 @@ class CollectionTest { test fun lastException() { - fails { arrayList().last() } - fails { linkedList().last() } - fails { hashSet().last() } +//todo(svtk) +// fails { arrayList().last() } +// fails { linkedList().last() } +// fails { hashSet().last() } } test fun subscript() { From 823b6733c2434c11e8d054d6f1fbf977beccb452 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 30 Apr 2012 16:21:17 +0400 Subject: [PATCH 24/50] A doubtful try to save compilation --- .../jetbrains/jet/lang/resolve/calls/CallResolver.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java index 1e699b0ca63..75dfdea0274 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java @@ -110,7 +110,8 @@ public class CallResolver { else { callableDescriptorCollectors.add(CallableDescriptorCollectors.VARIABLES); } - List> prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, referencedName, nameExpression, callableDescriptorCollectors); + List> prioritizedTasks = + TaskPrioritizer.computePrioritizedTasks(context, referencedName, nameExpression, callableDescriptorCollectors); return doResolveCall(context, prioritizedTasks, CallTransformer.PROPERTY_CALL_TRANSFORMER, nameExpression); } @@ -119,7 +120,9 @@ public class CallResolver { @NotNull BasicResolutionContext context, @NotNull final JetReferenceExpression functionReference, @NotNull String name) { - List> tasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); + + List> tasks = + TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); return doResolveCall(context, tasks, CallTransformer.FUNCTION_CALL_TRANSFORMER, functionReference); } @@ -141,7 +144,7 @@ public class CallResolver { String name = expression.getReferencedName(); if (name == null) return checkArgumentTypesAndFail(context); - prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); + prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); ResolutionTask.DescriptorCheckStrategy abstractConstructorCheck = new ResolutionTask.DescriptorCheckStrategy() { @Override public boolean performAdvancedChecks(D descriptor, BindingTrace trace, TracingStrategy tracing) { From 20833c690ebb9147e3ae934b5eda95b350acf525 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Mon, 30 Apr 2012 19:31:09 +0400 Subject: [PATCH 25/50] fix ant dist on mac --- build.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 1496e46461a..b3684e3865d 100644 --- a/build.xml +++ b/build.xml @@ -235,7 +235,8 @@ - + + Date: Mon, 30 Apr 2012 20:59:16 +0400 Subject: [PATCH 26/50] libraries: redundant ${project.basedir} --- libraries/docs/website/pom.xml | 4 ++-- libraries/kotlin-jdbc/pom.xml | 4 ++-- libraries/kotlin-swing/pom.xml | 4 ++-- libraries/kunit/pom.xml | 4 ++-- libraries/pom.xml | 2 +- libraries/stdlib/pom.xml | 4 ++-- libraries/tools/kdoc/pom.xml | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libraries/docs/website/pom.xml b/libraries/docs/website/pom.xml index 0d854b4f4e5..f21ab1711a6 100644 --- a/libraries/docs/website/pom.xml +++ b/libraries/docs/website/pom.xml @@ -28,8 +28,8 @@ - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin + src/main/kotlin + src/test/kotlin diff --git a/libraries/kotlin-jdbc/pom.xml b/libraries/kotlin-jdbc/pom.xml index 910f058726d..dd755a81bcd 100644 --- a/libraries/kotlin-jdbc/pom.xml +++ b/libraries/kotlin-jdbc/pom.xml @@ -29,8 +29,8 @@ - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin + src/main/kotlin + src/test/kotlin diff --git a/libraries/kotlin-swing/pom.xml b/libraries/kotlin-swing/pom.xml index 4b128f347d6..eac98705786 100644 --- a/libraries/kotlin-swing/pom.xml +++ b/libraries/kotlin-swing/pom.xml @@ -23,8 +23,8 @@ - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin + src/main/kotlin + src/test/kotlin diff --git a/libraries/kunit/pom.xml b/libraries/kunit/pom.xml index 575599798a3..d710ab52264 100644 --- a/libraries/kunit/pom.xml +++ b/libraries/kunit/pom.xml @@ -28,8 +28,8 @@ - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin + src/main/kotlin + src/test/kotlin diff --git a/libraries/pom.xml b/libraries/pom.xml index 934bce360ce..03a07f15814 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -12,7 +12,7 @@ UTF-8 - ${project.basedir}/../../.. + ../../.. 3.3.1 dart-r3300 diff --git a/libraries/stdlib/pom.xml b/libraries/stdlib/pom.xml index 320f0dcb913..bb5e85d930c 100644 --- a/libraries/stdlib/pom.xml +++ b/libraries/stdlib/pom.xml @@ -22,8 +22,8 @@ - ${project.basedir}/src - ${project.basedir}/test + src + test diff --git a/libraries/tools/kdoc/pom.xml b/libraries/tools/kdoc/pom.xml index 04a32bdca82..451cad9c400 100644 --- a/libraries/tools/kdoc/pom.xml +++ b/libraries/tools/kdoc/pom.xml @@ -35,8 +35,8 @@ - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin + src/main/kotlin + src/test/kotlin From 54fa1f9fbc01712df0052c50ff95aa0f55131880 Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Mon, 30 Apr 2012 20:59:52 +0400 Subject: [PATCH 27/50] libraries/runtime: copy runtime module sources locally to help IDEA find them --- libraries/tools/runtime/pom.xml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/libraries/tools/runtime/pom.xml b/libraries/tools/runtime/pom.xml index f887a4724fc..090bd908eda 100644 --- a/libraries/tools/runtime/pom.xml +++ b/libraries/tools/runtime/pom.xml @@ -16,9 +16,33 @@ jar - ${project.basedir}/../../../runtime/src + target/copied-sources + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + + copy-sources + process-sources + + + + + + + + + + run + + + + + org.apache.maven.plugins maven-source-plugin From 09403a1c6b59c01a7f157a3ed45adfde4a6f4287 Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Mon, 30 Apr 2012 21:00:20 +0400 Subject: [PATCH 28/50] more jarjar rules --- build.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.xml b/build.xml index b3684e3865d..771bac878fc 100644 --- a/build.xml +++ b/build.xml @@ -193,6 +193,10 @@ + + + + From 751092e99579360e206c809f2f252e20baa49492 Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Mon, 30 Apr 2012 21:43:36 +0400 Subject: [PATCH 29/50] cleanup --- build.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/build.xml b/build.xml index 771bac878fc..97f6bea615c 100644 --- a/build.xml +++ b/build.xml @@ -238,7 +238,6 @@ - From 8e961e00cc590d20043dc257baf0ca6ae85cfc68 Mon Sep 17 00:00:00 2001 From: Leonid Shalupov Date: Mon, 30 Apr 2012 22:52:21 +0400 Subject: [PATCH 30/50] delete obsolete readme on maven plugin --- libraries/tools/kotlin-maven-plugin/ReadMe.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 libraries/tools/kotlin-maven-plugin/ReadMe.md diff --git a/libraries/tools/kotlin-maven-plugin/ReadMe.md b/libraries/tools/kotlin-maven-plugin/ReadMe.md deleted file mode 100644 index 88a32b84cf1..00000000000 --- a/libraries/tools/kotlin-maven-plugin/ReadMe.md +++ /dev/null @@ -1,4 +0,0 @@ -## NOTE - this is just an initial spike of some maven plugins - -Until this plugin is working, please use this maven plugin: -http://evgeny-goldin.com/wiki/Kotlin-maven-plugin \ No newline at end of file From 2bd0be56385a96edd58ace6c7721d7a6501fb98c Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Tue, 1 May 2012 14:56:34 +0400 Subject: [PATCH 31/50] reverted: 'A doubtful try to save compilation' (no more needed) --- .../jetbrains/jet/lang/resolve/calls/CallResolver.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java index 75dfdea0274..1e699b0ca63 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java @@ -110,8 +110,7 @@ public class CallResolver { else { callableDescriptorCollectors.add(CallableDescriptorCollectors.VARIABLES); } - List> prioritizedTasks = - TaskPrioritizer.computePrioritizedTasks(context, referencedName, nameExpression, callableDescriptorCollectors); + List> prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, referencedName, nameExpression, callableDescriptorCollectors); return doResolveCall(context, prioritizedTasks, CallTransformer.PROPERTY_CALL_TRANSFORMER, nameExpression); } @@ -120,9 +119,7 @@ public class CallResolver { @NotNull BasicResolutionContext context, @NotNull final JetReferenceExpression functionReference, @NotNull String name) { - - List> tasks = - TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); + List> tasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); return doResolveCall(context, tasks, CallTransformer.FUNCTION_CALL_TRANSFORMER, functionReference); } @@ -144,7 +141,7 @@ public class CallResolver { String name = expression.getReferencedName(); if (name == null) return checkArgumentTypesAndFail(context); - prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); + prioritizedTasks = TaskPrioritizer.computePrioritizedTasks(context, name, functionReference, CallableDescriptorCollectors.FUNCTIONS_AND_VARIABLES); ResolutionTask.DescriptorCheckStrategy abstractConstructorCheck = new ResolutionTask.DescriptorCheckStrategy() { @Override public boolean performAdvancedChecks(D descriptor, BindingTrace trace, TracingStrategy tracing) { From 028be6a6961ea3e9b2dd3c7211921742287f5673 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Tue, 1 May 2012 14:58:08 +0400 Subject: [PATCH 32/50] stdlib change (after KT-1873 might be restored) --- libraries/stdlib/test/CollectionTest.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/stdlib/test/CollectionTest.kt b/libraries/stdlib/test/CollectionTest.kt index 6134defaa22..2c35b16e951 100644 --- a/libraries/stdlib/test/CollectionTest.kt +++ b/libraries/stdlib/test/CollectionTest.kt @@ -320,7 +320,8 @@ class CollectionTest { assertEquals(0, ArrayList().count()) } - test fun last() { + //todo after KT-1873 the name might be returned to 'last' + test fun lastElement() { val data = arrayList("foo", "bar") assertEquals("bar", data.last()) assertEquals(25, arrayList(15, 19, 20, 25).last()) @@ -331,10 +332,9 @@ class CollectionTest { test fun lastException() { -//todo(svtk) -// fails { arrayList().last() } -// fails { linkedList().last() } -// fails { hashSet().last() } + fails { arrayList().last() } + fails { linkedList().last() } + fails { hashSet().last() } } test fun subscript() { From 8278ed8aa587fdc723bf0b356ad347b84a37c66a Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 17:39:51 +0400 Subject: [PATCH 33/50] ImportPath.toString --- .../src/org/jetbrains/jet/lang/resolve/ImportPath.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportPath.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportPath.java index 3ef25b43833..661969e7550 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportPath.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/ImportPath.java @@ -45,6 +45,11 @@ public final class ImportPath { return fqName.getFqName() + (isAllUnder ? ".*" : ""); } + @Override + public String toString() { + return getPathStr(); + } + @NotNull public FqName fqnPart() { return fqName; From 90910cae3487311103e1792fb812e9d86b347aa5 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 17:39:56 +0400 Subject: [PATCH 34/50] kotlin runtime must be added to classpath (not just to library root) --- .../jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java index 14e5111f06b..f0ae060e20c 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java @@ -72,9 +72,7 @@ public class JetCoreEnvironment extends JavaCoreEnvironment { } } if (compilerSpecialMode.includeKotlinRuntime()) { - for (VirtualFile root : compilerDependencies.getRuntimeRoots()) { - addLibraryRoot(root); - } + addToClasspath(compilerDependencies.getRuntimeJar()); } JetStandardLibrary.initialize(getProject()); From 95f9bcbacbe7c4134f9cd916e0ac42a2688c3c34 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 19:11:48 +0400 Subject: [PATCH 35/50] enhance tests (mostly codegen) * drop dependency on stdlib/alt-headers in the most tests * assign to myEnvironment at most once in JetLiteFixture * more tests do not compile runtime --- .../cli/jvm/compiler/JetCoreEnvironment.java | 11 +++ .../codegen/classes/overloadPlusAssign.jet | 2 +- .../classes/overloadPlusAssignReturn.jet | 2 +- .../classes/overloadPlusToPlusAssign.jet | 2 +- .../codegen/classes/overloadUnaryOperator.jet | 2 +- .../codegen/controlStructures/forUserType.jet | 12 ++-- .../testData/codegen/regressions/kt471.kt | 34 +++++----- .../testData/codegen/regressions/kt475.jet | 2 +- .../codegen/super/basicmethodSuperClass.jet | 2 +- .../org/jetbrains/jet/JetLiteFixture.java | 16 ++++- .../jetbrains/jet/cfg/JetControlFlowTest.java | 10 ++- .../jet/checkers/CheckerTestUtilTest.java | 7 ++ .../jet/checkers/JetDiagnosticsTest.java | 6 ++ .../jet/codegen/AnnotationGenTest.java | 8 +++ .../jetbrains/jet/codegen/ArrayGenTest.java | 13 +++- .../jet/codegen/BridgeMethodGenTest.java | 3 + .../jetbrains/jet/codegen/ClassGenTest.java | 67 +++++++++++++++++++ .../jet/codegen/ClosuresGenTest.java | 9 +++ .../jet/codegen/CodegenTestCase.java | 7 +- .../jet/codegen/ControlStructuresTest.java | 37 ++++++++++ .../jet/codegen/ExtensionFunctionsTest.java | 7 ++ .../jet/codegen/FunctionGenTest.java | 8 +++ .../jet/codegen/NamespaceGenTest.java | 8 +++ .../jetbrains/jet/codegen/ObjectGenTest.java | 8 +++ .../jet/codegen/PatternMatchingTest.java | 8 +++ .../jet/codegen/PrimitiveTypesTest.java | 9 +++ .../jet/codegen/PropertyGenTest.java | 24 +++++++ .../jetbrains/jet/codegen/SafeRefTest.java | 8 +++ .../jetbrains/jet/codegen/StringsTest.java | 8 +++ .../jetbrains/jet/codegen/SuperGenTest.java | 9 +++ .../org/jetbrains/jet/codegen/TraitsTest.java | 9 +++ .../jetbrains/jet/codegen/TupleGenTest.java | 3 + .../jetbrains/jet/codegen/TypeInfoTest.java | 8 +++ .../org/jetbrains/jet/codegen/VarArgTest.java | 12 ++++ .../jet/resolve/DescriptorRendererTest.java | 8 +++ .../jet/resolve/ExpectedResolveData.java | 9 ++- .../resolve/ExtensibleResolveTestCase.java | 4 ++ .../jetbrains/jet/resolve/JetResolveTest.java | 7 +- .../org/jetbrains/jet/runtime/JetNpeTest.java | 8 +++ .../JetDefaultModalityModifiersTest.java | 1 + .../jetbrains/jet/types/JetOverloadTest.java | 1 + .../jet/types/JetOverridingTest.java | 1 + .../jet/types/JetTypeCheckerTest.java | 3 + 43 files changed, 379 insertions(+), 44 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java index f0ae060e20c..76f2644fe5c 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java @@ -47,8 +47,14 @@ import java.util.List; public class JetCoreEnvironment extends JavaCoreEnvironment { private final List sourceFiles = new ArrayList(); + @NotNull + private final CompilerDependencies compilerDependencies; + public JetCoreEnvironment(Disposable parentDisposable, @NotNull CompilerDependencies compilerDependencies) { super(parentDisposable); + + this.compilerDependencies = compilerDependencies; + registerFileType(JetFileType.INSTANCE, "kt"); registerFileType(JetFileType.INSTANCE, "kts"); registerFileType(JetFileType.INSTANCE, "ktm"); @@ -150,4 +156,9 @@ public class JetCoreEnvironment extends JavaCoreEnvironment { } } } + + @NotNull + public CompilerDependencies getCompilerDependencies() { + return compilerDependencies; + } } diff --git a/compiler/testData/codegen/classes/overloadPlusAssign.jet b/compiler/testData/codegen/classes/overloadPlusAssign.jet index 5247973e8d6..4f5d9618c37 100644 --- a/compiler/testData/codegen/classes/overloadPlusAssign.jet +++ b/compiler/testData/codegen/classes/overloadPlusAssign.jet @@ -12,7 +12,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index).sure() } } diff --git a/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet b/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet index c5236b0ace4..7f612abcbcb 100644 --- a/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet +++ b/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index).sure() } } diff --git a/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet b/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet index c5236b0ace4..7f612abcbcb 100644 --- a/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet +++ b/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index).sure() } } diff --git a/compiler/testData/codegen/classes/overloadUnaryOperator.jet b/compiler/testData/codegen/classes/overloadUnaryOperator.jet index 120f84a2746..c799da4fe8b 100644 --- a/compiler/testData/codegen/classes/overloadUnaryOperator.jet +++ b/compiler/testData/codegen/classes/overloadUnaryOperator.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index).sure() } } diff --git a/compiler/testData/codegen/controlStructures/forUserType.jet b/compiler/testData/codegen/controlStructures/forUserType.jet index 7c0a4d1203d..f7dfbf1960d 100644 --- a/compiler/testData/codegen/controlStructures/forUserType.jet +++ b/compiler/testData/codegen/controlStructures/forUserType.jet @@ -19,28 +19,28 @@ fun box() : String { val c1: java.lang.Iterable = MyCollection1() sum = 0 for (el in c1) { - sum = sum + el + sum = sum + el.sure() } if(sum != 15) return "c1 failed" val c2 = MyCollection1() sum = 0 for (el in c2) { - sum = sum + el + sum = sum + el.sure() } if(sum != 15) return "c2 failed" val c3: Iterable = MyCollection2() sum = 0 for (el in c3) { - sum = sum + el + sum = sum + el.sure() } if(sum != 15) return "c3 failed" val c4 = MyCollection2() sum = 0 for (el in c4) { - sum = sum + el + sum = sum + el.sure() } if(sum != 15) return "c4 failed" @@ -50,7 +50,7 @@ fun box() : String { } sum = 0 for (el in a) { - sum = sum + el + sum = sum + el.sure() } if(sum != 10) return "a failed" @@ -69,7 +69,7 @@ fun box() : String { val c7 = MyCollection5() sum = 0 for (el in c7) { - sum = sum + el + sum = sum + el.sure() } if(sum != 0) return "c7 failed" diff --git a/compiler/testData/codegen/regressions/kt471.kt b/compiler/testData/codegen/regressions/kt471.kt index bc452506e78..665a2f52b1a 100644 --- a/compiler/testData/codegen/regressions/kt471.kt +++ b/compiler/testData/codegen/regressions/kt471.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - class MyNumber(val i: Int) { fun inc(): MyNumber = MyNumber(i+1) } @@ -52,25 +50,26 @@ fun test6() : Boolean { return true } +class MyArrayList(var value: T) { + fun get(index: Int): T { + if (index != 17) + throw Exception() + return value + } + fun set(index: Int, value: T): Unit { + if (index != 17) + throw Exception() + this.value = value + } +} + fun test7() : Boolean { - var mnr = ArrayList() - mnr.add(MyNumber(42)) - mnr[0]++ - if (mnr[0].i != 43) return false + var mnr = MyArrayList(MyNumber(42)) + mnr[17]++ + if (mnr[17].i != 43) return false return true } -fun test8() : Boolean { - var mnr = ArrayList() - mnr.add(MyNumber(42)) - mnr.add(MyNumber(41)) - mnr[1] = mnr[0]++ - if (mnr[0].i != 43) return false - if (mnr[1].i != 42) return false - return true -} - - fun box() : String { var m = MyNumber(42) @@ -82,7 +81,6 @@ fun box() : String { if (!test5()) return "fail test 5" if (!test6()) return "fail test 6" if (!test7()) return "fail test 7" - if (!test8()) return "fail test 8" ++m diff --git a/compiler/testData/codegen/regressions/kt475.jet b/compiler/testData/codegen/regressions/kt475.jet index 62c06ece2d3..8e7e86ddda7 100644 --- a/compiler/testData/codegen/regressions/kt475.jet +++ b/compiler/testData/codegen/regressions/kt475.jet @@ -14,5 +14,5 @@ var ArrayList.length : Int set(value: Int) = throw java.lang.Error() var ArrayList.last : T - get() = get(size()-1) + get() = get(size()-1).sure() set(el : T) { set(size()-1, el) } diff --git a/compiler/testData/codegen/super/basicmethodSuperClass.jet b/compiler/testData/codegen/super/basicmethodSuperClass.jet index 1b8a48bbfe9..06344019298 100644 --- a/compiler/testData/codegen/super/basicmethodSuperClass.jet +++ b/compiler/testData/codegen/super/basicmethodSuperClass.jet @@ -1,7 +1,7 @@ import java.util.ArrayList class N() : ArrayList() { - override fun add(el: Any) : Boolean { + override fun add(el: Any?) : Boolean { if (!super.add(el)) { throw Exception() } diff --git a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java index 514a00a8990..70db5fdf602 100644 --- a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java +++ b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java @@ -30,8 +30,10 @@ import com.intellij.testFramework.LightVirtualFile; import com.intellij.testFramework.TestDataFile; import com.intellij.testFramework.UsefulTestCase; import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; import org.jetbrains.jet.lang.psi.JetFile; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import org.jetbrains.jet.plugin.JetLanguage; import java.io.File; @@ -65,14 +67,26 @@ public abstract class JetLiteFixture extends UsefulTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); } protected void createEnvironmentWithMockJdk() { + if (myEnvironment != null) { + throw new IllegalStateException("must not set up myEnvironemnt twice"); + } myEnvironment = JetTestUtils.createEnvironmentWithMockJdk(getTestRootDisposable()); } + protected void createEnvironmentWithMockJdk(@NotNull CompilerSpecialMode compilerSpecialMode) { + if (myEnvironment != null) { + throw new IllegalStateException("must not set up myEnvironemnt twice"); + } + myEnvironment = JetTestUtils.createEnvironmentWithMockJdk(getTestRootDisposable(), compilerSpecialMode); + } + protected void createEnvironmentWithFullJdk() { + if (myEnvironment != null) { + throw new IllegalStateException("must not set up myEnvironemnt twice"); + } myEnvironment = JetTestUtils.createEnvironmentWithFullJdk(getTestRootDisposable()); } diff --git a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java index 03ab347496e..32e7c4aed69 100644 --- a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java +++ b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java @@ -31,6 +31,7 @@ import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.lang.cfg.LoopInfo; import org.jetbrains.jet.lang.cfg.pseudocode.*; import org.jetbrains.jet.lang.psi.*; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.io.File; import java.io.FileNotFoundException; @@ -42,7 +43,7 @@ public class JetControlFlowTest extends JetLiteFixture { static { System.setProperty("idea.platform.prefix", "Idea"); } - + private String myName; public JetControlFlowTest(String dataPath, String name) { @@ -50,6 +51,13 @@ public class JetControlFlowTest extends JetLiteFixture { myName = name; } + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); + } + @Override public String getName() { return "test" + myName; diff --git a/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java b/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java index 1c447845f51..3aeae16c31a 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java @@ -40,6 +40,13 @@ public class CheckerTestUtilTest extends JetLiteFixture { super("diagnostics/checkerTestUtil"); } + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + + protected void doTest(TheTest theTest) throws Exception { prepareForTest("test"); theTest.test(myFile); diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java index f1414d9cd17..6418bd51c8a 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java @@ -54,6 +54,12 @@ public class JetDiagnosticsTest extends JetLiteFixture { this.name = name; } + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); + } + @Override public String getName() { return "test" + name; diff --git a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java index cc68c573163..ae2a5694855 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java @@ -17,6 +17,7 @@ package org.jetbrains.jet.codegen; import jet.JetObject; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.annotation.*; import java.lang.reflect.Constructor; @@ -24,6 +25,13 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class AnnotationGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testPropField() throws NoSuchFieldException, NoSuchMethodException { loadText("[Deprecated] var x = 0"); Class aClass = generateNamespaceClass(); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java index 83935e04995..067d9600d74 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java @@ -16,9 +16,18 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Method; public class ArrayGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testKt238 () throws Exception { blackBoxFile("regressions/kt238.jet"); } @@ -237,7 +246,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionAssignGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; s[2, -2] += \"7\"; return s[2,-2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); @@ -257,7 +266,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; return s[2, -2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); diff --git a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java index dc1a068531b..c389165b403 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java @@ -16,8 +16,11 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class BridgeMethodGenTest extends CodegenTestCase { public void testBridgeMethod () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("bridge.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java index 8598ee335b8..a21348bd85a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; @@ -26,7 +28,14 @@ import java.util.List; * @author alex.tkachman */ public class ClassGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + public void testPSVMClass() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/simpleClass.jet"); final Class aClass = loadClass("SimpleClass", generateClassesInFile()); @@ -37,6 +46,7 @@ public class ClassGenTest extends CodegenTestCase { } public void testArrayListInheritance() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/inheritingFromArrayList.jet"); // System.out.println(generateToText()); final Class aClass = loadClass("Foo", generateClassesInFile()); @@ -44,30 +54,37 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritanceAndDelegation_DelegatingDefaultConstructorProperties() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritance.jet"); } public void testInheritanceAndDelegation2() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/delegation2.kt"); } public void testFunDelegation() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/funDelegation.jet"); } public void testPropertyDelegation() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/propertyDelegation.jet"); } public void testDiamondInheritance() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/diamondInheritance.jet"); } public void testRightHandOverride() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/rightHandOverride.jet"); } public void testNewInstanceExplicitConstructor() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/newInstanceDefaultConstructor.jet"); // System.out.println(generateToText()); final Method method = generateFunction("test"); @@ -76,18 +93,22 @@ public class ClassGenTest extends CodegenTestCase { } public void testInnerClass() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/innerClass.jet"); } public void testInheritedInnerClass() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritedInnerClass.jet"); } public void testInitializerBlock() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/initializerBlock.jet"); } public void testAbstractMethod() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { abstract fun x(): String; fun y(): Int = 0 }"); final ClassFileFactory codegens = generateClassesInFile(); @@ -97,34 +118,42 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritedMethod() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritedMethod.jet"); } public void testInitializerBlockDImpl() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/initializerBlockDImpl.jet"); } public void testPropertyInInitializer() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/propertyInInitializer.jet"); } public void testOuterThis() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/outerThis.jet"); } public void testSecondaryConstructors() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/secondaryConstructors.jet"); } public void testExceptionConstructor() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/exceptionConstructor.jet"); } public void testSimpleBox() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/simpleBox.jet"); } public void testAbstractClass() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class SimpleClass() { }"); final Class aClass = createClassLoader(generateClassesInFile()).loadClass("SimpleClass"); @@ -132,15 +161,18 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObject() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/classObject.jet"); } public void testClassObjectMethod() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // todo to be implemented after removal of type info // blackBoxFile("classes/classObjectMethod.jet"); } public void testClassObjectInterface() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/classObjectInterface.jet"); final Method method = generateFunction(); Object result = method.invoke(null); @@ -148,26 +180,32 @@ public class ClassGenTest extends CodegenTestCase { } public void testOverloadBinaryOperator() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadBinaryOperator.jet"); } public void testOverloadUnaryOperator() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadUnaryOperator.jet"); } public void testOverloadPlusAssign() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusAssign.jet"); } public void testOverloadPlusAssignReturn() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusAssignReturn.jet"); } public void testOverloadPlusToPlusAssign() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusToPlusAssign.jet"); } public void testEnumClass() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("enum class Direction { NORTH; SOUTH; EAST; WEST }"); final Class direction = createClassLoader(generateClassesInFile()).loadClass("Direction"); // System.out.println(generateToText()); @@ -177,6 +215,7 @@ public class ClassGenTest extends CodegenTestCase { } public void testEnumConstantConstructors() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("enum class Color(val rgb: Int) { RED: Color(0xFF0000); GREEN: Color(0x00FF00); }"); final Class colorClass = createClassLoader(generateClassesInFile()).loadClass("Color"); final Field redField = colorClass.getField("RED"); @@ -186,21 +225,25 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObjFields() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class A() { class object { val value = 10 } }\n" + "fun box() = if(A.value == 10) \"OK\" else \"fail\""); blackBox(); } public void testKt249() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt249.jet"); } public void testKt48 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt48.jet"); // System.out.println(generateToText()); } public void testKt309 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun box() = null"); final Method method = generateFunction("box"); assertEquals(method.getReturnType().getName(), "java.lang.Object"); @@ -208,60 +251,73 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt343 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt343.jet"); // System.out.println(generateToText()); } public void testKt508 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("regressions/kt508.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt504 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("regressions/kt504.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt501 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt501.jet"); } public void testKt496 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt496.jet"); // System.out.println(generateToText()); } public void testKt500 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt500.jet"); } public void testKt694 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt694.jet"); } public void testKt285 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt285.jet"); } public void testKt707 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt707.jet"); } public void testKt857 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt857.jet"); } public void testKt903 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt903.jet"); } public void testKt940 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt940.kt"); } public void testKt1018 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1018.kt"); } @@ -276,47 +332,58 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt1134() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1134.kt"); } public void testKt1157() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1157.kt"); } public void testKt471() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt471.kt"); } public void testKt1213() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt1213.kt"); } public void testKt723() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt723.kt"); } public void testKt725() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt725.kt"); } public void testKt633() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt633.kt"); } public void testKt1345() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1345.kt"); } public void testKt1538() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1538.kt"); } public void testKt1759() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1759.kt"); } public void testResolveOrder() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/resolveOrder.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java index d7a2fc81ee6..4b220b4b5c1 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java @@ -16,10 +16,19 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + /** * @author max */ public class ClosuresGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testSimplestClosure() throws Exception { blackBoxFile("classes/simplestClosure.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java index e95269f3368..302d63f4d7a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java @@ -24,6 +24,7 @@ import org.jetbrains.jet.analyzer.AnalyzeExhaust; import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.psi.JetPsiUtil; +import org.jetbrains.jet.lang.resolve.AnalyzingUtils; import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM; import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import org.jetbrains.jet.parsing.JetParsingTest; @@ -127,8 +128,9 @@ public abstract class CodegenTestCase extends JetLiteFixture { private GenerationState generateCommon(ClassBuilderFactory classBuilderFactory) { final AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegrationAndCheckForErrors( myFile, JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false)); + myEnvironment.getCompilerDependencies()); analyzeExhaust.throwIfError(); + AnalyzingUtils.throwExceptionOnErrors(analyzeExhaust.getBindingContext()); GenerationState state = new GenerationState(getProject(), classBuilderFactory, analyzeExhaust, Collections.singletonList(myFile)); state.compileCorrectFiles(CompilationErrorHandler.THROW_EXCEPTION); return state; @@ -194,8 +196,7 @@ public abstract class CodegenTestCase extends JetLiteFixture { r = method; } - if (r == null) - throw new AssertionError(); + if (r == null) { throw new AssertionError(); } return r; } catch (Error e) { System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java index ed7c393f87a..095cbdf7b49 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays; @@ -31,6 +33,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIf() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); @@ -40,6 +43,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testSingleBranchIf() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); @@ -61,6 +65,7 @@ public class ControlStructuresTest extends CodegenTestCase { } private void factorialTest(final String name) throws IllegalAccessException, InvocationTargetException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(name); // System.out.println(generateToText()); @@ -70,6 +75,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testContinue() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -78,6 +84,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfNoElse() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -86,6 +93,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCondJumpOnStack() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("import java.lang.Boolean as jlBoolean; fun foo(a: String): Int = if (jlBoolean.parseBoolean(a)) 5 else 10"); final Method main = generateFunction(); assertEquals(5, main.invoke(null, "true")); @@ -93,6 +101,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testFor() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -101,6 +110,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfBlock() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -111,6 +121,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInArray() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -119,6 +130,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInRange() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(sb: StringBuilder) { for(x in 1..4) sb.append(x) }"); final Method main = generateFunction(); StringBuilder stringBuilder = new StringBuilder(); @@ -127,6 +139,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testThrowCheckedException() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo() { throw Exception(); }"); final Method main = generateFunction(); boolean caught = false; @@ -141,6 +154,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryCatch() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -149,6 +163,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryFinally() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -168,30 +183,37 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForUserType() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forUserType.jet"); } public void testForIntArray() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forIntArray.jet"); } public void testForPrimitiveIntArray() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forPrimitiveIntArray.jet"); } public void testForNullableIntArray() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forNullableIntArray.jet"); } public void testForIntRange() { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forIntRange.jet"); } public void testKt237() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt237.jet"); } public void testCompareToNull() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String?): Boolean = a == null && b !== null && null == a && null !== b"); String text = generateToText(); assertTrue(!text.contains("java/lang/Object.equals")); @@ -202,6 +224,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableEq() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String): Boolean = a == b || b == a"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -210,6 +233,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableNotEq() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String): Boolean = a != b"); String text = generateToText(); // System.out.println(text); @@ -220,15 +244,18 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt299() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt299.jet"); } public void testKt416() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt416.jet"); // System.out.println(generateToText()); } public void testKt513() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt513.jet"); } @@ -238,31 +265,37 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt769() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt769.jet"); // System.out.println(generateToText()); } public void testKt773() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt773.jet"); // System.out.println(generateToText()); } public void testKt772() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt772.jet"); // System.out.println(generateToText()); } public void testKt870() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt870.jet"); // System.out.println(generateToText()); } public void testKt958() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt958.jet"); // System.out.println(generateToText()); } public void testQuicksort() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/quicksort.jet"); // System.out.println(generateToText()); } @@ -280,18 +313,22 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt1076() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1076.kt"); } public void testKt998() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt998.kt"); } public void testKt628() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt628.kt"); } public void testKt1441() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1441.kt"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java index d582c5b65a2..7f3f5eefe2d 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Method; /** @@ -29,6 +31,7 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testSimple() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method foo = generateFunction("foo"); final Character c = (Character) foo.invoke(null); @@ -36,6 +39,7 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testWhenFail() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); Method foo = generateFunction("foo"); @@ -43,15 +47,18 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testVirtual() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("extensionFunctions/virtual.jet"); } public void testShared() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("extensionFunctions/shared.kt"); // System.out.println(generateToText()); } public void testKt475() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt475.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java index 9b5b8062251..60672485073 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -23,6 +25,12 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class FunctionGenTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testDefaultArgs() throws Exception { blackBoxFile("functions/defaultargs.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java index 5b18e101b47..1e8791a1d59 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java @@ -19,6 +19,7 @@ package org.jetbrains.jet.codegen; import jet.IntRange; import jet.Tuple2; import jet.Tuple4; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.awt.*; import java.lang.reflect.InvocationTargetException; @@ -30,6 +31,13 @@ import java.util.Arrays; * @author yole */ public class NamespaceGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testPSVM() throws Exception { loadFile("PSVM.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java index ee83ac306d9..2803abd67eb 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java @@ -16,11 +16,19 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + /** * @author yole * @author alex.tkachman */ public class ObjectGenTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testSimpleObject() throws Exception { blackBoxFile("objects/simpleObject.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java index 9c1e048c9b0..318de46aec8 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java @@ -17,6 +17,7 @@ package org.jetbrains.jet.codegen; import jet.Tuple2; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.reflect.Method; @@ -24,6 +25,13 @@ import java.lang.reflect.Method; * @author yole */ public class PatternMatchingTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + @Override protected String getPrefix() { return "patternMatching"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java index 37fe4d052ba..0db6d37fa2e 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Method; /** @@ -23,6 +25,13 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class PrimitiveTypesTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testPlus() throws Exception { loadText("fun f(a: Int, b: Int): Int { return a + b }"); diff --git a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java index a5e7eb58dd3..c0ddbaffc4a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -31,6 +33,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVal() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVal"); final Field[] fields = aClass.getDeclaredFields(); @@ -40,6 +43,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVar() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVar"); final Object instance = aClass.newInstance(); @@ -50,6 +54,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPublicVar() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class PublicVar() { public var foo : Int = 0; }"); final Class aClass = loadImplementationClass(generateClassesInFile(), "PublicVar"); final Object instance = aClass.newInstance(); @@ -60,6 +65,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsInInterface() { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class AccessorsInInterface() { public var foo : Int = 0; }"); final Class aClass = loadClass("AccessorsInInterface", generateClassesInFile()); assertNotNull(findMethodByName(aClass, "getFoo")); @@ -67,6 +73,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivatePropertyInNamespace() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private val x = 239"); final Class nsClass = generateNamespaceClass(); final Field[] fields = nsClass.getDeclaredFields(); @@ -79,6 +86,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldPropertyAccess() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("properties/fieldPropertyAccess.jet"); // System.out.println(generateToText()); final Method method = generateFunction(); @@ -87,12 +95,14 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldGetter() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("val now: Long get() = System.currentTimeMillis(); fun foo() = now"); final Method method = generateFunction("foo"); assertIsCurrentTime((Long) method.invoke(null)); } public void testFieldSetter() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -104,6 +114,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldSetterPlusEq() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -112,6 +123,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsWithoutBody() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class AccessorsWithoutBody() { protected var foo: Int = 349\n get\n private set\n fun setter() { foo = 610; } } "); // System.out.println(generateToText()); final Class aClass = loadImplementationClass(generateClassesInFile(), "AccessorsWithoutBody"); @@ -129,6 +141,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testInitializersForNamespaceProperties() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("val x = System.currentTimeMillis()"); final Method method = generateFunction("getX"); method.setAccessible(true); @@ -136,6 +149,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPropertyReceiverOnStack() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "Evaluator"); final Constructor constructor = aClass.getConstructor(StringBuilder.class); @@ -147,6 +161,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAbstractVal() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { public abstract val x: String }"); final ClassFileFactory codegens = generateClassesInFile(); final Class aClass = loadClass("Foo", codegens); @@ -154,6 +169,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testVolatileProperty() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { public volatile var x: String = \"\"; }"); // System.out.println(generateToText()); final ClassFileFactory codegens = generateClassesInFile(); @@ -163,15 +179,18 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt257 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt257.jet"); // System.out.println(generateToText()); } public void testKt613 () throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt613.jet"); } public void testKt160() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("internal val s = java.lang.Double.toString(1.0)"); final Method method = generateFunction("getS"); method.setAccessible(true); @@ -179,10 +198,12 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1165() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1165.kt"); } public void testKt1168() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1168.kt"); } @@ -192,14 +213,17 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1159() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1159.kt"); } public void testKt1417() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1417.kt"); } public void testKt1398() throws Exception { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1398.kt"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java index 8a579bef218..fc1a4ccb5df 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java @@ -16,7 +16,15 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class SafeRefTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void test247 () throws Exception { blackBoxFile("regressions/kt247.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java index 73793d9083e..50196c364e7 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -25,6 +27,12 @@ import java.lang.reflect.Method; */ public class StringsTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testAnyToString () throws InvocationTargetException, IllegalAccessException { loadText("fun foo(x: Any) = x.toString()"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java index 1f83ea3aeb8..1884873b80a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java @@ -16,7 +16,16 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class SuperGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + public void testBasicProperty () { blackBoxFile("/super/basicproperty.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java index 1991e81b676..0fe37963fdc 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java @@ -16,7 +16,16 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class TraitsTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + @Override protected String getPrefix() { return "traits"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java index 49c9e6afc25..b394def5fc6 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java @@ -16,8 +16,11 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class TupleGenTest extends CodegenTestCase { public void testBasic() { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("/tuples/basic.jet"); // System.out.println(generateToText()); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java index 06e2cb575b1..e7dfe162c4a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java @@ -17,6 +17,7 @@ package org.jetbrains.jet.codegen; import jet.TypeCastException; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.reflect.Method; @@ -25,6 +26,13 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class TypeInfoTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); + } + @Override protected String getPrefix() { return "typeInfo"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java index 6164d2dcada..506d9e1f00f 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -26,6 +28,7 @@ import java.util.Arrays; */ public class VarArgTest extends CodegenTestCase { public void testStringArray () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -34,6 +37,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArray () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -42,6 +46,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinNoArgs () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -50,6 +55,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(239, 7); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -60,6 +66,7 @@ public class VarArgTest extends CodegenTestCase { } public void testNullableIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(239.toByte(), 7.toByte()); fun testf(vararg ts: Byte?) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -70,6 +77,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinObj () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(\"239\"); fun testf(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -79,6 +87,7 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayT () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = _array(2, 4); fun _array(vararg elements : T) = elements"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -94,10 +103,12 @@ public class VarArgTest extends CodegenTestCase { } public void testKt797() { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt796_797.jet"); } public void testArrayAsVararg () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private fun asList(vararg elems: String) = elems; fun test(ts: Array) = asList(*ts); "); //System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -106,6 +117,7 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayAsVararg2 () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private fun asList(vararg elems: String) = elems; fun test(ts1: Array, ts2: String) = asList(*ts1, ts2); "); System.out.println(generateToText()); final Method main = generateFunction("test"); diff --git a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java index fb299b9a079..1165f5ef1fb 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java @@ -41,6 +41,14 @@ import java.util.List; * @since 4/6/12 */ public class DescriptorRendererTest extends JetLiteFixture { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + + public void testGlobalProperties() throws IOException { doTest(); } diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java index f2d236a2e83..00f7434ed38 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java @@ -27,6 +27,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.analyzer.AnalyzeExhaust; +import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory; import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.diagnostics.Diagnostic; @@ -78,9 +79,13 @@ public abstract class ExpectedResolveData { private final Map nameToDescriptor; private final Map nameToPsiElement; - public ExpectedResolveData(Map nameToDescriptor, Map nameToPsiElement) { + @NotNull + private final JetCoreEnvironment jetCoreEnvironment; + + public ExpectedResolveData(Map nameToDescriptor, Map nameToPsiElement, @NotNull JetCoreEnvironment environment) { this.nameToDescriptor = nameToDescriptor; this.nameToPsiElement = nameToPsiElement; + jetCoreEnvironment = environment; } public final JetFile createFileFromMarkedUpText(String fileName, String text) { @@ -143,7 +148,7 @@ public abstract class ExpectedResolveData { AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(project, files, Predicates.alwaysTrue(), JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true)); + jetCoreEnvironment.getCompilerDependencies()); BindingContext bindingContext = analyzeExhaust.getBindingContext(); for (Diagnostic diagnostic : bindingContext.getDiagnostics()) { if (diagnostic.getFactory() instanceof UnresolvedReferenceDiagnosticFactory) { diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java index bc8bd8f7f54..3e736e690fd 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java @@ -20,6 +20,7 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.jet.JetLiteFixture; import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.lang.psi.JetFile; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.util.List; @@ -32,6 +33,9 @@ public abstract class ExtensibleResolveTestCase extends JetLiteFixture { @Override protected void setUp() throws Exception { super.setUp(); + + createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); + expectedResolveData = getExpectedResolveData(); } diff --git a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java index 6540ba315cd..f52d1fd7e28 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java @@ -24,7 +24,6 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.PsiMethod; import junit.framework.Test; import org.jetbrains.annotations.NotNull; -import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.JetTestCaseBuilder; import org.jetbrains.jet.di.InjectorForJavaSemanticServices; import org.jetbrains.jet.di.InjectorForTests; @@ -37,8 +36,6 @@ import org.jetbrains.jet.lang.resolve.FqName; import org.jetbrains.jet.lang.resolve.calls.CallResolver; import org.jetbrains.jet.lang.resolve.calls.OverloadResolutionResults; import org.jetbrains.jet.lang.resolve.calls.ResolvedCall; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; -import org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver; import org.jetbrains.jet.lang.resolve.java.PsiClassFinder; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; import org.jetbrains.jet.lang.types.JetType; @@ -103,7 +100,7 @@ public class JetResolveTest extends ExtensibleResolveTestCase { nameToDeclaration.put("java::java.lang.Number", java_lang_Number); nameToDeclaration.put("java::java.lang.Number.intValue()", java_lang_Number.findMethodsByName("intValue", true)[0]); - return new ExpectedResolveData(nameToDescriptor, nameToDeclaration) { + return new ExpectedResolveData(nameToDescriptor, nameToDeclaration, myEnvironment) { @Override protected JetFile createJetFile(String fileName, String text) { return createCheckAndReturnPsiFile(fileName, text); @@ -127,7 +124,7 @@ public class JetResolveTest extends ExtensibleResolveTestCase { private PsiClass findClass(String qualifiedName) { Project project = getProject(); InjectorForJavaSemanticServices injector = new InjectorForJavaSemanticServices( - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true), project); + myEnvironment.getCompilerDependencies(), project); return injector.getPsiClassFinderForJvm().findPsiClass(new FqName(qualifiedName), PsiClassFinder.RuntimeClassesHandleMode.THROW); } diff --git a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java index 548314b7cf9..7d7e5fa91a3 100644 --- a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java +++ b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java @@ -22,6 +22,14 @@ import org.jetbrains.jet.codegen.CodegenTestCase; import java.lang.reflect.Method; public class JetNpeTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + + + public void testStackTrace () { try { Intrinsics.throwNpe(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java index 1a2a064a398..9134dcbd0d3 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java @@ -45,6 +45,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + super.createEnvironmentWithMockJdk(); tc.setUp(); } diff --git a/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java b/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java index 104a46b7f2c..415265d1f7b 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java @@ -40,6 +40,7 @@ public class JetOverloadTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + createEnvironmentWithMockJdk(); InjectorForTests injector = new InjectorForTests(getProject()); library = injector.getJetStandardLibrary(); descriptorResolver = injector.getDescriptorResolver(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java b/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java index 12d663c8971..8f88357f684 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java @@ -40,6 +40,7 @@ public class JetOverridingTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + createEnvironmentWithMockJdk(); InjectorForTests injector = new InjectorForTests(getProject()); library = injector.getJetStandardLibrary(); descriptorResolver = injector.getDescriptorResolver(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java index 400b00ff07d..8c6200cdf0b 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java @@ -66,6 +66,9 @@ public class JetTypeCheckerTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + + super.createEnvironmentWithMockJdk(); + library = JetStandardLibrary.getInstance(); classDefinitions = new ClassDefinitions(); From 67013cbaf502366db6bc271a8b6d3862e7a9bc35 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 19:21:44 +0400 Subject: [PATCH 36/50] fix one more error in error diagnostics --- .../src/org/jetbrains/jet/codegen/ExpressionCodegen.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java index e497db59abb..174511076d0 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ExpressionCodegen.java @@ -154,7 +154,8 @@ public class ExpressionCodegen extends JetVisitor { throw e; } catch (Throwable error) { - throw new CompilationException(error.getMessage(), error, selector); + String message = error.getMessage(); + throw new CompilationException(message != null ? message : "null", error, selector); } } From 035fd686e074fc5a93afde6ae7473effe204995d Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 19:22:28 +0400 Subject: [PATCH 37/50] add -ea to runner we should definitely make asserts unconditional --- bin/kotlin | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/kotlin b/bin/kotlin index 5cca3809cde..933ac6ed261 100755 --- a/bin/kotlin +++ b/bin/kotlin @@ -23,6 +23,7 @@ classpath="$classpath:$root/out/production/stdlib" classpath="$classpath:$root/lib/*:$ideaRoot/lib/*:$ideaRoot/lib/rt/*" exec java $JAVA_OPTS \ + -ea \ -classpath "$classpath" \ org.jetbrains.jet.cli.jvm.K2JVMCompiler \ "$@" From d71723131dff3a5bd6aae55c66b11b99f8a11b65 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 21:21:46 +0400 Subject: [PATCH 38/50] Revert "enhance tests (mostly codegen)" temporarily This reverts commit 95f9bcbacbe7c4134f9cd916e0ac42a2688c3c34. --- .../cli/jvm/compiler/JetCoreEnvironment.java | 11 --- .../codegen/classes/overloadPlusAssign.jet | 2 +- .../classes/overloadPlusAssignReturn.jet | 2 +- .../classes/overloadPlusToPlusAssign.jet | 2 +- .../codegen/classes/overloadUnaryOperator.jet | 2 +- .../codegen/controlStructures/forUserType.jet | 12 ++-- .../testData/codegen/regressions/kt471.kt | 34 +++++----- .../testData/codegen/regressions/kt475.jet | 2 +- .../codegen/super/basicmethodSuperClass.jet | 2 +- .../org/jetbrains/jet/JetLiteFixture.java | 16 +---- .../jetbrains/jet/cfg/JetControlFlowTest.java | 10 +-- .../jet/checkers/CheckerTestUtilTest.java | 7 -- .../jet/checkers/JetDiagnosticsTest.java | 6 -- .../jet/codegen/AnnotationGenTest.java | 8 --- .../jetbrains/jet/codegen/ArrayGenTest.java | 13 +--- .../jet/codegen/BridgeMethodGenTest.java | 3 - .../jetbrains/jet/codegen/ClassGenTest.java | 67 ------------------- .../jet/codegen/ClosuresGenTest.java | 9 --- .../jet/codegen/CodegenTestCase.java | 7 +- .../jet/codegen/ControlStructuresTest.java | 37 ---------- .../jet/codegen/ExtensionFunctionsTest.java | 7 -- .../jet/codegen/FunctionGenTest.java | 8 --- .../jet/codegen/NamespaceGenTest.java | 8 --- .../jetbrains/jet/codegen/ObjectGenTest.java | 8 --- .../jet/codegen/PatternMatchingTest.java | 8 --- .../jet/codegen/PrimitiveTypesTest.java | 9 --- .../jet/codegen/PropertyGenTest.java | 24 ------- .../jetbrains/jet/codegen/SafeRefTest.java | 8 --- .../jetbrains/jet/codegen/StringsTest.java | 8 --- .../jetbrains/jet/codegen/SuperGenTest.java | 9 --- .../org/jetbrains/jet/codegen/TraitsTest.java | 9 --- .../jetbrains/jet/codegen/TupleGenTest.java | 3 - .../jetbrains/jet/codegen/TypeInfoTest.java | 8 --- .../org/jetbrains/jet/codegen/VarArgTest.java | 12 ---- .../jet/resolve/DescriptorRendererTest.java | 8 --- .../jet/resolve/ExpectedResolveData.java | 9 +-- .../resolve/ExtensibleResolveTestCase.java | 4 -- .../jetbrains/jet/resolve/JetResolveTest.java | 7 +- .../org/jetbrains/jet/runtime/JetNpeTest.java | 8 --- .../JetDefaultModalityModifiersTest.java | 1 - .../jetbrains/jet/types/JetOverloadTest.java | 1 - .../jet/types/JetOverridingTest.java | 1 - .../jet/types/JetTypeCheckerTest.java | 3 - 43 files changed, 44 insertions(+), 379 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java index 76f2644fe5c..f0ae060e20c 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java @@ -47,14 +47,8 @@ import java.util.List; public class JetCoreEnvironment extends JavaCoreEnvironment { private final List sourceFiles = new ArrayList(); - @NotNull - private final CompilerDependencies compilerDependencies; - public JetCoreEnvironment(Disposable parentDisposable, @NotNull CompilerDependencies compilerDependencies) { super(parentDisposable); - - this.compilerDependencies = compilerDependencies; - registerFileType(JetFileType.INSTANCE, "kt"); registerFileType(JetFileType.INSTANCE, "kts"); registerFileType(JetFileType.INSTANCE, "ktm"); @@ -156,9 +150,4 @@ public class JetCoreEnvironment extends JavaCoreEnvironment { } } } - - @NotNull - public CompilerDependencies getCompilerDependencies() { - return compilerDependencies; - } } diff --git a/compiler/testData/codegen/classes/overloadPlusAssign.jet b/compiler/testData/codegen/classes/overloadPlusAssign.jet index 4f5d9618c37..5247973e8d6 100644 --- a/compiler/testData/codegen/classes/overloadPlusAssign.jet +++ b/compiler/testData/codegen/classes/overloadPlusAssign.jet @@ -12,7 +12,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index).sure() + return contents.get(index) } } diff --git a/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet b/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet index 7f612abcbcb..c5236b0ace4 100644 --- a/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet +++ b/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index).sure() + return contents.get(index) } } diff --git a/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet b/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet index 7f612abcbcb..c5236b0ace4 100644 --- a/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet +++ b/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index).sure() + return contents.get(index) } } diff --git a/compiler/testData/codegen/classes/overloadUnaryOperator.jet b/compiler/testData/codegen/classes/overloadUnaryOperator.jet index c799da4fe8b..120f84a2746 100644 --- a/compiler/testData/codegen/classes/overloadUnaryOperator.jet +++ b/compiler/testData/codegen/classes/overloadUnaryOperator.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index).sure() + return contents.get(index) } } diff --git a/compiler/testData/codegen/controlStructures/forUserType.jet b/compiler/testData/codegen/controlStructures/forUserType.jet index f7dfbf1960d..7c0a4d1203d 100644 --- a/compiler/testData/codegen/controlStructures/forUserType.jet +++ b/compiler/testData/codegen/controlStructures/forUserType.jet @@ -19,28 +19,28 @@ fun box() : String { val c1: java.lang.Iterable = MyCollection1() sum = 0 for (el in c1) { - sum = sum + el.sure() + sum = sum + el } if(sum != 15) return "c1 failed" val c2 = MyCollection1() sum = 0 for (el in c2) { - sum = sum + el.sure() + sum = sum + el } if(sum != 15) return "c2 failed" val c3: Iterable = MyCollection2() sum = 0 for (el in c3) { - sum = sum + el.sure() + sum = sum + el } if(sum != 15) return "c3 failed" val c4 = MyCollection2() sum = 0 for (el in c4) { - sum = sum + el.sure() + sum = sum + el } if(sum != 15) return "c4 failed" @@ -50,7 +50,7 @@ fun box() : String { } sum = 0 for (el in a) { - sum = sum + el.sure() + sum = sum + el } if(sum != 10) return "a failed" @@ -69,7 +69,7 @@ fun box() : String { val c7 = MyCollection5() sum = 0 for (el in c7) { - sum = sum + el.sure() + sum = sum + el } if(sum != 0) return "c7 failed" diff --git a/compiler/testData/codegen/regressions/kt471.kt b/compiler/testData/codegen/regressions/kt471.kt index 665a2f52b1a..bc452506e78 100644 --- a/compiler/testData/codegen/regressions/kt471.kt +++ b/compiler/testData/codegen/regressions/kt471.kt @@ -1,3 +1,5 @@ +import java.util.ArrayList + class MyNumber(val i: Int) { fun inc(): MyNumber = MyNumber(i+1) } @@ -50,26 +52,25 @@ fun test6() : Boolean { return true } -class MyArrayList(var value: T) { - fun get(index: Int): T { - if (index != 17) - throw Exception() - return value - } - fun set(index: Int, value: T): Unit { - if (index != 17) - throw Exception() - this.value = value - } -} - fun test7() : Boolean { - var mnr = MyArrayList(MyNumber(42)) - mnr[17]++ - if (mnr[17].i != 43) return false + var mnr = ArrayList() + mnr.add(MyNumber(42)) + mnr[0]++ + if (mnr[0].i != 43) return false return true } +fun test8() : Boolean { + var mnr = ArrayList() + mnr.add(MyNumber(42)) + mnr.add(MyNumber(41)) + mnr[1] = mnr[0]++ + if (mnr[0].i != 43) return false + if (mnr[1].i != 42) return false + return true +} + + fun box() : String { var m = MyNumber(42) @@ -81,6 +82,7 @@ fun box() : String { if (!test5()) return "fail test 5" if (!test6()) return "fail test 6" if (!test7()) return "fail test 7" + if (!test8()) return "fail test 8" ++m diff --git a/compiler/testData/codegen/regressions/kt475.jet b/compiler/testData/codegen/regressions/kt475.jet index 8e7e86ddda7..62c06ece2d3 100644 --- a/compiler/testData/codegen/regressions/kt475.jet +++ b/compiler/testData/codegen/regressions/kt475.jet @@ -14,5 +14,5 @@ var ArrayList.length : Int set(value: Int) = throw java.lang.Error() var ArrayList.last : T - get() = get(size()-1).sure() + get() = get(size()-1) set(el : T) { set(size()-1, el) } diff --git a/compiler/testData/codegen/super/basicmethodSuperClass.jet b/compiler/testData/codegen/super/basicmethodSuperClass.jet index 06344019298..1b8a48bbfe9 100644 --- a/compiler/testData/codegen/super/basicmethodSuperClass.jet +++ b/compiler/testData/codegen/super/basicmethodSuperClass.jet @@ -1,7 +1,7 @@ import java.util.ArrayList class N() : ArrayList() { - override fun add(el: Any?) : Boolean { + override fun add(el: Any) : Boolean { if (!super.add(el)) { throw Exception() } diff --git a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java index 70db5fdf602..514a00a8990 100644 --- a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java +++ b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java @@ -30,10 +30,8 @@ import com.intellij.testFramework.LightVirtualFile; import com.intellij.testFramework.TestDataFile; import com.intellij.testFramework.UsefulTestCase; import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; import org.jetbrains.jet.lang.psi.JetFile; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import org.jetbrains.jet.plugin.JetLanguage; import java.io.File; @@ -67,26 +65,14 @@ public abstract class JetLiteFixture extends UsefulTestCase { @Override protected void setUp() throws Exception { super.setUp(); + createEnvironmentWithMockJdk(); } protected void createEnvironmentWithMockJdk() { - if (myEnvironment != null) { - throw new IllegalStateException("must not set up myEnvironemnt twice"); - } myEnvironment = JetTestUtils.createEnvironmentWithMockJdk(getTestRootDisposable()); } - protected void createEnvironmentWithMockJdk(@NotNull CompilerSpecialMode compilerSpecialMode) { - if (myEnvironment != null) { - throw new IllegalStateException("must not set up myEnvironemnt twice"); - } - myEnvironment = JetTestUtils.createEnvironmentWithMockJdk(getTestRootDisposable(), compilerSpecialMode); - } - protected void createEnvironmentWithFullJdk() { - if (myEnvironment != null) { - throw new IllegalStateException("must not set up myEnvironemnt twice"); - } myEnvironment = JetTestUtils.createEnvironmentWithFullJdk(getTestRootDisposable()); } diff --git a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java index 32e7c4aed69..03ab347496e 100644 --- a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java +++ b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java @@ -31,7 +31,6 @@ import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.lang.cfg.LoopInfo; import org.jetbrains.jet.lang.cfg.pseudocode.*; import org.jetbrains.jet.lang.psi.*; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.io.File; import java.io.FileNotFoundException; @@ -43,7 +42,7 @@ public class JetControlFlowTest extends JetLiteFixture { static { System.setProperty("idea.platform.prefix", "Idea"); } - + private String myName; public JetControlFlowTest(String dataPath, String name) { @@ -51,13 +50,6 @@ public class JetControlFlowTest extends JetLiteFixture { myName = name; } - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); - } - @Override public String getName() { return "test" + myName; diff --git a/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java b/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java index 3aeae16c31a..1c447845f51 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java @@ -40,13 +40,6 @@ public class CheckerTestUtilTest extends JetLiteFixture { super("diagnostics/checkerTestUtil"); } - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(); - } - - protected void doTest(TheTest theTest) throws Exception { prepareForTest("test"); theTest.test(myFile); diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java index 6418bd51c8a..f1414d9cd17 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java @@ -54,12 +54,6 @@ public class JetDiagnosticsTest extends JetLiteFixture { this.name = name; } - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); - } - @Override public String getName() { return "test" + name; diff --git a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java index ae2a5694855..cc68c573163 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java @@ -17,7 +17,6 @@ package org.jetbrains.jet.codegen; import jet.JetObject; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.annotation.*; import java.lang.reflect.Constructor; @@ -25,13 +24,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class AnnotationGenTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testPropField() throws NoSuchFieldException, NoSuchMethodException { loadText("[Deprecated] var x = 0"); Class aClass = generateNamespaceClass(); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java index 067d9600d74..83935e04995 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java @@ -16,18 +16,9 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.Method; public class ArrayGenTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testKt238 () throws Exception { blackBoxFile("regressions/kt238.jet"); } @@ -246,7 +237,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionAssignGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; s[2, -2] += \"7\"; return s[2,-2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); @@ -266,7 +257,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; return s[2, -2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); diff --git a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java index c389165b403..dc1a068531b 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java @@ -16,11 +16,8 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - public class BridgeMethodGenTest extends CodegenTestCase { public void testBridgeMethod () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("bridge.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java index a21348bd85a..8598ee335b8 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; @@ -28,14 +26,7 @@ import java.util.List; * @author alex.tkachman */ public class ClassGenTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - public void testPSVMClass() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/simpleClass.jet"); final Class aClass = loadClass("SimpleClass", generateClassesInFile()); @@ -46,7 +37,6 @@ public class ClassGenTest extends CodegenTestCase { } public void testArrayListInheritance() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/inheritingFromArrayList.jet"); // System.out.println(generateToText()); final Class aClass = loadClass("Foo", generateClassesInFile()); @@ -54,37 +44,30 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritanceAndDelegation_DelegatingDefaultConstructorProperties() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritance.jet"); } public void testInheritanceAndDelegation2() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/delegation2.kt"); } public void testFunDelegation() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/funDelegation.jet"); } public void testPropertyDelegation() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/propertyDelegation.jet"); } public void testDiamondInheritance() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/diamondInheritance.jet"); } public void testRightHandOverride() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/rightHandOverride.jet"); } public void testNewInstanceExplicitConstructor() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/newInstanceDefaultConstructor.jet"); // System.out.println(generateToText()); final Method method = generateFunction("test"); @@ -93,22 +76,18 @@ public class ClassGenTest extends CodegenTestCase { } public void testInnerClass() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/innerClass.jet"); } public void testInheritedInnerClass() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritedInnerClass.jet"); } public void testInitializerBlock() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/initializerBlock.jet"); } public void testAbstractMethod() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { abstract fun x(): String; fun y(): Int = 0 }"); final ClassFileFactory codegens = generateClassesInFile(); @@ -118,42 +97,34 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritedMethod() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritedMethod.jet"); } public void testInitializerBlockDImpl() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/initializerBlockDImpl.jet"); } public void testPropertyInInitializer() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/propertyInInitializer.jet"); } public void testOuterThis() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/outerThis.jet"); } public void testSecondaryConstructors() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/secondaryConstructors.jet"); } public void testExceptionConstructor() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/exceptionConstructor.jet"); } public void testSimpleBox() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/simpleBox.jet"); } public void testAbstractClass() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class SimpleClass() { }"); final Class aClass = createClassLoader(generateClassesInFile()).loadClass("SimpleClass"); @@ -161,18 +132,15 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObject() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/classObject.jet"); } public void testClassObjectMethod() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // todo to be implemented after removal of type info // blackBoxFile("classes/classObjectMethod.jet"); } public void testClassObjectInterface() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/classObjectInterface.jet"); final Method method = generateFunction(); Object result = method.invoke(null); @@ -180,32 +148,26 @@ public class ClassGenTest extends CodegenTestCase { } public void testOverloadBinaryOperator() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadBinaryOperator.jet"); } public void testOverloadUnaryOperator() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadUnaryOperator.jet"); } public void testOverloadPlusAssign() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusAssign.jet"); } public void testOverloadPlusAssignReturn() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusAssignReturn.jet"); } public void testOverloadPlusToPlusAssign() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusToPlusAssign.jet"); } public void testEnumClass() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("enum class Direction { NORTH; SOUTH; EAST; WEST }"); final Class direction = createClassLoader(generateClassesInFile()).loadClass("Direction"); // System.out.println(generateToText()); @@ -215,7 +177,6 @@ public class ClassGenTest extends CodegenTestCase { } public void testEnumConstantConstructors() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("enum class Color(val rgb: Int) { RED: Color(0xFF0000); GREEN: Color(0x00FF00); }"); final Class colorClass = createClassLoader(generateClassesInFile()).loadClass("Color"); final Field redField = colorClass.getField("RED"); @@ -225,25 +186,21 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObjFields() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class A() { class object { val value = 10 } }\n" + "fun box() = if(A.value == 10) \"OK\" else \"fail\""); blackBox(); } public void testKt249() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt249.jet"); } public void testKt48 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt48.jet"); // System.out.println(generateToText()); } public void testKt309 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun box() = null"); final Method method = generateFunction("box"); assertEquals(method.getReturnType().getName(), "java.lang.Object"); @@ -251,73 +208,60 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt343 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt343.jet"); // System.out.println(generateToText()); } public void testKt508 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("regressions/kt508.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt504 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("regressions/kt504.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt501 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt501.jet"); } public void testKt496 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt496.jet"); // System.out.println(generateToText()); } public void testKt500 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt500.jet"); } public void testKt694 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt694.jet"); } public void testKt285 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt285.jet"); } public void testKt707 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt707.jet"); } public void testKt857 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt857.jet"); } public void testKt903 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt903.jet"); } public void testKt940 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt940.kt"); } public void testKt1018 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1018.kt"); } @@ -332,58 +276,47 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt1134() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1134.kt"); } public void testKt1157() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1157.kt"); } public void testKt471() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt471.kt"); } public void testKt1213() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt1213.kt"); } public void testKt723() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt723.kt"); } public void testKt725() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt725.kt"); } public void testKt633() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt633.kt"); } public void testKt1345() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1345.kt"); } public void testKt1538() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1538.kt"); } public void testKt1759() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1759.kt"); } public void testResolveOrder() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/resolveOrder.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java index 4b220b4b5c1..d7a2fc81ee6 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java @@ -16,19 +16,10 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - /** * @author max */ public class ClosuresGenTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testSimplestClosure() throws Exception { blackBoxFile("classes/simplestClosure.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java index 302d63f4d7a..e95269f3368 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java @@ -24,7 +24,6 @@ import org.jetbrains.jet.analyzer.AnalyzeExhaust; import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.psi.JetPsiUtil; -import org.jetbrains.jet.lang.resolve.AnalyzingUtils; import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM; import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import org.jetbrains.jet.parsing.JetParsingTest; @@ -128,9 +127,8 @@ public abstract class CodegenTestCase extends JetLiteFixture { private GenerationState generateCommon(ClassBuilderFactory classBuilderFactory) { final AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegrationAndCheckForErrors( myFile, JetControlFlowDataTraceFactory.EMPTY, - myEnvironment.getCompilerDependencies()); + CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false)); analyzeExhaust.throwIfError(); - AnalyzingUtils.throwExceptionOnErrors(analyzeExhaust.getBindingContext()); GenerationState state = new GenerationState(getProject(), classBuilderFactory, analyzeExhaust, Collections.singletonList(myFile)); state.compileCorrectFiles(CompilationErrorHandler.THROW_EXCEPTION); return state; @@ -196,7 +194,8 @@ public abstract class CodegenTestCase extends JetLiteFixture { r = method; } - if (r == null) { throw new AssertionError(); } + if (r == null) + throw new AssertionError(); return r; } catch (Error e) { System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java index 095cbdf7b49..ed7c393f87a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays; @@ -33,7 +31,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIf() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); @@ -43,7 +40,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testSingleBranchIf() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); @@ -65,7 +61,6 @@ public class ControlStructuresTest extends CodegenTestCase { } private void factorialTest(final String name) throws IllegalAccessException, InvocationTargetException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(name); // System.out.println(generateToText()); @@ -75,7 +70,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testContinue() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -84,7 +78,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfNoElse() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -93,7 +86,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCondJumpOnStack() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("import java.lang.Boolean as jlBoolean; fun foo(a: String): Int = if (jlBoolean.parseBoolean(a)) 5 else 10"); final Method main = generateFunction(); assertEquals(5, main.invoke(null, "true")); @@ -101,7 +93,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testFor() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -110,7 +101,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfBlock() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -121,7 +111,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInArray() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -130,7 +119,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInRange() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(sb: StringBuilder) { for(x in 1..4) sb.append(x) }"); final Method main = generateFunction(); StringBuilder stringBuilder = new StringBuilder(); @@ -139,7 +127,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testThrowCheckedException() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo() { throw Exception(); }"); final Method main = generateFunction(); boolean caught = false; @@ -154,7 +141,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryCatch() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -163,7 +149,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryFinally() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -183,37 +168,30 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForUserType() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forUserType.jet"); } public void testForIntArray() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forIntArray.jet"); } public void testForPrimitiveIntArray() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forPrimitiveIntArray.jet"); } public void testForNullableIntArray() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forNullableIntArray.jet"); } public void testForIntRange() { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forIntRange.jet"); } public void testKt237() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt237.jet"); } public void testCompareToNull() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String?): Boolean = a == null && b !== null && null == a && null !== b"); String text = generateToText(); assertTrue(!text.contains("java/lang/Object.equals")); @@ -224,7 +202,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableEq() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String): Boolean = a == b || b == a"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -233,7 +210,6 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableNotEq() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String): Boolean = a != b"); String text = generateToText(); // System.out.println(text); @@ -244,18 +220,15 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt299() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt299.jet"); } public void testKt416() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt416.jet"); // System.out.println(generateToText()); } public void testKt513() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt513.jet"); } @@ -265,37 +238,31 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt769() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt769.jet"); // System.out.println(generateToText()); } public void testKt773() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt773.jet"); // System.out.println(generateToText()); } public void testKt772() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt772.jet"); // System.out.println(generateToText()); } public void testKt870() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt870.jet"); // System.out.println(generateToText()); } public void testKt958() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt958.jet"); // System.out.println(generateToText()); } public void testQuicksort() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/quicksort.jet"); // System.out.println(generateToText()); } @@ -313,22 +280,18 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt1076() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1076.kt"); } public void testKt998() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt998.kt"); } public void testKt628() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt628.kt"); } public void testKt1441() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1441.kt"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java index 7f3f5eefe2d..d582c5b65a2 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.Method; /** @@ -31,7 +29,6 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testSimple() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method foo = generateFunction("foo"); final Character c = (Character) foo.invoke(null); @@ -39,7 +36,6 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testWhenFail() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); Method foo = generateFunction("foo"); @@ -47,18 +43,15 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testVirtual() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("extensionFunctions/virtual.jet"); } public void testShared() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("extensionFunctions/shared.kt"); // System.out.println(generateToText()); } public void testKt475() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt475.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java index 60672485073..9b5b8062251 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -25,12 +23,6 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class FunctionGenTest extends CodegenTestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testDefaultArgs() throws Exception { blackBoxFile("functions/defaultargs.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java index 1e8791a1d59..5b18e101b47 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java @@ -19,7 +19,6 @@ package org.jetbrains.jet.codegen; import jet.IntRange; import jet.Tuple2; import jet.Tuple4; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.awt.*; import java.lang.reflect.InvocationTargetException; @@ -31,13 +30,6 @@ import java.util.Arrays; * @author yole */ public class NamespaceGenTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testPSVM() throws Exception { loadFile("PSVM.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java index 2803abd67eb..ee83ac306d9 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java @@ -16,19 +16,11 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - /** * @author yole * @author alex.tkachman */ public class ObjectGenTest extends CodegenTestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testSimpleObject() throws Exception { blackBoxFile("objects/simpleObject.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java index 318de46aec8..9c1e048c9b0 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java @@ -17,7 +17,6 @@ package org.jetbrains.jet.codegen; import jet.Tuple2; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.reflect.Method; @@ -25,13 +24,6 @@ import java.lang.reflect.Method; * @author yole */ public class PatternMatchingTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - @Override protected String getPrefix() { return "patternMatching"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java index 0db6d37fa2e..37fe4d052ba 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.Method; /** @@ -25,13 +23,6 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class PrimitiveTypesTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testPlus() throws Exception { loadText("fun f(a: Int, b: Int): Int { return a + b }"); diff --git a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java index c0ddbaffc4a..a5e7eb58dd3 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -33,7 +31,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVal() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVal"); final Field[] fields = aClass.getDeclaredFields(); @@ -43,7 +40,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVar() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVar"); final Object instance = aClass.newInstance(); @@ -54,7 +50,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPublicVar() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class PublicVar() { public var foo : Int = 0; }"); final Class aClass = loadImplementationClass(generateClassesInFile(), "PublicVar"); final Object instance = aClass.newInstance(); @@ -65,7 +60,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsInInterface() { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class AccessorsInInterface() { public var foo : Int = 0; }"); final Class aClass = loadClass("AccessorsInInterface", generateClassesInFile()); assertNotNull(findMethodByName(aClass, "getFoo")); @@ -73,7 +67,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivatePropertyInNamespace() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private val x = 239"); final Class nsClass = generateNamespaceClass(); final Field[] fields = nsClass.getDeclaredFields(); @@ -86,7 +79,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldPropertyAccess() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("properties/fieldPropertyAccess.jet"); // System.out.println(generateToText()); final Method method = generateFunction(); @@ -95,14 +87,12 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldGetter() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("val now: Long get() = System.currentTimeMillis(); fun foo() = now"); final Method method = generateFunction("foo"); assertIsCurrentTime((Long) method.invoke(null)); } public void testFieldSetter() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -114,7 +104,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldSetterPlusEq() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -123,7 +112,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsWithoutBody() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class AccessorsWithoutBody() { protected var foo: Int = 349\n get\n private set\n fun setter() { foo = 610; } } "); // System.out.println(generateToText()); final Class aClass = loadImplementationClass(generateClassesInFile(), "AccessorsWithoutBody"); @@ -141,7 +129,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testInitializersForNamespaceProperties() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("val x = System.currentTimeMillis()"); final Method method = generateFunction("getX"); method.setAccessible(true); @@ -149,7 +136,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPropertyReceiverOnStack() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "Evaluator"); final Constructor constructor = aClass.getConstructor(StringBuilder.class); @@ -161,7 +147,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAbstractVal() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { public abstract val x: String }"); final ClassFileFactory codegens = generateClassesInFile(); final Class aClass = loadClass("Foo", codegens); @@ -169,7 +154,6 @@ public class PropertyGenTest extends CodegenTestCase { } public void testVolatileProperty() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { public volatile var x: String = \"\"; }"); // System.out.println(generateToText()); final ClassFileFactory codegens = generateClassesInFile(); @@ -179,18 +163,15 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt257 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt257.jet"); // System.out.println(generateToText()); } public void testKt613 () throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt613.jet"); } public void testKt160() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("internal val s = java.lang.Double.toString(1.0)"); final Method method = generateFunction("getS"); method.setAccessible(true); @@ -198,12 +179,10 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1165() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1165.kt"); } public void testKt1168() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1168.kt"); } @@ -213,17 +192,14 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1159() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1159.kt"); } public void testKt1417() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1417.kt"); } public void testKt1398() throws Exception { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1398.kt"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java index fc1a4ccb5df..8a579bef218 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java @@ -16,15 +16,7 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - public class SafeRefTest extends CodegenTestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void test247 () throws Exception { blackBoxFile("regressions/kt247.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java index 50196c364e7..73793d9083e 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -27,12 +25,6 @@ import java.lang.reflect.Method; */ public class StringsTest extends CodegenTestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testAnyToString () throws InvocationTargetException, IllegalAccessException { loadText("fun foo(x: Any) = x.toString()"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java index 1884873b80a..1f83ea3aeb8 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java @@ -16,16 +16,7 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - public class SuperGenTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - public void testBasicProperty () { blackBoxFile("/super/basicproperty.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java index 0fe37963fdc..1991e81b676 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java @@ -16,16 +16,7 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - public class TraitsTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - @Override protected String getPrefix() { return "traits"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java index b394def5fc6..49c9e6afc25 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java @@ -16,11 +16,8 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - public class TupleGenTest extends CodegenTestCase { public void testBasic() { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("/tuples/basic.jet"); // System.out.println(generateToText()); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java index e7dfe162c4a..06e2cb575b1 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java @@ -17,7 +17,6 @@ package org.jetbrains.jet.codegen; import jet.TypeCastException; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.reflect.Method; @@ -26,13 +25,6 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class TypeInfoTest extends CodegenTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); - } - @Override protected String getPrefix() { return "typeInfo"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java index 506d9e1f00f..6164d2dcada 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; - import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -28,7 +26,6 @@ import java.util.Arrays; */ public class VarArgTest extends CodegenTestCase { public void testStringArray () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -37,7 +34,6 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArray () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -46,7 +42,6 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinNoArgs () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -55,7 +50,6 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(239, 7); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -66,7 +60,6 @@ public class VarArgTest extends CodegenTestCase { } public void testNullableIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(239.toByte(), 7.toByte()); fun testf(vararg ts: Byte?) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -77,7 +70,6 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinObj () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(\"239\"); fun testf(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -87,7 +79,6 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayT () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = _array(2, 4); fun _array(vararg elements : T) = elements"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -103,12 +94,10 @@ public class VarArgTest extends CodegenTestCase { } public void testKt797() { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt796_797.jet"); } public void testArrayAsVararg () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private fun asList(vararg elems: String) = elems; fun test(ts: Array) = asList(*ts); "); //System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -117,7 +106,6 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayAsVararg2 () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private fun asList(vararg elems: String) = elems; fun test(ts1: Array, ts2: String) = asList(*ts1, ts2); "); System.out.println(generateToText()); final Method main = generateFunction("test"); diff --git a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java index 1165f5ef1fb..fb299b9a079 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java @@ -41,14 +41,6 @@ import java.util.List; * @since 4/6/12 */ public class DescriptorRendererTest extends JetLiteFixture { - - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(); - } - - public void testGlobalProperties() throws IOException { doTest(); } diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java index 00f7434ed38..f2d236a2e83 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java @@ -27,7 +27,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.analyzer.AnalyzeExhaust; -import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory; import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.diagnostics.Diagnostic; @@ -79,13 +78,9 @@ public abstract class ExpectedResolveData { private final Map nameToDescriptor; private final Map nameToPsiElement; - @NotNull - private final JetCoreEnvironment jetCoreEnvironment; - - public ExpectedResolveData(Map nameToDescriptor, Map nameToPsiElement, @NotNull JetCoreEnvironment environment) { + public ExpectedResolveData(Map nameToDescriptor, Map nameToPsiElement) { this.nameToDescriptor = nameToDescriptor; this.nameToPsiElement = nameToPsiElement; - jetCoreEnvironment = environment; } public final JetFile createFileFromMarkedUpText(String fileName, String text) { @@ -148,7 +143,7 @@ public abstract class ExpectedResolveData { AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(project, files, Predicates.alwaysTrue(), JetControlFlowDataTraceFactory.EMPTY, - jetCoreEnvironment.getCompilerDependencies()); + CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true)); BindingContext bindingContext = analyzeExhaust.getBindingContext(); for (Diagnostic diagnostic : bindingContext.getDiagnostics()) { if (diagnostic.getFactory() instanceof UnresolvedReferenceDiagnosticFactory) { diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java index 3e736e690fd..bc8bd8f7f54 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java @@ -20,7 +20,6 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.jet.JetLiteFixture; import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.lang.psi.JetFile; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.util.List; @@ -33,9 +32,6 @@ public abstract class ExtensibleResolveTestCase extends JetLiteFixture { @Override protected void setUp() throws Exception { super.setUp(); - - createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); - expectedResolveData = getExpectedResolveData(); } diff --git a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java index f52d1fd7e28..6540ba315cd 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java @@ -24,6 +24,7 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.PsiMethod; import junit.framework.Test; import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.JetTestCaseBuilder; import org.jetbrains.jet.di.InjectorForJavaSemanticServices; import org.jetbrains.jet.di.InjectorForTests; @@ -36,6 +37,8 @@ import org.jetbrains.jet.lang.resolve.FqName; import org.jetbrains.jet.lang.resolve.calls.CallResolver; import org.jetbrains.jet.lang.resolve.calls.OverloadResolutionResults; import org.jetbrains.jet.lang.resolve.calls.ResolvedCall; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; +import org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver; import org.jetbrains.jet.lang.resolve.java.PsiClassFinder; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; import org.jetbrains.jet.lang.types.JetType; @@ -100,7 +103,7 @@ public class JetResolveTest extends ExtensibleResolveTestCase { nameToDeclaration.put("java::java.lang.Number", java_lang_Number); nameToDeclaration.put("java::java.lang.Number.intValue()", java_lang_Number.findMethodsByName("intValue", true)[0]); - return new ExpectedResolveData(nameToDescriptor, nameToDeclaration, myEnvironment) { + return new ExpectedResolveData(nameToDescriptor, nameToDeclaration) { @Override protected JetFile createJetFile(String fileName, String text) { return createCheckAndReturnPsiFile(fileName, text); @@ -124,7 +127,7 @@ public class JetResolveTest extends ExtensibleResolveTestCase { private PsiClass findClass(String qualifiedName) { Project project = getProject(); InjectorForJavaSemanticServices injector = new InjectorForJavaSemanticServices( - myEnvironment.getCompilerDependencies(), project); + CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true), project); return injector.getPsiClassFinderForJvm().findPsiClass(new FqName(qualifiedName), PsiClassFinder.RuntimeClassesHandleMode.THROW); } diff --git a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java index 7d7e5fa91a3..548314b7cf9 100644 --- a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java +++ b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java @@ -22,14 +22,6 @@ import org.jetbrains.jet.codegen.CodegenTestCase; import java.lang.reflect.Method; public class JetNpeTest extends CodegenTestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - createEnvironmentWithMockJdk(); - } - - - public void testStackTrace () { try { Intrinsics.throwNpe(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java index 9134dcbd0d3..1a2a064a398 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java @@ -45,7 +45,6 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); - super.createEnvironmentWithMockJdk(); tc.setUp(); } diff --git a/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java b/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java index 415265d1f7b..104a46b7f2c 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java @@ -40,7 +40,6 @@ public class JetOverloadTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); InjectorForTests injector = new InjectorForTests(getProject()); library = injector.getJetStandardLibrary(); descriptorResolver = injector.getDescriptorResolver(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java b/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java index 8f88357f684..12d663c8971 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java @@ -40,7 +40,6 @@ public class JetOverridingTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); InjectorForTests injector = new InjectorForTests(getProject()); library = injector.getJetStandardLibrary(); descriptorResolver = injector.getDescriptorResolver(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java index 8c6200cdf0b..400b00ff07d 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java @@ -66,9 +66,6 @@ public class JetTypeCheckerTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); - - super.createEnvironmentWithMockJdk(); - library = JetStandardLibrary.getInstance(); classDefinitions = new ClassDefinitions(); From 58b706c12e78943e543721d0450baf1528bb0733 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 21:22:06 +0400 Subject: [PATCH 39/50] Revert "kotlin runtime must be added to classpath" temporarily This reverts commit 90910cae3487311103e1792fb812e9d86b347aa5. --- .../jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java index f0ae060e20c..14e5111f06b 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java @@ -72,7 +72,9 @@ public class JetCoreEnvironment extends JavaCoreEnvironment { } } if (compilerSpecialMode.includeKotlinRuntime()) { - addToClasspath(compilerDependencies.getRuntimeJar()); + for (VirtualFile root : compilerDependencies.getRuntimeRoots()) { + addLibraryRoot(root); + } } JetStandardLibrary.initialize(getProject()); From 0c7401c9320a7ac74a1d4b358e8668ebd9ff125f Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 21:47:09 +0400 Subject: [PATCH 40/50] add java.nio.charset.Charset to mock JDK --- compiler/testData/mockJDK-1.7/jre/lib/rt.jar | Bin 594322 -> 598167 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/compiler/testData/mockJDK-1.7/jre/lib/rt.jar b/compiler/testData/mockJDK-1.7/jre/lib/rt.jar index 27a89f30f17114af4b406aade103d1fcbdc4f02e..91ce8f9eece1a753975fcc97aaabe66e49db385c 100644 GIT binary patch delta 6737 zcmZWs2Ow2%*yr4Jjx9vjDrE1yGg8Tjl<+63gzV9jOR^e7@=8OIRSH>+e3K&1$ag$WMNKu7y|^5BkMI7=i8eIyGK z$$~3k!S^ZH(a2SG{R4yFp3cXd<$OGR<^JpYw;B82X0Gne0fC2uR?Ru-Q25K}8mk9h zwBR;UV3hxr4cE+MUA>$G12b)~6ZQv!m#Nnidd9|W1s)tMw&@wZmN3LGW__sc{Ack5 zPPKr6H}CH@D((69D&tzM^uY~}E|XE^q^%YO|8#iSNM~K$Dx_t(;mX}M@7wPqzcO}@ zF+}==)0r*wYVA?_IA-f#H`;ida&opSaJi@}uwkr3EscV`5G}0J;}ES=4>4wGeETKI z-a+1vy>a|RPqYV4^Pv2c(7})Xwb63C;x%;vCtgP%7{1ioG|h#(nwY}}hJQ!}%*pUq zJQ!5LnM|oXS>eY;PX%j)7}ik9?k^ZML-*8Bd2JFh=5QJzR*#kpag=l0C@s@sx=Xp? zC5gct%cd+8+31SPRgQ1_^M|Hn_$l7EndOoOeW%I-=CtPLsddxdOA&m_mNnZpwMFHR z&mEB%bPSn0AXqLOTYmJmtk|#Kp(!1W5XYJd-nL6Cm#Zk`Ik}}W)_jvMp?y`X%>RZ9 zUhS`$i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zn>0QUEBxu+#QBrdyH!VuzZl2*ny^=%$K6mP&wqp zCLWB?K-&L~ERM&yM9U?u-p6t4F!#W*K+#|MCz0#NJOn(5y7JqPh#(Qk;`d`wkO;6O SIVCw2zS^Tl$$n1%&HfiTFul6~ From c23feab6d1ec9bfdfa5b280a1d415da1ab9ce007 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 22:32:08 +0400 Subject: [PATCH 41/50] JetLiteFixture: assign to myEnvironment only once --- .../org/jetbrains/jet/JetLiteFixture.java | 9 ++- .../jetbrains/jet/cfg/JetControlFlowTest.java | 9 ++- .../jet/checkers/CheckerTestUtilTest.java | 7 ++ .../jet/checkers/JetDiagnosticsTest.java | 6 ++ .../jet/codegen/AnnotationGenTest.java | 7 ++ .../jetbrains/jet/codegen/ArrayGenTest.java | 7 ++ .../jet/codegen/BridgeMethodGenTest.java | 1 + .../jetbrains/jet/codegen/ClassGenTest.java | 77 +++++++++++++++++-- .../jet/codegen/ClosuresGenTest.java | 7 ++ .../jet/codegen/CodegenTestCase.java | 1 + .../jet/codegen/CompileTextTest.java | 1 + .../jet/codegen/ControlStructuresTest.java | 35 +++++++++ .../jet/codegen/ExtensionFunctionsTest.java | 5 ++ .../jet/codegen/FunctionGenTest.java | 6 ++ .../jet/codegen/NamespaceGenTest.java | 7 ++ .../jetbrains/jet/codegen/ObjectGenTest.java | 6 ++ .../jet/codegen/PatternMatchingTest.java | 7 ++ .../jet/codegen/PrimitiveTypesTest.java | 7 ++ .../jet/codegen/PropertyGenTest.java | 22 ++++++ .../jetbrains/jet/codegen/SafeRefTest.java | 6 ++ .../jetbrains/jet/codegen/StringsTest.java | 6 ++ .../jetbrains/jet/codegen/SuperGenTest.java | 7 ++ .../org/jetbrains/jet/codegen/TraitsTest.java | 7 ++ .../jetbrains/jet/codegen/TupleGenTest.java | 1 + .../jetbrains/jet/codegen/TypeInfoTest.java | 9 ++- .../org/jetbrains/jet/codegen/VarArgTest.java | 11 ++- .../jet/resolve/DescriptorRendererTest.java | 8 ++ .../jet/resolve/ExpectedResolveData.java | 1 + .../resolve/ExtensibleResolveTestCase.java | 3 + .../org/jetbrains/jet/runtime/JetNpeTest.java | 8 ++ .../JetDefaultModalityModifiersTest.java | 1 + .../jetbrains/jet/types/JetOverloadTest.java | 1 + .../jet/types/JetOverridingTest.java | 1 + .../jet/types/JetTypeCheckerTest.java | 3 + 34 files changed, 289 insertions(+), 11 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java index 514a00a8990..5c61f770f97 100644 --- a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java +++ b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java @@ -30,8 +30,10 @@ import com.intellij.testFramework.LightVirtualFile; import com.intellij.testFramework.TestDataFile; import com.intellij.testFramework.UsefulTestCase; import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; import org.jetbrains.jet.lang.psi.JetFile; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import org.jetbrains.jet.plugin.JetLanguage; import java.io.File; @@ -65,14 +67,19 @@ public abstract class JetLiteFixture extends UsefulTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); } protected void createEnvironmentWithMockJdk() { + if (myEnvironment != null) { + throw new IllegalStateException("must not set up myEnvironemnt twice"); + } myEnvironment = JetTestUtils.createEnvironmentWithMockJdk(getTestRootDisposable()); } protected void createEnvironmentWithFullJdk() { + if (myEnvironment != null) { + throw new IllegalStateException("must not set up myEnvironemnt twice"); + } myEnvironment = JetTestUtils.createEnvironmentWithFullJdk(getTestRootDisposable()); } diff --git a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java index 03ab347496e..7c5f077a5e0 100644 --- a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java +++ b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java @@ -42,7 +42,7 @@ public class JetControlFlowTest extends JetLiteFixture { static { System.setProperty("idea.platform.prefix", "Idea"); } - + private String myName; public JetControlFlowTest(String dataPath, String name) { @@ -50,6 +50,13 @@ public class JetControlFlowTest extends JetLiteFixture { myName = name; } + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + @Override public String getName() { return "test" + myName; diff --git a/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java b/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java index 1c447845f51..3aeae16c31a 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/CheckerTestUtilTest.java @@ -40,6 +40,13 @@ public class CheckerTestUtilTest extends JetLiteFixture { super("diagnostics/checkerTestUtil"); } + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + + protected void doTest(TheTest theTest) throws Exception { prepareForTest("test"); theTest.test(myFile); diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java index f1414d9cd17..dd3cead181c 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java @@ -54,6 +54,12 @@ public class JetDiagnosticsTest extends JetLiteFixture { this.name = name; } + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + @Override public String getName() { return "test" + name; diff --git a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java index cc68c573163..f4a6a085db0 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java @@ -24,6 +24,13 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class AnnotationGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testPropField() throws NoSuchFieldException, NoSuchMethodException { loadText("[Deprecated] var x = 0"); Class aClass = generateNamespaceClass(); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java index 83935e04995..4580d342f97 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java @@ -19,6 +19,13 @@ package org.jetbrains.jet.codegen; import java.lang.reflect.Method; public class ArrayGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testKt238 () throws Exception { blackBoxFile("regressions/kt238.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java index dc1a068531b..1cada40caac 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java @@ -18,6 +18,7 @@ package org.jetbrains.jet.codegen; public class BridgeMethodGenTest extends CodegenTestCase { public void testBridgeMethod () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("bridge.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java index 8598ee335b8..9a9eca63fef 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java @@ -26,7 +26,14 @@ import java.util.List; * @author alex.tkachman */ public class ClassGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + public void testPSVMClass() throws Exception { + createEnvironmentWithMockJdk(); loadFile("classes/simpleClass.jet"); final Class aClass = loadClass("SimpleClass", generateClassesInFile()); @@ -37,6 +44,7 @@ public class ClassGenTest extends CodegenTestCase { } public void testArrayListInheritance() throws Exception { + createEnvironmentWithMockJdk(); loadFile("classes/inheritingFromArrayList.jet"); // System.out.println(generateToText()); final Class aClass = loadClass("Foo", generateClassesInFile()); @@ -44,30 +52,37 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritanceAndDelegation_DelegatingDefaultConstructorProperties() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/inheritance.jet"); } public void testInheritanceAndDelegation2() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/delegation2.kt"); } public void testFunDelegation() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/funDelegation.jet"); } public void testPropertyDelegation() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/propertyDelegation.jet"); } public void testDiamondInheritance() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/diamondInheritance.jet"); } public void testRightHandOverride() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/rightHandOverride.jet"); } public void testNewInstanceExplicitConstructor() throws Exception { + createEnvironmentWithMockJdk(); loadFile("classes/newInstanceDefaultConstructor.jet"); // System.out.println(generateToText()); final Method method = generateFunction("test"); @@ -76,18 +91,22 @@ public class ClassGenTest extends CodegenTestCase { } public void testInnerClass() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/innerClass.jet"); } public void testInheritedInnerClass() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/inheritedInnerClass.jet"); } public void testInitializerBlock() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/initializerBlock.jet"); } public void testAbstractMethod() throws Exception { + createEnvironmentWithMockJdk(); loadText("abstract class Foo { abstract fun x(): String; fun y(): Int = 0 }"); final ClassFileFactory codegens = generateClassesInFile(); @@ -97,34 +116,42 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritedMethod() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/inheritedMethod.jet"); } public void testInitializerBlockDImpl() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/initializerBlockDImpl.jet"); } public void testPropertyInInitializer() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/propertyInInitializer.jet"); } public void testOuterThis() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/outerThis.jet"); } public void testSecondaryConstructors() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/secondaryConstructors.jet"); } public void testExceptionConstructor() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/exceptionConstructor.jet"); } public void testSimpleBox() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/simpleBox.jet"); } public void testAbstractClass() throws Exception { + createEnvironmentWithMockJdk(); loadText("abstract class SimpleClass() { }"); final Class aClass = createClassLoader(generateClassesInFile()).loadClass("SimpleClass"); @@ -132,15 +159,18 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObject() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/classObject.jet"); } public void testClassObjectMethod() throws Exception { -// todo to be implemented after removal of type info + createEnvironmentWithMockJdk(); + // todo to be implemented after removal of type info // blackBoxFile("classes/classObjectMethod.jet"); } public void testClassObjectInterface() throws Exception { + createEnvironmentWithMockJdk(); loadFile("classes/classObjectInterface.jet"); final Method method = generateFunction(); Object result = method.invoke(null); @@ -148,26 +178,32 @@ public class ClassGenTest extends CodegenTestCase { } public void testOverloadBinaryOperator() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/overloadBinaryOperator.jet"); } public void testOverloadUnaryOperator() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/overloadUnaryOperator.jet"); } public void testOverloadPlusAssign() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/overloadPlusAssign.jet"); } public void testOverloadPlusAssignReturn() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/overloadPlusAssignReturn.jet"); } public void testOverloadPlusToPlusAssign() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/overloadPlusToPlusAssign.jet"); } public void testEnumClass() throws Exception { + createEnvironmentWithMockJdk(); loadText("enum class Direction { NORTH; SOUTH; EAST; WEST }"); final Class direction = createClassLoader(generateClassesInFile()).loadClass("Direction"); // System.out.println(generateToText()); @@ -177,6 +213,7 @@ public class ClassGenTest extends CodegenTestCase { } public void testEnumConstantConstructors() throws Exception { + createEnvironmentWithMockJdk(); loadText("enum class Color(val rgb: Int) { RED: Color(0xFF0000); GREEN: Color(0x00FF00); }"); final Class colorClass = createClassLoader(generateClassesInFile()).loadClass("Color"); final Field redField = colorClass.getField("RED"); @@ -186,21 +223,25 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObjFields() throws Exception { + createEnvironmentWithMockJdk(); loadText("class A() { class object { val value = 10 } }\n" + "fun box() = if(A.value == 10) \"OK\" else \"fail\""); blackBox(); } public void testKt249() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt249.jet"); } public void testKt48 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt48.jet"); // System.out.println(generateToText()); } public void testKt309 () throws Exception { + createEnvironmentWithMockJdk(); loadText("fun box() = null"); final Method method = generateFunction("box"); assertEquals(method.getReturnType().getName(), "java.lang.Object"); @@ -208,65 +249,78 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt343 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt343.jet"); // System.out.println(generateToText()); } public void testKt508 () throws Exception { + createEnvironmentWithMockJdk(); loadFile("regressions/kt508.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt504 () throws Exception { + createEnvironmentWithMockJdk(); loadFile("regressions/kt504.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt501 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt501.jet"); } public void testKt496 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt496.jet"); // System.out.println(generateToText()); } public void testKt500 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt500.jet"); } public void testKt694 () throws Exception { -// blackBoxFile("regressions/kt694.jet"); + createEnvironmentWithMockJdk(); + // blackBoxFile("regressions/kt694.jet"); } public void testKt285 () throws Exception { -// blackBoxFile("regressions/kt285.jet"); + createEnvironmentWithMockJdk(); + // blackBoxFile("regressions/kt285.jet"); } public void testKt707 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt707.jet"); } public void testKt857 () throws Exception { -// blackBoxFile("regressions/kt857.jet"); + createEnvironmentWithMockJdk(); + // blackBoxFile("regressions/kt857.jet"); } public void testKt903 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt903.jet"); } public void testKt940 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt940.kt"); } public void testKt1018 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1018.kt"); } public void testKt1120 () throws Exception { -// createEnvironmentWithFullJdk(); + createEnvironmentWithFullJdk(); // blackBoxFile("regressions/kt1120.kt"); } @@ -276,47 +330,58 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt1134() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1134.kt"); } public void testKt1157() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1157.kt"); } public void testKt471() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt471.kt"); } public void testKt1213() throws Exception { -// blackBoxFile("regressions/kt1213.kt"); + createEnvironmentWithMockJdk(); + // blackBoxFile("regressions/kt1213.kt"); } public void testKt723() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt723.kt"); } public void testKt725() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt725.kt"); } public void testKt633() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt633.kt"); } public void testKt1345() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1345.kt"); } public void testKt1538() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1538.kt"); } public void testKt1759() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1759.kt"); } public void testResolveOrder() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("classes/resolveOrder.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java index d7a2fc81ee6..225ebbc4670 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java @@ -20,6 +20,13 @@ package org.jetbrains.jet.codegen; * @author max */ public class ClosuresGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testSimplestClosure() throws Exception { blackBoxFile("classes/simplestClosure.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java index e95269f3368..2b639b9b4c1 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java @@ -24,6 +24,7 @@ import org.jetbrains.jet.analyzer.AnalyzeExhaust; import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.psi.JetPsiUtil; +import org.jetbrains.jet.lang.resolve.AnalyzingUtils; import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM; import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import org.jetbrains.jet.parsing.JetParsingTest; diff --git a/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java b/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java index 1e60a9fc01f..2934c8b09aa 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java @@ -30,6 +30,7 @@ import java.lang.reflect.Method; public class CompileTextTest extends CodegenTestCase { public void testMe() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); String text = "import org.jetbrains.jet.codegen.CompileTextTest; fun x() = CompileTextTest()"; CompilerDependencies dependencies = CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false); JetCoreEnvironment environment = new JetCoreEnvironment(CompileEnvironmentUtil.createMockDisposable(), dependencies); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java index ed7c393f87a..55fc93c6795 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java @@ -31,6 +31,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIf() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); @@ -40,6 +41,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testSingleBranchIf() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); @@ -61,6 +63,7 @@ public class ControlStructuresTest extends CodegenTestCase { } private void factorialTest(final String name) throws IllegalAccessException, InvocationTargetException { + createEnvironmentWithMockJdk(); loadFile(name); // System.out.println(generateToText()); @@ -70,6 +73,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testContinue() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -78,6 +82,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfNoElse() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -86,6 +91,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCondJumpOnStack() throws Exception { + createEnvironmentWithMockJdk(); loadText("import java.lang.Boolean as jlBoolean; fun foo(a: String): Int = if (jlBoolean.parseBoolean(a)) 5 else 10"); final Method main = generateFunction(); assertEquals(5, main.invoke(null, "true")); @@ -93,6 +99,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testFor() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -101,6 +108,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfBlock() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -111,6 +119,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInArray() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -119,6 +128,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInRange() throws Exception { + createEnvironmentWithMockJdk(); loadText("fun foo(sb: StringBuilder) { for(x in 1..4) sb.append(x) }"); final Method main = generateFunction(); StringBuilder stringBuilder = new StringBuilder(); @@ -127,6 +137,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testThrowCheckedException() throws Exception { + createEnvironmentWithMockJdk(); loadText("fun foo() { throw Exception(); }"); final Method main = generateFunction(); boolean caught = false; @@ -141,6 +152,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryCatch() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -149,6 +161,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryFinally() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -168,30 +181,37 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForUserType() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("controlStructures/forUserType.jet"); } public void testForIntArray() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("controlStructures/forIntArray.jet"); } public void testForPrimitiveIntArray() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("controlStructures/forPrimitiveIntArray.jet"); } public void testForNullableIntArray() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("controlStructures/forNullableIntArray.jet"); } public void testForIntRange() { + createEnvironmentWithMockJdk(); blackBoxFile("controlStructures/forIntRange.jet"); } public void testKt237() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt237.jet"); } public void testCompareToNull() throws Exception { + createEnvironmentWithMockJdk(); loadText("fun foo(a: String?, b: String?): Boolean = a == null && b !== null && null == a && null !== b"); String text = generateToText(); assertTrue(!text.contains("java/lang/Object.equals")); @@ -202,6 +222,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableEq() throws Exception { + createEnvironmentWithMockJdk(); loadText("fun foo(a: String?, b: String): Boolean = a == b || b == a"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -210,6 +231,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableNotEq() throws Exception { + createEnvironmentWithMockJdk(); loadText("fun foo(a: String?, b: String): Boolean = a != b"); String text = generateToText(); // System.out.println(text); @@ -220,15 +242,18 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt299() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt299.jet"); } public void testKt416() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt416.jet"); // System.out.println(generateToText()); } public void testKt513() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt513.jet"); } @@ -238,31 +263,37 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt769() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt769.jet"); // System.out.println(generateToText()); } public void testKt773() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt773.jet"); // System.out.println(generateToText()); } public void testKt772() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt772.jet"); // System.out.println(generateToText()); } public void testKt870() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt870.jet"); // System.out.println(generateToText()); } public void testKt958() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt958.jet"); // System.out.println(generateToText()); } public void testQuicksort() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("controlStructures/quicksort.jet"); // System.out.println(generateToText()); } @@ -280,18 +311,22 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt1076() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1076.kt"); } public void testKt998() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt998.kt"); } public void testKt628() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt628.kt"); } public void testKt1441() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1441.kt"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java index d582c5b65a2..2b3383be9b9 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java @@ -29,6 +29,7 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testSimple() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); final Method foo = generateFunction("foo"); final Character c = (Character) foo.invoke(null); @@ -36,6 +37,7 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testWhenFail() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); // System.out.println(generateToText()); Method foo = generateFunction("foo"); @@ -43,15 +45,18 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testVirtual() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("extensionFunctions/virtual.jet"); } public void testShared() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("extensionFunctions/shared.kt"); // System.out.println(generateToText()); } public void testKt475() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt475.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java index 9b5b8062251..af3748b9ed1 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java @@ -23,6 +23,12 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class FunctionGenTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testDefaultArgs() throws Exception { blackBoxFile("functions/defaultargs.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java index 5b18e101b47..e294c343471 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java @@ -30,6 +30,13 @@ import java.util.Arrays; * @author yole */ public class NamespaceGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testPSVM() throws Exception { loadFile("PSVM.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java index ee83ac306d9..019a1854f4a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java @@ -21,6 +21,12 @@ package org.jetbrains.jet.codegen; * @author alex.tkachman */ public class ObjectGenTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testSimpleObject() throws Exception { blackBoxFile("objects/simpleObject.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java index 9c1e048c9b0..c0692e612aa 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java @@ -24,6 +24,13 @@ import java.lang.reflect.Method; * @author yole */ public class PatternMatchingTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + @Override protected String getPrefix() { return "patternMatching"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java index 37fe4d052ba..8e0358afa05 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java @@ -23,6 +23,13 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class PrimitiveTypesTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testPlus() throws Exception { loadText("fun f(a: Int, b: Int): Int { return a + b }"); diff --git a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java index a5e7eb58dd3..0f0cf18f039 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java @@ -31,6 +31,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVal() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVal"); final Field[] fields = aClass.getDeclaredFields(); @@ -40,6 +41,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVar() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVar"); final Object instance = aClass.newInstance(); @@ -50,6 +52,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPublicVar() throws Exception { + createEnvironmentWithMockJdk(); loadText("class PublicVar() { public var foo : Int = 0; }"); final Class aClass = loadImplementationClass(generateClassesInFile(), "PublicVar"); final Object instance = aClass.newInstance(); @@ -60,6 +63,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsInInterface() { + createEnvironmentWithMockJdk(); loadText("class AccessorsInInterface() { public var foo : Int = 0; }"); final Class aClass = loadClass("AccessorsInInterface", generateClassesInFile()); assertNotNull(findMethodByName(aClass, "getFoo")); @@ -67,6 +71,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivatePropertyInNamespace() throws Exception { + createEnvironmentWithMockJdk(); loadText("private val x = 239"); final Class nsClass = generateNamespaceClass(); final Field[] fields = nsClass.getDeclaredFields(); @@ -79,6 +84,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldPropertyAccess() throws Exception { + createEnvironmentWithMockJdk(); loadFile("properties/fieldPropertyAccess.jet"); // System.out.println(generateToText()); final Method method = generateFunction(); @@ -87,12 +93,14 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldGetter() throws Exception { + createEnvironmentWithMockJdk(); loadText("val now: Long get() = System.currentTimeMillis(); fun foo() = now"); final Method method = generateFunction("foo"); assertIsCurrentTime((Long) method.invoke(null)); } public void testFieldSetter() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -104,6 +112,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldSetterPlusEq() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -112,6 +121,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsWithoutBody() throws Exception { + createEnvironmentWithMockJdk(); loadText("class AccessorsWithoutBody() { protected var foo: Int = 349\n get\n private set\n fun setter() { foo = 610; } } "); // System.out.println(generateToText()); final Class aClass = loadImplementationClass(generateClassesInFile(), "AccessorsWithoutBody"); @@ -129,6 +139,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testInitializersForNamespaceProperties() throws Exception { + createEnvironmentWithMockJdk(); loadText("val x = System.currentTimeMillis()"); final Method method = generateFunction("getX"); method.setAccessible(true); @@ -136,6 +147,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPropertyReceiverOnStack() throws Exception { + createEnvironmentWithMockJdk(); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "Evaluator"); final Constructor constructor = aClass.getConstructor(StringBuilder.class); @@ -147,6 +159,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAbstractVal() throws Exception { + createEnvironmentWithMockJdk(); loadText("abstract class Foo { public abstract val x: String }"); final ClassFileFactory codegens = generateClassesInFile(); final Class aClass = loadClass("Foo", codegens); @@ -154,6 +167,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testVolatileProperty() throws Exception { + createEnvironmentWithMockJdk(); loadText("abstract class Foo { public volatile var x: String = \"\"; }"); // System.out.println(generateToText()); final ClassFileFactory codegens = generateClassesInFile(); @@ -163,15 +177,18 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt257 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt257.jet"); // System.out.println(generateToText()); } public void testKt613 () throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt613.jet"); } public void testKt160() throws Exception { + createEnvironmentWithMockJdk(); loadText("internal val s = java.lang.Double.toString(1.0)"); final Method method = generateFunction("getS"); method.setAccessible(true); @@ -179,10 +196,12 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1165() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1165.kt"); } public void testKt1168() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1168.kt"); } @@ -192,14 +211,17 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1159() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1159.kt"); } public void testKt1417() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1417.kt"); } public void testKt1398() throws Exception { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt1398.kt"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java index 8a579bef218..3205f9c01cd 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java @@ -17,6 +17,12 @@ package org.jetbrains.jet.codegen; public class SafeRefTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void test247 () throws Exception { blackBoxFile("regressions/kt247.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java index 73793d9083e..23687a94730 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java @@ -25,6 +25,12 @@ import java.lang.reflect.Method; */ public class StringsTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testAnyToString () throws InvocationTargetException, IllegalAccessException { loadText("fun foo(x: Any) = x.toString()"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java index 1f83ea3aeb8..42a62459aa5 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java @@ -17,6 +17,13 @@ package org.jetbrains.jet.codegen; public class SuperGenTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + public void testBasicProperty () { blackBoxFile("/super/basicproperty.jet"); // System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java index 1991e81b676..b0576ec4824 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java @@ -17,6 +17,13 @@ package org.jetbrains.jet.codegen; public class TraitsTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + @Override protected String getPrefix() { return "traits"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java index 49c9e6afc25..e3b4df53b09 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java @@ -18,6 +18,7 @@ package org.jetbrains.jet.codegen; public class TupleGenTest extends CodegenTestCase { public void testBasic() { + createEnvironmentWithMockJdk(); blackBoxFile("/tuples/basic.jet"); // System.out.println(generateToText()); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java index 06e2cb575b1..f4ca05844c5 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen; -import jet.TypeCastException; - import java.lang.reflect.Method; /** @@ -25,6 +23,13 @@ import java.lang.reflect.Method; * @author alex.tkachman */ public class TypeInfoTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + @Override protected String getPrefix() { return "typeInfo"; diff --git a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java index 6164d2dcada..2043ff940e2 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java @@ -19,13 +19,13 @@ package org.jetbrains.jet.codegen; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.Arrays; /** * @author alex.tkachman */ public class VarArgTest extends CodegenTestCase { public void testStringArray () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("fun test(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -34,6 +34,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArray () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("fun test(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -42,6 +43,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinNoArgs () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("fun test() = testf(); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -50,6 +52,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("fun test() = testf(239, 7); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -60,6 +63,7 @@ public class VarArgTest extends CodegenTestCase { } public void testNullableIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("fun test() = testf(239.toByte(), 7.toByte()); fun testf(vararg ts: Byte?) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -70,6 +74,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinObj () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("fun test() = testf(\"239\"); fun testf(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -79,6 +84,7 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayT () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("fun test() = _array(2, 4); fun _array(vararg elements : T) = elements"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -94,10 +100,12 @@ public class VarArgTest extends CodegenTestCase { } public void testKt797() { + createEnvironmentWithMockJdk(); blackBoxFile("regressions/kt796_797.jet"); } public void testArrayAsVararg () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("private fun asList(vararg elems: String) = elems; fun test(ts: Array) = asList(*ts); "); //System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -106,6 +114,7 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayAsVararg2 () throws InvocationTargetException, IllegalAccessException { + createEnvironmentWithMockJdk(); loadText("private fun asList(vararg elems: String) = elems; fun test(ts1: Array, ts2: String) = asList(*ts1, ts2); "); System.out.println(generateToText()); final Method main = generateFunction("test"); diff --git a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java index fb299b9a079..1165f5ef1fb 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java @@ -41,6 +41,14 @@ import java.util.List; * @since 4/6/12 */ public class DescriptorRendererTest extends JetLiteFixture { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + + public void testGlobalProperties() throws IOException { doTest(); } diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java index f2d236a2e83..5e822339f37 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java @@ -27,6 +27,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.analyzer.AnalyzeExhaust; +import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory; import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.diagnostics.Diagnostic; diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java index bc8bd8f7f54..86cad93f5b7 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java @@ -32,6 +32,9 @@ public abstract class ExtensibleResolveTestCase extends JetLiteFixture { @Override protected void setUp() throws Exception { super.setUp(); + + createEnvironmentWithMockJdk(); + expectedResolveData = getExpectedResolveData(); } diff --git a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java index 548314b7cf9..7d7e5fa91a3 100644 --- a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java +++ b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java @@ -22,6 +22,14 @@ import org.jetbrains.jet.codegen.CodegenTestCase; import java.lang.reflect.Method; public class JetNpeTest extends CodegenTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(); + } + + + public void testStackTrace () { try { Intrinsics.throwNpe(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java index 1a2a064a398..9134dcbd0d3 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java @@ -45,6 +45,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + super.createEnvironmentWithMockJdk(); tc.setUp(); } diff --git a/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java b/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java index 104a46b7f2c..415265d1f7b 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetOverloadTest.java @@ -40,6 +40,7 @@ public class JetOverloadTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + createEnvironmentWithMockJdk(); InjectorForTests injector = new InjectorForTests(getProject()); library = injector.getJetStandardLibrary(); descriptorResolver = injector.getDescriptorResolver(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java b/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java index 12d663c8971..8f88357f684 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetOverridingTest.java @@ -40,6 +40,7 @@ public class JetOverridingTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + createEnvironmentWithMockJdk(); InjectorForTests injector = new InjectorForTests(getProject()); library = injector.getJetStandardLibrary(); descriptorResolver = injector.getDescriptorResolver(); diff --git a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java index 400b00ff07d..8c6200cdf0b 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java @@ -66,6 +66,9 @@ public class JetTypeCheckerTest extends JetLiteFixture { @Override public void setUp() throws Exception { super.setUp(); + + super.createEnvironmentWithMockJdk(); + library = JetStandardLibrary.getInstance(); classDefinitions = new ClassDefinitions(); From ba7a94e17d8899ba569008d1a6a305ce5fbe6876 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 22:59:39 +0400 Subject: [PATCH 42/50] reuse CodegenTestCase in CompileTextTest --- compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java b/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java index 2934c8b09aa..ca425d39551 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java @@ -33,8 +33,7 @@ public class CompileTextTest extends CodegenTestCase { createEnvironmentWithMockJdk(); String text = "import org.jetbrains.jet.codegen.CompileTextTest; fun x() = CompileTextTest()"; CompilerDependencies dependencies = CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false); - JetCoreEnvironment environment = new JetCoreEnvironment(CompileEnvironmentUtil.createMockDisposable(), dependencies); - CompileEnvironmentConfiguration configuration = new CompileEnvironmentConfiguration(environment, dependencies, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR); + CompileEnvironmentConfiguration configuration = new CompileEnvironmentConfiguration(myEnvironment, dependencies, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR); configuration.getEnvironment().addToClasspathFromClassLoader(getClass().getClassLoader()); ClassLoader classLoader = KotlinToJVMBytecodeCompiler.compileText(configuration, text); Class namespace = classLoader.loadClass("namespace"); From b109ac5ad46d0f45884eb09d0281f551e65a0715 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 22:59:42 +0400 Subject: [PATCH 43/50] store CompilerDependencies in JetCoreEnvironment --- .../jet/buildtools/core/BytecodeCompiler.java | 2 +- .../org/jetbrains/jet/cli/jvm/K2JVMCompiler.java | 6 +++--- .../compiler/CompileEnvironmentConfiguration.java | 13 ++++--------- .../cli/jvm/compiler/CompileEnvironmentUtil.java | 2 +- .../jet/cli/jvm/compiler/JetCoreEnvironment.java | 11 +++++++++++ .../jvm/compiler/KotlinToJVMBytecodeCompiler.java | 14 +++++++------- .../jetbrains/jet/checkers/JetDiagnosticsTest.java | 2 +- .../jvm/compiler/JavaDescriptorResolverTest.java | 2 +- .../cli/jvm/compiler/ReadJavaBinaryClassTest.java | 4 ++-- .../jvm/compiler/ReadKotlinBinaryClassTest.java | 2 +- .../org/jetbrains/jet/codegen/CodegenTestCase.java | 2 +- .../org/jetbrains/jet/codegen/CompileTextTest.java | 9 ++------- .../org/jetbrains/jet/codegen/TestlibTest.java | 8 ++------ .../jet/resolve/DescriptorRendererTest.java | 2 +- .../jetbrains/jet/resolve/ExpectedResolveData.java | 8 ++++++-- .../org/jetbrains/jet/resolve/JetResolveTest.java | 7 ++----- .../jet/types/JetDefaultModalityModifiersTest.java | 2 +- .../jetbrains/jet/types/JetTypeCheckerTest.java | 2 +- 18 files changed, 48 insertions(+), 50 deletions(-) diff --git a/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java b/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java index d03683a331b..79611687b46 100644 --- a/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java +++ b/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java @@ -52,7 +52,7 @@ public class BytecodeCompiler { private CompileEnvironmentConfiguration env( String stdlib, String[] classpath ) { CompilerDependencies dependencies = CompilerDependencies.compilerDependenciesForProduction(CompilerSpecialMode.REGULAR); JetCoreEnvironment environment = new JetCoreEnvironment(CompileEnvironmentUtil.createMockDisposable(), dependencies); - CompileEnvironmentConfiguration env = new CompileEnvironmentConfiguration(environment, dependencies, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR); + CompileEnvironmentConfiguration env = new CompileEnvironmentConfiguration(environment, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR); if (( stdlib != null ) && ( stdlib.trim().length() > 0 )) { File file = new File(stdlib); diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/K2JVMCompiler.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/K2JVMCompiler.java index 007253e25e5..9484e55d770 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/K2JVMCompiler.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/K2JVMCompiler.java @@ -127,7 +127,7 @@ public class K2JVMCompiler { Disposable rootDisposable = CompileEnvironmentUtil.createMockDisposable(); JetCoreEnvironment environment = new JetCoreEnvironment(rootDisposable, dependencies); - CompileEnvironmentConfiguration configuration = new CompileEnvironmentConfiguration(environment, dependencies, messageCollector); + CompileEnvironmentConfiguration configuration = new CompileEnvironmentConfiguration(environment, messageCollector); messageCollector.report(CompilerMessageSeverity.LOGGING, "Configuring the compilation environment", CompilerMessageLocation.NO_LOCATION); @@ -243,8 +243,8 @@ public class K2JVMCompiler { configuration.getCompilerPlugins().addAll(plugins); } - if (configuration.getCompilerDependencies().getRuntimeJar() != null) { - CompileEnvironmentUtil.addToClasspath(configuration.getEnvironment(), configuration.getCompilerDependencies().getRuntimeJar()); + if (configuration.getEnvironment().getCompilerDependencies().getRuntimeJar() != null) { + CompileEnvironmentUtil.addToClasspath(configuration.getEnvironment(), configuration.getEnvironment().getCompilerDependencies().getRuntimeJar()); } if (arguments.classpath != null) { diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentConfiguration.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentConfiguration.java index e95f3ba7186..39c62333e8b 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentConfiguration.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentConfiguration.java @@ -29,8 +29,9 @@ import java.util.List; * @author abreslav */ public class CompileEnvironmentConfiguration { + @NotNull private final JetCoreEnvironment environment; - private final CompilerDependencies compilerDependencies; + @NotNull private final MessageCollector messageCollector; private List compilerPlugins = Lists.newArrayList(); @@ -39,22 +40,16 @@ public class CompileEnvironmentConfiguration { * NOTE: It's very important to call dispose for every object of this class or there will be memory leaks. * @see Disposer */ - public CompileEnvironmentConfiguration(@NotNull JetCoreEnvironment environment, - @NotNull CompilerDependencies compilerDependencies, @NotNull MessageCollector messageCollector) { + public CompileEnvironmentConfiguration(@NotNull JetCoreEnvironment environment, @NotNull MessageCollector messageCollector) { this.messageCollector = messageCollector; - this.compilerDependencies = compilerDependencies; this.environment = environment; } + @NotNull public JetCoreEnvironment getEnvironment() { return environment; } - @NotNull - public CompilerDependencies getCompilerDependencies() { - return compilerDependencies; - } - @NotNull public MessageCollector getMessageCollector() { return messageCollector; diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentUtil.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentUtil.java index 344fa99cd59..1175ccffacf 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentUtil.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/CompileEnvironmentUtil.java @@ -162,7 +162,7 @@ public class CompileEnvironmentUtil { scriptEnvironment.addSources(moduleScriptFile); GenerationState generationState = KotlinToJVMBytecodeCompiler - .analyzeAndGenerate(new CompileEnvironmentConfiguration(scriptEnvironment, dependencies, messageCollector), false); + .analyzeAndGenerate(new CompileEnvironmentConfiguration(scriptEnvironment, messageCollector), false); if (generationState == null) { return null; } diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java index 14e5111f06b..cc030b4d0a5 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java @@ -47,8 +47,14 @@ import java.util.List; public class JetCoreEnvironment extends JavaCoreEnvironment { private final List sourceFiles = new ArrayList(); + @NotNull + private final CompilerDependencies compilerDependencies; + public JetCoreEnvironment(Disposable parentDisposable, @NotNull CompilerDependencies compilerDependencies) { super(parentDisposable); + + this.compilerDependencies = compilerDependencies; + registerFileType(JetFileType.INSTANCE, "kt"); registerFileType(JetFileType.INSTANCE, "kts"); registerFileType(JetFileType.INSTANCE, "ktm"); @@ -152,4 +158,9 @@ public class JetCoreEnvironment extends JavaCoreEnvironment { } } } + + @NotNull + public CompilerDependencies getCompilerDependencies() { + return compilerDependencies; + } } diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java index af98cf42dc6..ce7ad375693 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java @@ -83,7 +83,7 @@ public class KotlinToJVMBytecodeCompiler { configuration.getEnvironment().addToClasspath(new File(classpathRoot)); } - CompileEnvironmentUtil.ensureRuntime(configuration.getEnvironment(), configuration.getCompilerDependencies()); + CompileEnvironmentUtil.ensureRuntime(configuration.getEnvironment(), configuration.getEnvironment().getCompilerDependencies()); GenerationState generationState = analyzeAndGenerate(configuration); if (generationState == null) { @@ -104,9 +104,9 @@ public class KotlinToJVMBytecodeCompiler { for (Module moduleBuilder : modules) { // TODO: this should be done only once for the environment - if (configuration.getCompilerDependencies().getRuntimeJar() != null) { + if (configuration.getEnvironment().getCompilerDependencies().getRuntimeJar() != null) { CompileEnvironmentUtil - .addToClasspath(configuration.getEnvironment(), configuration.getCompilerDependencies().getRuntimeJar()); + .addToClasspath(configuration.getEnvironment(), configuration.getEnvironment().getCompilerDependencies().getRuntimeJar()); } ClassFileFactory moduleFactory = compileModule(configuration, moduleBuilder, directory); if (moduleFactory == null) { @@ -143,7 +143,7 @@ public class KotlinToJVMBytecodeCompiler { } } - CompileEnvironmentUtil.ensureRuntime(configuration.getEnvironment(), configuration.getCompilerDependencies()); + CompileEnvironmentUtil.ensureRuntime(configuration.getEnvironment(), configuration.getEnvironment().getCompilerDependencies()); GenerationState generationState = analyzeAndGenerate(configuration); if (generationState == null) { @@ -209,7 +209,7 @@ public class KotlinToJVMBytecodeCompiler { @Nullable public static GenerationState analyzeAndGenerate(CompileEnvironmentConfiguration configuration) { - return analyzeAndGenerate(configuration, configuration.getCompilerDependencies().getCompilerSpecialMode().isStubs()); + return analyzeAndGenerate(configuration, configuration.getEnvironment().getCompilerDependencies().getCompilerSpecialMode().isStubs()); } @Nullable @@ -244,7 +244,7 @@ public class KotlinToJVMBytecodeCompiler { return AnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( environment.getProject(), environment.getSourceFiles(), filesToAnalyzeCompletely, JetControlFlowDataTraceFactory.EMPTY, - configuration.getCompilerDependencies()); + configuration.getEnvironment().getCompilerDependencies()); } }, environment.getSourceFiles() ); @@ -267,7 +267,7 @@ public class KotlinToJVMBytecodeCompiler { }; GenerationState generationState = new GenerationState(project, ClassBuilderFactories.binaries(stubs), backendProgress, exhaust, environment.getSourceFiles(), - configuration.getCompilerDependencies().getCompilerSpecialMode()); + configuration.getEnvironment().getCompilerDependencies().getCompilerSpecialMode()); generationState.compileCorrectFiles(CompilationErrorHandler.THROW_EXCEPTION); List plugins = configuration.getCompilerPlugins(); diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java index dd3cead181c..e98d776f3f0 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java @@ -175,7 +175,7 @@ public class JetDiagnosticsTest extends JetLiteFixture { BindingContext bindingContext = AnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( getProject(), jetFiles, Predicates.alwaysTrue(), JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true)) + myEnvironment.getCompilerDependencies()) .getBindingContext(); boolean ok = true; diff --git a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/JavaDescriptorResolverTest.java b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/JavaDescriptorResolverTest.java index 4c878d6da84..955d611294d 100644 --- a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/JavaDescriptorResolverTest.java +++ b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/JavaDescriptorResolverTest.java @@ -54,7 +54,7 @@ public class JavaDescriptorResolverTest extends TestCaseWithTmpdir { jetCoreEnvironment.addToClasspath(tmpdir); InjectorForJavaSemanticServices injector = new InjectorForJavaSemanticServices( - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.JDK_HEADERS, true), jetCoreEnvironment.getProject()); + jetCoreEnvironment.getCompilerDependencies(), jetCoreEnvironment.getProject()); JavaDescriptorResolver javaDescriptorResolver = injector.getJavaDescriptorResolver(); ClassDescriptor classDescriptor = javaDescriptorResolver.resolveClass(fqName, DescriptorSearchRule.ERROR_IF_FOUND_IN_KOTLIN); Assert.assertNotNull(classDescriptor); diff --git a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadJavaBinaryClassTest.java b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadJavaBinaryClassTest.java index 2636aabf2d4..d2d38b6a16a 100644 --- a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadJavaBinaryClassTest.java +++ b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadJavaBinaryClassTest.java @@ -88,7 +88,7 @@ public class ReadJavaBinaryClassTest extends TestCaseWithTmpdir { BindingContext bindingContext = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegrationAndCheckForErrors( psiFile, JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.JDK_HEADERS, true)) + jetCoreEnvironment.getCompilerDependencies()) .getBindingContext(); return bindingContext.get(BindingContext.FQNAME_TO_NAMESPACE_DESCRIPTOR, FqName.topLevel("test")); } @@ -116,7 +116,7 @@ public class ReadJavaBinaryClassTest extends TestCaseWithTmpdir { jetCoreEnvironment.addToClasspath(new File("out/production/runtime")); InjectorForJavaSemanticServices injector = new InjectorForJavaSemanticServices( - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.JDK_HEADERS, true), jetCoreEnvironment.getProject()); + jetCoreEnvironment.getCompilerDependencies(), jetCoreEnvironment.getProject()); JavaDescriptorResolver javaDescriptorResolver = injector.getJavaDescriptorResolver(); return javaDescriptorResolver.resolveNamespace(FqName.topLevel("test"), DescriptorSearchRule.ERROR_IF_FOUND_IN_KOTLIN); } diff --git a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadKotlinBinaryClassTest.java b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadKotlinBinaryClassTest.java index a15d70efffc..67e73da8f73 100644 --- a/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadKotlinBinaryClassTest.java +++ b/compiler/tests/org/jetbrains/jet/cli/jvm/compiler/ReadKotlinBinaryClassTest.java @@ -90,7 +90,7 @@ public class ReadKotlinBinaryClassTest extends TestCaseWithTmpdir { jetCoreEnvironment.addToClasspath(new File("out/production/runtime")); InjectorForJavaSemanticServices injector = new InjectorForJavaSemanticServices( - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.JDK_HEADERS, true), jetCoreEnvironment.getProject()); + jetCoreEnvironment.getCompilerDependencies(), jetCoreEnvironment.getProject()); JavaDescriptorResolver javaDescriptorResolver = injector.getJavaDescriptorResolver(); NamespaceDescriptor namespaceFromClass = javaDescriptorResolver.resolveNamespace(FqName.topLevel("test"), DescriptorSearchRule.ERROR_IF_FOUND_IN_KOTLIN); diff --git a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java index 2b639b9b4c1..d04b7f624e1 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java @@ -128,7 +128,7 @@ public abstract class CodegenTestCase extends JetLiteFixture { private GenerationState generateCommon(ClassBuilderFactory classBuilderFactory) { final AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegrationAndCheckForErrors( myFile, JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false)); + myEnvironment.getCompilerDependencies()); analyzeExhaust.throwIfError(); GenerationState state = new GenerationState(getProject(), classBuilderFactory, analyzeExhaust, Collections.singletonList(myFile)); state.compileCorrectFiles(CompilationErrorHandler.THROW_EXCEPTION); diff --git a/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java b/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java index ca425d39551..0159244370e 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CompileTextTest.java @@ -16,14 +16,9 @@ package org.jetbrains.jet.codegen; -import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentConfiguration; -import org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentUtil; -import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; import org.jetbrains.jet.cli.jvm.compiler.KotlinToJVMBytecodeCompiler; import org.jetbrains.jet.cli.common.messages.MessageCollector; -import org.jetbrains.jet.lang.resolve.java.CompilerDependencies; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -32,8 +27,8 @@ public class CompileTextTest extends CodegenTestCase { public void testMe() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException { createEnvironmentWithMockJdk(); String text = "import org.jetbrains.jet.codegen.CompileTextTest; fun x() = CompileTextTest()"; - CompilerDependencies dependencies = CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false); - CompileEnvironmentConfiguration configuration = new CompileEnvironmentConfiguration(myEnvironment, dependencies, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR); + CompileEnvironmentConfiguration configuration = new CompileEnvironmentConfiguration( + myEnvironment, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR); configuration.getEnvironment().addToClasspathFromClassLoader(getClass().getClassLoader()); ClassLoader classLoader = KotlinToJVMBytecodeCompiler.compileText(configuration, text); Class namespace = classLoader.loadClass("namespace"); diff --git a/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java b/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java index fd581894162..ff0dc1a0498 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java @@ -21,7 +21,6 @@ import gnu.trove.THashSet; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.codegen.forTestCompile.ForTestCompileRuntime; import org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentConfiguration; import org.jetbrains.jet.cli.jvm.compiler.KotlinToJVMBytecodeCompiler; @@ -32,8 +31,6 @@ import org.jetbrains.jet.lang.psi.JetDeclaration; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lang.resolve.DescriptorUtils; -import org.jetbrains.jet.lang.resolve.java.CompilerDependencies; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import org.jetbrains.jet.lang.types.JetType; import org.jetbrains.jet.parsing.JetParsingTest; @@ -75,7 +72,6 @@ public class TestlibTest extends CodegenTestCase { private TestSuite doBuildSuite() { try { - CompilerDependencies compilerDependencies = CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false); File junitJar = new File("libraries/lib/junit-4.9.jar"); if (!junitJar.exists()) { @@ -84,14 +80,14 @@ public class TestlibTest extends CodegenTestCase { myEnvironment.addToClasspath(junitJar); - myEnvironment.addToClasspath(compilerDependencies.getRuntimeJar()); + myEnvironment.addToClasspath(myEnvironment.getCompilerDependencies().getRuntimeJar()); CoreLocalFileSystem localFileSystem = myEnvironment.getLocalFileSystem(); myEnvironment.addSources(localFileSystem.findFileByPath(JetParsingTest.getTestDataDir() + "/../../libraries/stdlib/test")); myEnvironment.addSources(localFileSystem.findFileByPath(JetParsingTest.getTestDataDir() + "/../../libraries/kunit/src")); GenerationState generationState = KotlinToJVMBytecodeCompiler - .analyzeAndGenerate(new CompileEnvironmentConfiguration(myEnvironment, compilerDependencies, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR), false); + .analyzeAndGenerate(new CompileEnvironmentConfiguration(myEnvironment, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR), false); if (generationState == null) { throw new RuntimeException("There were compilation errors"); diff --git a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java index 1165f5ef1fb..464a2279dfd 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/DescriptorRendererTest.java @@ -80,7 +80,7 @@ public class DescriptorRendererTest extends JetLiteFixture { AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegration( (JetFile) psiFile, JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true)); + myEnvironment.getCompilerDependencies()); final BindingContext bindingContext = analyzeExhaust.getBindingContext(); final List descriptors = new ArrayList(); psiFile.acceptChildren(new JetVisitorVoid() { diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java index 5e822339f37..00f7434ed38 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java @@ -79,9 +79,13 @@ public abstract class ExpectedResolveData { private final Map nameToDescriptor; private final Map nameToPsiElement; - public ExpectedResolveData(Map nameToDescriptor, Map nameToPsiElement) { + @NotNull + private final JetCoreEnvironment jetCoreEnvironment; + + public ExpectedResolveData(Map nameToDescriptor, Map nameToPsiElement, @NotNull JetCoreEnvironment environment) { this.nameToDescriptor = nameToDescriptor; this.nameToPsiElement = nameToPsiElement; + jetCoreEnvironment = environment; } public final JetFile createFileFromMarkedUpText(String fileName, String text) { @@ -144,7 +148,7 @@ public abstract class ExpectedResolveData { AnalyzeExhaust analyzeExhaust = AnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(project, files, Predicates.alwaysTrue(), JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true)); + jetCoreEnvironment.getCompilerDependencies()); BindingContext bindingContext = analyzeExhaust.getBindingContext(); for (Diagnostic diagnostic : bindingContext.getDiagnostics()) { if (diagnostic.getFactory() instanceof UnresolvedReferenceDiagnosticFactory) { diff --git a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java index 6540ba315cd..f52d1fd7e28 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java +++ b/compiler/tests/org/jetbrains/jet/resolve/JetResolveTest.java @@ -24,7 +24,6 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.PsiMethod; import junit.framework.Test; import org.jetbrains.annotations.NotNull; -import org.jetbrains.jet.CompileCompilerDependenciesTest; import org.jetbrains.jet.JetTestCaseBuilder; import org.jetbrains.jet.di.InjectorForJavaSemanticServices; import org.jetbrains.jet.di.InjectorForTests; @@ -37,8 +36,6 @@ import org.jetbrains.jet.lang.resolve.FqName; import org.jetbrains.jet.lang.resolve.calls.CallResolver; import org.jetbrains.jet.lang.resolve.calls.OverloadResolutionResults; import org.jetbrains.jet.lang.resolve.calls.ResolvedCall; -import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; -import org.jetbrains.jet.lang.resolve.java.JavaDescriptorResolver; import org.jetbrains.jet.lang.resolve.java.PsiClassFinder; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor; import org.jetbrains.jet.lang.types.JetType; @@ -103,7 +100,7 @@ public class JetResolveTest extends ExtensibleResolveTestCase { nameToDeclaration.put("java::java.lang.Number", java_lang_Number); nameToDeclaration.put("java::java.lang.Number.intValue()", java_lang_Number.findMethodsByName("intValue", true)[0]); - return new ExpectedResolveData(nameToDescriptor, nameToDeclaration) { + return new ExpectedResolveData(nameToDescriptor, nameToDeclaration, myEnvironment) { @Override protected JetFile createJetFile(String fileName, String text) { return createCheckAndReturnPsiFile(fileName, text); @@ -127,7 +124,7 @@ public class JetResolveTest extends ExtensibleResolveTestCase { private PsiClass findClass(String qualifiedName) { Project project = getProject(); InjectorForJavaSemanticServices injector = new InjectorForJavaSemanticServices( - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true), project); + myEnvironment.getCompilerDependencies(), project); return injector.getPsiClassFinderForJvm().findPsiClass(new FqName(qualifiedName), PsiClassFinder.RuntimeClassesHandleMode.THROW); } diff --git a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java index 9134dcbd0d3..b1e78c68ebf 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java @@ -68,7 +68,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture { assert aClass instanceof JetClass; AnalyzeExhaust bindingContext = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegration(file, JetControlFlowDataTraceFactory.EMPTY, - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true)); + myEnvironment.getCompilerDependencies()); DeclarationDescriptor classDescriptor = bindingContext.getBindingContext().get(BindingContext.DECLARATION_TO_DESCRIPTOR, aClass); WritableScopeImpl scope = new WritableScopeImpl(libraryScope, root, RedeclarationHandler.DO_NOTHING); assert classDescriptor instanceof ClassifierDescriptor; diff --git a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java index 8c6200cdf0b..e00f0a5ed0f 100644 --- a/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java +++ b/compiler/tests/org/jetbrains/jet/types/JetTypeCheckerTest.java @@ -590,7 +590,7 @@ public class JetTypeCheckerTest extends JetLiteFixture { WritableScopeImpl writableScope = new WritableScopeImpl(scope, scope.getContainingDeclaration(), RedeclarationHandler.DO_NOTHING); writableScope.importScope(library.getLibraryScope()); InjectorForJavaSemanticServices injector = new InjectorForJavaSemanticServices( - CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, true), getProject()); + myEnvironment.getCompilerDependencies(), getProject()); JavaDescriptorResolver javaDescriptorResolver = injector.getJavaDescriptorResolver(); writableScope.importScope(javaDescriptorResolver.resolveNamespace(FqName.ROOT, DescriptorSearchRule.INCLUDE_KOTLIN).getMemberScope()); From 518f50692ffaa5496991499e2cebeae418c26f5f Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 23:49:19 +0400 Subject: [PATCH 44/50] kotlin runtime must be added to classpath (not just to library root) --- .../jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java index cc030b4d0a5..76f2644fe5c 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/JetCoreEnvironment.java @@ -78,9 +78,7 @@ public class JetCoreEnvironment extends JavaCoreEnvironment { } } if (compilerSpecialMode.includeKotlinRuntime()) { - for (VirtualFile root : compilerDependencies.getRuntimeRoots()) { - addLibraryRoot(root); - } + addToClasspath(compilerDependencies.getRuntimeJar()); } JetStandardLibrary.initialize(getProject()); From 5e77ca553c2f4beeb293ac2161b579f782fd909a Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 23:49:22 +0400 Subject: [PATCH 45/50] make most codegen tests are indenendent from jdk-headers/stdlib now --- .../codegen/classes/overloadPlusAssign.jet | 2 +- .../classes/overloadPlusAssignReturn.jet | 2 +- .../classes/overloadPlusToPlusAssign.jet | 2 +- .../codegen/classes/overloadUnaryOperator.jet | 2 +- .../codegen/controlStructures/forUserType.jet | 12 +- .../testData/codegen/regressions/kt471.kt | 33 +++-- .../testData/codegen/regressions/kt475.jet | 2 +- .../codegen/super/basicmethodSuperClass.jet | 2 +- .../org/jetbrains/jet/JetLiteFixture.java | 7 ++ .../jetbrains/jet/cfg/JetControlFlowTest.java | 3 +- .../jet/checkers/JetDiagnosticsTest.java | 2 +- .../jet/codegen/AnnotationGenTest.java | 3 +- .../jetbrains/jet/codegen/ArrayGenTest.java | 8 +- .../jet/codegen/BridgeMethodGenTest.java | 4 +- .../jetbrains/jet/codegen/ClassGenTest.java | 118 +++++++++--------- .../jet/codegen/ClosuresGenTest.java | 4 +- .../jet/codegen/CodegenTestCase.java | 4 +- .../jet/codegen/ControlStructuresTest.java | 72 +++++------ .../jet/codegen/ExtensionFunctionsTest.java | 12 +- .../jet/codegen/FunctionGenTest.java | 4 +- .../jet/codegen/NamespaceGenTest.java | 3 +- .../jetbrains/jet/codegen/ObjectGenTest.java | 4 +- .../jet/codegen/PatternMatchingTest.java | 3 +- .../jet/codegen/PrimitiveTypesTest.java | 4 +- .../jet/codegen/PropertyGenTest.java | 46 +++---- .../jetbrains/jet/codegen/SafeRefTest.java | 4 +- .../jetbrains/jet/codegen/StringsTest.java | 4 +- .../jetbrains/jet/codegen/SuperGenTest.java | 4 +- .../org/jetbrains/jet/codegen/TraitsTest.java | 4 +- .../jetbrains/jet/codegen/TupleGenTest.java | 4 +- .../jetbrains/jet/codegen/TypeInfoTest.java | 5 +- .../org/jetbrains/jet/codegen/VarArgTest.java | 22 ++-- .../resolve/ExtensibleResolveTestCase.java | 3 +- 33 files changed, 232 insertions(+), 176 deletions(-) diff --git a/compiler/testData/codegen/classes/overloadPlusAssign.jet b/compiler/testData/codegen/classes/overloadPlusAssign.jet index 5247973e8d6..5e9b4a09eb9 100644 --- a/compiler/testData/codegen/classes/overloadPlusAssign.jet +++ b/compiler/testData/codegen/classes/overloadPlusAssign.jet @@ -12,7 +12,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index)!! } } diff --git a/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet b/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet index c5236b0ace4..2a4912f1e94 100644 --- a/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet +++ b/compiler/testData/codegen/classes/overloadPlusAssignReturn.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index)!! } } diff --git a/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet b/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet index c5236b0ace4..2a4912f1e94 100644 --- a/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet +++ b/compiler/testData/codegen/classes/overloadPlusToPlusAssign.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index)!! } } diff --git a/compiler/testData/codegen/classes/overloadUnaryOperator.jet b/compiler/testData/codegen/classes/overloadUnaryOperator.jet index 120f84a2746..79197f3600b 100644 --- a/compiler/testData/codegen/classes/overloadUnaryOperator.jet +++ b/compiler/testData/codegen/classes/overloadUnaryOperator.jet @@ -15,7 +15,7 @@ class ArrayWrapper() { } fun get(index: Int): T { - return contents.get(index) + return contents.get(index)!! } } diff --git a/compiler/testData/codegen/controlStructures/forUserType.jet b/compiler/testData/codegen/controlStructures/forUserType.jet index 7c0a4d1203d..1bb637e4a26 100644 --- a/compiler/testData/codegen/controlStructures/forUserType.jet +++ b/compiler/testData/codegen/controlStructures/forUserType.jet @@ -19,28 +19,28 @@ fun box() : String { val c1: java.lang.Iterable = MyCollection1() sum = 0 for (el in c1) { - sum = sum + el + sum = sum + el!! } if(sum != 15) return "c1 failed" val c2 = MyCollection1() sum = 0 for (el in c2) { - sum = sum + el + sum = sum + el!! } if(sum != 15) return "c2 failed" val c3: Iterable = MyCollection2() sum = 0 for (el in c3) { - sum = sum + el + sum = sum + el!! } if(sum != 15) return "c3 failed" val c4 = MyCollection2() sum = 0 for (el in c4) { - sum = sum + el + sum = sum + el!! } if(sum != 15) return "c4 failed" @@ -50,7 +50,7 @@ fun box() : String { } sum = 0 for (el in a) { - sum = sum + el + sum = sum + el!! } if(sum != 10) return "a failed" @@ -69,7 +69,7 @@ fun box() : String { val c7 = MyCollection5() sum = 0 for (el in c7) { - sum = sum + el + sum = sum + el!! } if(sum != 0) return "c7 failed" diff --git a/compiler/testData/codegen/regressions/kt471.kt b/compiler/testData/codegen/regressions/kt471.kt index bc452506e78..00714f4000b 100644 --- a/compiler/testData/codegen/regressions/kt471.kt +++ b/compiler/testData/codegen/regressions/kt471.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - class MyNumber(val i: Int) { fun inc(): MyNumber = MyNumber(i+1) } @@ -52,21 +50,32 @@ fun test6() : Boolean { return true } +// ArrayList without jdk-headers cannot be used in these tests +class MyArrayList(var value: T) { + fun get(index: Int): T { + if (index != 17) + throw Exception() + return value + } + fun set(index: Int, value: T): Unit { + if (index != 17) + throw Exception() + this.value = value + } +} + fun test7() : Boolean { - var mnr = ArrayList() - mnr.add(MyNumber(42)) - mnr[0]++ - if (mnr[0].i != 43) return false + var mnr = MyArrayList(MyNumber(42)) + mnr[17]++ + if (mnr[17].i != 43) return false return true } fun test8() : Boolean { - var mnr = ArrayList() - mnr.add(MyNumber(42)) - mnr.add(MyNumber(41)) - mnr[1] = mnr[0]++ - if (mnr[0].i != 43) return false - if (mnr[1].i != 42) return false + var mnr = MyArrayList(MyNumber(42)) + val old = mnr[17]++ + if (old.i != 42) return false + if (mnr[17].i != 43) return false return true } diff --git a/compiler/testData/codegen/regressions/kt475.jet b/compiler/testData/codegen/regressions/kt475.jet index 62c06ece2d3..8e7e86ddda7 100644 --- a/compiler/testData/codegen/regressions/kt475.jet +++ b/compiler/testData/codegen/regressions/kt475.jet @@ -14,5 +14,5 @@ var ArrayList.length : Int set(value: Int) = throw java.lang.Error() var ArrayList.last : T - get() = get(size()-1) + get() = get(size()-1).sure() set(el : T) { set(size()-1, el) } diff --git a/compiler/testData/codegen/super/basicmethodSuperClass.jet b/compiler/testData/codegen/super/basicmethodSuperClass.jet index 1b8a48bbfe9..06344019298 100644 --- a/compiler/testData/codegen/super/basicmethodSuperClass.jet +++ b/compiler/testData/codegen/super/basicmethodSuperClass.jet @@ -1,7 +1,7 @@ import java.util.ArrayList class N() : ArrayList() { - override fun add(el: Any) : Boolean { + override fun add(el: Any?) : Boolean { if (!super.add(el)) { throw Exception() } diff --git a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java index 5c61f770f97..70db5fdf602 100644 --- a/compiler/tests/org/jetbrains/jet/JetLiteFixture.java +++ b/compiler/tests/org/jetbrains/jet/JetLiteFixture.java @@ -76,6 +76,13 @@ public abstract class JetLiteFixture extends UsefulTestCase { myEnvironment = JetTestUtils.createEnvironmentWithMockJdk(getTestRootDisposable()); } + protected void createEnvironmentWithMockJdk(@NotNull CompilerSpecialMode compilerSpecialMode) { + if (myEnvironment != null) { + throw new IllegalStateException("must not set up myEnvironemnt twice"); + } + myEnvironment = JetTestUtils.createEnvironmentWithMockJdk(getTestRootDisposable(), compilerSpecialMode); + } + protected void createEnvironmentWithFullJdk() { if (myEnvironment != null) { throw new IllegalStateException("must not set up myEnvironemnt twice"); diff --git a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java index 7c5f077a5e0..32e7c4aed69 100644 --- a/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java +++ b/compiler/tests/org/jetbrains/jet/cfg/JetControlFlowTest.java @@ -31,6 +31,7 @@ import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.lang.cfg.LoopInfo; import org.jetbrains.jet.lang.cfg.pseudocode.*; import org.jetbrains.jet.lang.psi.*; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.io.File; import java.io.FileNotFoundException; @@ -54,7 +55,7 @@ public class JetControlFlowTest extends JetLiteFixture { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); } @Override diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java index e98d776f3f0..603b8fc3b7c 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTest.java @@ -57,7 +57,7 @@ public class JetDiagnosticsTest extends JetLiteFixture { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); } @Override diff --git a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java index f4a6a085db0..ae2a5694855 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/AnnotationGenTest.java @@ -17,6 +17,7 @@ package org.jetbrains.jet.codegen; import jet.JetObject; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.annotation.*; import java.lang.reflect.Constructor; @@ -28,7 +29,7 @@ public class AnnotationGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testPropField() throws NoSuchFieldException, NoSuchMethodException { diff --git a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java index 4580d342f97..067d9600d74 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Method; public class ArrayGenTest extends CodegenTestCase { @@ -23,7 +25,7 @@ public class ArrayGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testKt238 () throws Exception { @@ -244,7 +246,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionAssignGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; s[2, -2] += \"7\"; return s[2,-2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); @@ -264,7 +266,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; return s[2, -2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); diff --git a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java index 1cada40caac..c389165b403 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/BridgeMethodGenTest.java @@ -16,9 +16,11 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class BridgeMethodGenTest extends CodegenTestCase { public void testBridgeMethod () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("bridge.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java index 9a9eca63fef..ac3e9db8d37 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClassGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; @@ -33,7 +35,7 @@ public class ClassGenTest extends CodegenTestCase { } public void testPSVMClass() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/simpleClass.jet"); final Class aClass = loadClass("SimpleClass", generateClassesInFile()); @@ -44,7 +46,7 @@ public class ClassGenTest extends CodegenTestCase { } public void testArrayListInheritance() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/inheritingFromArrayList.jet"); // System.out.println(generateToText()); final Class aClass = loadClass("Foo", generateClassesInFile()); @@ -52,37 +54,37 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritanceAndDelegation_DelegatingDefaultConstructorProperties() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritance.jet"); } public void testInheritanceAndDelegation2() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/delegation2.kt"); } public void testFunDelegation() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/funDelegation.jet"); } public void testPropertyDelegation() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/propertyDelegation.jet"); } public void testDiamondInheritance() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/diamondInheritance.jet"); } public void testRightHandOverride() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/rightHandOverride.jet"); } public void testNewInstanceExplicitConstructor() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/newInstanceDefaultConstructor.jet"); // System.out.println(generateToText()); final Method method = generateFunction("test"); @@ -91,22 +93,22 @@ public class ClassGenTest extends CodegenTestCase { } public void testInnerClass() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/innerClass.jet"); } public void testInheritedInnerClass() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritedInnerClass.jet"); } public void testInitializerBlock() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/initializerBlock.jet"); } public void testAbstractMethod() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { abstract fun x(): String; fun y(): Int = 0 }"); final ClassFileFactory codegens = generateClassesInFile(); @@ -116,42 +118,42 @@ public class ClassGenTest extends CodegenTestCase { } public void testInheritedMethod() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/inheritedMethod.jet"); } public void testInitializerBlockDImpl() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/initializerBlockDImpl.jet"); } public void testPropertyInInitializer() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/propertyInInitializer.jet"); } public void testOuterThis() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/outerThis.jet"); } public void testSecondaryConstructors() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/secondaryConstructors.jet"); } public void testExceptionConstructor() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/exceptionConstructor.jet"); } public void testSimpleBox() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/simpleBox.jet"); } public void testAbstractClass() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class SimpleClass() { }"); final Class aClass = createClassLoader(generateClassesInFile()).loadClass("SimpleClass"); @@ -159,18 +161,18 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObject() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/classObject.jet"); } public void testClassObjectMethod() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // todo to be implemented after removal of type info // blackBoxFile("classes/classObjectMethod.jet"); } public void testClassObjectInterface() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("classes/classObjectInterface.jet"); final Method method = generateFunction(); Object result = method.invoke(null); @@ -178,32 +180,32 @@ public class ClassGenTest extends CodegenTestCase { } public void testOverloadBinaryOperator() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadBinaryOperator.jet"); } public void testOverloadUnaryOperator() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadUnaryOperator.jet"); } public void testOverloadPlusAssign() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusAssign.jet"); } public void testOverloadPlusAssignReturn() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusAssignReturn.jet"); } public void testOverloadPlusToPlusAssign() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/overloadPlusToPlusAssign.jet"); } public void testEnumClass() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("enum class Direction { NORTH; SOUTH; EAST; WEST }"); final Class direction = createClassLoader(generateClassesInFile()).loadClass("Direction"); // System.out.println(generateToText()); @@ -213,7 +215,7 @@ public class ClassGenTest extends CodegenTestCase { } public void testEnumConstantConstructors() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("enum class Color(val rgb: Int) { RED: Color(0xFF0000); GREEN: Color(0x00FF00); }"); final Class colorClass = createClassLoader(generateClassesInFile()).loadClass("Color"); final Field redField = colorClass.getField("RED"); @@ -223,25 +225,25 @@ public class ClassGenTest extends CodegenTestCase { } public void testClassObjFields() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class A() { class object { val value = 10 } }\n" + "fun box() = if(A.value == 10) \"OK\" else \"fail\""); blackBox(); } public void testKt249() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt249.jet"); } public void testKt48 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt48.jet"); // System.out.println(generateToText()); } public void testKt309 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun box() = null"); final Method method = generateFunction("box"); assertEquals(method.getReturnType().getName(), "java.lang.Object"); @@ -249,73 +251,73 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt343 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt343.jet"); // System.out.println(generateToText()); } public void testKt508 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("regressions/kt508.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt504 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("regressions/kt504.jet"); // System.out.println(generateToText()); blackBox(); } public void testKt501 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt501.jet"); } public void testKt496 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt496.jet"); // System.out.println(generateToText()); } public void testKt500 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt500.jet"); } public void testKt694 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt694.jet"); } public void testKt285 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt285.jet"); } public void testKt707 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt707.jet"); } public void testKt857 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); // blackBoxFile("regressions/kt857.jet"); } public void testKt903 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt903.jet"); } public void testKt940 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt940.kt"); } public void testKt1018 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1018.kt"); } @@ -330,17 +332,17 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt1134() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1134.kt"); } public void testKt1157() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1157.kt"); } public void testKt471() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt471.kt"); } @@ -350,38 +352,38 @@ public class ClassGenTest extends CodegenTestCase { } public void testKt723() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt723.kt"); } public void testKt725() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt725.kt"); } public void testKt633() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt633.kt"); } public void testKt1345() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1345.kt"); } public void testKt1538() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1538.kt"); } public void testKt1759() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1759.kt"); } public void testResolveOrder() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("classes/resolveOrder.jet"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java index 225ebbc4670..4b220b4b5c1 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ClosuresGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + /** * @author max */ @@ -24,7 +26,7 @@ public class ClosuresGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testSimplestClosure() throws Exception { diff --git a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java index d04b7f624e1..302d63f4d7a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java +++ b/compiler/tests/org/jetbrains/jet/codegen/CodegenTestCase.java @@ -130,6 +130,7 @@ public abstract class CodegenTestCase extends JetLiteFixture { myFile, JetControlFlowDataTraceFactory.EMPTY, myEnvironment.getCompilerDependencies()); analyzeExhaust.throwIfError(); + AnalyzingUtils.throwExceptionOnErrors(analyzeExhaust.getBindingContext()); GenerationState state = new GenerationState(getProject(), classBuilderFactory, analyzeExhaust, Collections.singletonList(myFile)); state.compileCorrectFiles(CompilationErrorHandler.THROW_EXCEPTION); return state; @@ -195,8 +196,7 @@ public abstract class CodegenTestCase extends JetLiteFixture { r = method; } - if (r == null) - throw new AssertionError(); + if (r == null) { throw new AssertionError(); } return r; } catch (Error e) { System.out.println(generateToText()); diff --git a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java index 55fc93c6795..095cbdf7b49 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ControlStructuresTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays; @@ -31,7 +33,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIf() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); @@ -41,7 +43,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testSingleBranchIf() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); @@ -63,7 +65,7 @@ public class ControlStructuresTest extends CodegenTestCase { } private void factorialTest(final String name) throws IllegalAccessException, InvocationTargetException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(name); // System.out.println(generateToText()); @@ -73,7 +75,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testContinue() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -82,7 +84,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfNoElse() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -91,7 +93,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCondJumpOnStack() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("import java.lang.Boolean as jlBoolean; fun foo(a: String): Int = if (jlBoolean.parseBoolean(a)) 5 else 10"); final Method main = generateFunction(); assertEquals(5, main.invoke(null, "true")); @@ -99,7 +101,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testFor() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -108,7 +110,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testIfBlock() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -119,7 +121,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInArray() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -128,7 +130,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForInRange() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(sb: StringBuilder) { for(x in 1..4) sb.append(x) }"); final Method main = generateFunction(); StringBuilder stringBuilder = new StringBuilder(); @@ -137,7 +139,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testThrowCheckedException() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo() { throw Exception(); }"); final Method main = generateFunction(); boolean caught = false; @@ -152,7 +154,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryCatch() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -161,7 +163,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testTryFinally() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -181,37 +183,37 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testForUserType() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forUserType.jet"); } public void testForIntArray() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forIntArray.jet"); } public void testForPrimitiveIntArray() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forPrimitiveIntArray.jet"); } public void testForNullableIntArray() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forNullableIntArray.jet"); } public void testForIntRange() { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/forIntRange.jet"); } public void testKt237() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt237.jet"); } public void testCompareToNull() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String?): Boolean = a == null && b !== null && null == a && null !== b"); String text = generateToText(); assertTrue(!text.contains("java/lang/Object.equals")); @@ -222,7 +224,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableEq() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String): Boolean = a == b || b == a"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -231,7 +233,7 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testCompareToNonnullableNotEq() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun foo(a: String?, b: String): Boolean = a != b"); String text = generateToText(); // System.out.println(text); @@ -242,18 +244,18 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt299() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt299.jet"); } public void testKt416() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt416.jet"); // System.out.println(generateToText()); } public void testKt513() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt513.jet"); } @@ -263,37 +265,37 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt769() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt769.jet"); // System.out.println(generateToText()); } public void testKt773() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt773.jet"); // System.out.println(generateToText()); } public void testKt772() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt772.jet"); // System.out.println(generateToText()); } public void testKt870() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt870.jet"); // System.out.println(generateToText()); } public void testKt958() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt958.jet"); // System.out.println(generateToText()); } public void testQuicksort() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("controlStructures/quicksort.jet"); // System.out.println(generateToText()); } @@ -311,22 +313,22 @@ public class ControlStructuresTest extends CodegenTestCase { } public void testKt1076() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1076.kt"); } public void testKt998() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt998.kt"); } public void testKt628() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt628.kt"); } public void testKt1441() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1441.kt"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java index 2b3383be9b9..7f3f5eefe2d 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ExtensionFunctionsTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Method; /** @@ -29,7 +31,7 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testSimple() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method foo = generateFunction("foo"); final Character c = (Character) foo.invoke(null); @@ -37,7 +39,7 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testWhenFail() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); // System.out.println(generateToText()); Method foo = generateFunction("foo"); @@ -45,18 +47,18 @@ public class ExtensionFunctionsTest extends CodegenTestCase { } public void testVirtual() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("extensionFunctions/virtual.jet"); } public void testShared() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("extensionFunctions/shared.kt"); // System.out.println(generateToText()); } public void testKt475() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt475.jet"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java index af3748b9ed1..60672485073 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/FunctionGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -26,7 +28,7 @@ public class FunctionGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testDefaultArgs() throws Exception { diff --git a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java index e294c343471..1e8791a1d59 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/NamespaceGenTest.java @@ -19,6 +19,7 @@ package org.jetbrains.jet.codegen; import jet.IntRange; import jet.Tuple2; import jet.Tuple4; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.awt.*; import java.lang.reflect.InvocationTargetException; @@ -34,7 +35,7 @@ public class NamespaceGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testPSVM() throws Exception { diff --git a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java index 019a1854f4a..2803abd67eb 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ObjectGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + /** * @author yole * @author alex.tkachman @@ -24,7 +26,7 @@ public class ObjectGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testSimpleObject() throws Exception { diff --git a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java index c0692e612aa..318de46aec8 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PatternMatchingTest.java @@ -17,6 +17,7 @@ package org.jetbrains.jet.codegen; import jet.Tuple2; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.lang.reflect.Method; @@ -28,7 +29,7 @@ public class PatternMatchingTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } @Override diff --git a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java index 8e0358afa05..0db6d37fa2e 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Method; /** @@ -27,7 +29,7 @@ public class PrimitiveTypesTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testPlus() throws Exception { diff --git a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java index 0f0cf18f039..c0ddbaffc4a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -31,7 +33,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVal() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVal"); final Field[] fields = aClass.getDeclaredFields(); @@ -41,7 +43,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivateVar() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "PrivateVar"); final Object instance = aClass.newInstance(); @@ -52,7 +54,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPublicVar() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class PublicVar() { public var foo : Int = 0; }"); final Class aClass = loadImplementationClass(generateClassesInFile(), "PublicVar"); final Object instance = aClass.newInstance(); @@ -63,7 +65,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsInInterface() { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class AccessorsInInterface() { public var foo : Int = 0; }"); final Class aClass = loadClass("AccessorsInInterface", generateClassesInFile()); assertNotNull(findMethodByName(aClass, "getFoo")); @@ -71,7 +73,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPrivatePropertyInNamespace() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private val x = 239"); final Class nsClass = generateNamespaceClass(); final Field[] fields = nsClass.getDeclaredFields(); @@ -84,7 +86,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldPropertyAccess() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile("properties/fieldPropertyAccess.jet"); // System.out.println(generateToText()); final Method method = generateFunction(); @@ -93,14 +95,14 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldGetter() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("val now: Long get() = System.currentTimeMillis(); fun foo() = now"); final Method method = generateFunction("foo"); assertIsCurrentTime((Long) method.invoke(null)); } public void testFieldSetter() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -112,7 +114,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testFieldSetterPlusEq() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Method method = generateFunction("append"); method.invoke(null, "IntelliJ "); @@ -121,7 +123,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAccessorsWithoutBody() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("class AccessorsWithoutBody() { protected var foo: Int = 349\n get\n private set\n fun setter() { foo = 610; } } "); // System.out.println(generateToText()); final Class aClass = loadImplementationClass(generateClassesInFile(), "AccessorsWithoutBody"); @@ -139,7 +141,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testInitializersForNamespaceProperties() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("val x = System.currentTimeMillis()"); final Method method = generateFunction("getX"); method.setAccessible(true); @@ -147,7 +149,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testPropertyReceiverOnStack() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadFile(); final Class aClass = loadImplementationClass(generateClassesInFile(), "Evaluator"); final Constructor constructor = aClass.getConstructor(StringBuilder.class); @@ -159,7 +161,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testAbstractVal() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { public abstract val x: String }"); final ClassFileFactory codegens = generateClassesInFile(); final Class aClass = loadClass("Foo", codegens); @@ -167,7 +169,7 @@ public class PropertyGenTest extends CodegenTestCase { } public void testVolatileProperty() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("abstract class Foo { public volatile var x: String = \"\"; }"); // System.out.println(generateToText()); final ClassFileFactory codegens = generateClassesInFile(); @@ -177,18 +179,18 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt257 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt257.jet"); // System.out.println(generateToText()); } public void testKt613 () throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt613.jet"); } public void testKt160() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("internal val s = java.lang.Double.toString(1.0)"); final Method method = generateFunction("getS"); method.setAccessible(true); @@ -196,12 +198,12 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1165() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1165.kt"); } public void testKt1168() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1168.kt"); } @@ -211,17 +213,17 @@ public class PropertyGenTest extends CodegenTestCase { } public void testKt1159() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1159.kt"); } public void testKt1417() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1417.kt"); } public void testKt1398() throws Exception { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt1398.kt"); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java index 3205f9c01cd..fc1a4ccb5df 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SafeRefTest.java @@ -16,11 +16,13 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class SafeRefTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void test247 () throws Exception { diff --git a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java index 23687a94730..50196c364e7 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StringsTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -28,7 +30,7 @@ public class StringsTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testAnyToString () throws InvocationTargetException, IllegalAccessException { diff --git a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java index 42a62459aa5..1884873b80a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/SuperGenTest.java @@ -16,12 +16,14 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class SuperGenTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } public void testBasicProperty () { diff --git a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java index b0576ec4824..0fe37963fdc 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TraitsTest.java @@ -16,12 +16,14 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class TraitsTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } @Override diff --git a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java index e3b4df53b09..b394def5fc6 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TupleGenTest.java @@ -16,9 +16,11 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + public class TupleGenTest extends CodegenTestCase { public void testBasic() { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("/tuples/basic.jet"); // System.out.println(generateToText()); } diff --git a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java index f4ca05844c5..e7dfe162c4a 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TypeInfoTest.java @@ -16,6 +16,9 @@ package org.jetbrains.jet.codegen; +import jet.TypeCastException; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Method; /** @@ -27,7 +30,7 @@ public class TypeInfoTest extends CodegenTestCase { @Override protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); } @Override diff --git a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java index 2043ff940e2..37e4b680da1 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/VarArgTest.java @@ -16,6 +16,8 @@ package org.jetbrains.jet.codegen; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -25,7 +27,7 @@ import java.lang.reflect.Method; */ public class VarArgTest extends CodegenTestCase { public void testStringArray () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -34,7 +36,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArray () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction(); @@ -43,7 +45,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinNoArgs () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -52,7 +54,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(239, 7); fun testf(vararg ts: Int) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -63,7 +65,7 @@ public class VarArgTest extends CodegenTestCase { } public void testNullableIntArrayKotlin () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(239.toByte(), 7.toByte()); fun testf(vararg ts: Byte?) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -74,7 +76,7 @@ public class VarArgTest extends CodegenTestCase { } public void testIntArrayKotlinObj () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = testf(\"239\"); fun testf(vararg ts: String) = ts"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -84,7 +86,7 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayT () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("fun test() = _array(2, 4); fun _array(vararg elements : T) = elements"); // System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -100,12 +102,12 @@ public class VarArgTest extends CodegenTestCase { } public void testKt797() { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); blackBoxFile("regressions/kt796_797.jet"); } public void testArrayAsVararg () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private fun asList(vararg elems: String) = elems; fun test(ts: Array) = asList(*ts); "); //System.out.println(generateToText()); final Method main = generateFunction("test"); @@ -114,7 +116,7 @@ public class VarArgTest extends CodegenTestCase { } public void testArrayAsVararg2 () throws InvocationTargetException, IllegalAccessException { - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.JDK_HEADERS); loadText("private fun asList(vararg elems: String) = elems; fun test(ts1: Array, ts2: String) = asList(*ts1, ts2); "); System.out.println(generateToText()); final Method main = generateFunction("test"); diff --git a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java index 86cad93f5b7..3e736e690fd 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ExtensibleResolveTestCase.java @@ -20,6 +20,7 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.jet.JetLiteFixture; import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.lang.psi.JetFile; +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; import java.util.List; @@ -33,7 +34,7 @@ public abstract class ExtensibleResolveTestCase extends JetLiteFixture { protected void setUp() throws Exception { super.setUp(); - createEnvironmentWithMockJdk(); + createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); expectedResolveData = getExpectedResolveData(); } From d5d05d76f349a221a1f020b8b2a99481db8fff67 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 1 May 2012 23:49:25 +0400 Subject: [PATCH 46/50] explictly test codegen with jdk-headers --- .../testData/codegen/jdk-headers/arrayList.kt | 13 ++++++ .../testData/codegen/jdk-headers/hashMap.kt | 15 +++++++ .../jetbrains/jet/codegen/JdkHeadersTest.java | 42 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 compiler/testData/codegen/jdk-headers/arrayList.kt create mode 100644 compiler/testData/codegen/jdk-headers/hashMap.kt create mode 100644 compiler/tests/org/jetbrains/jet/codegen/JdkHeadersTest.java diff --git a/compiler/testData/codegen/jdk-headers/arrayList.kt b/compiler/testData/codegen/jdk-headers/arrayList.kt new file mode 100644 index 00000000000..9dfcfc9cb24 --- /dev/null +++ b/compiler/testData/codegen/jdk-headers/arrayList.kt @@ -0,0 +1,13 @@ +import java.util.ArrayList + +fun box(): String { + val a = ArrayList() + a.add(74) + a.add(75) + val i: Int = a.get(0) + val j: Int = a.get(1) + if (i != 74) return "fail 1" + if (j != 75) return "fail 2" + if (a.size() != 2) return "epic fail" + return "OK" +} diff --git a/compiler/testData/codegen/jdk-headers/hashMap.kt b/compiler/testData/codegen/jdk-headers/hashMap.kt new file mode 100644 index 00000000000..db30d64a761 --- /dev/null +++ b/compiler/testData/codegen/jdk-headers/hashMap.kt @@ -0,0 +1,15 @@ +import java.util.* + +fun box(): String { + val map: Map = HashMap() + map.put("a", 1) + map.put("bb", 2) + map.put("ccc", 3) + map.put("dddd", 4) + if (map.get("a") != 1) return "fail 1" + if (map.size() != 4) return "fail 2" + if (map.get("eeeee") != null) return "fail 3" + if (!map.containsKey("bb")) return "fail 4" + if (map.entrySet().contains("ffffff")) return "fail 5" + return "OK" +} diff --git a/compiler/tests/org/jetbrains/jet/codegen/JdkHeadersTest.java b/compiler/tests/org/jetbrains/jet/codegen/JdkHeadersTest.java new file mode 100644 index 00000000000..f70b569d66a --- /dev/null +++ b/compiler/tests/org/jetbrains/jet/codegen/JdkHeadersTest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2010-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.codegen; + +import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode; + +/** + * Test correct code is generated for descriptors loaded as alt jdk headers + * + * @author Stepan Koltsov + */ +public class JdkHeadersTest extends CodegenTestCase { + + @Override + protected void setUp() throws Exception { + super.setUp(); + createEnvironmentWithMockJdk(CompilerSpecialMode.STDLIB); + } + + public void testArrayList() { + blackBoxFile("jdk-headers/arrayList.kt"); + } + + public void testHashMap() { + blackBoxFile("jdk-headers/hashMap.kt"); + } + +} From 427afefce40b1ddb8ba109169e937d231102d1ff Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Wed, 2 May 2012 00:01:04 +0400 Subject: [PATCH 47/50] replace .sure with !! --- compiler/testData/codegen/regressions/kt475.jet | 2 +- compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/testData/codegen/regressions/kt475.jet b/compiler/testData/codegen/regressions/kt475.jet index 8e7e86ddda7..e6dee342926 100644 --- a/compiler/testData/codegen/regressions/kt475.jet +++ b/compiler/testData/codegen/regressions/kt475.jet @@ -14,5 +14,5 @@ var ArrayList.length : Int set(value: Int) = throw java.lang.Error() var ArrayList.last : T - get() = get(size()-1).sure() + get() = get(size()-1)!! set(el : T) { set(size()-1, el) } diff --git a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java index 067d9600d74..b51c3b2bfff 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ArrayGenTest.java @@ -246,7 +246,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionAssignGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; s[2, -2] += \"7\"; return s[2,-2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]!!\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); @@ -266,7 +266,7 @@ public class ArrayGenTest extends CodegenTestCase { public void testCollectionGetMultiIndex () throws Exception { loadText("import java.util.ArrayList\n" + "fun box() : String { val s = ArrayList(1); s.add(\"\"); s [1, -1] = \"5\"; return s[2, -2] }\n" + - "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2].sure()\n" + + "fun ArrayList.get(index1: Int, index2 : Int) = this[index1+index2]!!\n" + "fun ArrayList.set(index1: Int, index2 : Int, elem: String) { this[index1+index2] = elem }\n"); // System.out.println(generateToText()); Method foo = generateFunction("box"); From 0fd34a455fa1989defca250864d503784c902212 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Sat, 28 Apr 2012 12:22:54 +0400 Subject: [PATCH 48/50] Added assert in DefaultErrorMessages checking that all error factories have default renderer. --- .../jet/lang/diagnostics/Errors.java | 2 +- .../rendering/DefaultErrorMessages.java | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java index 3877588b9fc..23bcde0b80e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java @@ -449,7 +449,7 @@ public interface Errors { class Initializer { static { for (Field field : Errors.class.getFields()) { - if ((field.getModifiers() & Modifier.STATIC) != 0) { + if (Modifier.isStatic(field.getModifiers())) { try { Object value = field.get(null); if (value instanceof AbstractDiagnosticFactory) { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java index dc96f771033..bd148492f1f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/DefaultErrorMessages.java @@ -17,7 +17,9 @@ package org.jetbrains.jet.lang.diagnostics.rendering; import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.lang.diagnostics.AbstractDiagnosticFactory; import org.jetbrains.jet.lang.diagnostics.Diagnostic; +import org.jetbrains.jet.lang.diagnostics.Errors; import org.jetbrains.jet.lang.psi.JetExpression; import org.jetbrains.jet.lang.psi.JetSimpleNameExpression; import org.jetbrains.jet.lang.psi.JetTypeConstraint; @@ -25,6 +27,8 @@ import org.jetbrains.jet.lang.types.JetType; import org.jetbrains.jet.lexer.JetKeywordToken; import org.jetbrains.jet.resolve.DescriptorRenderer; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.Collection; import java.util.Iterator; @@ -401,6 +405,22 @@ public class DefaultErrorMessages { "This may cause problems when calling this function with named arguments.", commaSeparated(TO_STRING), TO_STRING); MAP.setImmutable(); + + for (Field field : Errors.class.getFields()) { + if (Modifier.isStatic(field.getModifiers())) { + try { + Object fieldValue = field.get(null); + if (fieldValue instanceof AbstractDiagnosticFactory) { + if (MAP.get((AbstractDiagnosticFactory) fieldValue) == null) { + throw new IllegalStateException("No default diagnostic renderer is provided for " + ((AbstractDiagnosticFactory)fieldValue).getName()); + } + } + } + catch (IllegalAccessException e) { + throw new IllegalStateException(e); + } + } + } } private DefaultErrorMessages() { From abdf34418a2dc999387b4ece7fe9e5cf5f0e7174 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Sun, 29 Apr 2012 13:43:18 +0400 Subject: [PATCH 49/50] Got rid of returning empty range list in position strategies (in places where they don't depend on syntax errors). --- .../org/jetbrains/jet/lang/diagnostics/Errors.java | 8 ++++---- .../jet/lang/diagnostics/PositioningStrategies.java | 11 +++++------ .../UnresolvedReferenceDiagnosticFactory.java | 5 ++++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java index 23bcde0b80e..488fa24c38d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java @@ -247,12 +247,12 @@ public interface Errors { public List mark(@NotNull JetDeclarationWithBody element) { JetExpression bodyExpression = element.getBodyExpression(); if (!(bodyExpression instanceof JetBlockExpression)) { - return Collections.emptyList(); + return markElement(element); } JetBlockExpression blockExpression = (JetBlockExpression)bodyExpression; TextRange lastBracketRange = blockExpression.getLastBracketRange(); if (lastBracketRange == null) { - return Collections.emptyList(); + return markElement(element); } return markRange(lastBracketRange); } @@ -403,7 +403,7 @@ public interface Errors { JetClass klass = (JetClass)jetDeclaration; PsiElement nameAsDeclaration = klass.getNameIdentifier(); if (nameAsDeclaration == null) { - return markRange(klass.getTextRange()); + return markElement(klass); } PsiElement primaryConstructorParameterList = klass.getPrimaryConstructorParameterList(); if (primaryConstructorParameterList == null) { @@ -416,7 +416,7 @@ public interface Errors { } else { // safe way - return markRange(jetDeclaration.getTextRange()); + return markElement(jetDeclaration); } } }); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java index 457a66cb034..71b28bb5c6b 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java @@ -59,10 +59,9 @@ public class PositioningStrategies { returnTypeRef = accessor.getReturnTypeReference(); nameNode = accessor.getNamePlaceholder().getNode(); } - if (returnTypeRef != null) return Collections.singletonList(returnTypeRef.getTextRange()); - if (nameNode != null) return Collections.singletonList(nameNode.getTextRange()); - return super.mark(declaration); - + if (returnTypeRef != null) return markElement(returnTypeRef); + if (nameNode != null) return markNode(nameNode); + return markElement(declaration); } private ASTNode getNameNode(JetNamedDeclaration function) { @@ -100,9 +99,9 @@ public class PositioningStrategies { assert modifierList != null; ASTNode node = modifierList.getModifierNode(token); assert node != null; - return Collections.singletonList(node.getTextRange()); + return markNode(node); } - return Collections.emptyList(); + return markElement(modifierListOwner); } }; } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/UnresolvedReferenceDiagnosticFactory.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/UnresolvedReferenceDiagnosticFactory.java index fd80049556d..992f4317ad6 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/UnresolvedReferenceDiagnosticFactory.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/UnresolvedReferenceDiagnosticFactory.java @@ -34,7 +34,10 @@ public class UnresolvedReferenceDiagnosticFactory extends DiagnosticFactory1 mark(@NotNull JetReferenceExpression element) { if (element instanceof JetArrayAccessExpression) { - return ((JetArrayAccessExpression) element).getBracketRanges(); + List ranges = ((JetArrayAccessExpression) element).getBracketRanges(); + if (!ranges.isEmpty()) { + return ranges; + } } return Collections.singletonList(element.getTextRange()); } From eeafd06cd82cdd9782c7facb9c511a5c39008f93 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Sun, 29 Apr 2012 13:48:58 +0400 Subject: [PATCH 50/50] Got rid of returning empty range list in position strategies (in places where they depend on syntax errors). --- .../src/org/jetbrains/jet/lang/diagnostics/Errors.java | 1 - .../jet/lang/diagnostics/PositioningStrategies.java | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java index 488fa24c38d..997ef40c1fb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java @@ -288,7 +288,6 @@ public interface Errors { @NotNull @Override public List mark(@NotNull JetWhenExpression element) { - if (hasSyntaxError(element)) return Collections.emptyList(); return markElement(element.getWhenKeywordElement()); } }); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java index 71b28bb5c6b..0f9f14ac019 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java @@ -74,14 +74,11 @@ public class PositioningStrategies { @NotNull @Override public List mark(@NotNull PsiNameIdentifierOwner element) { - if (element.getLastChild() instanceof PsiErrorElement) { - return Collections.emptyList(); - } PsiElement nameIdentifier = element.getNameIdentifier(); if (nameIdentifier != null) { return markElement(nameIdentifier); } - return Collections.emptyList(); + return markElement(element); } };