Commit Graph

38624 Commits

Author SHA1 Message Date
Alexey Sedunov eab6c024c2 Move: Warn about moving to non-Kotlin class
#KT-17472 Fixed
2017-04-24 20:52:09 +03:00
Alexey Sedunov d71b02f972 Move: Improve filtering in "Move nested class" dialog member list
Do not suggest inner classes and companion objects
 #KT-17515 Fixed
2017-04-24 20:52:08 +03:00
Simon Ogorodnik 3acebc3001 Fix KNPE in KotlinAddImportActionKt.createSingleImportActionForConstructor
#KT-17525 fixed
2017-04-24 19:18:13 +03:00
Alexey Andreev 0d7b39eb57 JS: minor code cleanup 2017-04-24 18:39:04 +03:00
Alexey Andreev feb968e66d JS: fix generation of names for local declarations
Local declarations obtain names prefixed with outer function's name.
Only simple name (i.e. without mangling) of outer function used
in this case. This raises a problem in case of inline functions
with object literals. Currently, they are not copied, but exported
from module. Consider two inline functions foo with different
signatures, both declare object literals. In this case both literals
are exported as foo$f, so only one will be accessible from outside.
2017-04-24 18:39:04 +03:00
Alexey Andreev 88cf37951b JS: always create aliases for function parameters
This is required to make translateAndAliasParameters
behaviour a little more clear.
Also, fix destructuring declaration translator to use parameter aliases
from TranslationContext, when possible.
2017-04-24 18:39:04 +03:00
Alexey Andreev 524dd122e7 JS: move deserialization logic out of createTopDownAnalyzerForJs
Remove code that deserializes unchanged descriptors from
`createTopDownAnalyzerForJs`, deserialize in caller instead.
2017-04-24 18:39:03 +03:00
Alexey Andreev df46417cd7 JS: fix NPE in incremental compilation
Fix NPE when compiling project incrementally and a file which
is not recompiled contains try/catch statement
2017-04-24 18:39:03 +03:00
Alexey Andreev f916d83978 JS: replace consumer in with returning value
Refactor some utility functions that take consumer of JsStatement
to return actual statements, so that caller now responsible
for putting these statements to corresponding lists.
2017-04-24 18:39:02 +03:00
Alexey Andreev a055a038a8 JS: minor fixes after rebasing
Multiple minor fixes after rebasing incremental compilation related
branch to actual master
2017-04-24 18:39:02 +03:00
Alexey Andreev 1c2120d7e2 JS: avoid repeated export of the same declaration 2017-04-24 18:30:42 +03:00
Alexey Andreev dd43d0a9e0 JS: don't use wrapper messages for string, int and double literals. This allowed to decrease binary AST size of stdlib from 2659138 bytes to 2642908 bytes 2017-04-24 18:30:41 +03:00
Alexey Andreev f4a9b99e4d JS: fix incremental generation of source maps 2017-04-24 18:30:38 +03:00
Alexey Andreev 0058d2fdf6 JS: add some tests to ensure that AST metadata is correctly serialized and deserialized and visible to JS optimizer 2017-04-24 18:29:52 +03:00
Alexey Andreev 80c1ac8b1b JS: don't generate metadata for fragments when fragment serialization is turned off 2017-04-24 18:29:51 +03:00
Alexey Andreev 85bd380373 JS: fix performance regression caused by changing approach to detection of main and test function from PSI-based to descriptor-based 2017-04-24 18:29:50 +03:00
Alexey Andreev dc1ce0e8b5 JS: replace declareFreshName with declareTemporaryName in inliner, get rid of scopes where possible 2017-04-24 18:29:50 +03:00
Alexey Andreev 22f24d13b9 JS: transform coroutines before serializing AST to binary format 2017-04-24 18:29:49 +03:00
Alexey Andreev 02ca374dc9 JS: fix inlining in incremental compilation 2017-04-24 18:29:48 +03:00
Alexey Andreev c85108602a JS: add tests for recompilation of only some files in a project 2017-04-24 18:29:46 +03:00
Alexey Andreev 49dacfcd76 JS: add metadata to AST serialization/deserialization 2017-04-24 18:29:19 +03:00
Alexey Andreev 8d2eb344ff JS: add AST deserializer 2017-04-24 18:29:18 +03:00
Alexey Andreev 4d3a86a183 JS: add AST serializer 2017-04-24 18:29:17 +03:00
Alexey Andreev 83df21329f JS: add protobuf declarations for JS AST 2017-04-24 18:29:17 +03:00
Alexey Andreev df4c7048d0 JS: do not create duplicate local variables for packages 2017-04-24 18:29:16 +03:00
Alexey Andreev cb8189989c JS: optimize removeUnusedFunctionDefinitions 2017-04-24 18:29:15 +03:00
Alexey Andreev a1780234ee JS: when compiling stdlib, prevent builtin class from import when the same class is declared in compiled module 2017-04-24 18:29:14 +03:00
Alexey Andreev f82f5d0471 JS: add tests for private external declarations 2017-04-24 18:29:13 +03:00
Alexey Andreev 8d2dac4577 JS: fix generation of main call and test run 2017-04-24 18:29:13 +03:00
Alexey Andreev 5b34ff8fa4 JS: don't generate inner name for class functions. Looks like this is not necessary. However, it breaks new pipeline when generating class members, since two distinct names are generated (inner and outer) for one declaration and that confuses Merger 2017-04-24 18:29:12 +03:00
Alexey Andreev c1627e840b JS: use eval instead of js in tests to refer local declarations to avoid renaming by resolveTemporaryNames 2017-04-24 18:29:12 +03:00
Alexey Andreev ce1eabdf6f JS: generate name table entries for non-internal name so that Merger could merge them in a single JsName. It is required for inlining to properly work on non-toplevel declarations between different files. 2017-04-24 18:29:11 +03:00
Alexey Andreev ee1e0fc0b1 JS: minor optimization: when attempting to set default value to MetadataProperty, remove value from underlying map 2017-04-24 18:29:11 +03:00
Alexey Andreev ecdf8a9985 JS: import external declarations, reference them by aliases, not by FQN 2017-04-24 18:29:10 +03:00
Alexey Andreev 435be921f2 JS: when generating class, translate reference to its parent, so that fragment can import corresponding declaration 2017-04-24 18:29:10 +03:00
Alexey Andreev 7d3e3c0299 JS: de-duplicate temporary names in some cases to allow name resolution to make its work better 2017-04-24 18:29:09 +03:00
Alexey Andreev 9e0a06a4aa JS: refactor JsScope, JsName and related things, since it's became unnecessary to track scopes and declaration order of temporary JsName's 2017-04-24 18:29:09 +03:00
Alexey Andreev 9530ce6c26 JS: when resolving temporary functions, don't rely on JsScope hierarchy, build this hierarchy instead, based on scoping rules for function, var, etc expressions 2017-04-24 18:29:08 +03:00
Alexey Andreev a6bb5743db JS: include expandIsCalls in new translator pipeline 2017-04-24 18:29:08 +03:00
Alexey Andreev 714cb60375 JS: support bridges and copying of non-abstract methods of interfaces in new pipeline 2017-04-24 18:29:07 +03:00
Alexey Andreev 83140bc5f7 JS: support inlining in new pipeline 2017-04-24 18:29:07 +03:00
Alexey Andreev a414cd64c5 JS: support module imports in new pipeline 2017-04-24 18:29:06 +03:00
Alexey Andreev 2354adfa22 JS: support class prototypes in new pipeline 2017-04-24 18:29:06 +03:00
Alexey Andreev 108fcba885 JS: support imports in new pipeline 2017-04-24 18:29:05 +03:00
Alexey Andreev 6711db86ee JS: reworking translator pipeline to generate multiple fragment each for source file 2017-04-24 18:29:05 +03:00
Alexey Andreev e909ef984c JS: prepare all necessary abstractions for new pipeline 2017-04-24 18:29:04 +03:00
Zalim Bashorov 56810c5100 KJS: cleanup RhinoUtils and remove obsolete rhino result checkers 2017-04-24 17:59:10 +03:00
Zalim Bashorov 25dd31a2e0 KJS: introduce new base class WebDemoExamples* tests 2017-04-24 17:59:08 +03:00
Zalim Bashorov e1cf6445ee KJS: make OutputPrefixPostfixTest generated and migrate to BasicBoxTest 2017-04-24 17:59:08 +03:00
Zalim Bashorov 030809e3b1 KJS: add generateNodeJsRunner flag to BasicBoxTest to control the generating files for node.js runner 2017-04-24 17:59:07 +03:00