Dmitry Petrov
146f0f4904
JVM_IR KT-41214 emit PermittedSubclasses on JDK17+
2021-10-09 17:07:35 +03:00
Roman Artemev
2ca74174d3
[JS IR] Nullify body of declaration on it shouldn't be loaded
2021-09-30 14:30:13 +03:00
Roman Artemev
398b545801
[JS IC] Rollback hack
2021-08-06 20:49:17 +03:00
Roman Artemev
15648da2b4
[PIR] Use simple fast hashCode
2021-08-06 20:49:12 +03:00
Roman Artemev
b1eeb1fb27
[JS IC] Don't persist temporary copies of inline functions
...
- drop special `IrValueParameterPublicSymbol`
- drop special `IrAnonymousInitializerPublicSymbolImpl`
- drop hacky `useGlobalSignatures`
2021-08-06 20:49:06 +03:00
Anton Bannykh
20088994c1
JS IC: IC lowerings prototype
2021-07-22 21:56:55 +03:00
Anton Bannykh
76f0684d7c
IR: .isBound API for F/O declarations
...
Fake override functions and properties may not be bound to symbols.
This API allows to know if such declaration is actually bound
2021-07-22 21:56:47 +03:00
Anton Bannykh
bd4e7ffef8
JS PIR: store signatures for lowered declarations inside PIR declarations
2021-06-27 22:56:33 +03:00
Dmitry Petrov
53c1de172f
IR KT-46578 add IrProperty#overriddenSymbols
2021-05-14 16:20:18 +03:00
Alexander Udalov
54befa769f
IR: add IrClass.getInlineClassRepresentation, serialize/deserialize it
...
The change in FirDeclarationUtil is needed because in case of unsigned
types loaded from the standard library, the primary constructor for some
reason is not the first, but the second in the list of constructors.
2021-05-13 13:56:59 +02:00
Anton Bannykh
ba80086ae3
JS PIR generator: eliminate deprecated String.capitalize
2021-04-14 21:04:39 +03:00
Anton Bannykh
afaf3b5e28
JS PIR: replace deprecated toLowerCase with lowercase
2021-04-13 14:20:00 +03:00
Anton Bannykh
923303c2c1
JS PIR: move PIR proto messages to a separate file
2021-04-09 19:54:23 +03:00
Anton Bannykh
1e822aa28a
JS PIR: carrier serializer implementation
2021-04-09 19:54:20 +03:00
Anton Bannykh
c97066527c
JS PIR: carrier serializer / deserializer
2021-04-09 19:54:19 +03:00
Anton Bannykh
5de04f49ca
JS PIR: updated declarations
2021-04-09 19:54:17 +03:00
Anton Bannykh
1f0d83b420
JS PIR: update the generator
...
- Use symbols in carriers
- .proto messages for carriers
- carrier serializer/derserializer
2021-04-09 19:54:16 +03:00
Anton Bannykh
87f3ca3f36
IR: make isExternal immutable
2021-03-02 14:30:18 +03:00
Anton Bannykh
027f656790
JS IR: make PIR Carriers immutable
2021-03-02 14:30:15 +03:00
Anton Bannykh
c06b345f3c
Hide stageController into the IrFactory
2021-02-17 10:42:50 +03:00
Anton Bannykh
97080c49fc
Persistent IR generator
...
Goal:
- avoid hand-writing the boilerplate
- easier PIR evolution
Output is reasonably close the hand-writtern version
2021-02-17 10:42:50 +03:00
Anton Bannykh
8a0ce20d43
PIR: minor restructuring
2021-02-17 10:42:50 +03:00
Svyatoslav Kuzmich
2a424ad2af
[IR] Make isExternal mutable and accessible via common interface
...
JS IR: Mark all effectively external declarations as external to access it
directly instead of computing it every time
2021-02-04 16:15:33 +03:00
Georgy Bronnikov
c5961da780
IR: remove WrappedDescriptors altogether
2020-12-23 18:50:52 +03:00
Georgy Bronnikov
b07dccb8d7
Fir2IR: remove wrapped descriptors
2020-12-23 18:50:52 +03:00
Mads Ager
5d9e86863a
[IR] Make isHidden and isAssignable explicit on IrValueParameter.
...
There were a couple of places where they were confused and
isAssignable was passed as a positional parameter in the position
of isHidden.
2020-12-04 17:04:45 +01:00
Zalim Bashorov
2c1e4c1769
[IR] Use more specific type (IrSimpleFunction) for accessors in IrLocalDelegatedProperty
2020-11-05 22:25:05 +03:00
Mads Ager
1f2ca606a5
[IR] Add isAssignable property to IrValueParameter.
...
Use it to check that only the value parameters that are explicitly
marked assignable are assigned.
Currently, the only parameters marked assignable are those for
default argument stubs.
2020-10-06 21:47:29 +02:00
Alexander Udalov
2573eaa77f
IR: do not crash renderer on functions with uninitialized return type
...
This is a follow-up to b497f39c29 . It
turns out that it didn't help because `IrFunction.returnType` throws
exception, and checking for `IrUninitializedType` in `IrType.render` was
already too late. Throw and catch specific exception instead.
Also add function name into the exception message for better diagnostics
elsewhere (can't compute the full FQ name because in cases like
KT-42020, the parent is also uninitialized).
2020-10-06 14:23:34 +02:00
Alexander Udalov
06f1bd6101
Reformat IR tree declarations and implementations
...
Most of the changes are to the incorrect formatting introduced in
d1fd1da56f .
2020-10-06 14:21:40 +02:00
Georgy Bronnikov
df1d9a0113
IR: make IrTypeParameter.superTypes persistent mutable field
2020-09-22 23:53:39 +03:00
Georgy Bronnikov
a409976d28
IR: make IrValueParameter.varargElementType mutable
2020-09-22 23:53:39 +03:00
Georgy Bronnikov
a3763e8276
IR: make IrTypeAlias.expandedType mutable
2020-09-22 23:53:39 +03:00
Georgy Bronnikov
78fc690f29
IR: make IrLocaldelegatedProperty.type mutable
2020-09-22 23:53:39 +03:00
Georgy Bronnikov
d9681e535d
IR: make IrField.type mutable
2020-09-22 23:53:39 +03:00
Georgy Bronnikov
5065b1a4c6
Make IrValueDeclaration.type mutable
2020-09-22 23:53:38 +03:00
Roman Artemev
f01941d1dd
[IR] Support isHidden is IrFactory API
...
- add API to create a hidden value parameter
2020-09-17 00:57:16 +03:00
Roman Artemev
79e2886da1
[IR] Add isHidden flag into IrValueParameter
2020-09-17 00:57:15 +03:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00
Alexander Udalov
9d81e50128
IR: undeprecate IrUninitializedType
...
It's no longer a temporary hack, see the comment.
2020-08-27 18:02:04 +02:00
Alexander Udalov
a810dbb41b
IR: fix compiler warnings
2020-08-18 10:33:25 +02:00
Alexander Udalov
08a35f0674
IR: make IrBody and subtypes classes
2020-08-11 14:41:57 +02:00
Georgy Bronnikov
dafcdc527d
IR: propagate original declaration info via attributeOwnerId
...
For IrProperty, IrSimpleFunction we need to pass information about
original declaration to JVM_IR codegen. Instead of descriptors, use
the attributeOwnerId field.
2020-08-10 10:16:23 +03:00
Georgy Bronnikov
04d93dfbce
IR: move containerSource from descriptor to IrFunction, IrProperty
2020-08-10 10:16:23 +03:00
Alexander Udalov
771e7574f4
IR: make subtypes of IrDeclaration classes
2020-08-06 17:08:03 +02:00
Alexander Udalov
9152df4702
PIR: transform base implementation classes to interfaces
...
Unfortunately this requires a lot of boilerplate, but is a requirement
for transforming the main IR element hierarchy interfaces
(IrDeclaration, IrClass, ...) to classes.
2020-08-06 16:46:26 +02:00
Alexander Udalov
f240d51d2c
IR: do not inherit IrFakeOverride* from IrFunction/IrProperty
...
This will help to reduce boilerplate after making the latter classes.
Without this change, IrFunctionCommonImpl would not be able to be a
class because it would introduce a diamond class hierarchy, and thus
that would require copying all its contents to IrFunctionImpl and
IrFakeOverrideFunctionImpl.
2020-07-28 19:05:12 +02:00
Alexander Udalov
0909894a96
PIR: make most implementations and carriers internal
2020-07-28 19:04:44 +02:00
Alexander Udalov
77247deb23
IR: add module ir.tree.persistent, copy PIR implementation there
...
Use PersistentIrFactory in JS IR compiler entry points.
2020-07-28 19:04:43 +02:00