Commit Graph

164 Commits

Author SHA1 Message Date
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Alexander Udalov 396a5ab352 JS: write/read module annotation FQ names to/from metadata
#KT-22759 In Progress
2018-02-08 17:07:23 +01:00
Ilya Chernikov 7e21573cf4 Convert the rest of the project to intellij repo prepared in buildSrc 2018-01-30 17:06:13 +03:00
Ilya Chernikov a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Ilya Chernikov 8266777bd5 Convert js modules to intellij plugin 2018-01-30 17:06:07 +03:00
Denis Zharkov 2e933a165a Avoid retaining all protobuf objects in DeserializedMemberScope
Object model for deserialized protobuf isn't very cheap, so
loading just our stdlib's packages several times (as we do in the IDE)
might lead to ~ 96 MB of retained memory just by these objects.

While in fact many of them remain unused

 #KT-21517 Fixed
2018-01-22 10:48:25 +03:00
Alexey Andreev 93f8542fc4 JS: serialize location of JsCase/JsDefault
See KT-21699
2017-12-11 17:20:15 +03:00
Alexey Andreev 71b1591044 JS: replace suspend inline metadata after inlining
This fixes some issues on coroutine inlining, see tests
2017-11-27 17:01:18 +03:00
Alexander Udalov d386712903 Report pre-release errors if release LV is used
#KT-21267 Fixed
2017-11-17 13:42:36 +01:00
Alexey Andreev e1f8bac4d5 JS: several bugfixes in incremental compilation
1. Fix exported packages sometimes being mixed up
2. Fix metadata losing package fragments sometimes
3. Don't serialize empty packages to .meta.js
4. Preserve order of package fragments in .meta.js
5. In IC tests, compare textual representation of metadata rather
   than binary representation
2017-10-23 17:19:51 +03:00
Alexey Andreev cb0482f53e JS: fix crash when js function contains for statement w/o initializer
Fix KT-20898
2017-10-23 17:19:49 +03:00
Alexey Andreev b781661279 JS: fix copying functions with default arguments across interfaces
Copy function to super interface first, then copy from interface
to class. Add interface set to JsClassModel for this purpose.

See KT-20625
2017-10-19 13:10:47 +03:00
Alexander Udalov 8b0b334601 Extract shouldWritePreReleaseFlag(), use in JS as well as JVM
Fix the difference in behavior between JS and JVM
2017-10-16 15:09:36 +02:00
Alexander Udalov 3665255a2b Extract skipPreReleaseCheck out of DeserializationConfiguration.skipMetadataVersionCheck 2017-10-16 15:09:36 +02:00
Dmitry Savvinov 175d23155e Effects: add (de)serialization of contracts in metadata
- Introduce new definitions in descriptors.proto
- Add new corresponding values in Flags.java
- Introduce ContractSerializer and ContractDeserializer, responsible for
for conversion ContractDescription <-> ProtoBuf.Contract
- Add dependency of 'serialization' module on 'resolution' so that it
could see contracts model.

Note that here we do a lot of seemingly unnecessary hoops, which in fact
necessary to respect existing module system (in particular, to be able
to extract ContractDescription declarations from 'descriptors' module to
make them invisible from reflection)

==========
Effect System introduction: 8/18
2017-10-11 13:34:54 +03:00
Alexey Andreev bad50c03a7 JS: support cross-module inlining of suspend functions
See KT-18063
2017-09-29 14:32:49 +03:00
Alexey Andreev 95566b1374 JS: fix serialization of fileId in case of incremental compilation 2017-09-26 13:56:19 +03:00
Ilya Chernikov 3aabeca191 Fix maven and android tests after modularizing and rebasing 2017-09-20 11:51:21 +02:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov 61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Stanislav Erokhin c8ee424f67 Rename isHeader to isExpect in descriptors 2017-09-15 18:25:41 +03:00
Zalim Bashorov 30c7f633bd KJS: don't load declarations marked by PlatformDependent annotation
#KT-17450 Fixed
2017-09-13 02:18:43 +03:00
Alexey Andreev 1260146d25 Use local aliases for char boxing and unboxing in JS BE 2017-09-04 15:33:12 +03:00
Alexey Andreev 7646c2fc72 Use local aliases for Kotlin runtime functions in JS BE 2017-09-04 15:33:11 +03:00
Alexey Andreev 8c256b24dc Avoid duplication of imports introduced during JS inlining 2017-09-04 15:33:10 +03:00
Alexey Andreev 901346243d JS: fix inlining of function that calls functions from other modules 2017-09-04 15:33:08 +03:00
Alexey Andreev df782eaadd Fix incremental compilation to JS with new inliner 2017-09-04 15:33:06 +03:00
Alexey Tsvetkov 46a3a59b81 Fix missing lookups from deserialized JS descriptors 2017-08-10 21:19:42 +03:00
Alexey Andreev 5a9adcca2d Improve performance of JS tests
* Do not read protos for descriptors of stdlib and kotlin-tests
  repeatedly
