Dmitry Jemerov
6e7ea662c8
"Code Cleanup" action to migrate all instances of deprecated syntax to new one
2015-05-26 14:41:21 +02:00
Mikhail Glukhikh
4570872bfd
Postfix expression code generation fixed as per KT-7561.
...
A set of tests for KT-7561 on codegen side, including exotic inc() functions().
#KT-7561 Fixed.
2015-05-26 15:20:37 +03:00
Mikhail Glukhikh
5723c2a077
Front-end fix: result type corrected for increment / decrement expressions. Smart cast allowed on a postfix increment result. See KT-7561.
...
Now result type is receiver type for postfix increment, or increment result type for prefix increment.
A set of relevant tests.
2015-05-26 15:20:25 +03:00
Alexander Udalov
ea6d0b464d
Report error when free function is called as extension
2015-05-26 15:05:04 +03:00
Svetlana Isakova
14c2690447
Distinguish between no declared arguments and an empty argument list
...
in a function literal
If there are no arguments, any number of them might be expected
2015-05-26 15:05:03 +03:00
Svetlana Isakova
d9568ef88c
Added special type constructor for function/ extension function
...
that stores an information about declared argument types
2015-05-26 15:05:02 +03:00
Alexander Udalov
79ee91c048
Download and build intellij-markdown when ABI version changes
2015-05-26 15:05:02 +03:00
Alexander Udalov
9ba6d91e2e
Prepare JVM runtime for support of reflection on functions
...
Introduce abstract class FunctionReference, which is supposed to be a
superclass for all anonymous classes generated for function references. Each
anonymous subclass will have statically-generated symbol info, which will be
used by reflection to locate the symbol
2015-05-26 15:05:01 +03:00
Alexander Udalov
9aeae7ddc6
Extract FunctionReferenceGenerationStrategy to top level
2015-05-26 15:05:00 +03:00
Alexander Udalov
d0bb06dbb0
Rename helper method in KotlinDebuggerTestBase
...
Now that functions and extension functions conform to each other, this method
began to conflict with the synthesized SAM-adapter from the super class (which
also can't be overridden by design)
2015-05-26 15:05:00 +03:00
Alexander Udalov
4d00077ffb
Delete assertion on receiver presence in 'invoke'
...
#KT-6541 Fixed
#KT-7383 Fixed
2015-05-26 15:04:59 +03:00
Alexander Udalov
34c6af0039
Advance stub and JVM ABI versions due to function type reform
2015-05-26 15:04:58 +03:00
Alexander Udalov
7f0b5029eb
Refactor KotlinBuiltIns#isFunctionType/isExtensionFunctionType
2015-05-26 15:04:58 +03:00
Alexander Udalov
6a0a703539
Delete numbered ExtensionFunction classes and generation logic
2015-05-26 15:04:57 +03:00
Alexander Udalov
2186ce5e8d
Degrade CFG test on values of extension function type
...
Apparently type annotations ('kotlin.extension' in particular) are lost
somewhere in control-flow values processor at the moment, so types may not be
as precise as they were when functions and extension functions had different
classifiers.
This test presumably only affects IDE functionality like 'Extract Method' in a
way that it will suggest a slightly incorrect function type for the parameter
of an extracted method. An issue is to be reported and fixed later upon demand
2015-05-26 15:04:56 +03:00
Alexander Udalov
49004a8b8e
Conform functions to extension functions and vice versa
...
#KT-5989 Fixed
2015-05-26 15:04:56 +03:00
Alexander Udalov
b08bd3bc67
Update FunctionImpl hack in Evaluate Expression and test data
...
Lambdas now have an additional superclass besides FunctionImpl: Lambda, which
should also be changed to inherit from MagicAccessorImpl
2015-05-26 15:04:55 +03:00
Alexander Udalov
4141e0a8df
Introduce fictitious numbered Function class descriptors
2015-05-26 15:04:54 +03:00
Alexander Udalov
27ed098467
Introduce kotlin.jvm.internal.Lambda, superclass for all lambdas
...
It has its arity precomputed, as opposed to the future KFunctionImpl inheriting
from FunctionImpl, for which the computation of arity can take some time and so
it shouldn't be passed in the constructor and saved as a field
2015-05-26 15:04:54 +03:00
Alexander Udalov
86ecb423f6
Drop generic parameters from FunctionImpl classes in JVM runtime
...
They are not used in any way but cause some complex code in JVM back-end
2015-05-26 15:04:53 +03:00
Alexander Udalov
135ee92966
Minor, don't pass constants as parameters
2015-05-26 15:04:52 +03:00
Alexander Udalov
d4965a4f3e
Add temporary imports for disambiguation
2015-05-26 15:04:52 +03:00
Alexander Udalov
738a84e259
Temporary hack to migrate functions to package kotlin.jvm.functions
...
Add a file in package 'kotlin.jvm.functions' to the project and replace
explicit imports of functions 'kotlin.Function{n}' to two imports 'kotlin.*'
and 'kotlin.jvm.functions.*', so that the codebase can be compiled both by the
old and by the new compiler
2015-05-26 15:04:34 +03:00
Alexander Udalov
7baa7a72e2
Avoid extension functions in Java-facing code in project
...
This is to workaround the coming functions / extension functions global
refactoring and move
2015-05-26 14:27:42 +03:00
Alexander Udalov
b574c1d205
Move 23 function classes to package kotlin.jvm.functions, drop KFunction*
2015-05-26 14:27:41 +03:00
Alexander Udalov
f6178ad7dd
Introduce Function, KFunction interfaces and 'extension' annotation
2015-05-26 14:27:40 +03:00
Alexander Udalov
90097d7e8b
Move callable reference diagnostic tests to non-stdlib
2015-05-26 14:27:40 +03:00
Alexander Udalov
51684b3fe1
Drop "Reflection types not loaded" diagnostic
...
Reflection types are now considered to be built-in, so their absence means the
runtime is broken and the compiler can't work at all; this condition probably
should be handled on another level for all built-in types
2015-05-26 14:27:39 +03:00
Alexander Udalov
45c28abfee
Keep built-in metadata for reflection interfaces
...
Reflection interfaces (interfaces in kotlin.reflect.* in core/builtins/) are
now fully considered as built-ins and can be accessed via KotlinBuiltIns. This
increases runtime size by ~20kb, but only because KotlinBuiltIns is static and
is therefore constructed only via resource loading from the compiler classpath
at the moment. As soon as it's possible to inject KotlinBuiltIns to the
particular resolution process, the metadata on JVM will be loaded via standard
annotation mechanism (kotlin.jvm.internal.KotlinClass/KotlinPackage) and wasted
runtime space will be reclaimed
2015-05-26 14:27:38 +03:00
Michael Nedzelsky
0879860074
AbstractQuickFixTest: fix possible test failure for tests with js-runtime
2015-05-26 12:56:25 +03:00
Michael Nedzelsky
f56bb4e9f4
add dependency on idea-js for idea and fix AbstractQuickFixTest
2015-05-26 05:05:08 +03:00
Michael Nedzelsky
533e4ac812
add dependency on idea-js to idea-test-framework and fix testUtils
2015-05-26 05:05:05 +03:00
Michael Nedzelsky
9f3154e6c0
add dependency on idea-js for idea-completion and fix AbstractJSBasicCompletionTest
2015-05-26 05:05:03 +03:00
Michael Nedzelsky
b558fd4181
add KotlinJavaScriptDecompiledTextConsistencyTest
2015-05-26 05:05:00 +03:00
Michael Nedzelsky
7978e0895e
add KotlinJavaScriptStubConsistencyTest
2015-05-26 05:04:57 +03:00
Michael Nedzelsky
4a83de7ef3
tests: extract closeAndDeleteProject, move to testUtils
2015-05-26 05:04:54 +03:00
Michael Nedzelsky
1f744272f2
JS: add decompiled text generated tests
2015-05-26 05:04:52 +03:00
Michael Nedzelsky
c362db7330
tests for decompiled texts: AssertionError -> RuntimeException
2015-05-26 05:04:49 +03:00
Michael Nedzelsky
a0dc22b464
add TARGET_BACKEND: JVM to some decompiled tests
2015-05-26 05:04:44 +03:00
Michael Nedzelsky
79b81d846e
fix and improve check for TARGET_BACKEND for generated tests
2015-05-26 05:04:41 +03:00
Michael Nedzelsky
f48a8d206a
JdkAndMockLibraryProjectDescriptor: support for Kotlin/Javascript library
2015-05-26 05:04:39 +03:00
Michael Nedzelsky
fc916b22f8
MockLibraryUtil: add support for compile to js
2015-05-26 05:04:36 +03:00
Michael Nedzelsky
69c3f7b69a
AllClassesCompletion: remove unnecessary code
2015-05-26 05:04:33 +03:00
Michael Nedzelsky
ac01dd6996
JsAnalyzerFacade: use only metadata from library modules
2015-05-26 05:04:30 +03:00
Michael Nedzelsky
484a73c17e
JsHeaderLibraryDetectionUtil -> KotlinJavaScriptLibraryDetectionUtil
...
JsHeaderLibraryPresentationProvider -> KotlinJavaScriptLibraryPresentationProvider
2015-05-26 05:04:28 +03:00
Michael Nedzelsky
ebcc29b907
PluginDeclarationProviderFactoryService: remove special treatment for Kotlin/Javascript projects
2015-05-26 05:04:25 +03:00
Michael Nedzelsky
23da4f0897
JS: KotlinJavascriptMetaFileDecompiler -> KotlinJavaScriptMetaFileDecompiler
2015-05-26 05:04:23 +03:00
Michael Nedzelsky
a0579ebedd
add KotlinJavaScriptStubBuilder
2015-05-26 05:04:20 +03:00
Michael Nedzelsky
ea9d7ed49a
DecompiledTextFactory: new implementation of buildDecompiledTextFromJsMetadata
2015-05-26 05:04:17 +03:00
Michael Nedzelsky
18afa8f2d5
add KotlinJavaScriptDeserializeForDecompiler
2015-05-26 05:04:15 +03:00