Commit Graph

64968 Commits

Author SHA1 Message Date
Mikhail Glukhikh f3e2dbf360 [FIR2IR] Add conversion of function annotations 2020-05-08 17:30:19 +03:00
Dmitry Gridin ad00d28631 TypingIndentation: add large test 2020-05-08 20:15:49 +07:00
Mikhail Zarechenskiy 36f6ccffde Add test for obsolete issue
#KT-38667 Obsolete
2020-05-08 15:42:43 +03:00
Alexander Udalov 91ef053fbc IR: keep local scope with counter maps across LDL invocations
Since LocalDeclarationsLowering is a BodyLoweringPass, local
functions inside one declaration are handled independently of local
functions in the other declaration. This can lead to name clashes, in
case a local function with the same name and signature is declared in
overloads in the same container, which results in a signature clash
error in JVM IR.

The issue became more common with the introduction of adapted function
references, where psi2ir generates a local adapter-function with a
predefined name, which can easily clash with another reference to the
same target in an overload. This led to a compilation error when
bootstrapping Kotlin with JVM IR, for example in GradleIRBuilder.kt
where there are a lot of references to the same function.
2020-05-08 14:33:34 +02:00
Dmitry Gridin 50506658c0 fix some tests for as36 2020-05-08 19:13:28 +07:00
Dmitriy Novozhilov ad09eb5416 [FIR] Add ability to rewrite attributes in FirDeclarationAttributes 2020-05-08 15:10:13 +03:00
Dmitriy Novozhilov 239837fd14 [FIR] Introduce FirDeclarationAttributes for FirDeclaration 2020-05-08 15:10:12 +03:00
Dmitriy Novozhilov b348ae689a [FIR] Introduce different implementations of ArrayMapOwner
- ComponentArrayOwner for services
- AttributeArrayOwner for attributes like userdata or type attributes
2020-05-08 15:10:12 +03:00
Dmitriy Novozhilov edd7d5b0b0 [FIR-TEST] Add tests of compiler plugin prototype to :firAllTest 2020-05-08 15:10:02 +03:00
Dmitriy Novozhilov 959ecceaf7 [FIR-PLUGIN] Move fir plugin prototype out from :compiler module 2020-05-08 15:10:02 +03:00
Dmitriy Novozhilov ab7613f6a4 [FIR-PLUGIN] Rename FirExtensionPoint to FirExtension 2020-05-08 15:10:02 +03:00
Dmitriy Novozhilov 4eb9eb0537 [FIR] Rename FirExtensionPoint to FirExtension
Also rename `FirExtensionPointService` to `FirExtensionsService`
2020-05-08 15:10:02 +03:00
Dmitriy Novozhilov a1e719a127 [FIR] Register extensions in CLI 2020-05-08 15:10:01 +03:00
Dmitriy Novozhilov 6af3b289a3 [FIR-PLUGIN] Add plugin key to allopen extensions 2020-05-08 15:10:01 +03:00
Dmitriy Novozhilov 78b8a7b388 [FIR] Store extensions by plugin key 2020-05-08 15:10:01 +03:00
Dmitriy Novozhilov e5365cec87 [FIR-PLUGIN] Change allopen plugin according to previous commit 2020-05-08 15:10:01 +03:00
Dmitriy Novozhilov fac57344a3 [FIR] Split plugin annotations for two groups. Introduce modes for meta annotations 2020-05-08 15:10:01 +03:00
Dmitriy Novozhilov 4022a57a4b [FIR-PLUGIN] Add simple implemetation of class generator extension point 2020-05-08 15:10:00 +03:00
Dmitriy Novozhilov 2b24317358 [FIR-PLUGIN] Add test with meta annotation in plugin 2020-05-08 15:10:00 +03:00
Dmitriy Novozhilov 343928b97e [FIR] Add proper extension key to FirExtensionPoint 2020-05-08 15:10:00 +03:00
Dmitriy Novozhilov 941e43a226 [FIR] Fix collecting annotations with meta annotations 2020-05-08 15:10:00 +03:00
Dmitriy Novozhilov b52452ef84 [FIR] Don't resolve annotation to error types on annotation phase 2020-05-08 15:10:00 +03:00
Dmitriy Novozhilov 17434c34b4 [FIR-PLUGIN] Enable lib with annotation in plugin tests 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov 7e5024fb88 [FIR-PLUGIN] Add lib with annotations for allopen plugin 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov 728e0604ac [FIR] Add prototype of first generation phase 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov b31981619e [FIR] Skip annotations resolve phase if no extensions registered 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov 4ed6d7fddb [FIR] Add stage for resolving annotations from plugins 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov f9c37cfa6c [FIR] Add transformAnnotationTypeRef to FirAnnotationCall 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov ab2177f8a4 [FIR] Extract withScopesCleanup from FirAbstractBodyResolveTransformer 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov bb645a7962 [FIR] Add transformSuperTypeRefs to FirClass 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov bad4497970 [FIR] Add transformDeclarations to FirFile 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov 4b580b4e06 [FIR] Refactor FirResolvePhase.requiredToLaunch 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov 3d30ba9c19 [FIR] Add ability to register user defined annotations for plugins 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov 8ecd3d8efe [FIR-PLUGIN] Fix allopen plugin due to previous commits 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov ab831179e2 [FIR] Add different modes for extensions and annotations 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov 8f293acb2e [FIR] Add prototype of declaring plugin annotations 2020-05-08 15:09:57 +03:00
Dmitriy Novozhilov d1b709e632 [FIR] Extract FirExtensionPointService to separate file 2020-05-08 15:09:57 +03:00
Dmitriy Novozhilov 35cce7eedd [FIR] Initialize extension service in all FIR tests 2020-05-08 15:09:57 +03:00
Dmitriy Novozhilov cb0a7a5bf7 [FIR] Rename FirExtensionRegistrarExtension to FirExtensionRegistrar 2020-05-08 15:09:57 +03:00
Dmitriy Novozhilov dd2b7f87f7 [FIR-PLUGIN] Add prototype of allopen plugin for FIR compiler 2020-05-08 15:09:56 +03:00
Dmitriy Novozhilov 9b43c66f80 [FIR] Add status transformer extension 2020-05-08 15:09:56 +03:00
Dmitriy Novozhilov 7f8a8ca099 [FIR] Add ability to register extension points in diagnostic tests 2020-05-08 15:09:56 +03:00
Dmitriy Novozhilov a37975ab21 [FIR] Add compiler extension for plugin registration 2020-05-08 15:09:56 +03:00
Dmitriy Novozhilov ff4a71386e [FIR] Register extension point component in fir sessions 2020-05-08 15:09:56 +03:00
Dmitriy Novozhilov 262d1472f2 [FIR] Add service for fir extension points 2020-05-08 15:09:56 +03:00
Mads Ager 1f4a3b0d1c [JVM_IR] Avoid safe-call conversions from Byte? and Short? to Int? for
comparisons.

Having those conversions leads to unnecesary boxing and null checks.

This change does it only for JVM in the optimization lowering. It
is unclear to me if the other backends can get away with something
similar.
2020-05-08 11:39:30 +03:00
Svyatoslav Kuzmich 3d5003d476 [JS_IR] Use new plugin to build Kotlin/JS stdlib with IR compiler
- Switch to building stdlib with bootstrap compiler since IR is stable
  enough
- Build stdlib with coreLibs by default
- Include JS IR stdlib to kotlin distribution
2020-05-08 10:37:48 +03:00
Sergey Rostov 14edc26cf1 Revert due to test failing in 201 2020-05-08 10:13:07 +03:00
Ilmir Usmanov 05797afaf8 Replace last SourceInterpreter with specific one in inliner
#KT-38489: Fixed
2020-05-07 23:04:03 +02:00
Ilmir Usmanov 2c88844409 Replace SourceInterpreter with interpreter, which track only
functional arguments.
2020-05-07 23:04:01 +02:00