Commit Graph

38604 Commits

Author SHA1 Message Date
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
Zalim Bashorov 41ce3936fc KJS: move some "static" properties of BasicBoxTest to its companion object 2017-04-24 17:59:07 +03:00
Zalim Bashorov 7eb882ed27 KJS: switch sourcemap tests to generated using BasicBoxTest 2017-04-24 17:59:07 +03:00
Zalim Bashorov 725b0100e2 KJS: remove useless StdLibTest 2017-04-24 17:59:06 +03:00
Denis Zharkov 62a55b7b00 Fix false-positive resolution ambiguity when using akka
com.typesafe.akka:akka-cluster-sharding_2.12:2.5
akka.cluster.sharding.ClusterSharding  has the following methods:

    public static ClusterSharding get(ActorSystem var0) {
        return ClusterSharding$.MODULE$.get(var0);
    }

    public static Extension get(ActorSystem var0) {
        return ClusterSharding$.MODULE$.get(var0);
    }

NB: ClusterSharding  <: Extension
None of these methods is synthetic or something, but javac allows
calls like ClusterSharding.get(null)  and they get resolved
to the first method returning ClusterSharding

It seems that both javac and IntelliJ resolution algorithms filter out
such clashing declarations choosing the one that has the most
specific return type, the same idea is applied in the change

 #KT-17560 Fixed
2017-04-24 17:54:01 +03:00
Denis Zharkov 40e1d5bc23 Optimize KtFile::isScipt/getScript when file is not kts
`isScript` gets invoked for each call
(see org.jetbrains.kotlin.resolve.calls.CandidateResolver#checkOuterClassMemberIsAccessible)

And currently it may work for O(|top-level-declarations|),
that is rather slow e.g. for native stubs for gtk

 #KT-17562 Fixed
2017-04-24 17:53:20 +03:00
Ilya Chernikov af4caeaf24 Ignore empty lines at the end of the testdata, remove debug dump
should fix source-section plugin tests on windows
2017-04-24 16:50:19 +02:00
Alexey Sedunov fd41e266fb Quick Fixes: Add/remove 'suspend' in hierarchy
#KT-15903 Fixed
2017-04-24 14:55:37 +03:00
Vyacheslav Gerasimov 0d32ac924a Update 1.1.2 changelog 2017-04-24 14:07:49 +03:00
Anton Bannykh 0db3649da1 Added EnvironmentConfigFiles.NATIVE_CONFIG_FILES for Kotlin/Native 2017-04-24 13:20:57 +03:00
Dmitry Jemerov 5315f4d9da Initial implementation of rainbow highlighting for Kotlin
#KT-12629 Fixed
2017-04-22 13:45:36 +02:00
Alexander Udalov c9769ab454 Do not serialize/deserialize CommonCompilerArguments#errors
This prevents .idea/kotlinc.xml from being added with an empty
ArgumentParseErrors object and also fixes
ConfigureKotlinInTempDirTest.testKotlincExistsNoSettingsRuntime11
2017-04-22 02:17:49 +03:00
Ilya Gorbunov e0a4f9ba76 Rewrite precondition samples and refactor precondition tests
Precondition tests are shared for JS target.
Samples do not use assertFailsWith as expression, as it's going to be converted as a special template.
2017-04-21 21:13:25 +03:00
Ilya Gorbunov 2c32bae5ca kotlin-test: Make assertFailsWith<reified T: Throwable>() common 2017-04-21 20:52:14 +03:00
Ilya Gorbunov 307b132015 kotlin-test: Make assertFailsWith(KClass<T: Throwable>) common 2017-04-21 20:52:12 +03:00
Ilya Gorbunov ec8ead754f Run kotlin-test-js tests with kotlin-stdlib-js
Rework kotlin-test common tests to make them runnable with qunit.
Change the way how asserter is overridden in js box tests.
Minor: remove unneeded test configs
2017-04-21 20:51:07 +03:00
Ilya Gorbunov f009e0c665 kotlin-test: Make 'todo { }' function common 2017-04-21 20:50:59 +03:00
Nikolay Krasko 4d0b88e34b Minor: use 'Searching for' instead of 'Searching' 2017-04-21 15:12:08 +03:00
Nikolay Krasko 666ecdb7d6 Don't iterate through classes for Scala and Clojure 2017-04-21 15:12:08 +03:00
Nikolay Krasko 111f0b1e66 Avoid full references search for languages without PsiClass (KT-14974)
Make smart type search work for Groovy.

 #KT-14974 Fixed
2017-04-21 15:12:07 +03:00
Nikolay Krasko 102310e3c2 Skip references for invoke when number of arguments in psi is wrong 2017-04-21 15:08:52 +03:00