Commit Graph

20812 Commits

Author SHA1 Message Date
Pavel V. Talanov 3aee544f02 Throw more descriptive exception when service isn't found 2018-04-04 17:56:32 +02:00
Ilya Chernikov 00320bad8d Implement support for additional receivers in the backend 2018-04-04 16:23:56 +02:00
Ilya Chernikov 611aff6b61 J2K: ScriptContext - convert 2018-04-04 16:23:56 +02:00
Ilya Chernikov cf4cca3683 J2K: ScriptContext - rename 2018-04-04 16:23:56 +02:00
Ilya Chernikov 87de1dff03 Implement support for additional receivers for script in frontend 2018-04-04 16:23:56 +02:00
Ilya Chernikov d05f67127d Move scripting configuration into compiler plugin 2018-04-04 16:23:55 +02:00
Ilya Chernikov d07a3f2bdd Implement script templates discovery in the cli compiler 2018-04-04 16:23:54 +02:00
Ilya Chernikov c764365da5 Add new scripting support to the compiler 2018-04-04 16:23:54 +02:00
Ilya Chernikov 3f22e28a51 Implement basic support of the new scripting in the frontend and plugin 2018-04-04 16:23:54 +02:00
Mikhael Bogdanov 4aec9499b5 Add @RequireKotlin(1.2.40) on interface with @JvmDefaults and its subinterfaces 2018-04-04 16:17:38 +02:00
Alexander Udalov 0439abba46 Check that kotlin.stdlib is explicitly required in module-info
Writing a Jigsaw-modular Kotlin program which doesn't require
kotlin.stdlib doesn't make sense because it most likely will fail at
runtime, on access to anything from the standard library. Previously, we
checked that kotlin.stdlib was in the module graph, but that's not
enough, we should also check that the source module requires it.
'-Xallow-kotlin-package' can be used to disable the error.

Add a test checking that an indirect (transitive) dependency is also OK
2018-04-03 21:50:25 +02:00
Alexander Udalov 828cc6dbf3 Add module-info.java for kotlin-reflect
The standard way of loading resources with built-ins metadata from the
current class loader no longer works in the modular mode on Java 9
because the current class loader is for module 'kotlin.reflect', but the
metadata is located in the module 'kotlin.stdlib'. On Java 9, we now use
the class loader of 'kotlin.stdlib' to load these resources.

 #KT-21266 Fixed
2018-04-03 21:24:03 +02:00
Alexander Udalov 2d41c7d462 Add module-info.java for standard Kotlin libraries
Using the new multi-release jar feature, store compiled
module-info.class files into META-INF/versions/9 instead of the artifact
root. Hopefully, this will break fewer tools which do not support
module-info.class files because any sane tool should not do anything
with files in META-INF because before Java 9 that directory only
contained resources.

Upgrade some Maven plugins to newer versions which do not fail on
module-info.class files

 #KT-21266 In Progress
