Alexey Andreev
0302fcbb72
JS: don't write native superclass to metadata. Fix KT-15007
2016-12-06 15:42:34 +03:00
Sergey Mashkov
e7d6711db3
IDL2K: properly handle clash or val and var attributes
2016-12-06 15:00:35 +03:00
Alexander Udalov
0d99801783
Revert "Add NonVolatileRef to runtime"
...
This reverts commit 1e9624901a .
For more information, see
https://discuss.kotlinlang.org/t/non-volatile-vs-volatile-captured-refs-by-default/
#KT-14746 Fixed
2016-12-06 14:59:15 +03:00
Alexander Udalov
04d4351e30
Revert "Make Ref fields volatile"
...
This reverts commit 6b348bfc6e .
For more information, see
https://discuss.kotlinlang.org/t/non-volatile-vs-volatile-captured-refs-by-default/
#KT-14746 In Progress
2016-12-06 14:59:14 +03:00
Mikhail Zarechenskiy
57ee8c878c
Regenerate tests
2016-12-06 08:56:45 +03:00
Mikhail Zarechenskiy
0134b8819b
Optimize const vals by inlining them at use sites
...
#KT-11734 Fixed
#KT-13570 Fixed
2016-12-05 22:11:33 +03:00
Mikhail Zarechenskiy
8c1e165f18
Skip property accessors for constants
...
- Inline protected constants from Java at use sites
- Do not create accessors for private constants in Kotlin
#KT-11734 In Progress
2016-12-05 22:10:14 +03:00
Mikhail Zarechenskiy
bd14c24592
Allow LANGUAGE_VERSION directive in codegen tests
2016-12-05 22:10:08 +03:00
Ilya Gorbunov
4d3d8463dc
Make tools.jar system dependency, since classpath property is readonly.
2016-12-05 20:10:33 +03:00
Yan Zhulanow
fcafaf5500
Update LightAnalysisModeCodegenTests for Kotlin 1.1
2016-12-05 20:10:32 +03:00
Yan Zhulanow
e31a39386e
Minor: Fix testDeprecatedJvmOverloads test (Kotlin runtime is not enabled by default now in bytecode listing tests)
2016-12-05 19:58:06 +03:00
Yan Zhulanow
e39a8f2900
Kapt3, Minor: Add tools.jar to kotlin-annotation-processing classpath (Maven)
2016-12-05 19:58:05 +03:00
Yan Zhulanow
75aaf6e797
Minor: Update tests for light analysis mode (rebase)
2016-12-05 19:58:02 +03:00
Yan Zhulanow
d246bd8cff
Kapt3: Fix literal expressions for byte and short
2016-12-05 19:57:59 +03:00
Yan Zhulanow
de0e4ac340
Kapt3: Add tests for primitive values and NonExistentClass
2016-12-05 19:57:57 +03:00
Yan Zhulanow
582f85f303
Kapt3: Generate stub for error.NonExistentClass to make javac happy
2016-12-05 19:57:56 +03:00
Yan Zhulanow
325245f996
Minor: Rebase to 1.0.6, re-generate tests
2016-12-05 19:57:55 +03:00
Yan Zhulanow
c2013c4d03
Kapt3: Add 'useLightAnalysis' option to compiler and Gradle plugins
2016-12-05 19:57:53 +03:00
Yan Zhulanow
e4de840b8a
Kapt3: Add friend paths to kapt tasks
2016-12-05 19:57:52 +03:00
Yan Zhulanow
75a8088f65
Kapt3: Minor: Changes on review
2016-12-05 19:57:51 +03:00
Yan Zhulanow
95d1210317
Kapt3: Extract annotation processing to its own task in Gradle. Now the kotlinCompile task should know nothing about kapt, for the main task it's just a regular Java source root.
2016-12-05 19:57:49 +03:00
Yan Zhulanow
92282072fc
Enable light class analysis mode for AbstractLightAnalysisModeCodegenTest. See also the previous commit.
...
Note that no test data files are changed, it means that light classes with the light analysis mode enabled are the same as with the full analysis.
2016-12-05 19:57:48 +03:00
Yan Zhulanow
328286ab14
Use box tests to check if the light analysis mode (without analyzing bodies when possible) produces the same result as the complete analysis. See also the next commit in which light analysis mode is applied. Note that no tests were changed.
2016-12-05 19:57:47 +03:00
Yan Zhulanow
8bdb54929b
Fix @JvmMultifileClass in ClassBuilderMode=LIGHT_CLASSES
2016-12-05 19:57:46 +03:00
Yan Zhulanow
0914a65234
Kapt3: Support processor arguments. Add integration tests.
2016-12-05 19:57:45 +03:00
Yan Zhulanow
b54df7a945
Kapt3: Do not resolve declaration bodies if possible in kapt
2016-12-05 19:57:44 +03:00
Yan Zhulanow
d884830700
Allow to avoid declaration body resolution for function and property initializers if the return type is explicitly specified. This significantly reduces the analysis time in kapt3.
2016-12-05 19:57:43 +03:00
Yan Zhulanow
90cbf172d2
Kapt3: Use annotation simple name if the annotation declaration is inside the same package as the current source file's package
2016-12-05 19:57:42 +03:00
Yan Zhulanow
1f1491f1ca
Kapt3: Fix a number of errors in ClassFileToSourceStubConverter:
...
1. Support strictfp modifier for methods.
2. Support Kotlin top-level methods and properties.
3. Fix visibility modifiers on enum methods.
2016-12-05 19:57:41 +03:00
Yan Zhulanow
e22ce14c36
Kapt3: Review fixes
2016-12-05 19:57:40 +03:00
Yan Zhulanow
3a29bf5e01
Minor: Add 'impls' to dictionary
2016-12-05 19:57:39 +03:00
Yan Zhulanow
86aa82da6c
Kapt3: Minor: Refactor kapt3 module (move/rename)
2016-12-05 19:57:38 +03:00
Yan Zhulanow
e61a7c7f2c
Kapt3: Minor: Annotation processor classes may be initialized only once, so SIMPLE_PROCESSOR became a factory method
2016-12-05 19:57:37 +03:00
Yan Zhulanow
03244123c9
Kapt3: Minor: Measure stub generation time
2016-12-05 19:57:36 +03:00
Yan Zhulanow
6b1fc6fc39
Kapt3: Output stubs to .java files in verbose mode
2016-12-05 19:57:35 +03:00
Yan Zhulanow
aa15e0ad67
Kapt3: Run Javac annotation processing in the kapt3 plugin.
...
There are two modes:
1. Run only annotation processing (like kapt1 with stubs + javac). Seems that it may be faster to process annotations once before Kotlin compilation than launching AP on each IC round.
2. Run AP, repeat analysis and compile Kotlin classes (like kapt2). This mode doesn't support IC for now.
2016-12-05 19:57:35 +03:00
Yan Zhulanow
bd9d33fe44
Kapt3: Replace kapt2 in Ant and Maven artifacts with kapt3
2016-12-05 19:57:34 +03:00
Yan Zhulanow
64046f1e40
Kapt3: Add simple AP test with Kotlin
2016-12-05 19:57:33 +03:00
Yan Zhulanow
5b780ec56c
Kapt3: Parse generic signatures of methods and fields
2016-12-05 19:57:32 +03:00
Yan Zhulanow
efd25de13f
Kapt3: Parse generic signatures of classes.
...
Refactoring (move TreeMaker helper functions to KaptTreeMaker, mapValues() and others to utils.kt).
2016-12-05 19:57:31 +03:00
Yan Zhulanow
e4158a5571
Kapt3: Number of bugfixes in JCTreeConverter:
...
Convert Java primitive and array types properly.
Enums: ignore first two synthetic constructor parameters, do not generate super class constructor call, add ACC_ENUM flag to enum values, do not generate "values" and "valueOf" methods.
Provide a JavaFileObject for JCCompilationUnit.
Handle DefaultImpls, ignore empty DefaultImpls classes.
Use a name table from Javac Names.
2016-12-05 19:57:30 +03:00
Yan Zhulanow
e131763cb0
Kapt3: Put static modifiers on nested non-inner classes.
...
Do not initialize synthetic and static fields in constructor.
2016-12-05 19:57:29 +03:00
Yan Zhulanow
68c2e8d71d
Kapt3: Do not generate body for abstract methods.
...
Add java.lang.Override annotation for overrides.
Ignore java.lang.Synthetic annotation.
2016-12-05 19:57:28 +03:00
Yan Zhulanow
10cfde4ab9
Kapt3: Call super class constructor with some default parameters.
...
Allow interface, annotation, enum modifiers on class.
2016-12-05 19:57:27 +03:00
Yan Zhulanow
edaadb0d48
Kapt3: Initialize final fields in class constructors
2016-12-05 19:57:27 +03:00
Yan Zhulanow
666a522fed
Kapt3: Generate empty body for constructor and void methods
2016-12-05 19:57:26 +03:00
Yan Zhulanow
4305706c16
Kapt3: Filter only relevant modifiers
2016-12-05 19:57:25 +03:00
Yan Zhulanow
5f45b41d53
Kapt3: Initial implementation of JCTreeConverter
2016-12-05 19:57:24 +03:00
Yan Zhulanow
f07f367ff6
Kapt3: Add kapt3 compiler plugin
2016-12-05 19:57:23 +03:00
Yan Zhulanow
fc0b17c453
Kapt3: Replace "my/package/Class$Inner" to "my/package/Class/Inner" in kapt3 class builder mode
2016-12-05 19:57:21 +03:00