Commit Graph

56291 Commits

Author SHA1 Message Date
Alexander Udalov 59ce76e9fd JVM IR: do not use misleading names for callable reference classes
The real JVM name is invented in InventNamesForLocalClasses and will be
used by the codegen when generating the actual class
2019-07-17 13:55:36 +02:00
Alexander Udalov 29fa1793d3 JVM IR: add InventNamesForLocalClasses pass 2019-07-17 13:55:36 +02:00
Alexander Udalov 529efff8cb IR: introduce IrAttributeContainer
This is useful to store data that must be kept when the element is
transformed, such as names of local/anonymous classes and
EnclosingMethod values on JVM which are computed before any lowerings.

For now, this is implemented very conservatively: the only field
`attributeOwnerId` which can be used in BackendContext implementation as
a key in the map
2019-07-17 13:55:36 +02:00
Alexander Udalov d399144b80 Use TypeSystemCommonBackendContext in mapBuiltInType 2019-07-17 13:55:36 +02:00
Alexander Udalov 13bc5f0c47 Use TypeSystemCommonBackendContext in computeExpandedTypeForInlineClass 2019-07-17 13:55:36 +02:00
Alexander Udalov c27d9c4546 Use TypeSystemCommonBackendContext in KotlinTypeMapper.writeGenericArguments 2019-07-17 13:55:36 +02:00
Alexander Udalov 2585ce0aa7 Introduce TypeSystemCommonBackendContext, use in KotlinTypeMapper.getVarianceForWildcard 2019-07-17 13:55:35 +02:00
Alexander Udalov 0460b2990f Use TypeSystemContext in KotlinTypeMapper.hasNothingInNonContravariantPosition
Thanks to this abstraction, this code will now easily work with
IrType-based TypeSystemContext implementation in the new IR type mapper
2019-07-17 13:55:35 +02:00
Alexander Udalov 1896537091 Minor, extract inline class type mapping to separate file 2019-07-17 13:55:35 +02:00
Alexander Udalov bd8c09bfb5 JVM IR: move CollectionToArray creation to JvmSymbols
Also simplify it to use IR builder DSL
2019-07-17 13:55:35 +02:00
Alexander Udalov 15e0fd93bd Minor, rename IrBuiltIns.IrTypeMapper -> BuiltInIrTypePair
To avoid name clash with the new IrTypeMapper in JVM backend
2019-07-17 13:55:35 +02:00
Alexander Udalov f9a1e582b2 Minor, somewhat simplify ClassCodegen construction 2019-07-17 13:55:35 +02:00
Alexander Udalov edaff968ad Minor optimization in MutableList.transformFlat 2019-07-17 13:55:35 +02:00
Ilya Gorbunov 945e058586 Document return value of removeAll and retainAll with predicate
#KT-32532 Fixed
2019-07-17 14:27:26 +03:00
Dmitry Gridin 7d173ed385 GradleBuildScript: throw exception when trying to change level of language features to disable in multiplatform & fix tests 2019-07-17 12:55:12 +03:00
Dmitry Gridin 0d49ffa831 UpdateConfigurationQuickFixTest: update tests 2019-07-17 12:55:12 +03:00
Dmitry Gridin cb432acfb7 BuildScriptManipulator: implement new syntax for enable experimental features in MPP
#KT-28295 Fixed
2019-07-17 12:55:12 +03:00
Dmitry Gridin 8887031962 GradleConfiguratorTest: fix configureJvmEAPWithBuildGradleKts test 2019-07-17 12:55:11 +03:00
Dmitry Gridin 46dfff7d82 KotlinBuildScriptManipulator: cleanup code 2019-07-17 12:55:11 +03:00
Dmitry Gridin b1d1a4b2e1 FeatureSupportIntentionActionsFactory: add the missing branch else 2019-07-17 12:55:11 +03:00
Dmitry Petrov 28215186ca IR serialization: migrate to new generated Java classes structure 2019-07-17 12:00:34 +03:00
Dmitry Petrov 8baa7dfe22 Generated Java classes for Kotlin IR protobuf 2019-07-17 12:00:34 +03:00
Dmitry Petrov 2305bea2b5 Generate IR protobuf classes as multiple Java files
Otherwise KotlinIr.java becomes too big for IDEA to swallow in the
default configuration.
2019-07-17 12:00:34 +03:00
Dmitry Petrov d6eee37481 GenerateProtoBuf: support java_multiple_files mode 2019-07-17 12:00:34 +03:00
Anton Yalyshev 19dfbfa42c Cleanup: make comments more informative 2019-07-17 10:58:57 +03:00
Anton Yalyshev 1cdcde86e3 Extract adding of sourceSets to subclass, cause superclass is also used in other wizards where this procedure breaks build.gradle
#KT-32105 Fixed
2019-07-17 10:58:39 +03:00
Anton Yalyshev 5b66063650 Add clarifications about single/multi targeting to framework descriptions 2019-07-17 10:58:13 +03:00
Anton Yalyshev a864715cb8 Refactoring: extract and pull up duplicated code from JVM- and JS- related subclassed 2019-07-17 10:57:22 +03:00
Anton Yalyshev 9d6367a9be Add Kotlin/MPP to Gradle group of New Project Wizards #KT-32105 Fixed 2019-07-17 10:57:04 +03:00
Mikhail Glukhikh 7ccf21c5c8 FIR resolve: fix vararg parameter types 2019-07-17 10:45:07 +03:00
Mikhail Glukhikh 592cf4f4e8 Make FirNamedReferenceWithCandidate not resolved, fix receiver completion
Counting it as resolved provokes a lot of difficult to discover errors
2019-07-17 10:45:06 +03:00
Mikhail Glukhikh 08f44d4f14 FIR resolve: add early protection against cyclic property resolve 2019-07-17 10:45:06 +03:00
Simon Ogorodnik 1222449dc8 FIR resolve: perform inference completion for property access 2019-07-17 10:45:06 +03:00
Mikhail Glukhikh 99680a2ad7 FIR: refactor & simplify invoke resolve a bit 2019-07-17 10:45:06 +03:00
Mikhail Glukhikh fff954ed3f FIR: skip extra non-valid groups during candidate resolve 2019-07-17 10:45:06 +03:00
Mikhail Glukhikh b813f22cfe Extract part of utility FIR transformers into TransformUtils 2019-07-17 10:45:05 +03:00
Mikhail Glukhikh 0ac23eef93 Minor (FIR resolve): replace session with fileSession 2019-07-17 10:45:05 +03:00
Simon Ogorodnik 3da11cc85b Use no-op substitutor instead of substitutor with empty map 2019-07-17 10:45:05 +03:00
Mikhail Glukhikh 2d74dac4f2 FIR: set constructor parameter scope correctly for designated transformer 2019-07-17 10:45:05 +03:00
Mikhail Glukhikh b8c3947827 Measure unresolved function call & qualified access # in FIR bench 2019-07-17 10:45:05 +03:00
Roman Artemev af45e1c5dc [JS BE] Do not produce source mapping for fake KtElement
Fix [KT-26701], [KT-12935]
2019-07-17 10:21:34 +03:00
Anton Yalyshev 12736edfc1 Revert "Add Kotlin/MPP to Gradle group of New Project Wizards #KT-32105 Fixed"
This reverts commit 6b3117cc
2019-07-16 18:10:49 +03:00
Anton Yalyshev eb608770e7 Revert "Refactoring: extract and pull up duplicated code from JVM- and JS- related subclassed"
This reverts commit f742e000
2019-07-16 18:10:19 +03:00
Anton Yalyshev 067978e613 Revert "Add clarifications about single/multi targeting to framework descriptions"
This reverts commit 101a3a94
2019-07-16 18:09:47 +03:00
Dmitry Gridin b1e371a2dd MPP: don't return Main modules from implementedModules for Test modules
#KT-28529 Fixed
#KT-30799 Fixed
2019-07-16 17:08:42 +03:00
Dmitry Gridin 60421c441e IDE: add warn on java files outside java source roots
#KT-28121 Fixed
2019-07-16 17:07:31 +03:00
Dmitry Gridin 4928f3ff57 CreateExpectedFix: fix KNPE from init block
#KT-32639 Fixed
2019-07-16 17:06:36 +03:00
Alexander Udalov f38e4d618e Support Array::class literal, forbid Array<X>::class on non-JVM
#KT-31230 Fixed
2019-07-16 15:57:26 +02:00
Alexander Udalov 8103f0ba60 Fix compilation in AbstractAndroidBytecodeShapeTest.kt 2019-07-16 15:51:30 +02:00
Mikhael Bogdanov 496765f41e Support target templates in bytecode tests
Avoid test data duplication
2019-07-16 14:08:27 +02:00