Anton Bannykh
81798282b9
JS: support explicit SAM constructor invocation
2020-04-15 17:13:21 +03:00
Svyatoslav Kuzmich
3ec13d5bd6
[JS IR BE] Support companion objects in external interfaces
...
These objects are referenced but value is not actually used.
Replace access to these references with null literals.
2020-04-07 21:19:14 +03:00
Victor Turansky
79bec82430
KT-34770 JS. Configurable properties. Test
2020-04-07 16:15:02 +03:00
Victor Turansky
5652d2657d
KT-34770 JS. Configurable properties. Old backend
2020-04-07 16:14:21 +03:00
Victor Turansky
4d219d1eed
KT-31126 JS. Fix super constructor call. Test infra comment
...
Primary ordinary -> secondary external
2020-04-07 09:30:22 +03:00
Victor Turansky
be39151fad
KT-31126 JS. Fix super constructor call. Tests
...
Primary ordinary -> secondary external
2020-04-07 09:30:22 +03:00
Victor Turansky
6859e87be1
KT-31126 JS. Fix super constructor call. Old backend
...
Primary ordinary -> secondary external
2020-04-07 09:30:22 +03:00
Dmitry Petrov
24b8495e00
KT-30419 Box inline classes in return types of covariant overrides
...
Use boxed version of an inline class in return type position for
covariant and generic-specialized overrides.
Also fixes KT-35234 and KT-31585.
2020-04-01 22:59:14 +03:00
Alexander Udalov
8dd04789ad
Remove obsolete InlineStrategy
...
Replace corresponding metadata property in js.ast with Boolean. This
allows to get rid of dependency of 'js.ast' on 'frontend'.
2020-03-28 21:30:03 +01:00
Zalim Bashorov
7cf8697e30
[JS BEs] use star projection when type parameter used recursively
...
#KT-37128 Fixed
2020-03-13 10:15:56 +03:00
Zalim Bashorov
8c7562d338
[CJS BE] don't crash when intersection types passed for a reified parameter
...
#KT-37163 Fixed
2020-03-13 10:15:53 +03:00
Svyatoslav Kuzmich
f113c22450
[JS IR BE] Fix enum entry initialization
...
Keep helper fields uninitialized. This way thier initialization
would not depend on field initialization order.
2020-03-11 14:28:20 +03:00
Anton Bannykh
63a909dee6
JS: fix KT-37386
...
Anonymous object constructor parameters should not reuse JsName's
of the super class. Otherwise the temporary name renamer gets
confused.
2020-03-11 12:15:23 +03:00
Roman Artemev
7430bfe518
[KLIB] Update test data
...
- mute temporary broken test
- add regression test
2020-03-10 11:12:08 +03:00
Roman Artemev
5dcac16cf7
[JS IR] Update test data
2020-03-03 18:54:36 +03:00
Roman Artemev
161bb72439
[JS IR] Update test data
2020-03-03 18:54:36 +03:00
Svyatoslav Kuzmich
3ecee5c7cd
[JS IR BE] Implement kotlin.js.jsTypeOf as intrinsics
2020-02-27 16:54:55 +03:00
Svyatoslav Kuzmich
dff7d7b7b9
[PSI2IR] Patch parents before referenceExpectsForUsedActuals
...
There were some ADAPTER_FOR_CALLABLE_REFERENCE functions with
uninitialized parents at this point.
2020-02-27 16:54:55 +03:00
Svyatoslav Kuzmich
cd80eced32
[JS IR BE] Use fresh name for external JsModule declarations.
2020-02-27 16:54:55 +03:00
Anton Bannykh
e7816b4ec2
JS: support callable references with vararg and default parameters conversion
2020-02-27 15:12:49 +03:00
Anton Bannykh
23e218396e
JS: support SAM conversion
...
The SAM adapter is generate on declaration site. This is different
from the JVM approach.
`external fun interface` is banned for now.
Reusing interface declaration for the adapter is a hack which
reduces code size and makes importing/exporting the adapter
effortless.
2020-02-26 18:57:11 +03:00
Pavel Kirpichenkov
07ca355af8
[NI] Fix smartcasts for conventional contains in when
...
Call argument for conventional `contains` after expanding `in` may come from a `when` subject during its branch analysis.
In this case data flow info from a previous when branch was not considered,
because data flow info for subject had been used instead of data flow before argument.
Use of the latter one for the conventional `contains` solves the issue.
The old FE uses `isExternal` property of value arguments to skip smartcast reporting on `when` subject,
if they come from branches. To prevent undesired smartcasts on `when` subject after branch analysis in the new FE,
`isExternal` arguments are skipped in diagnostic reporter and during recorded type update.
Also, the new FE interprets `isExternal` completely differently from the old FE.
In the old FE this property is used exclusively by `when` with subject.
In the new FE it is also used for parially resolved calls, lambda return arguments and receivers.
This may be preventing the use of data flow info before argument in the first place, but this assumption requires additional investigation.
^KT-36818 Fixed
2020-02-20 19:07:54 +03:00
Anton Bannykh
5605eb5a31
Review fix: add TODO comments
2020-02-06 21:03:41 +03:00
Anton Bannykh
1e96c3d21e
DCE-driven mode
...
:js:js.tests:jsIrTest works same as before
:js:js.tests:jsPirTest runs tests in DCE-driven mode
2020-02-06 21:03:41 +03:00
Victor Petukhov
4490efab3e
[NI] Use original descriptor for functions imported from object during JS mangling
...
^KT-35904 Fixed
2020-01-30 19:55:41 +03:00
Abduqodiri Qurbonzoda
b06645d1c0
Update number of reachable nodes because of MutableList.removeFirst/Last
2020-01-29 17:53:08 +03:00
Zalim Bashorov
e6074e8759
[JS BE] Unmute test
2020-01-22 15:20:41 +03:00
Dmitriy Novozhilov
76b3964e96
Update testdata according to change compiler version to 1.4
2020-01-17 10:33:50 +03:00
Zalim Bashorov
ee06678484
[JS BE] Fix is check with Function
...
#KT-33149 fixed
2019-12-26 22:49:53 +03:00
Roman Artemev
cad3cb1bbe
[KLIB] Fix references to type made from TypeParameter in KotlinMangler
...
- promote ABI version
2019-12-17 17:56:07 +03:00
Anton Bannykh
9a971172c9
JS: fix object expression constructor delegation to secondary constructors with default arguments (KT-30517 fixed)
2019-12-15 15:21:23 +03:00
Abduqodiri Qurbonzoda
dabf6376db
Update js reachable nodes count after expanding StringBuilder api
2019-12-06 05:37:09 +03:00
Roman Artemev
4759c16428
[JS IR] Fix IrGetClass for Throwable successors
...
- add test
2019-11-28 14:45:34 +03:00
Roman Artemev
97c8b2074e
[JS] Set correct EXPECTED_REACHABLE_NODES
2019-11-27 00:06:42 +03:00
Anton Bannykh
81699299f5
JS_IR: DCE
...
Could be enabled by toggling `-Xir-dce`
Box test output in js/js.translator/testData/out-min
2019-11-26 12:20:39 +03:00
Roman Artemev
c5e25a0382
[JS IR] Make PrivateMembersLowering global to handle inlined private references correctly
...
- Fixes [KT-33334]
2019-11-25 20:22:03 +03:00
Roman Artemev
9946feb66c
[JS IR] Fix name clash between class members defined on prototype
...
- Fixes [KT-33327]
2019-11-25 20:22:03 +03:00
Roman Artemev
987c6ab3ee
[JS IR] Roll making Char inline class back
...
- un/mute falling tests
2019-11-25 20:22:03 +03:00
Pavel Kirpichenkov
8c52bb4212
Add frontend checks for missing dependency supertypes
...
Call checker and declaration checker are used in order to preserve backward compatibility.
Attempt to use classifier usage checker was not good enouth,
since not all errors found with it would actually be reported before.
For example types and constructor calls don't cause supertypes to resolve,
so missing supertypes would not lead to errors in case they are the only use of class name.
Updated tests failing due to missing Java dependencies in superclasses.
2019-11-18 12:06:41 +03:00
Dmitry Petrov
2ff36c808e
Minor: mute testEa35963 in WASM
2019-10-31 11:13:45 +03:00
Vladimir Dolzhenko
46d843643d
Fixed BoxJsTestGenerated.Main due to nullable arguments in main method
2019-10-28 16:42:14 +01:00
Mark Punzalan
78465e280f
Exclude additional generated testData/out-min dir in js/js.translator.
...
This was causing re-indexing in IntelliJ after every time the JS tests
are run.
2019-10-14 14:51:27 +03:00
Anton Bannykh
aad9cbbf01
[JS IR BE] Fix tests failing due to reduced runtime
2019-10-04 17:30:45 +03:00
Svyatoslav Kuzmich
5d7f18b1b9
[JS] Support wrapped and dynamic types in typeOf
2019-10-03 13:12:46 +03:00
Anton Bannykh
ead8379c50
JS: add -Xmetadata-only flag for JS common code modules (KT-33142 fixed)
2019-09-27 19:12:03 +03:00
Anton Bannykh
b4917ec816
JS: remove unconditional as SimpleType cast
...
This is a workround for a bug introduced in the typeOf
support
2019-09-27 16:55:10 +03:00
Svyatoslav Kuzmich
7592048437
[JS] Support typeOf
2019-09-25 18:12:55 +03:00
Roman Artemev
0040298eac
Fix master
...
- improve assertion message
- compare correct file paths
- fix C JS BE testData
2019-09-04 14:37:14 +03:00
Roman Artemev
90504c797a
[IR SERIALIZATION] Add tests about klib linkage
2019-09-03 14:21:31 +03:00
Svyatoslav Kuzmich
9594e9b3b1
[JS IR BE] Initial export generation
2019-08-30 13:15:37 +03:00