2018-04-03 21:22:14 +02:00
Alexey Tsvetkov 650e97f200 Temporarily turn off source map generation in JS IC tests
Until IncrementalJsCompilerRunnerTestGenerated$ClassHierarchyAffected.testEnumEntryRemoved 
is fixed
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov 6f59b6da8e Use daemon if available for parsing files in JPS 2018-04-03 21:11:12 +03:00
Alexey Tsvetkov 3eb968807e Invalidate usages of removed classes before round
#KT-23165 fixed
2018-04-03 21:11:12 +03:00
Dmitry Jemerov ecb9a39f94 Report errors when trying to build decompiled text for light class 2018-04-03 19:45:37 +02:00
Mikhael Bogdanov 08ff1de248 Update test data 2018-04-03 19:38:37 +02:00
Mikhael Bogdanov 2c56f0bfd3 Require 'jvmDefaultFlag' for default super calls 2018-04-03 19:18:19 +02:00
Mikhael Bogdanov db59e916fb Inline utility method 2018-04-03 19:18:18 +02:00
Mikhael Bogdanov 3f5fea05de Write 'RequireKotlin' annotation on @JvmDefault members 2018-04-03 19:18:17 +02:00
Mikhael Bogdanov 23e8adb793 Add custom diagnostic checker for @JvmDefault annotation 2018-04-03 19:18:17 +02:00
Mikhael Bogdanov 38f8924ae3 Update test data. Use simple ''@JvmDefault' instead full qualifier 2018-04-03 19:18:15 +02:00
Mikhael Bogdanov 2a8041e77e Check method abstractness during bridge generation per method not interface 2018-04-03 19:18:14 +02:00
Mikhael Bogdanov f290b325ee Remove @JvmDefault members from delegation 2018-04-03 19:18:14 +02:00
Mikhael Bogdanov d84a15c0f6 Support inline for private @JvmDefault members 2018-04-03 19:18:13 +02:00
Mikhael Bogdanov affe445955 Minor.Reformat 2018-04-03 19:18:12 +02:00
Mikhael Bogdanov 308283e52e Support synthetic accessors for @JvmDefault members 2018-04-03 19:18:12 +02:00
Mikhael Bogdanov 1acd5642ce Minor.Reformat 2018-04-03 19:18:11 +02:00
Mikhael Bogdanov 1d3e57acee Add @JvmDefault diagnostics 2018-04-03 19:18:10 +02:00
Mikhael Bogdanov 63afd37cdd Remove unused parameters, compiler keys and obsolete code 2018-04-03 19:18:10 +02:00
Mikhael Bogdanov fe45eb2a81 Initial support of @JvmDefault 2018-04-03 19:18:09 +02:00
Mikhael Bogdanov 5830f99bce Remove unused test data 2018-04-03 19:18:08 +02:00
Mikhael Bogdanov c143480727 Remove wrong directive
Similar test exists under 'defaults' foldes
2018-04-03 19:18:07 +02:00
Mikhael Bogdanov b337b9ea8d Specify idea.home.path for java 8 tests
Default discovery mechanism points to wrong location
2018-04-03 19:18:06 +02:00
Ilmir Usmanov eb81c205c7 Replace CHECKCAST kotlin/Unit with ARETURN for tail call optimization
Sometimes instead of {POP, GETSTATIC Unit.INSTANCE, ARETURN} sequence
the codegen emits {CHECKCAST Unit, ARETURN} sequence, which breaks tail
call optimization. By replacing CHECKCAST with ARETURN we eliminate
this issue.

 #KT-19790: Fixed
2018-04-03 20:04:18 +03:00
Ilmir Usmanov 7b2de2de5e Add regression test for KT-20744
#KT-20744: Obsolete
2018-04-03 20:02:02 +03:00
Alexander Udalov d0e99e9a3f Fix NPE from JarURLConnection.getUseCaches when loading compiler plugins
#KT-22513 Fixed
2018-04-03 16:55:48 +02:00
Yan Zhulanow b1d7935d4a Kapt: Annotation processors should not be discovered when the processor fqNames are set by user (#KT-22939) 2018-04-02 19:26:24 +03:00
Yan Zhulanow 81f3346329 Evaluate: Fix annotation value evaluation (#KT-23058) 2018-04-02 19:16:46 +03:00
Yan Zhulanow 2b0489529d Fix compatibility for compiler API in DeclarationAttributeAltererExtension (EA-114961) 2018-04-02 19:14:52 +03:00
Yan Zhulanow 966480a155 Debugger: A dirty fix for setting breakpoints inside finally {} in case if exception is thrown from try {} (#KT-22654) 2018-04-02 19:14:28 +03:00
Yan Zhulanow eec9c6bffa Debugger: Fix breakpoints and stepping for inline-only function lambda arguments (#KT-23064) 2018-04-02 19:14:14 +03:00
Mikhail Zarechenskiy e1d75d5581 Migration fixes for new inference 2018-03-30 20:39:55 +03:00
Mikhail Zarechenskiy ae35a3b324 Enable new inference in the compiler 2018-03-30 20:39:55 +03:00
Mikhail Zarechenskiy 152a9a21f9 Make type parameter nullable as it should be
This change is needed, because in NI we perform a more strict check
2018-03-30 20:39:54 +03:00
Mikhail Zarechenskiy 0632bbbed0 Nullability of intersection type should be determined by supertypes
Intersection types cannot be nullable as is because of special rules for subtyping
2018-03-30 14:51:07 +03:00
Mikhail Zarechenskiy aebcb61402 Resolve elements in chain of qualifier expression without expected type
Consider call chain `foo.bar.baz()` which has expected type `Int`
Elements `foo` and `bar` doesn't have expected type `Int`,
this is especially important in NI, because we use expected type for
candidate applicability
2018-03-30 14:51:07 +03:00
Natalia Selezneva 15914dac86 Add ScriptExpectedLocations annotation to script-runtime.
It describes where script file can be found.
2018-03-30 14:43:17 +03:00
Anton Bannykh a514c0f515 JS IR: initial lowerings reuse 2018-03-29 20:32:10 +03:00