Commit Graph

51883 Commits

Author SHA1 Message Date
Anton Bannykh 396ec20788 JS: add constructor binding and inlining test 2019-02-14 15:14:28 +03:00
Anton Bannykh 92401f0561 JS: fix primary constructor name tag generation 2019-02-14 15:14:28 +03:00
Anton Bannykh 36fd4d24fb JS: move label renaming to new fragment post-processing
Also remove metadata renaming from the global passes
2019-02-14 15:14:28 +03:00
Anton Bannykh 6921d4d128 JS: minor 2019-02-14 15:14:28 +03:00
Anton Bannykh 2022a9c887 JS: fix inheriting fake overrides in inlined object literals 2019-02-14 15:14:28 +03:00
Anton Bannykh 9716abcc12 JS: inline private properties 2019-02-14 15:14:28 +03:00
Anton Bannykh 50aeeee462 JS: fix the test 2019-02-14 15:14:28 +03:00
Anton Bannykh 21cbc7b018 JS: add incremental test for local declarations change 2019-02-14 15:14:28 +03:00
Anton Bannykh 299a45ccbf JS: validate AST when serializing to IC cache 2019-02-14 15:14:28 +03:00
Anton Bannykh e4b081e1bf JS: fix inline cycle reporting 2019-02-14 15:14:28 +03:00
Anton Bannykh b5b770c804 JS: line number fix 2019-02-14 15:14:28 +03:00
Anton Bannykh 47a219eeff JS: refactorings & cleanup 2019-02-14 15:14:28 +03:00
Anton Bannykh e76f80cbc6 JS: prevent duplicate imports inside inline function definition 2019-02-14 15:14:28 +03:00
Anton Bannykh 13844bd08e JS: FunctionReader cleanup 2019-02-14 15:14:28 +03:00
Anton Bannykh 6d5ef2d324 JS: fix long constants importing 2019-02-14 15:14:28 +03:00
Anton Bannykh cd0fd569b4 JS: visit tests and main in import remover; update line numbers 2019-02-14 15:14:28 +03:00
Anton Bannykh 52b705e7ae JS: Fix local aliases
Local aliases can be copied as-is to a different fragment now. Before this change we would have had to extract the local alias tag (if any) from the source fragment and add to the destination fragment name bindings.
2019-02-14 15:14:28 +03:00
Anton Bannykh 3a258ad08a JS: fix module references in case of @JsModule annotation 2019-02-14 15:14:28 +03:00
Anton Bannykh a1649e9e4d JS: fix import cleaner
The tag generated during the source file translation could differ from
the tag generated based on the import statement (e.g. "intrinsic:..."
during generation becomes "'Kotlin'...." later on).

This means that the same function imported from the start and imported
during inlining has different tags. Which makes duplicate import removal
trickier. The best solution would be to make sure the tag generation
algorithms are consistent.

Current solution: rewrite the tags in terms of the Inliner tag
generation algorithm right after the source file translation.

Also it seems that some `var` statements we treated as imports, even
though they were not. Supported this behavior for now.