* Parse libraries lazily in inline, so that when no inline function
  exist in a test, we won't parse huge kotlin.js file
* Speed-up source map parser
2017-07-11 11:06:52 +03:00
Mikhail Glukhikh dfe2c16bc7 More cleanup: lift return / assignment out 2017-07-10 12:59:58 +03:00
Alexey Andreev a0e1bde594 Allow to embed source files into JS source maps 2017-06-26 18:15:28 +03:00
Alexey Andreev 13ab63ae09 Generate relative paths in JS source maps
Also, add CLI options to manipulate prefixes of path

See KT-4078
2017-06-20 17:40:32 +03:00
Alexander Udalov 7febd846e8 Export 'intellij-core' in module 'frontend'
Remove intellij-core from dependencies of modules which already depend
on frontend or any module that exports frontend (such as frontend.java)
2017-06-06 14:29:26 +03:00
Alexander Udalov cbaa676c3d Move some declarations between 'descriptors' and 'deserialization'
- Move the following from 'deserialization' to 'descriptors':
  NotFoundClasses.kt
  AdditionalClassPartsProvider.kt
  ClassDescriptorFactory.kt
  PlatformDependentDeclarationFilter.kt
  findClassInModule.kt
- Move the following form 'descriptors' to 'deserialization':
  BuiltInSerializerProtocol.kt
  builtInsPackageFragmentProvider.kt
- Extract a marker interface from BuiltInsPackageFragment and move its
  implementation to 'deserialization'
- Change the type of parameters in PlatformDependentDeclarationFilter
  and AdditionalClassPartsProvider to ClassDescriptor

This will help in getting rid of the circular dependency of
'descriptors' <-> 'deserialization'
2017-06-06 14:29:18 +03:00
Alexey Andreev 5715803b96 Fix incremental recompilation of JS source maps
Note that this breaks binary compatibility.
It should be OK, since nobody is using incremental compilation API
for now.
2017-05-30 12:48:59 +03:00
Alexey Andreev e9a2c8c0f1 Prevent JS AST nodes of several types to be shared 2017-05-30 12:48:47 +03:00
Alexey Andreev 9e89213d66 Prototyping DCE tool for JS 2017-05-26 18:20:15 +03:00
Denis Zharkov 63c5d85cf4 Optimize memory footprint for generated protobuf code
The problem was that an overload of CodedOutputStream.newInstance
without size uses 4000 as a default value, thus allocating
a 4k-sized byte array.
At the same time the array remained effectively unused
in the most cases since it only used for storing data
for unknown fields.

Because such arrays are being created for each read of
protobuf message, during compilation of IntelliJ project
it was producing 25% of redundant memory traffic.

Of course these arrays were all in the young gen, but still
they have some effect on GC
2017-05-17 14:34:11 +03:00
Alexey Andreev 3fb15a4423 Fix iml file of js.serializer module 2017-04-25 13:31:26 +03:00
Alexey Andreev a055a038a8 JS: minor fixes after rebasing
Multiple minor fixes after rebasing incremental compilation related
branch to actual master
2017-04-24 18:39:02 +03:00
Alexey Andreev 1c2120d7e2 JS: avoid repeated export of the same declaration 2017-04-24 18:30:42 +03:00
Alexey Andreev dd43d0a9e0 JS: don't use wrapper messages for string, int and double literals. This allowed to decrease binary AST size of stdlib from 2659138 bytes to 2642908 bytes 2017-04-24 18:30:41 +03:00
Alexey Andreev f4a9b99e4d JS: fix incremental generation of source maps 2017-04-24 18:30:38 +03:00
Alexey Andreev 22f24d13b9 JS: transform coroutines before serializing AST to binary format 2017-04-24 18:29:49 +03:00
Alexey Andreev 02ca374dc9 JS: fix inlining in incremental compilation 2017-04-24 18:29:48 +03:00
Alexey Andreev c85108602a JS: add tests for recompilation of only some files in a project 2017-04-24 18:29:46 +03:00
Alexey Andreev 49dacfcd76 JS: add metadata to AST serialization/deserialization 2017-04-24 18:29:19 +03:00
Alexey Andreev 8d2eb344ff JS: add AST deserializer 2017-04-24 18:29:18 +03:00
Alexey Andreev 4d3a86a183 JS: add AST serializer 2017-04-24 18:29:17 +03:00