Alexander Udalov
70e847b794
Reimplement generation of intrinsic array constructors
...
Instead of relying on a class from the runtime (which thus cannot be deleted
from the runtime ever), rely on a class from the compiler instead. This has a
minor downside: that class is compiled by the bootstrap compiler, so if codegen
of 'for'-loops or something else used in that class changes, it won't
immediately have an effect on a local working copy (on the build server
everything will be fine because of a 2-step building process).
In the future it may make sense to just manually create all the bytecode
instructions and dump them into a MethodNode. Currently the amount of work
needed for that seems rather significant
2016-01-28 03:10:39 +03:00
Alexander Udalov
04026dbe84
Make Array<T>(size, init) a constructor of Array
...
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Alexander Udalov
9e8b6571f4
Make primitive array factory functions constructors
2016-01-28 03:10:19 +03:00
Ilya Gorbunov
28ab9eebbc
minor: manual cleanup
2016-01-26 02:26:33 +03:00
Ilya Gorbunov
2a125ca92d
Drop deprecated builtins: PropertyMetadata, progression internal utils, HiddenDeclaration and Extension annotations
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
83ef48d0ac
Refer to builtin names in HeuristicSignatures and j2k TypeVisitor
2016-01-22 05:54:38 +03:00
Alexander Udalov
9620893fa4
Drop synthetic class kind Function, drop Metadata#xi
2016-01-19 18:39:59 +03:00
Alexander Udalov
aef6d49b48
Drop isLocalClass, do not write KotlinLocalClass
2016-01-19 18:39:59 +03:00
Alexander Udalov
e37bd4eba6
Do not write and read KotlinInterfaceDefaultImpls
...
This was only used in InlineTestUtil.kt and had no effect in the condition
2016-01-19 18:39:59 +03:00
Alexander Udalov
59dab0a558
Combine all metadata annotations into one kotlin/Metadata
2016-01-19 18:39:59 +03:00
Alexander Udalov
4a31ad0d53
Make PropertyMetadata internal and deprecated with error
...
To make them inaccessible from Kotlin sources and drop them later. They're
still needed in runtime because Kotlin tests run old IDEA code (which depends
on PropertyMetadata) with our own runtime
2016-01-17 16:28:22 +03:00
Dmitry Jemerov
b11acdfbea
regenerate builtins (don't remove 'public' modifiers until we agree that we don't want them in stdlib)
2016-01-08 16:01:34 +01:00
Dmitry Jemerov
3870bd04b8
core: cleanup 'public', property access syntax
2016-01-07 18:03:09 +01:00
Denis Zharkov
87b6374351
Get rid of redundant intrinsic
...
Also drop 'safe' parameter from TypeIntrinsics.checkcast,
because it's supposed to work as JVM checkcast (i.e. accepting nulls)
2015-12-28 18:31:40 +03:00
Denis Zharkov
39bbd7c795
Rework reified markers format
...
Use integer operation identifier instead of method name to differentiate
reified operations
2015-12-28 18:31:40 +03:00
Alexander Udalov
0685f06200
Drop outdated stuff from metadata annotations
...
Make KotlinLocalClass and KotlinInterfaceDefaultImpls not retained at runtime,
to be maybe deleted in the future
2015-12-25 20:16:18 +03:00
Alexander Udalov
0ecf04dcc5
Drop KotlinDelegatedMethod, simplify related code in codegen
2015-12-25 20:16:18 +03:00
Ilya Gorbunov
f9ba35af64
Place Char constants into builtin Char companion object.
2015-12-24 06:18:51 +03:00
Ilya Gorbunov
de11ed4fc6
Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.
...
IntegerConstants and FloatingPointConstants are dropped.
#KT-8897 Fixed
2015-12-24 06:17:03 +03:00
Alexander Udalov
c10cc30f40
Drop kotlin.jvm.internal.Intrinsic, use only one mechanism for intrinsics
2015-12-21 20:28:40 +03:00
Alexander Udalov
dc84445e2e
Inherit KProperty interfaces from function types
...
To be able to write the following: listOfStrings.map(String::length)
2015-12-16 19:48:28 +03:00
Denis Zharkov
7756644eb1
Introduce KClass<T>.javaPrimitiveType and KClass<T>.javaObjectType
...
#KT-6319 Fixed
2015-12-15 16:18:31 +03:00
Ilya Gorbunov
5aff07561d
Move jvm annotations and class mapping intrinsics to runtime.jvm module to kotlin.jvm package.
...
Make annotationClass to be a property.
Deprecate with error javaClass property on KClass<T>
2015-12-14 03:51:07 +03:00
Alexander Udalov
7b3b157707
Remove PropertyMetadata from project and bytecode, migrate code to KProperty
2015-11-27 23:34:34 +03:00
Alexander Udalov
8594cfca46
Remove kotlin.jvm.internal.KotlinPackage and corresponding code
2015-11-27 21:22:04 +03:00
Alexander Udalov
ad6888dac6
Drop KPackage and deprecated stuff from Reflection/ReflectionFactory
2015-11-27 21:22:04 +03:00
Alexander Udalov
fa34ebac4a
Delete KotlinSignature and corresponding code
2015-11-27 21:22:04 +03:00
Ilya Gorbunov
75f5cec190
Minor: remove inapplicable operator modifiers.
2015-11-11 16:41:40 +03:00
Alexander Udalov
77138ecdb7
Add intrinsic functions to check availability of classes at runtime
...
Will be used whenever we add a new class to the runtime and use it in the
generated code: we'll now generate a call to one of these functions in <clinit>
of each class file which references the newly added class
2015-11-09 22:24:42 +03:00
Alexander Udalov
1576160390
Improve implementation of callable reference superclasses
...
Previously to use reflection on them, you had to wrap an already created object
with a "Reflection.function" or "Reflection.propertyN" call, which the JVM
back-end was doing. This was not optimal in several senses and current solution
fixes that
2015-11-09 22:24:40 +03:00
Alexander Udalov
1c889c4e67
Support equals, hashCode, toString for ::-references without reflection
2015-11-09 22:24:39 +03:00
Alexander Udalov
baa28de865
Add factory methods to create class references with internal names
...
Will be used in future versions to support references to mapped mutable
collections
2015-11-09 22:24:39 +03:00
Dmitry Jemerov
736b496f6a
drop deprecated @platformName and @platformStatic annotations
2015-11-02 17:00:44 +01:00
Mikhail Glukhikh
f8a70302ac
Cleanup: get rid of effective visibility warnings
2015-10-28 14:31:51 +03:00
Alexander Udalov
a97567ea0c
Optimize KProperty objects for delegated properties
...
Don't generate anonymous classes with a lot of methods because this hurts
Android. Add special classes to the runtime instead (also add
FunctionReferenceImpl, to be used later) and just create their instances in the
static initializer of each class
2015-10-26 21:02:34 +03:00
Alexander Udalov
d021821db5
Minor, add constructors with messages and causes to KotlinReflectionNotSupportedError
2015-10-26 19:40:04 +03:00
Alexander Udalov
8dde7497e0
Minor, drop outdated constructor from FunctionReference
2015-10-21 13:40:49 +03:00
Alexander Udalov
c204e8fc67
Add more intrinsic methods to be maybe used in the future
2015-10-21 13:40:48 +03:00
Alexander Udalov
a24ac86e1c
Support exception messages for reified inline markers
2015-10-21 13:40:47 +03:00
Alexander Udalov
1f1b3660f7
Provide additional overloads of TypeIntrinsics methods for future use
2015-10-21 13:40:47 +03:00
Alexander Udalov
8f6f6f7807
Minor, simplify code in TypeIntrinsics
2015-10-21 13:40:46 +03:00
Alexander Udalov
121807654a
Add generalized methods to InlineMarker
...
To be able to use them in the future compiler without breaking binary
compatibility
2015-10-21 13:40:45 +03:00
Alexander Udalov
3f9806d758
Add constructors with messages and causes to runtime exceptions
2015-10-21 13:40:44 +03:00
Alexander Udalov
1e9624901a
Add NonVolatileRef to runtime
2015-10-21 13:40:02 +03:00
Alexander Udalov
1c280c96b6
Set binary version to 1.0.0
2015-10-19 22:12:39 +03:00
Denis Zharkov
bd37a10677
Transform *Array.size to properties
2015-10-16 18:16:02 +03:00
Alexander Udalov
ec1b4776fe
Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead
2015-10-14 20:45:25 +03:00
Alexander Udalov
b378969a0a
Deprecate KotlinSignature, to be removed later
2015-10-13 20:29:15 +03:00
Alexander Udalov
9d626ef1d9
Rename KotlinCallable annotation to KotlinFunction
2015-10-11 17:10:40 +03:00
Alexander Udalov
9e4823ef82
Write module name to metadata, fix reflection for file facades
...
Module name will be used for proper introspection of internal members
2015-10-11 17:10:37 +03:00