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
Simon Ogorodnik
f8914013ef
Fix infinity deferred element unfolding in J2K
...
#KT-13146 fixed
2017-05-29 20:26:45 +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
9375a1d984
Prohibit illegal identifiers in packages in JS BE
...
See KT-18032
2017-05-29 15:37:30 +03:00
Alexey Andreev
a0ddbf0e9b
Fix handling non-ES5 identifiers in JS
...
When a Kotlin identifiers contains non-ES5 chars, JS BE
either reports error (for published declarations) or mangles name
(for non-published ones). The old approach relied on wrong
assuption that Java identifier = ES identifier.
However, that's not true. This commit introduces functions that
check identifiers according to ES5.1 spec rather than
using Character.isIdentifierStart[Part]
See KT-17476
2017-05-29 15:37:29 +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
Alexey Andreev
383e273fed
In LightAnalysisModeTestGenerated skip tests ignored in JVM
...
When a test is marked as ignored in JVM BE (i.e. IGNORE_BACKEND: JVM)
it's ignored in LightAnalysisModeTestGenerated. This means that
this tests is expected to fail. However, often tests that fail
in JVM blackbox tests, don't fail in LAMTG, therefore it's reasonable
to skip these tests in LAMTG at all.
2017-05-29 15:30:27 +03:00
Denis Zharkov
2c98bd053a
Fix super calls to suspend functions in abstract classes
2017-05-29 10:58:18 +03:00
Alexander Udalov
26ef954507
Merge pull request #1102 from igorini/master
...
Fix inline code block in notation.grm
2017-05-29 10:55:38 +03:00
igorini
00a5ff2364
Fix inline block in notation.grm
2017-05-28 17:12:52 +01:00
Alexander Udalov
da0ecc6cf7
Refactor CompileKotlinAgainstCustomBinariesTest
...
Combine compileLibrary and compileJava into a universal compileLibrary
which compiles both .java and .kt files, either to a directory or to a
.jar file. Also introduce compileJsLibrary for JS only
2017-05-26 19:38:54 +03:00
Alexander Udalov
dae414854d
Reduce boilerplate in CompileKotlinAgainstCustomBinariesTest
...
Check against output.txt in compileKotlin; adapt test data of some tests
2017-05-26 19:38:53 +03:00
Alexander Udalov
0899eb9924
J2K CompileKotlinAgainstCustomBinariesTest: prettify
2017-05-26 19:38:52 +03:00
Alexander Udalov
2ef48bfbca
J2K CompileKotlinAgainstCustomBinariesTest: convert
2017-05-26 19:38:51 +03:00
Alexander Udalov
0e4ea10d8a
J2K CompileKotlinAgainstCustomBinariesTest: move .java -> .kt
2017-05-26 19:38:50 +03:00
Alexander Udalov
a583a2f171
Move JavaModuleInfo and JavaModuleGraph to frontend.java
2017-05-26 19:38:49 +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
Alexey Andreev
522a56947c
Add -keep command line option to JS DCE tool
2017-05-26 18:20:23 +03:00
Alexey Andreev
9181140387
Suppress some DCE tests that can't pass
2017-05-26 18:20:21 +03:00
Alexey Andreev
e2c2fcf1ff
Generate EXPECTED_REACHABLE_NODES directive on JS box tests
2017-05-26 18:20:20 +03:00
Alexey Andreev
ab9b639652
Improve test infrastructure for JS DCE tool
...
Introduce directives to assert minification rate (MINIFIER_THRESHOLD)
and to skip DCE test at all (SKIP_MINIFIER).
Allow to run DCE on some of the box tests by default.
2017-05-26 18:20:19 +03:00
Alexey Andreev
8a8fdf1968
Command-line tool for JS DCE
2017-05-26 18:20:17 +03:00
Alexey Andreev
ca7062d776
Fix JS parser to properly handle "." <keyword> sequence
2017-05-26 18:20:16 +03:00
Alexey Andreev
9e89213d66
Prototyping DCE tool for JS
2017-05-26 18:20:15 +03:00
Simon Ogorodnik
d617b1d869
Fix IfThenToSafeAccessIntention broken by refactoring
...
Broken in 66c5717adc
2017-05-26 17:32:47 +03:00
Valentin Kipyatkov
87e3725306
Do not report property as unused when it is used
...
#KT-17062 Fixed
2017-05-26 16:37:38 +03:00
Valentin Kipyatkov
986eaeb7ea
Refactoring
2017-05-26 16:37:37 +03:00
Valentin Kipyatkov
d53aa28ddf
Fixed expected type for setter
2017-05-26 16:37:37 +03:00
Valentin Kipyatkov
db0309c39d
Reorder
2017-05-26 16:37:37 +03:00
Valentin Kipyatkov
545384910c
Special order of usage processing is not needed anymore
2017-05-26 16:37:37 +03:00
Valentin Kipyatkov
c69375ebdc
Remove redundant curly braces in string templates on inline
2017-05-26 16:37:37 +03:00
Valentin Kipyatkov
ab1b985bac
Inline Property supported for properties with setter
...
#KT-2638 Fixed
2017-05-26 16:37:36 +03:00
Valentin Kipyatkov
e6bfa55534
Inline Property also supported for properties with getter
2017-05-26 16:37:36 +03:00
Valentin Kipyatkov
20686297e5
Refactored to not use too many local functions
2017-05-26 16:37:36 +03:00
Valentin Kipyatkov
940ce27925
Inline val: more correct and simple detection of write usages
...
#KT-17489 Fixed
2017-05-26 16:37:35 +03:00
Valentin Kipyatkov
55979aca74
Drop result value if it's not needed
2017-05-26 16:37:35 +03:00
Mikhail Glukhikh
adbece82ef
Clear DF info for variables assigned in 'try' #KT-17929 Fixed
2017-05-26 15:39:27 +03:00
Mikhail Glukhikh
0fd70df681
Add tests for KT-17929
2017-05-26 15:39:25 +03:00
Mikhail Glukhikh
d9e4b445b9
Add extra information for EA-76201
2017-05-26 15:39:24 +03:00
Alexey Tsvetkov
3de679fb23
Minor: add comment for CompilerMessageSeverity.OUTPUT
2017-05-26 15:16:41 +03:00
Alexey Tsvetkov
afa1e901a7
Ensure output directory exists when adding it to classpath
...
Otherwise a warning is reported:
"Сlasspath entry points to a non-existent location".
Currently it only affects Maven + IC.
2017-05-26 15:16:41 +03:00
Alexey Tsvetkov
fd9e42a233
Do not print OUTPUT message as warning in Maven
...
Before the change Maven + IC had been reporting OUTPUT
messages as warnings since OUTPUT was removed
from CompilerMessageSeverity.VERBOSE
2017-05-26 15:16:41 +03:00