Roman Artemev
ba5193870e
[IR] Drop unused language version settings parameters from DependenciesGenerator
2021-02-02 12:05:34 +03:00
Ilya Goncharov
5fa9acc17a
[JS IR] Add additional exported declarations inside dce loop
...
[JS IR] Remove useless filter in dce for more log information
^KT-44469 fixed
2021-01-28 18:56:34 +03:00
Ilya Goncharov
d88d1d048e
[JS IR] Context to NameTables for stable names in additional exported declarations
...
[JS IR] BridgesConstruction with generic without cast
^KT-44469 fixed
2021-01-28 18:56:21 +03:00
Ilya Goncharov
f186047101
[JS IR] Add additional exported declarations with exported stub to dce
...
^KT-44469 fixed
2021-01-28 18:56:01 +03:00
Ilya Goncharov
6e98b81f3a
[JS IR] Use recursive isExported for stable name detection
...
^KT-44469 fixed
2021-01-28 18:55:48 +03:00
Svyatoslav Kuzmich
4bde884844
[JS IR] Use non-persistent IR for non-dce-driven mode
...
Eliminate overhead of persistency that we don't use in this mode.
2021-01-27 14:58:33 +03:00
Svyatoslav Kuzmich
02615ec569
[JS IR] Fix: Use proper parameter in ExportedDefaultParameterStub
2021-01-27 14:57:42 +03:00
Svyatoslav Kuzmich
f85263ca7f
[JS IR] Add fast path to JsCodeOutliningLowering
2021-01-25 19:18:44 +03:00
Svyatoslav Kuzmich
cb3b1f8ae2
[JS IR] Fix referencing Kotin variables in inline JS code
...
Fixed by outlining JS code that uses Kotlin variables making usages of
these locals explicit and preventing bugs due to one-sided variable renaming.
This prevents using Kotlin variables as lvalue in JS code.
2021-01-25 19:18:44 +03:00
Ilya Goncharov
aa1e23d9b0
[JS IR] Use origins for bridge with and without stable names
...
^KT-44415 fixed
2021-01-25 15:16:47 +03:00
Ilya Goncharov
57fdabdace
[JS IR] Add BRIDGE origin as ignore for stabitility of names
...
^KT-44415 fixed
2021-01-25 15:16:35 +03:00
Alexander Udalov
221f44da5f
Fix warnings in stdlib/compiler/plugins/test code
2021-01-13 19:18:20 +01:00
Svyatoslav Kuzmich
2d88ff6fb2
[JS IR] Fix unsgined integer default arguemtns (KT-44180)
...
Const lowering didn't exprect null constants with unsigned number
types and crashed with NPE. This commit fixes that.
2021-01-12 15:42:31 +03:00
Shagen Ogandzhanian
96de9144de
[JS IR] Generate stub for exported functions with default params
...
see https://youtrack.jetbrains.com/issue/KT-43407
2020-12-31 20:21:21 +01:00
Shagen Ogandzhanian
e7dc199ad7
Init enum entries whenever we access companion object or accessing valueOf
...
Fixes https://youtrack.jetbrains.com/issue/KT-43987
Fixes https://youtrack.jetbrains.com/issue/KT-43989
2020-12-30 14:54:34 +01:00
Zalim Bashorov
02849edc22
[IR] Make descriptor parameter optional for IrFileSymbolImpl and IrExternalPackageFragmentSymbolImpl
...
Remove DescriptorlessIrFileSymbol and use IrFileSymbolImpl instead.
2020-12-28 18:53:54 +03:00
Zalim Bashorov
14254ceb0b
[IR] Remove no longer needed usages of ObsoleteDescriptorBasedAPI
2020-12-28 18:53:54 +03:00
Zalim Bashorov
0372dae3ce
[JS scripting] Remove usages of descriptor based APIs and proper support for callable references
2020-12-28 18:53:53 +03:00
Svyatoslav Kuzmich
0945c110bf
[JS IR] Support init blocks in inline classes
2020-12-25 17:00:23 +03:00
Zalim Bashorov
274b09cf36
[JS IR] Support generating JS expression from IrComposite
...
Except the case when it's empty.
2020-12-24 20:03:23 +03:00
Zalim Bashorov
d7e3f826bb
[JS IR] Generate jsClass function inside the compiler instead of relying on declaration inside stdlib
...
We want to make its type parameter reified to do it we have to make it inline and non-external.
But we don't want to inline it in call sites and want prevent using it anywhere except places generated by the compiler.
In user code, including stdlib, we should use `K::class.js` instead.
Separately we have to intrinsify `K::class.js` to reduce overhead.
2020-12-24 20:03:23 +03:00
Zalim Bashorov
df6635085b
[JS IR] Replace calls with invalid type arguments for type parameters with call to errorCode function from runtime.
2020-12-24 20:03:22 +03:00
Zalim Bashorov
ff77155b5a
[JS IR] A type argument of the jsClass intrinsic must be a class (IrClass)
2020-12-24 20:03:22 +03:00
Zalim Bashorov
c1f6a72ae1
[JS IR] Remove inline properties with reified parameters
...
RemoveInlineFunctionsWithReifiedTypeParametersLowering -> RemoveInlineDeclarationsWithReifiedTypeParametersLowering
2020-12-24 20:03:22 +03:00
Zalim Bashorov
da8dacb495
[JS IR] run RemoveInlineFunctionsWithReifiedTypeParametersLowering earlier
...
It's required to avoid extracting local classes declarations and leaking some references to inline function internals.
2020-12-24 20:03:21 +03:00
Zalim Bashorov
bc9828f3f3
[JS IR] Generate a key using hashedMangle for all IR declarations in mapToKey
...
It is required to avoid "key" clashes and failing with ISE.
2020-12-24 20:03:21 +03:00
Zalim Bashorov
7c5ea414b7
[JS IR] Use mappedNames in NameTable only for REPL
...
And throw exception for unsupported types in mapToKey
2020-12-24 20:03:21 +03:00
Georgy Bronnikov
d714adacae
IR: removing WrappedDescriptors from symbols
2020-12-23 18:50:51 +03:00
Shagen Ogandzhanian
4f96f9d6a1
[JS IR] Initialize enum fields before accessing them in companion object
...
see https://youtrack.jetbrains.com/issue/KT-43901
2020-12-18 01:54:59 +01:00
Shagen Ogandzhanian
32cc95a3b0
[JS IR] Skip export annotations while generating default stubs
2020-12-14 16:41:27 +01:00
Ilya Goncharov
167e60b9fb
[JS IR] Assert createdOn equals 0 for properties initialization fun for file
2020-12-10 18:07:50 +03:00
LepilkinaElena
c8c83c04c0
[IR] Fix saving function calls during inlining const properties in PropertyAccessorInlineLowering ( #3971 )
2020-12-10 12:24:23 +03:00
Shagen Ogandzhanian
8e5bcd349e
[JS IR] Respect JsExport while assigning stable names
...
see https://youtrack.jetbrains.com/issue/KT-43404
2020-12-02 22:21:16 +01:00
Shagen Ogandzhanian
d512158c25
[JS IR] Remove redundant guard assertion for extension funs with default params
...
Introduce corresponding test
See https://youtrack.jetbrains.com/issue/KT-41076
2020-12-02 16:45:12 +01:00
Ilya Goncharov
697b2b02f1
[JS IR] Add properties lazy initialization with multiple modules
...
[JS IR] Move tests into compiler/testData
[JS IR] Add cyclic dependencies with lazy property initialization
[JS IR] Add test on not initialization in case of call non properties (classed, objects, enum classes, const vals)
[JS IR] Add initialization through top level
[JS IR] Ignore enum getInstance function in property lazy initialization
[JS IR] Use let function with useful result instead of pure apply and also
[JS IR] Remove duplicated tests in js.translator
2020-12-02 17:35:30 +03:00
Ilya Goncharov
995d96e5a3
[JS IR] Use one concat elements for non vararg and vararg arguments
...
^KT-42357 fixed
2020-11-30 17:34:44 +03:00
Ilya Goncharov
67e4b0948e
[JS IR] Constructor call with vararg invoking with apply
...
[JS IR] Nullize external empty varargs
[JS IR] Concat varargs with array of nonVarargs arguments
^KT-42357 fixed
2020-11-30 17:33:28 +03:00
Ilya Goncharov
efee3ea648
[JS IR] - Remove file lowering declarations from lowering phases
...
- rename fileToPurenessInitializers onto fileToInitializerPureness
- remove redundant check on top-level property
[JS IR] Rename initialis* to initializ* for consistency
[JS IR] Move propertyLazyInitialization property to context from configuration
[JS IR] Add test on lazy initialization properties order
[JS IR] Add multi module for lazy initialization of properties
[JS IR] Move tests onto js.translator
[JS IR] Rename fileToInitializerPureness according to context name
^KT-43222 fixed
2020-11-24 12:33:44 +03:00
Ilya Goncharov
a2d41b86bf
[JS IR] Add compiler argument about lazy initialisation
...
^KT-43222 fixed
2020-11-24 12:33:43 +03:00
Ilya Goncharov
fcb3ee5e45
[JS IR]Add check on pureness to not calculate fields to expression twice
...
^KT-43222 fixed
2020-11-24 12:33:42 +03:00
Ilya Goncharov
c224394dfc
[JS IR] Return with createdOn hack
...
^KT-43222 fixed
[JS IR] Not create initialisation function for file if there were attempt to create it earlier
^KT-43222 fixed
[JS IR] Pureness for PIR and memoize file fields pureness
^KT-43222 fixed
2020-11-24 12:33:42 +03:00
Ilya Goncharov
8b4d42e70a
[JS IR] Add initialisation call for functions in method
...
^KT-43222 fixed
2020-11-24 12:30:37 +03:00
Ilya Goncharov
06b276f9c3
[JS IR] Migrate on body lowering pass and declaration transformer
...
^KT-43222 fixed
2020-11-24 12:30:21 +03:00
Ilya Goncharov
d6bc309c94
[JS IR] Eager initialisation for all pure properties
...
^KT-43222 fixed
2020-11-24 12:29:48 +03:00
Ilya Goncharov
f4c1e52338
[JS IR] Continuation parameter in main through accessor
...
^KT-43222 fixed
2020-11-24 12:29:11 +03:00
Ilya Goncharov
34ee146148
[JS IR] Internal visibility for init fun
...
^KT-43222 fixed
2020-11-24 12:28:57 +03:00
Ilya Goncharov
07b6ef65a3
[JS IR] Init delegated properties as usual
...
^KT-43222 fixed
2020-11-24 12:28:07 +03:00
Ilya Goncharov
841118a64d
[JS IR] Add init properties call to top level functions
...
^KT-43222 fixed
2020-11-24 12:27:51 +03:00
Ilya Goncharov
5746a7c4fc
[JS IR] Only consider top level properties
...
^KT-43222 fixed
2020-11-24 12:27:36 +03:00
Ilya Goncharov
0dc4f51d74
[JS IR] Add init function call into first step of property accessor
...
^KT-43222 fixed
2020-11-24 12:27:20 +03:00