Commit Graph

42228 Commits

Author SHA1 Message Date
Zalim Bashorov 37879e18d9 [Wasm] Pass location instead of fileEntry to generateConstExpression 2023-01-17 19:37:05 +01:00
Zalim Bashorov aa8a0fd7d7 [Wasm] Remove LocationHolder and helper functions
It turned out that dedicated scoping function for locations are not so useful.
Now, if you want to scope a location use functions from stdlib, like `let`.
2023-01-17 19:37:05 +01:00
Zalim Bashorov 0d203d190e [Wasm] Remove buildInstr without location and fix usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov 42f2edd282 [Wasm] Require location for buildThrow and fix all usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov 1244cd1259 [Wasm] Require location for buildBr* and fix all usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov 95c84d5d3f [Wasm] Require location for buildDrop and fix all usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov 6eba0392db [Wasm] Require location for buildRefNull and fix all usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov 12854af0a2 [Wasm] Require location for buildRefTestStatic and fix all usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov 7bd92bc412 [Wasm] Require location for buildRefCastNullStatic and fix all usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov 158a307334 [Wasm] Require location for buildStructSet and fix all usages 2023-01-17 19:37:05 +01:00
Zalim Bashorov e7dc443c18 [Wasm] Require location for buildStructGet and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov 530438dfcb [Wasm] Require location for buildStructNew and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov 3967bd2755 [Wasm] Require location for buildSetGlobal and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov 65e1b53027 [Wasm] Require location for buildGetGlobal and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov 00d0c38fc3 [Wasm] Require location for buildSetLocal and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov 0b59ef58dc [Wasm] Require location for buildGetLocal and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov e5e786c265 [Wasm] Use more specific types in generateExpression and generateStatement
Also, rename: `generateStatement` -> `generateAsStatement`
2023-01-17 19:37:04 +01:00
Zalim Bashorov ce265c049a [Wasm] Require location for buildUnreachable and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov 36d4e29253 [Wasm] Require location for buildConstI32Symbol and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov e69bbdd5b4 [Wasm] Require location for buildConstF32 & buildConstF64 and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov 332aca10b0 [Wasm] Require location for buildConstI64 and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov f2f4c63720 [Wasm] Require location for buildConstI32 and fix all usages 2023-01-17 19:37:04 +01:00
Zalim Bashorov cdc1d66b1f [Wasm] Require a description on each usage of SourceLocation.NoLocation 2023-01-17 19:37:04 +01:00
Zalim Bashorov 61440c74d5 [Wasm] Require location for buildCall and fix all usages 2023-01-17 19:37:03 +01:00
Artem Kobzar 71486a321c [K/JS] Add support of compilation with ES-classes 2023-01-17 18:14:17 +00:00
Dmitriy Novozhilov 8d728d4f53 Revert "[FE 1.0] Deprecate declaration of expect and actual in the same module"
This reverts commit b09561c3c3.

It was decided to postpone this warning till 1.9
This is needed to provide proper IDE support

^KT-40904 Open
^KT-55177 Open
2023-01-17 18:02:50 +00:00
Alexander Udalov 2a80e70860 Install jansi only when colors are enabled, add test
Also minor cleanup. Remove the comment about the issue jansi#35 because
although the issue is fixed, the behavior is correct right now: we
enable colors by default iff stderr is a TTY (and the platform is not
Windows), and to determine that we need to call `CLibrary.isatty`.

 #KT-55784
2023-01-17 16:59:51 +01:00
Loïc Mangeonjean 34947c9d7a Allow overriding ansi mode on PlainTextMessageRenderer
#KT-55784 Fixed
2023-01-17 16:59:51 +01:00
Alexander Korepanov 8492791bf3 [JS IR IC] Check the unbound symbols in the IC infrastructure 2023-01-17 15:48:37 +00:00
Alexander Korepanov a4192c38f2 [JS IR IC] Remove JS files of the deleted modules from the out directory 2023-01-17 15:48:37 +00:00
Alexander Korepanov fde71918ed [JS IR IC] Write only modified JS files
Optimization: the patch allows copying and overwriting
 only modified JS files during the compilation output writing routine.
2023-01-17 15:48:37 +00:00
Alexander Korepanov 75931fb9c8 [JS IR IC] Do not read non modified JS into memory
Optimizaion: instead of reading all non modified JS files
 from the cache into the memory at once, the patch allows
 copying non-modified JS files from disk one by one
 during the compilation output writing routine.
