Commit Graph

35 Commits

Author SHA1 Message Date
Alexander Udalov 93b5065cf5 Get rid of SerializationUtil, move methods to DescriptorSerializer 2015-09-22 18:22:55 +03:00
Denis Zharkov 9c4564a5a6 Get rid of deprecated annotations and modifiers in project code 2015-09-18 09:34:27 +03:00
Alexander Udalov 949144e0c0 Report incomplete hierarchy error for deserialized types
#KT-5129 Fixed

Delete a JPS test that was specifically testing that we would not fail in this
situation; now there's a compilation error
2015-09-15 13:11:17 +03:00
Yan Zhulanow e7703df0b6 Use a single AnnotatedCallableKind enum item for property 2015-08-31 15:33:14 +03:00
Yan Zhulanow 1b9dab47ec Deserialize property and field annotations 2015-08-31 15:33:03 +03:00
Yan Zhulanow 08c678ef46 Deserialize receiver parameter annotations for extension functions 2015-08-31 15:32:55 +03:00
Dmitry Jemerov 3718a7dd44 code cleanup for JS modules 2015-07-20 18:32:05 +02:00
Pavel V. Talanov aae8ccfd57 Refactor: AnnotationSerializer does not depend on bultins 2015-07-17 19:21:24 +03:00
Pavel V. Talanov c313887641 Split CompileTimeConstant into two entities
1. ConstantValue
	* just holds some value and its type
	* implementations for concrete constants
2. CompileTimeConstant
	* is only produced by ConstantExpressionEvaluator
	* has additional flags (canBeUsedInAnnotation etc)
	* has two implementations TypedCompileTimeConstant containing a constant value
		and IntegerValueConstant which does not have exact type
	* can be converted to ConstantValue

Adjustt usages to use ConstantValue if flags are not needed
Add tests for some uncovered cases
2015-07-16 02:28:05 +03:00
Pavel V. Talanov 5dc5d77e60 Inject builtins in constants 2015-07-15 21:09:52 +03:00
Alexander Udalov c8439ae6fc Minor, rename val EXTENSION_REGISTRY -> extensionRegistry 2015-07-03 15:32:16 +03:00
Alexander Udalov 110d6fa7f1 Don't load irrelevant classes by accident, if resource happens to exist
Check with the containing class or package first, don't load the class if the
container doesn't know about it. This also makes the workaround for
case-insensitive file systems unnecessary
2015-07-03 15:31:48 +03:00
Pavel V. Talanov 37bcd455b5 Make ModuleDescriptor#getPackage() return not null lazy object with lazy scope
Refactor: no need to create package view in order to obtain its subpackages
LazyPackageViewDescriptorImpl to replace PackageViewDescriptorImpl
This allows to avoid computations when package views are requested but their contents not necessarily queried
For example: DescriptorResolver.resolvePackageHeader()
2015-06-23 15:19:06 +03:00
Pavel V. Talanov 1cf38e4799 Convert PackageViewDescriptor to Kotlin 2015-06-23 15:18:57 +03:00
Alexander Udalov 4141e0a8df Introduce fictitious numbered Function class descriptors 2015-05-26 15:04:54 +03:00
Alexander Udalov 135ee92966 Minor, don't pass constants as parameters 2015-05-26 15:04:52 +03:00
Michael Nedzelsky 7a01ba7d7a JS: add jsProtoBufUtil 2015-05-26 05:04:04 +03:00
Michael Nedzelsky 06af6bbd82 JS: KotlinJavascriptSerializationUtil, KotlinJavascriptSerializedResourcePaths: add some useful functions 2015-05-26 05:03:14 +03:00
Pavel V. Talanov e4c242e66b Remove direct usages of ModuleDescriptor#getPackageFragmentProvider() 2015-05-25 13:00:16 +03:00
Alexander Udalov 7a1b3bfbed JS: serialize/deserialize type annotations similarly to JVM
No new tests added because there are some on extension functions, which soon
will depend on type annotations to be preserved to work correctly
2015-05-19 18:46:58 +03:00
Michael Nedzelsky c420e0f010 JS: eliminate direct usage of builtins serialization for js 2015-05-12 19:30:29 +03:00
Michael Nedzelsky de3a31b07c JS: add import from descriptors to js.proto 2015-05-12 19:30:20 +03:00
Nikolay Krasko 9d986d077c Move kotlin runtime library to end of classpath and remove duplicates with 'util' package 2015-05-06 14:18:24 +03:00
Alexander Udalov a0502d99f4 Minor, use substringBeforeLast instead of hand-written code 2015-04-23 03:20:11 +03:00
Michael Nedzelsky 7e69c414d4 JS: support new names for built-in metadata files starting with dot 2015-04-23 03:17:31 +03:00
Alexander Udalov 20cd360b07 Rename built-in metadata files starting with dot
Files starting with dot are considered as hidden on Unix systems, and sometimes
are ignored by the tools. For example, Android build tools do not package such
files to the resulting application, which causes Kotlin reflection to fail
there

 #KT-7088 Fixed
2015-04-23 03:17:29 +03:00
Michael Nedzelsky d0616ed8bd fix KT-7512 JS: project with external library lead to deadlock and IDEA freeze due to wrong storage manager configured
#KT-7512 Fixed
2015-04-20 21:02:01 +03:00
Alexander Udalov 3d928a0842 Refactor deserialization initialization in built-ins and JS
BuiltinsPackageFragment was only designed to work with a single instance alive.
Because of this, it was creating deserialization subsystem upon initialization.
This was not working perfectly in JS where it was used, because multiple
storage managers, class caches and other components were created for each
package, leading to different concurrency errors and performance hits. Also in
the near future another package fragment will be needed to represent the
built-in package "kotlin.reflect"
2015-04-20 19:09:35 +03:00
Stanislav Erokhin b703f59e04 Migrate kotlin sources, maven projects and stdlib to new lambda syntax 2015-04-07 13:08:53 +03:00
Michael Nedzelsky 61726fdcb7 JS: merge KotlinJavascriptSerializer into KotlinJavascriptSerializationUtil 2015-04-03 05:36:21 +03:00
Michael Nedzelsky dbe59190ed JS: add writeMetadataToString, serializeToString 2015-04-03 05:35:59 +03:00
Alexander Udalov d09e0e73fa Rename NameSerializationUtil, move serialization-related code there 2015-03-30 17:22:07 +03:00
Alexander Udalov b57e15f3a4 Move utilities from NameSerializationUtil to meaningful places 2015-03-30 17:22:06 +03:00
Michael Nedzelsky 842eaa86a4 merge serialization.js module into js.serializer 2015-03-24 15:13:45 +03:00
Michael Nedzelsky 711501af56 add new module js.serializer 2015-03-18 09:38:51 +03:00