Commit Graph

51 Commits

Author SHA1 Message Date
Stanislav Erokhin 2c3f58eeb7 Renamed methods in MemberScope from getSmth to getContributedSmth 2015-11-05 14:34:00 +03:00
Stanislav Erokhin 6f9d9759ce Renamed KtScope to MemberScope 2015-11-05 14:34:00 +03:00
Zalim Bashorov 81a288b42c Add LookupTracker to DeserializationComponents 2015-11-02 18:18:28 +03:00
Alexander Udalov 5677ff60e7 Move/inline stuff from DescriptorUtils to other modules 2015-10-29 21:16:06 +03:00
Dmitry Jemerov d6a3870101 rename Kt to Kotlin in KtType, KtIcons 2015-10-20 16:23:31 +02:00
Dmitry Jemerov 49033e0002 rename Jet* classes to Kt* 2015-10-19 21:35:30 +02:00
Svetlana Isakova 25b40455ad Serialize/deserialize annotations on type parameters 2015-10-16 21:58:47 +03:00
Alexander Udalov f62128bdcd Fix protobuf extension API usages
"getExtension" returns default value when the requested extension is not
present, which is 0 for Int, which makes no sense for extensions like
methodImplClassName that are storing the number in the string table
2015-10-15 22:36:22 +03:00
Alexander Udalov e4efa27b76 Drop Callable and primary/secondary constructor proto messages 2015-10-11 17:10:26 +03:00
Alexander Udalov 9bf0502a31 Load new proto messages for functions and properties 2015-10-11 17:10:24 +03:00
Alexander Udalov 8c0a86617a Write JVM signatures to new protobuf messages 2015-10-03 00:59:33 +03:00
Alexander Udalov 4f21caecc4 Simplify AnnotationAndConstantLoader, use NameResolver from ProtoContainer 2015-10-03 00:59:32 +03:00
Alexander Udalov e4090d3f30 Cleanup descriptors.proto, regenerate
- move enums and messages nested in Callable to top level, since they're likely
  to be reused in other messages soon
- delete obsolete comments: some did not any value, some became obsolete with
  custom options ("id in StringTable" -> name_id_in_table)
2015-10-02 20:30:55 +03:00
Alexander Udalov 3b9d90429b Simplify local class name serialization, don't go through extension
Also fix it for the case of a class in a non-default package
2015-09-29 16:26:28 +03:00
Alexander Udalov 542bfab96f Don't write unnecessary information to ValueParameter proto
Flags can have a default value and the index can be trivially computed almost
all the time
2015-09-29 16:26:28 +03:00
Alexander Udalov da68c4d9ee Extract interface out of StringTable
Rework SerializerExtension interface: don't pass StringTable to each method
every time, create it in each extension's constructor instead and expose to
DescriptorSerializer with an interface method
2015-09-29 16:26:24 +03:00
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