Alexey Andreev
4252d9786b
Fix translation of interface with non-abstract methods in JS BE
...
Fix additional case of generic interfaces in KT-18187
2017-06-08 13:51:18 +03:00
Alexey Andreev
59240a4bd9
Report errors in JS source maps as compiler warnings
2017-06-07 11:13:55 +03:00
Alexey Andreev
bf21cfd6e0
Use source map remapper in JS inliner
2017-06-07 11:13:55 +03:00
Alexey Andreev
590954e9a8
Add processor that removes location from ambiguous JS AST nodes
...
There are cases when it's impossible to distinguish which JS node
owns location denoted by source map. Consider example:
a + b
Both root JsBinaryNode and its arg1 point to the same start location.
Out translator provides full information, though parser can't
produce the same AST. The second AST will miss some of the locations
available on the first one. This processor gets AST node produced
by translator and removes locations from there so that both ASTs
become equal.
2017-06-07 11:13:53 +03:00
Alexey Andreev
c5bf76578a
Add test infrastructure for JS source map parser and generator
2017-06-07 11:13:52 +03:00
Alexey Andreev
e784d1846e
Fix warning in BasicBoxTest (JS)
2017-06-07 11:13:50 +03:00
Alexey Andreev
93ec81d2eb
Add source information to parsed JS AST
2017-06-07 11:13:50 +03:00
Alexey Andreev
27a44f3282
Fix JS source maps for complex enum entry
2017-06-07 11:13:47 +03:00
Alexey Andreev
b70c52e41f
Fix JS source maps for optional arguments
...
Also, when function has expression body, use expression instead
of function declaration to mark return statement.
2017-06-07 11:13:46 +03:00
Alexey Andreev
6f0e4c4deb
Fix JS source maps for data class synthetic methods
2017-06-07 11:13:46 +03:00
Alexey Andreev
5bc6c07f9e
Fix JS source maps for companion objects of enum
2017-06-07 11:13:45 +03:00
Alexey Andreev
c9545f291a
Fix JS source maps for properties without initializer
2017-06-07 11:13:44 +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
Alexey Andreev
b6d12fe7f3
Fix bug in re-importing modules from inline declarations in JS
...
Fix another case in KT-18201
2017-06-06 13:36:19 +03:00
Alexey Andreev
1df6f2f9a0
JS BE: expose imported modules via $$importsForInline$$ property
...
... and use it as prefix to FQN in inline functions. This allows
to properly inline function declared in module A to module B,
when this function calls another function in module C.
See KT-18201
2017-06-02 14:18:42 +03:00
Dmitry Petrov
d559212d70
Optimize out trivial INSTANCEOF checks
...
#KT-18157 Fixed Target versions 1.1.4
2017-05-31 16:48:14 +03:00
Alexey Andreev
e6b0cc64bd
Fix copying of non-abstract functions of interfaces in JS BE
...
Fix copying of non-abstract functions of interfaces to implementing
classes when implementing class inherits interface via 2+ paths.
See KT-18187
2017-05-31 11:21:13 +03:00
Alexey Andreev
ed592452a3
Fix JS source maps for functions with expression body
2017-05-30 12:48:59 +03:00
Alexey Andreev
1014666937
Fix JS source maps for delegates and backing fields
2017-05-30 12:48:58 +03:00
Alexey Andreev
13795b47fb
Fix JS source maps for initialization of variables captured by class
2017-05-30 12:48:58 +03:00
Alexey Andreev
bfc3a9c2af
Fix JS source maps for && expression with complex operands
2017-05-30 12:48:57 +03:00
Alexey Andreev
1111f2d5cd
Fix JS source maps for while/do..while statements
2017-05-30 12:48:57 +03:00
Alexey Andreev
413ac40c25
Fix JS source maps for for statements
2017-05-30 12:48:56 +03:00
Alexey Andreev
d7a10750e0
Fix JS source maps for lambdas
2017-05-30 12:48:55 +03:00
Alexey Andreev
82d37c0d57
Fix JS source maps for catch blocks
2017-05-30 12:48:55 +03:00
Alexey Andreev
6ad991adfb
Fix JS source maps for "is" and "in" clauses in when expression
2017-05-30 12:48:54 +03:00
Alexey Andreev
9692c02f6e
Fix JS source maps for string literals
2017-05-30 12:48:53 +03:00
Alexey Andreev
8dae399945
Fix generation of JS source maps for default parameters
...
(Of open member functions)
2017-05-30 12:48:52 +03:00
Alexey Andreev
e1009622af
Fix generation of JS source maps for call expressions
2017-05-30 12:48:52 +03:00
Alexey Andreev
6e489900cb
Fix generation of JS source maps for long literals
2017-05-30 12:48:51 +03:00
Alexey Andreev
89e3fb7592
Keep JS AST source information after refreshing local names
2017-05-30 12:48:51 +03:00
Alexey Andreev
ad89e5906f
Fix JS source maps for increment expression used as statement
2017-05-30 12:48:50 +03:00
Alexey Andreev
bad79dfa85
Fix JS source maps for return statement of inlined function
2017-05-30 12:48:49 +03:00
Alexey Andreev
5a4d3c5391
Generate JS source maps for object instance function
2017-05-30 12:48:49 +03:00
Alexey Andreev
77df0f28bf
Fix generation of JS source maps for class properties
2017-05-30 12:48:48 +03:00
Alexey Andreev
6f8ccfb80d
Add test for JS source maps for literals
2017-05-30 12:48:47 +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
3077a0f640
Fix generation of JS source maps for suspend functions
2017-05-30 12:12:49 +03:00
Alexey Andreev
28140b0883
Fix generation of JS source maps for closures
2017-05-30 12:12:34 +03:00
Alexey Andreev
3a7df13440
Fix generation of source maps for synthetic code in enums in JS BE
2017-05-30 12:12:33 +03:00
Alexey Andreev
fb3a864892
Fix generation of JS source maps for synthetic code in constructors
2017-05-30 12:12:32 +03:00
Alexey Andreev
4332f1cb2c
Don't share instances of JsNameRef nodes to avoid wrong source maps
...
When to name references to the same name are represented by
a shared JS AST node, setting line number of the second usage may
override line number of the first usage.
Also, supply more JS AST nodes related to default parameters,
with corresponding source information.
2017-05-30 12:12:30 +03:00
Alexey Andreev
e5662ac2ad
Copy location info when copying JS AST subtrees
...
This is necessary to preserve source information of a function's body
after inlining.
2017-05-30 12:12:28 +03:00
Alexey Andreev
9218b61141
Add tests for source maps in JS BE
2017-05-30 12:12:27 +03:00
Alexey Andreev
4bb1130f3f
Fix translation of labels with non-identifier names in JS BE
...
See KT-18027
2017-05-29 15:37:31 +03:00
Alexey Andreev
24c0a1e7ce
Fix translation of delegated functions with default params in JS BE
...
See KT-17285
2017-05-29 15:30:28 +03:00
Denis Zharkov
2c98bd053a
Fix super calls to suspend functions in abstract classes
2017-05-29 10:58:18 +03:00
Alexey Andreev
dde50a34db
Fix comparison of boolean values in JS BE
...
See KT-16984
2017-05-26 18:26:08 +03:00
Alexey Andreev
f5510b8d66
Fix translation to JS of call to top-level fun with vararg and @JsModule
...
See KT-17871
2017-05-26 18:24:15 +03:00
Alexey Andreev
e2fc808d83
Add simple test infrastructure for JS DCE
...
Add test infrastructure that allows to test handwritten JS
to test various small aspects of DCE, as opposed to box tests
which test kotlin stdlib + kotlin generated examples
2017-05-26 18:20:30 +03:00