Alexey Andreev
88eef7337e
KT-12928: decompose invocation like "a.foo(b)" to "$t = a; $s = $t.foo.bind($t); $s(b)" instead of "$t = a.foo; $t(b)", since in the latter case foo won't receive proper this. Add optimization that replaces "foo.bar.bind(baz)(args)" with "baz.bar(args)"
2016-07-04 14:52:12 +03:00
Alexey Andreev
33248e7721
KT-3008: minor code style fixes
2016-06-27 15:33:31 +03:00
Alexey Andreev
202400cb97
KT-3008: remove unused code that handles anonymous modules, since there's no way to declare them via configuration
2016-06-27 15:33:30 +03:00
Alexey Andreev
97605a97da
KT-3008: multiple minor fixes after code review
2016-06-27 15:33:28 +03:00
Alexey Andreev
713a7efcdf
KT-3008 Add support of module kind to Ant task. Repair Ant JS tests
2016-06-27 15:33:28 +03:00
Alexey Andreev
b090b79d92
KT-3008 Add UI that allows to change module kind in IDEA Kotlin configurator
2016-06-27 15:33:26 +03:00
Alexey Andreev
b6b604d78f
KT-3008 Fix UMD and plain module wrappers when module id is not a valid JS identifier
2016-06-27 15:33:25 +03:00
Alexey Andreev
e38b83880f
KT-3008 Add tests for module wrappers
2016-06-27 15:33:25 +03:00
Alexey Andreev
0cfacfa44a
KT-3008 Merge JS runtime modules in one kotlin.js
2016-06-27 15:33:25 +03:00
Alexey Andreev
b556b6efca
KT-3008 Fix JS backend tests
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
2e6a48576d
KT-12417: add support of RTTI against K(Mutable)Property* types
2016-06-21 15:42:50 +03:00
Ilya Gorbunov
c5a208f3eb
Rearrange stdlib unit tests across packages.
...
Rearrange JS stdlib unit tests.
2016-06-18 16:50:32 +03:00
Ilya Gorbunov
d266f546f4
Remove obsolete and not relevant to stdlib tests
2016-06-18 16:50:32 +03:00
Mikhael Bogdanov
bb59638039
Support bridges in interfaces. Fix for KT-12416: Missed bridges in js backend
...
#KT-12416 Fixed
2016-06-15 13:43:28 +03:00
Stanislav Erokhin
03241419bd
Minor. removed several tests with error calls.
2016-06-10 21:28:04 +03:00
Denis Zharkov
20d1d12f3b
Revert "'yield' reserved as a keyword"
...
This reverts commit 434082cadb .
2016-06-08 18:53:16 +03:00
Alexey Andreev
0e1dde022a
KT-6942: in JS backed for value equalitity patterns in when generate structural equality check (i.e. Any.equals) instead of referential check (===).
...
(cherry picked from commit 97228e5)
2016-06-07 12:59:16 +03:00
Alexey Andreev
f0e64f8e38
JS/Inlining: rename IneffectiveStatementElimination to RedundantStatementElimination
2016-06-07 11:54:45 +03:00
Alexey Andreev
07d5a4506c
JS/Inlining: minor improvements and clarifications after code review. Test whether expression without side effect does not prevent to relocate another expressions
2016-06-07 11:54:41 +03:00
Alexey Andreev
6b99d4e1c5
JS/Inlining: change sideEffects metadata to take three values: producing side effect, dependding on side effect and purity
2016-06-07 11:54:41 +03:00
Alexey Andreev
774efa4e70
JS/Inlining: improve test for removal of binary expresions without side effect, add tests for removal of a reference to a function parameter
2016-06-07 11:54:34 +03:00
Alexey Andreev
a26c09ae81
JS/Inlining: refactor TemporaryAssignmentElimination, add more tests
2016-06-07 11:54:12 +03:00
Alexey Andreev
b8b6999afc
JS/Inlining: add test case for KT-10931
2016-06-07 11:54:12 +03:00
Alexey Andreev
4783c9b612
JS/Inlining: in function call like fn() extract fn to a local variable, since fn can be access to property with side effects. Add tests to prove that evaluation order became proper in certain cases. Fix KT-11711, KT-7674, KT-7043
2016-06-07 11:54:02 +03:00
Alexey Andreev
ee6483b7ec
JS/Inlining: in expression like f(g()), where *f* is inline, don't treat g() as a lambda constructor
2016-06-07 11:52:57 +03:00
Alexey Andreev
65876c36eb
JS/Inlining: introduce removal of expression statements without side effects
2016-06-07 11:52:57 +03:00
Alexey Andreev
551ed28d84
JS/Inlining: introduce removal of unused variables
2016-06-07 11:52:56 +03:00
Alexey Andreev
c11f2fe2d6
JS/Inlining: fix bug in temporary assignment elimination which causes excess removal of assignment statement. When there is a set of temporary variables that receive same value in different execution branches, remove them carefully so that at least one (and, preferably, at most) remains in each branch.
2016-06-07 11:52:55 +03:00
Alexey Andreev
2bd807bb4e
KT-11960: add test for case of instantiating inner class of a local class
2016-05-31 15:24:30 +03:00
Alexey Andreev
acc5303731
KT-11960 Fix case of instantiation of local class via its inner class or via nested lambda. Move tests to more appropriate location. Fix bug in blackbox codegen generator for JVM, which does not allow to suppress tests.
2016-05-31 15:24:29 +03:00
Alexey Andreev
6f363a71be
KT-11960 Fix for data classes
2016-05-31 15:24:29 +03:00
Alexey Andreev
170a671a1b
KT-11960 Fix for case when class instantiates itself
2016-05-31 15:24:28 +03:00
Alexander Udalov
159d88102f
Use MODULE_NAME configuration key in JS instead of MODULE_ID
2016-05-26 11:47:30 +03:00
Alexander Udalov
cad4b6973c
Introduce and use JSConfigurationKeys similar to JVMConfigurationKeys
...
Use type-safe keys in CompilerConfiguration instead of multiple parameters,
duplicated in the base class (JsConfig), derived class (LibrarySourcesConfig)
and its builder (LibrarySourcesConfig.Builder)
2016-05-26 11:47:30 +03:00
Alexander Udalov
b65980f3b7
Drop JsConfig#inlineEnabled flag
...
Use CommonConfigurationKeys#DISABLE_INLINE flag (moved from
JVMConfigurationKeys) in CompilerConfiguration instead, similarly to the JVM
compiler
2016-05-26 11:47:30 +03:00
Alexander Udalov
6889bdbef8
Add CompilerConfiguration to JsConfig
...
Will be used to store common compiler options (such as source version, inline
disabled, etc) as well as JS-specific options, to unify the logic of compiler
option initialization between JS and JVM compilers
2016-05-26 11:47:30 +03:00
Alexander Udalov
116e4a5ced
Rename Config -> JsConfig
2016-05-26 11:47:30 +03:00
Alexander Udalov
2bd3211ba8
Get rid of unnecessary exceptions in JS translator
...
Before this commit, an internal error during JS translation resulted in the
actual exception wrapped in TranslationRuntimeException wrapped in
TranslationInternalException wrapped in RuntimeException being thrown. This
change gets rid of the two latter wrappings.
Also delete unthrown MainFunctionNotFoundException and related unused
constructors in TranslationException
2016-05-26 11:47:30 +03:00
Alexey Andreev
81bdd6b4bb
JS: improve performance of Hashtable-based collections
2016-05-23 12:23:27 +03:00
Alexey Andreev
f0ee52faaf
KT-11086 Treat initializer of a companion object as a class initializer
2016-05-23 12:22:50 +03:00
Alexey Andreev
c5eaea846d
KT-7424: add test to show that inlining works for anonymous functions
2016-05-23 12:22:50 +03:00
Alexey Andreev
db5baf7fa7
KT-8386: pass mutable list to JsInvocation from intrinsic generator, so that inliner had a chance to replace arguments
2016-05-23 12:22:50 +03:00
Stanislav Erokhin
7332032bb6
Support sealed class inheritors in the same file
...
#KT-11573 Fixed
2016-05-19 16:22:40 +03:00
Alexey Andreev
cb36b61f7f
KT-12254 Prevent JsEmptyExpression from getting into initializer JS when compiling code like val x = throw Exception()
2016-05-19 11:41:50 +03:00
Alexey Andreev
4387c31939
KT-8005 Add test to prove the issue is no more reproducible
2016-05-19 11:37:02 +03:00
Alexey Andreev
3cd7dcdb26
KT-8299 Make proper access to private fields in generated methods of data classes
2016-05-19 11:32:22 +03:00
Zalim Bashorov
7b1afd4e6a
JS backend: use ResolvedCall when translate super expression and remove some heuristics when translate receivers; generate right receiver when reference to super of outer class;
2016-05-18 17:34:18 +03:00
Mikhael Bogdanov
e207b56009
Support increment and '+=' on local delegated properties in JS backend
2016-05-13 19:11:21 +03:00
Dotlin
0e071b4748
Delegated Properties: Code generation for local properties (JS)
2016-05-13 19:11:20 +03:00