2023-01-17 15:48:36 +00:00
Alexander Korepanov dd268d67ff [JS IR IC] Use fingerprints form klib && use 128 bytes hash
Optimization: instead of calculating fingerprints manually each time
 the patch allows using precalculated fingerprints from the klib.

 Optimization: share one md5 digest for all IC infrastructure.
2023-01-17 15:48:36 +00:00
Alexander Korepanov c502cae437 [JS IR IC] Calculate symbol hashes on demand
Optimization: often we don't need all hashes for all available symbols.
 This patch allows the calculation of the symbol hash only on demand.

 This patch also allows cycles for the inline function dependency
 graph in the IC infrastructure. Note that the inline function cycles
 may crash the inliner, however it is not the IC infrastructure
 responsibility to check the cycles.
2023-01-17 15:48:36 +00:00
Alexander Korepanov bd295df7d0 [JS IR IC] Do not recreate out files
Optimization: FileOutputStream truncates the existing files,
 therefore no need to delete and create a new file each time.
2023-01-17 15:48:35 +00:00
Alexander Korepanov 033ad33322 [JS IR IC] Do not save metadata to tmp file
Optimization: keep serialized metadata in memory
2023-01-17 15:48:35 +00:00
Alexander Korepanov 08a5e36ee7 [JS IR IC] Do not load deserializers and fingerprints together
Optimization: in some cases we need only deserializers without fingerprints.
2023-01-17 15:48:34 +00:00
Alexander Korepanov d90aa6c805 [JS IR IC] Use fingerprints from the cache
Optimization: do not read file names and recalculate fingerprints from klib.
 Read them from the cache if klib is not modified.
2023-01-17 15:48:34 +00:00
Dmitriy Novozhilov 259303ca50 [FIR] Fix loading of classId for nested enums in java annotation arguments
^KT-55887 Fixed
^KT-55976
2023-01-17 14:51:29 +00:00
Dmitriy Novozhilov 8bd3c9d019 [FIR] Don't transform nested classes during class update because of @JvmRecord annotation
^KT-55703 Fixed
2023-01-17 14:51:28 +00:00
Dmitriy Novozhilov ad191eb179 [Test] Add test for KT-55703 2023-01-17 14:51:28 +00:00
Dmitriy Novozhilov 4363b0815c [FIR] Add ability to specify if meta annotation itself should match metaAnnotated predicate
^KT-55843 Fixed
2023-01-17 14:51:28 +00:00
Dmitriy Novozhilov e88a6af7a0 [JS Test] Include friend modules in list of all dependencies in compiler configuration 2023-01-17 14:51:27 +00:00
Dmitriy Novozhilov 83cbd322fd [Test] Prohibit declaring dependency on the same module with different kinds in module structure 2023-01-17 14:51:27 +00:00
Dmitriy Novozhilov c71b80823c [Test] Cleanup code of ModuleStructureExtractorImpl.kt 2023-01-17 14:51:27 +00:00
Vladimir Sukharev e4d209cbde [K2] [KN-55977] Fix suspend type serialization
Merge-request: KT-MR-8328
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-17 13:07:21 +00:00
Jinseong Jeon b088e742ae Introduce a util to copy TypeMappingMode for UAST 2023-01-17 13:56:42 +01:00
Jinseong Jeon e89a387cd4 Optimal type mapping modes for UAST
As shown in (DEFALUT | GENERIC_ARGUMENT)_UAST, UAST's PsiType mapping
needs an automatic expansion of type alias. This commit makes utils that
generate optimal type mapping modes for return / parameter to consider
if this is used for UAST. In that case, utils will set `mapTypeAliases`
true so that typealias (even inside type arguments) can be expanded
properly.
2023-01-17 13:56:41 +01:00
Dmitrii Gridin 485fad1951 [FIR] FirJavaClass: make annotations and deprecationsProvider lazily enhanced
^KT-55387
2023-01-17 12:45:53 +00:00
Hung Nguyen 908dbf32cf IC: Clean up closing caches logic in IncrementalCompilerRunner.kt
Make the code more readable and address a small issue where we
did not close caches when returning `ICResult.RequiresRebuild`
(it was not exactly a correctness issue because we would recompile
non-incrementally in that case).

^KT-55709 In progress (This is a follow-up on a previous change for this
    bug)
2023-01-17 17:22:59 +05:30