Commit Graph

87 Commits

Author SHA1 Message Date
Denis Zharkov 86c1dbe7b5 Fix decompilation of types based on local classifiers
If deserializing a type with arguments based on a local class for
decompiler, then just return Any type (without arguments).

Previously Any constructor was used with serialized arguments, that lead
to exception

Note that in case of deserialization for compiler nothing changes about
local-classes-based types (LocalClassifierResolverImpl is just inlined)

 #KT-13408 Fixed
2016-09-05 17:54:36 +03:00
Stanislav Erokhin 6556cde329 Introduce new type checker. 2016-07-21 16:07:16 +03:00
Alexander Udalov 601dc96a34 Minor, rename protobuf field according to style guide 2016-06-27 20:18:57 +03:00
Alexander Udalov 4c8e8b099a Update protobuf from 2.5.0 to 2.6.1 2016-06-27 20:14:00 +03:00
Alexey Andreev 97605a97da KT-3008: multiple minor fixes after code review 2016-06-27 15:33:28 +03:00
Alexey Andreev 64cd0b70d7 KT-3008 Minor refactoring and clean up 2016-06-27 15:33:27 +03:00
Alexey Andreev 848d7f92fa KT-3008 Implement AMD, CommonJS and UMD wrappers. Compile stdlib and builtins modules into separate JS files and wrap them in UMD. 2016-06-27 15:33:24 +03:00
Alexey Andreev 95b78e18df KT-3008 Change the way how modules are referenced in JS 2016-06-27 15:33:23 +03:00
Alexey Andreev 2909533522 KT-3008 Add module kind. Include module kind and module dependencies in metadata 2016-06-27 15:33:23 +03:00
Alexander Udalov 7e38b93d80 Use protobuf with renamed packages, pack to IDEA plugin
Update GenerateProtoBuf.kt to also regexp-replace com.google.protobuf with
org.jetbrains.kotlin.protobuf in generated Java sources

 #KT-12581 Fixed
2016-06-14 14:17:22 +03:00
Stanislav Erokhin 1d9ca06b96 Remake KotlinTypes. 2016-06-09 12:57:59 +03:00
Stanislav Erokhin 203c4cd94d Remake Raw type representation.
(cherry picked from commit b21cede)
2016-06-09 12:57:53 +03:00
Stanislav Erokhin 669558c4ba Refactoring. Move flexible type factory to deserialization module. 2016-06-09 12:57:48 +03:00
Dmitry Petrov 32f61c3918 KT-11588 Type aliases
Deserialization
2016-05-20 14:17:25 +03:00
Stanislav Erokhin 45ac1d2cb5 Refactoring. Remove FlexibleTypeFactoryDeserializer. 2016-04-25 15:28:49 +03:00
Stanislav Erokhin 0a4ad3f267 Refactoring. Rename FlexibleTypeCapabilities -> FlexibleTypeFactory. Also use factory.create instead of DelegatingFlexibleType.create. 2016-04-25 15:28:46 +03:00
Alexander Udalov 8ee278d02f Fix SourceElement for classes loaded in decompiler 2016-04-14 21:08:36 +03:00
Alexander Udalov 7620d66019 Minor, rename PackagePartSource -> BinarySource 2016-04-14 21:08:36 +03:00
Alexander Udalov 0ea3b4ade4 Fix multiple resource leaks by closing InputStream instances
The main fix is in BuiltInsPackageFragment, the rest is the improvement of
other usages of getResourceAsStream

 #KT-11433 Fixed
2016-03-30 21:41:43 +03:00
Alexander Udalov 8d64ed7f3f Do not produce error classes for not found annotations 2016-03-28 14:13:59 +03:00
Alexander Udalov f82ec6711d Remove SerializedResourcePaths and BuiltInsSerializedResourcePaths
Most of members now only make sense for JS, move the rest to
BuiltInSerializerProtocol
2016-02-26 11:29:10 +03:00
Alexander Udalov 996c5848c2 Simplify deserialization components for built-ins and JS 2016-02-26 11:29:10 +03:00
Alexander Udalov 4bd1d064bb Do not load built-ins in old format, drop class_name extension 2016-01-19 18:39:59 +03:00
Dmitry Jemerov d6a11b839b js: cleanup 'public', property access syntax 2016-01-07 18:15:19 +01:00
Ilya Gorbunov da4b1ae0fb Cleanup in js modules 2015-12-29 18:04:16 +03:00
Alexander Udalov b4addd0567 Move builtins-related logic from DeserializedPackageFragment to BuiltinsPackageFragment 2015-12-25 20:16:18 +03:00
Alexander Udalov 906d706961 Deserialize builtins from new message 2015-12-25 20:16:18 +03:00
Alexander Udalov 7592f31596 Serialize built-ins to separate file .kotlin_builtins 2015-12-25 20:16:18 +03:00
Alexander Udalov 07a23cab10 Minor, make SerializedResourcePaths an interface 2015-12-25 20:16:18 +03:00
Alexander Udalov 3e2eb8c1a0 Serialize/deserialize annotations on enum entries
#KT-10338 Fixed
2015-12-13 03:52:41 +03:00
Pavel V. Talanov c40d6af1e5 Decompile builtins (kotlin_class and kotlin_package files)
The main purpose of this is to be able to index builtin declarations and enable go to symbol/class functionality in ide
Also it makes sense to show builtin classes (Any, Int ...) as classes when browsing kotlin-runtime.jar

Refactor decompiler code to eliminate existing and potential duplication
Share the code between js (kjsm) decompilation and builtin decompilation heavily
2015-12-09 18:51:28 +03:00
Pavel V. Talanov 6164566cad Extract duplicate logic between javascript and builtins serialization/deserialization 2015-12-09 18:51:27 +03:00
Pavel V. Talanov dc34d4fc31 Decompiler, minor: fix some strange code 2015-12-09 18:51:22 +03:00
Yan Zhulanow 46ac3571d5 Fix "infix modifier required" errors in project 2015-11-27 15:51:11 +03:00
Michael Nedzelsky 2b4868c3ce js: do not generate files for empty string tables 2015-11-23 22:32:47 +03:00
Michael Nedzelsky c80c33efb6 add kjsm option for kotlin js command line compiler 2015-11-23 22:32:32 +03:00
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