TODO: Get rid of these workaround
2019-02-14 15:14:28 +03:00
Anton Bannykh c1fbeeb7d9 JS: fix bugs 2019-02-14 15:14:28 +03:00
Anton Bannykh a30c7fbee1 JS: Support imported wrapper serialization 2019-02-14 15:14:28 +03:00
Anton Bannykh 75668826d3 JS: simplification in process 2019-02-14 15:14:28 +03:00
Anton Bannykh 2cbdc7ecb0 JS: store whole JsImportedModule's in the module local alias
Module references were stored as plain JsName's. When inlining a function
from one fragment to another, those references should be re-interpreted
in terms of the destination fragment. Storing the whole module information
makes that much easier.
2019-02-14 15:14:28 +03:00
Anton Bannykh a0ff581a2f JS: refactoring 2019-02-14 15:14:28 +03:00
Anton Bannykh 6d26bf9622 JS: don't load binary AST unless required by the inliner 2019-02-14 15:14:28 +03:00
Anton Bannykh c83b6d46cc JS: split JsInliner 2019-02-14 15:14:28 +03:00
Anton Bannykh c65383fa3f JS: postpone JS AST merging 2019-02-14 15:14:28 +03:00
Anton Bannykh ec276dbea4 JS: convert JsInliner to Kotlin 2019-02-14 15:14:28 +03:00
Anton Bannykh 039625bb7e JS: convert K2JSTranslator to Kotlin 2019-02-14 15:14:28 +03:00
Anton Bannykh 1052ec898c JS: review fixes (mostly tests) 2019-02-14 15:14:28 +03:00
Anton Bannykh 3529114913 JS: incremental translation of tests and main fun invocation 2019-02-14 15:14:28 +03:00
Anton Bannykh 0397af79b4 JS: convert from java to kotlin JsProgramFragment 2019-02-14 15:14:28 +03:00
Toshiaki Kameyama d583c1be58 Can be replaced with binary operator: do not suggest when receiver or argument is floating point type
#KT-28596 Fixed
2019-02-14 15:10:26 +03:00
Nicolay Mitropolsky 48619a49ed RenameKotlinPropertyProcessor made not update the property before all references are updated (KT-27602)
because otherwise language independent bean property references couldn't properly handle rename in some cases.

Groovy references were also affected by this bug because they weren't able to resolve to original property
2019-02-14 13:27:06 +03:00
victor.petukhov 2bcdadf17f Add positive diagnostic tests for smartcasts from nullability condition using if expression 2019-02-14 13:11:14 +03:00
Dmitriy Dolovov 75250cf1a0 User friendly presentation of KLIBs in IDEA
Adds friendly names for KLIBs imported as file dependencies from Gradle project.

Issue #KT-29613 Fixed
Issue #KT-29783 Fixed
2019-02-14 16:55:45 +07:00
victor.petukhov 06b5a42d0d Improve test exceptions fixation:
- exceptions is analyzed if it's specified explicitly only,
- compute test case number for diagnostic tests in which an exception is thrown.
2019-02-14 12:31:43 +03:00
victor.petukhov 317da3d481 Add NOTE and UNSPECIFIED BEHAVIOUR fields to spec tests 2019-02-14 12:31:43 +03:00
victor.petukhov ec8a6cbe9c Alphabetical sort wrapped intersection types for rendered diagnostics 2019-02-14 12:31:43 +03:00
victor.petukhov acd6d354dc Support several spec places to which tests are linked and require specify spec version for each test 2019-02-14 12:31:43 +03:00
victor.petukhov cb5f497cbe Alphabetical sort wrapped intersection types for rendered diagnostics 2019-02-14 12:31:42 +03:00
victor.petukhov 30762a450a Wrap diagnostic parameters to double quotes and split by comma instead of semicolon 2019-02-14 12:31:42 +03:00
victor.petukhov 46bd5ba107 Add alphabetical sorting diagnostics with same ranges 2019-02-14 12:31:42 +03:00
victor.petukhov fad59e200c Code stylistic improvements in BaseDiagnosticTest 2019-02-14 12:31:42 +03:00
victor.petukhov b354518a41 Add lazy debug diagnostic DEBUG_INFO_EXPRESSION_TYPE 2019-02-14 12:31:42 +03:00
victor.petukhov f92232f015 Decompose and rewrite CheckerTestUtil to Kotlin 2019-02-14 12:31:42 +03:00
victor.petukhov 9e06e1eec0 Move and rename into .kt files around CheckerTestUtil for rewrite to Kotlin 2019-02-14 12:31:42 +03:00
victor.petukhov 8a9c7a69f3 Move checkType directives for tests to separate folder 2019-02-14 12:31:42 +03:00
Ilmir Usmanov 440cccae73 Loosen tail call check
Check that any source of ARETURN is inside a suspension point, not all
of them.
 #KT-27190 Fixed
2019-02-14 12:21:44 +03:00
Sergey Rostov cc62c971e7 JPS Build: update artifacts for IDEA 2019.1 module names 2019-02-14 10:32:28 +03:00