Alexander Udalov
fdfd808d80
Remove KForeignMemberProperty and KClassOrigin, use KMemberPropertyImpl instead
2015-03-11 16:42:36 +03:00
Alexander Udalov
ff0044f66a
Use descriptors for reflection on extension properties
2015-03-11 16:42:34 +03:00
Alexander Udalov
1a618deeab
Use descriptors for reflection on top level properties
...
This also allows to obtain a Field object from the package part (see
mapping.kt)
2015-03-11 16:42:33 +03:00
Alexander Udalov
d1debf586c
Support local classes in reflection
2015-03-11 16:42:32 +03:00
Alexander Udalov
64fdb18ad3
Use descriptors for reflection on class properties
...
- use ConcurrentHashMap as a cache of class loaders to module descriptors
- KClassImpl now has a lazy class descriptor and it manages property creation
by looking (also lazily) for the property descriptor in the corresponding
scope
- since deserialized descriptors have full information about where a JVM symbol
is located and what signature it has, new tests will begin to pass where
Kotlin model and Java reflection model differ, see classObjectVar.kt
2015-03-11 16:42:31 +03:00
Alexander Udalov
ba0ea1515b
Minor, simplify/optimize KClassImpl creation
2015-03-11 16:42:30 +03:00
Alexander Udalov
ecde41d9ab
Introduce ReflectProperties for lazy weak/soft property delegates
...
This class needs to be written in Java because no Kotlin classes can be used in
KClassImpl constructor (otherwise since each Kotlin class creates a KClassImpl
in its static initializer, this would result in infinite recursion)
2015-03-11 16:42:29 +03:00
Alexander Udalov
2b090e02a1
Build kotlin-reflect.jar in build.xml and for Maven
...
Reflection will be distributed in a separate jar and not in kotlin-runtime.jar
for two primary reasons:
- Reflection implementation at the moment takes almost 2Mb
- Separate libraries for separate features is a technique encouraged by Maven,
and it's inconvenient to make it different in the compiler distribution
2015-03-11 16:42:28 +03:00
Alexander Udalov
2c8754a6af
Build lite runtime of protobuf-java
...
Saves ~400kb (3.25mb -> 2.85mb) of runtime+reflect size
2015-03-11 16:42:27 +03:00
Alexander Udalov
af6e7cf140
Minor, remove ReflectJavaTypeProvider, throw unsupported instead
...
getTypeProvider() is in fact a bad abstraction because it's only used in SAM
construction, which does not happen at runtime
2015-03-11 16:42:26 +03:00
Alexander Udalov
e95d22dcfe
Refactor ReflectJavaConstructor.getValueParameters()
...
See https://youtrack.jetbrains.com/issue/KT-6886 for more information
2015-03-11 16:42:25 +03:00
Alexander Udalov
1054f004aa
Load annotations on constructors and parameters of Kotlin reflected classes
2015-03-11 16:42:24 +03:00
Alexander Udalov
4fb420f3f1
Fix deserialization of enum annotation arguments at runtime
2015-03-11 16:42:23 +03:00
Alexander Udalov
f36ef6f546
Provide equals, hashCode, toString for classes in reflection model
2015-03-11 16:42:21 +03:00
Alexander Udalov
a14b301f31
Resolve annotations on all reflected elements
...
Annotation in NestedEnumArgument test is made public, because we try to load
annotation argument values eagerly and fail, since you can't invoke methods
reflectively on an object of a non-effectively-public class
2015-03-11 16:42:19 +03:00
Alexander Udalov
c90f11b7e6
Support Java symbols in runtime descriptor loading
2015-03-11 16:42:18 +03:00
Alexander Udalov
73e4287aee
Initial support of annotation loading at runtime
...
In order to locate an annotated entity, we need to implement almost the whole
Java element model (which will be used anyway for Java descriptor loading)
2015-03-11 16:42:17 +03:00
Alexander Udalov
356f54b5df
Initial support of descriptor loading at runtime
2015-03-11 16:42:15 +03:00
Yan Zhulanow
be954f2c27
Fix WrongIdFormat exception on Android XML widgets with non-@+id/ format
2015-03-11 15:33:45 +03:00
Dmitry Jemerov
07381b765f
rename Numbers.kt to Primitives.kt as it now contains Char which is not a number
build-0.10.1393
2015-03-11 12:40:39 +01:00
Dmitry Jemerov
89398796c6
generate also the Char class
2015-03-11 12:40:31 +01:00
Dmitry Jemerov
26e452383e
reenable test which was temporarily disabled
2015-03-10 20:28:48 +01:00
Pavel V. Talanov
a701cb2bd9
Add quick fix to replace all 'class object's in project
build-0.10.1371
2015-03-10 18:21:33 +03:00
Pavel V. Talanov
81f9d34d1a
Add quick fix for deprecated 'class object' syntax
2015-03-10 18:21:33 +03:00
Pavel V. Talanov
3cfcef9da4
Render warning on 'class object' as deprecated
2015-03-10 18:21:32 +03:00
Pavel V. Talanov
581e163031
Report warning on 'class object'
2015-03-10 18:21:32 +03:00
Pavel V. Talanov
8fef31ee5b
Replace 'class object' with 'default object' in builtins
2015-03-10 18:07:56 +03:00
Pavel V. Talanov
9a844d2feb
Minor: replace some missed mentions of 'class object' with 'default object'
2015-03-10 18:07:54 +03:00
Pavel V. Talanov
9ecf95532e
Replace 'class object' with default object in project code
2015-03-10 18:07:46 +03:00
Alexander Udalov
dc7bb32a3b
Refactor runtime library configuration in IDE
build-0.10.1367
2015-03-10 16:15:20 +03:00
Alexander Udalov
dab18f7d4e
Minor, fix typos: existed, deffer, shouldExists
2015-03-10 16:15:17 +03:00
Alexander Udalov
a01ffd70e7
Fix NoInternalVisibilityInStdLibTest in maven build
...
Create disposable in setUp(), destroy in tearDown()
2015-03-10 16:13:50 +03:00
Alexander Udalov
611700c998
Fix "mvn clean" in libraries/ project
...
JS examples were failing on "clean" because no phases were set for compilation
and thus they required kotlin-maven-plugin on every phase which is obviously
not built yet when we're running "clean"
2015-03-10 16:13:45 +03:00
Natalia Ukhorskaya
3eb2182ef0
Evaluate expression: find local variable using callText from extract function instead of function parameter names
build-0.10.1364
2015-03-10 15:27:38 +03:00
Natalia Ukhorskaya
cdf081ddc3
Fix for exception: JetCodeFragment with context null
...
#KT-6876 Fixed
2015-03-10 15:27:37 +03:00
Natalia Ukhorskaya
f6162dc726
JetCodeFragment: increment modification count after inserting import
2015-03-10 15:27:37 +03:00
Natalia Ukhorskaya
c4f7bf6815
Add test for inserting imports in JetCodeFragment after completion
2015-03-10 15:27:36 +03:00
Zalim Bashorov
f49e4ca3e9
JS backend: fixed accessing to native enum entries.
build-0.10.1362
2015-03-10 14:30:45 +03:00
Ilya Ryzhenkov
e00cdfc8e1
toSortedMap() without a comparator requires keys that are Comparable.
build-0.10.1357
2015-03-10 11:21:41 +03:00
Ilya Ryzhenkov
bfeb21afb0
stdlib: stream() for Map #KT-6547 Fixed
2015-03-10 11:21:41 +03:00
Valery Kharitonov
8873be22d5
Implemented asList() method for arrays. #KT-1313 Fixed
2015-03-10 11:21:40 +03:00
Valery Kharitonov
c8094e7587
Implemented indexOfFirst/Last(predicate). #KT-6577 Fixed
2015-03-10 11:21:40 +03:00
Valery Kharitonov
38a4f86db2
Implemented asIterable method for arrays. #KT-1313 Fixed
2015-03-10 11:21:39 +03:00
Laszlo Hornyak
3954215b50
Add support for + and - operators in immutable maps #KT-6594 Fixed
2015-03-10 11:21:38 +03:00
Ilya Ryzhenkov
1a67e35739
Add more tests to cover stdlib
2015-03-10 11:21:38 +03:00
Alexander Udalov
6fe483f0cf
build.xml: use absolute paths, extract some constants
build-0.10.1346
2015-03-07 02:32:59 +03:00
Alexander Udalov
a8046020fb
Rename kotlin.reflect.IllegalAccessException -> IllegalPropertyAccessException
...
The former name clashes with java.lang.IllegalAccessException and proved to be
inconvenient because it should always be qualified in the source.
Also use java.lang exception's message as kotlin.reflect exception's message
2015-03-07 02:32:15 +03:00
Alexander Udalov
ed022f892b
Drop JavaTypeParameter#getIndex
2015-03-07 02:32:14 +03:00
Alexander Udalov
ca8831097f
Resolve annotations on Java constructors
...
Also add tests on custom annotations on fields and methods
2015-03-07 02:32:14 +03:00
Alexander Udalov
17c21dcaa2
Test generator: allow to exclude certain test data directories
2015-03-07 02:32:14 +03:00