Commit Graph

61208 Commits

Author SHA1 Message Date
Alexander Udalov d4170bca6e Regenerate generated files after updating copyright year 2020-01-30 12:41:42 +01:00
Natalia Selezneva e33a81a968 Tests: fix gradle tests for script configuration loading
Introduce `testAffectedGradleProjectFiles` property
to avoid full gradle project import in some tests
2020-01-30 14:39:29 +03:00
Dmitriy Novozhilov f9a4b8f9cb [FIR] Split printer in tree generator to several files
Also use smart printer instead of `PrintWriter`
2020-01-30 14:38:02 +03:00
Dmitriy Novozhilov 075068155b [FIR] Delay configuration of nodes in tree generator 2020-01-30 14:38:02 +03:00
Dmitriy Novozhilov 9f6cf5c8f4 [FIR] Add forgotten replacing lambdas in arguments of try and when calls 2020-01-30 14:38:02 +03:00
Dmitriy Novozhilov f8c8925fd6 [FIR] Support DFA analysis of postponed lambdas. Add more kinds of edges of CFG
#KT-36248
#KT-35724 Fixed
2020-01-30 14:38:02 +03:00
Dmitriy Novozhilov c78da854f7 [FIR] Make Stack an abstract class 2020-01-30 14:38:02 +03:00
Dmitriy Novozhilov 5de37baf6e [FIR] Rename EnterNode and ExitNode interface to markers 2020-01-30 14:38:01 +03:00
Dmitriy Novozhilov ec0f8a9c77 [FIR] Hide modifications of CFG from public API 2020-01-30 14:38:01 +03:00
Dmitriy Novozhilov 6716cb0bf3 [FIR] Add edge kinds to control flow graph
Another changes:
- Remove useless CFG plain text renderer
- Refactor CFG .dot renderer
- Add checking of consistency control flow graph
2020-01-30 14:38:01 +03:00
Dmitriy Novozhilov 0c2157155d [FIR-TEST] Remove outdated empty test class 2020-01-30 14:38:01 +03:00
Dmitriy Novozhilov 237198758d [FIR] Get rid of alivePreviousNodes in control flow graph 2020-01-30 14:38:01 +03:00
Dmitriy Novozhilov 1180ec54ef [FIR] Add unique id's for nodes of control flow graph 2020-01-30 14:38:01 +03:00
Mikhael Bogdanov 10900e0d90 JVM_IR. Don't copy synthetic method for property annotations if @JvmStatic presented 2020-01-30 12:31:38 +01:00
Pavel Kirpichenkov 832064305f [NI] Set correct applicability for unknown lambda parameter diagnostic
Unknown lambda parameter should not change resolve.
So the new diagnostic should not have error status; othrewise candidates with lower priority but more specific expected type may be chosen.

KT-34335 Fixed
See also KT-36264
2020-01-30 13:52:18 +03:00
Pavel Kirpichenkov eec039f5a2 [NI] Report error about unknown parameter type of lambda argument
KT-34335
2020-01-30 13:52:12 +03:00
Pavel Kirpichenkov 9fb8579252 [minor] Refactor KotlinCallCompleter
Move completion mode logic to CompletionModeCalculator.
2020-01-30 12:48:20 +03:00
Dmitry Gridin 96f49d8e3c Remove trailing comma from some tests 2020-01-30 15:32:09 +07:00
Dmitry Petrov 53f66e9509 PSI2IR: SAM conversion in varargs 2020-01-30 10:27:01 +03:00
Alexander Udalov 186a456e01 JVM IR: fix condition in Documented annotation generation 2020-01-30 00:06:03 +01:00
Alexander Udalov d71dec9b64 Minor, fix typo in condition in AbstractWriteFlagsTest 2020-01-30 00:02:20 +01:00
Pavel Kirpichenkov 5a04b7935e Add workaround for obsolete inline suspend integration test
Restore test data dropped in 7abd87d5, add specific output check
KT-36240
2020-01-29 21:41:07 +03:00
Pavel Kirpichenkov 9902643a26 Remove unsupported versions from kotlin compiler tab in settings
KT-36146 In progress
2020-01-29 21:40:50 +03:00
Pavel Kirpichenkov 913ed71863 Update error about unsupported language and API versions
Set first supported version to 1.3
Add property for oldest depecated language version in order to control unsupported ones
Report error on attempts to manually disable language feature from unsupported versions
Update test data, drop compatibility tests for features from unsupported versions

KT-36146 In progress
2020-01-29 21:40:44 +03:00
Sergey Igushkin 715e7e1a3c Downgrade Kotlin/Native version to 1.4-dev-14287 as latest published 2020-01-29 21:17:22 +03:00
Sergey Igushkin 30a9f0a875 Update versions.kotlin-native to 1.4-dev-14288 2020-01-29 21:04:48 +03:00
Vyacheslav Gerasimov a8650ccfd2 Set local build version to 1.4.255-SNAPSHOT
#KT-36128
2020-01-29 20:20:33 +03:00
Alexander Udalov f4912ed433 Minor, simplify JS-related build files a bit
* remove test roots in modules which have no tests
* 1.8 is already the default JVM target in the project
* replace compilation dependency on kotlin-reflect with runtime
2020-01-29 18:03:22 +01:00
Alexander Udalov d27bb76fd0 Remove dependency of serialization.js on cli
To break up compilation dependency of JS IR/WASM backends on JVM
backend.

 #KT-35854 Fixed
