Roman Artemev
a52e045c91
[IR BE] Remap references in default arg value in inner class constructor
...
Make sure that there is no reference into zombie declarations.
- fix KT-40771
- add test
2020-10-06 00:06:47 +03:00
Roman Artemev
f597585ffb
[IR BE] Refactor DefaultArgumentStubGenerator a bit
2020-10-06 00:06:46 +03:00
Georgy Bronnikov
b0b971cd0a
IR: Remove unused class
2020-10-05 11:02:12 +03:00
Georgy Bronnikov
80b7194799
IR: remove KotlinType usage from Ir.kt
2020-10-05 11:02:12 +03:00
Georgy Bronnikov
7afad9a91d
Use wrapped descriptors in IrReturnableBlock
2020-10-05 11:02:12 +03:00
Georgy Bronnikov
38ee182f51
IR: remove unused AbstractClosureAnnotator
2020-10-05 11:02:11 +03:00
LepilkinaElena
dc2845df10
[IR] Avoid extra lists creation during getting explicit/all parameters ( #3769 )
2020-10-01 21:19:40 +03:00
Dmitry Petrov
af86c52101
JVM_IR merge annotations when substituting types
...
Otherwise special annotations such as @EnhancedNullability are lost,
which affects JVM signatures.
KT-42330
2020-09-30 15:44:54 +03:00
Steven Schäfer
3a7cc93c4e
JVM IR: More precise check for calls to the implementation method in a default stub
2020-09-24 07:53:31 +02:00
Roman Artemev
76ed09482f
[IR BE] Fix inline class lowering
...
- provide additional type parameters from context when transforming
constructor into static function.
- fix KT-41771
- add test
2020-09-23 14:49:38 +03:00
Georgy Bronnikov
9d22ef948c
IR: rework ScopeValidator
2020-09-22 23:53:41 +03:00
Georgy Bronnikov
377940a6ea
IR: handle IrVararg.varargElementType in RemapTypes
2020-09-22 23:53:41 +03:00
Georgy Bronnikov
a542bb6af7
IR: check IrClassReference.classType in ScopeValidator
2020-09-22 23:53:41 +03:00
Georgy Bronnikov
728c55973a
IR: handle MemberAccessExpression type parameters in RemapTypes
2020-09-22 23:53:41 +03:00
Georgy Bronnikov
3041a2815c
IR: handle varargElementType in LocalDeclarationsLowering
2020-09-22 23:53:41 +03:00
Georgy Bronnikov
67d7bf3269
IR: take care of supertypes when copying IrTypeParameters
2020-09-22 23:53:40 +03:00
Georgy Bronnikov
916d66c220
IR: add ScopeValidator
2020-09-22 23:53:40 +03:00
Georgy Bronnikov
33a2c69122
IR: remap types in LocalDeclarationsLowering
2020-09-22 23:53:40 +03:00
Georgy Bronnikov
df1d9a0113
IR: make IrTypeParameter.superTypes persistent mutable field
2020-09-22 23:53:39 +03:00
Georgy Bronnikov
5065b1a4c6
Make IrValueDeclaration.type mutable
2020-09-22 23:53:38 +03:00
Dmitry Petrov
c03573fc18
JVM_IR fix override equivalence check for collection stub generation
...
KT-42043 KT-42033
2020-09-22 15:26:34 +03:00
Roman Artemev
1da2830e2b
[IR] Support hidden parameters in ir builder
2020-09-17 00:57:16 +03:00
Igor Chevdar
e39ce91253
[IR] Fixed fake override builder for lowerings
2020-09-11 09:35:01 +05:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00
Roman Artemev
c7b57c0fb3
[IR] Use only empty constructor to create WrappedDescriptor
2020-09-01 17:08:11 +03:00
Roman Artemev
fd88914cf9
[IR] Remove some descriptor usage from Common/JS/JVM backends
...
- replace descriptor-based builders with pure IR ones
- fix matchers
- fix Ir2Js
- rewrite some inliner-helpers to pure-IR implementations
2020-09-01 17:08:11 +03:00
Roman Artemev
4dca3715fa
[JS IR | IR] Implement error element lowering to support compilation with errors
2020-09-01 14:53:08 +03:00
Igor Chevdar
5e71068e61
[IR] Handled degenerate cases of IrStringConcatenation
...
It is not needed to create StringBuilder if the number of values
being concatenated is 0 or 1
2020-09-01 11:34:17 +05:00
Alexander Udalov
1e712f8398
IR: remove IrElementVisitorVoidWithContext
...
It was only used as a superclass in IrInlineReferenceLocator and
LocalDeclarationsLowering. In both cases it's clearer and more optimal
to pass the necessary data via the visitor 'data' variable.
2020-08-31 12:47:54 +02:00
Igor Chevdar
ab54e43b00
[IR] Commonized SAM equals/hashCode builder
2020-08-31 12:01:29 +05:00
Steven Schäfer
b02f0f0a25
JVM IR: Fix compilation of nested inner classes
2020-08-28 20:03:19 +02:00
Dmitriy Novozhilov
a764732020
Rename KotlinBuiltInsNames to StandardNames
2020-08-25 10:41:33 +03:00
Dmitriy Novozhilov
7a7fe77b8e
Move static constants with builtin names to :core:descriptors.common module
2020-08-25 10:31:36 +03:00
Mark Punzalan
a9359eb530
RangeContainsLowering: Handle unsigned ranges.
2020-08-21 21:15:27 +02:00
Mark Punzalan
ceba9f231d
RangeContainsLowering: Fix bug in additional condition order for
...
`until` ranges.
2020-08-21 21:15:27 +02:00
Mark Punzalan
60a2f7d03f
RangeContainsLowering: Handle Comparable ranges.
2020-08-21 21:15:27 +02:00
Mark Punzalan
1c1b1b4b0f
Initial version of RangeContainsLowering, which optimizes calls to
...
contains() on ClosedRanges.
2020-08-21 21:15:27 +02:00
Dmitry Petrov
8f0aecce58
JVM_IR: KT-40330 Unify field names for captured 'this' with JVM
...
NB some cases such as captured extension receiver for an extension
lambda are not supported yet; to be discussed, to what extent should we
actually follow JVM code shape here.
2020-08-19 11:07:41 +03:00
Alexander Udalov
a810dbb41b
IR: fix compiler warnings
2020-08-18 10:33:25 +02:00
Alexander Udalov
9b94e073af
Fix warnings related to OptIn/UseExperimental
2020-08-17 21:18:19 +02:00
Alexander Udalov
256f4449ce
IR: annotate obsolete API in IrPluginContext with ObsoleteDescriptorBasedAPI
2020-08-17 21:18:19 +02:00
Alexander Udalov
9961bd1fe1
IR: remove unneeded casts after making IrCall's symbol a simple function
2020-08-17 21:18:17 +02:00
Steven Schäfer
0328fcaf5d
JVM IR: Avoid IMPLICIT_NOTNULL checks on special bridge methods
...
...with dynamic type checks, except for the `@PlatformDependent`
methods, for which the JVM backend adds null checks.
2020-08-14 21:59:33 +02:00
Alexander Udalov
469b164555
IR: minor optimizations to IR validation
2020-08-14 21:55:37 +02:00
Alexander Udalov
9607414cf1
IR: make allOverridden return Set instead of Sequence, move to IrUtils
...
This doesn't hurt performance, but improves stack traces, in particular
in JVM's BridgeLowering.
2020-08-14 21:55:37 +02:00
Alexander Udalov
adcfbdec24
JVM IR: optimize special method / signature computation in BridgeLowering
...
First of all, put method signature caches of BridgeLowering into
JvmBackendContext. Since method hierarchies can span several files, and
a new instance of BridgeLowering is created to lower each file, keeping
them cached for the whole module makes BridgeLowering faster.
Also, do not attempt to compute special bridges if the method is
irrelevant, which can be deduced by its name. With this optimization,
the special method cache is no longer needed.
This brings BridgeLowering time from 3.8% down to 1.5% of all compiler
time on a sample project.
2020-08-14 21:55:37 +02:00
Alexander Udalov
6db5ad7310
IR: remove cast to IrStatement in IrDeclarationBase.transform
...
Default implementation of `IrStatement.transform` contained a cast to
`IrStatement`. Since almost all IR elements inherit from IrStatement,
this implementation was used in many subclasses. However, checkcast to
interface is slow and this place was indeed noticeable in the profiler
snapshot. Since not that many places really expected to get IrStatement
out of IrStatement.transform, introduce a new method
`transformStatement` that does this cast, and use it in all those
places. Meanwhile, most implementations will use the IrElement's
implementation of `transform` which merely invokes `accept` without
casts.
2020-08-14 21:55:37 +02:00
Alexander Udalov
fb8e39a621
IR: optimize transformation of declarations/statements lists in-place
...
Also, inherit IrDeclarationBase from IrElementBase to be able to use a
cast to IrElementBase, which is faster than a cast to IrElement or
IrDeclaration.
2020-08-14 21:55:36 +02:00
Georgy Bronnikov
18ae665d41
IR: make IrCall take IrSimpleFunctionSymbol
2020-08-12 16:31:31 +03:00
Alexander Udalov
ba7ff36274
IR: make IrDeclarationReference and subtypes classes
2020-08-11 14:41:56 +02:00