2020-01-29 18:03:22 +01:00
Alexander Udalov dcf6a2199a Generate JvmOverloads methods as final
#KT-33240 Fixed
2020-01-29 18:01:57 +01:00
Mads Ager 73aa36ca59 JVM: Add D8 check that class files can be dexed with D8.
This change adds D8 in addition to Dx which is being deprecated.
At some point after the official Dx deprecation, we should remove
the Dx checker.

Moving to D8 has the additional benefit that D8 can dex code
using java 8 features without using a separate desugaring tool.
2020-01-29 18:00:45 +01:00
Nicolay Mitropolsky 222ceb7698 Uast: fix for Lambda in place call identifiers (KT-35432) 2020-01-29 19:57:43 +03:00
Nicolay Mitropolsky ac3a8eb494 Uast: fixes for Enum identifiers (KT-35432) 2020-01-29 19:57:43 +03:00
Alexander Udalov 953b461c53 Add new compiler errors and flags when JVM compiles against JVM IR
From now on, the old JVM backend will report an error by default when
compiling against class files produced by the JVM IR backend. This is
needed because we're not yet sure that the ABI generated by JVM IR is
fully correct and do not want to land in a 2-dimensional compatibility
situation where we'll need to consider twice more scenarios when
introducing any breaking change in the language. This is generally OK
since the JVM IR backend is still going to be experimental in 1.4.

However, for purposes of users which _do_ need to compile something with
the old backend against JVM IR, we provide two new compiler flags:
* -Xallow-jvm-ir-dependencies -- allows to suppress the error when
  compiling with the old backend against JVM IR.
* -Xir-binary-with-stable-api -- allows to mark the generated binaries
  as stable, when compiling anything with JVM IR, so that dependent
  modules will compile even with the old backend automatically. In this
  case, the author usually does not care for the generated ABI, or s/he
  ensures that it's consistent with the one expected by the old compiler
  with some external tools.

Internally, this is implemented by storing two new flags in
kotlin.Metadata: one tells if the class file was compiled with the JVM
IR, and another tells if the class file is stable (in case it's compiled
with JVM IR). Implementation is similar to the diagnostic reported by
the pre-release dependency checker.
2020-01-29 17:20:41 +01:00
Kristoffer Andersen f262f61096 [JVM + IR] Fix Generic Signature Test Expectations 2020-01-29 17:14:41 +01:00
Mark Punzalan e226561150 [JVM IR] Copy metadata in IrFieldBuilder.
This fixes an issue with lateinit properties where the metadata from
the original field was not copied to the nullable field in
LateinitLowering. Also consolidated related tests.
2020-01-29 17:12:16 +01:00
Mikhael Bogdanov f5f25224b0 JVM_IR. Add IrAsmLikeInstructionListingTestGenerated tests 2020-01-29 17:00:00 +01:00
Mikhael Bogdanov 342ff50e31 Minor. Update test 2020-01-29 16:59:59 +01:00
Mikhael Bogdanov 1ecf9d407f JVM_IR. Align order of JvmOverload functions between backends 2020-01-29 16:59:58 +01:00
Mikhael Bogdanov 504d79577d JVM_IR. Align outer parameter name generation between backends 2020-01-29 16:59:57 +01:00
Mikhael Bogdanov 17e89fbbdb JVM_IR. Align synthetic parameter name generation across backends 2020-01-29 16:59:57 +01:00
Mikhael Bogdanov c42984ca33 Generate proper flags for <clinit> 2020-01-29 16:59:56 +01:00
Mikhael Bogdanov 6c07dbf351 JVM_IR. Support type annotations 2020-01-29 16:59:55 +01:00
Vyacheslav Gerasimov e4258e528f Introduce internal property sourceMapBaseDirs for Kotlin2JsCompile
Separate property needed to prevent Gradle snapshotting absolute paths
as inputs when passed as compiler argument.
To reduce property visibility to external users put it to the impl class
which will make it invisible in completion but still usable in Kotlin
build.
2020-01-29 18:15:31 +03:00
Abduqodiri Qurbonzoda b06645d1c0 Update number of reachable nodes because of MutableList.removeFirst/Last 2020-01-29 17:53:08 +03:00
Dmitriy Dolovov 9594b8db42 Rename Kotlin/Native modules for uniformity 2020-01-29 20:30:46 +07:00
Dmitriy Dolovov abd86107d1 Include :native:frontend.native into kotlin-compiler.jar 2020-01-29 20:30:40 +07:00
Dmitriy Dolovov 25ff33cc3c Update NativePlatformAnalyzerServices from Kotlin/Native repo 2020-01-29 20:30:35 +07:00
Dmitriy Dolovov b49e6ac581 Rename :kotlin-native:kotlin-native-library-reader to :native:frontend.native 2020-01-29 20:30:29 +07:00
Mikhail Glukhikh 53d50c935a [FIR] Do not use strict type equality in override checker 2020-01-29 15:58:12 +03:00