Commit Graph

219 Commits

Author SHA1 Message Date
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov 27968c8e13 Set proper jvmTarget for projects 2017-09-19 21:37:27 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov 61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Stanislav Erokhin e86d2f00ff Rename isImpl to isActual in descriptors 2017-09-15 18:25:49 +03:00
Stanislav Erokhin c8ee424f67 Rename isHeader to isExpect in descriptors 2017-09-15 18:25:41 +03:00
Dmitry Petrov 3bae430d49 Resolve lateinit variables
Do not report UNINITIALIZED_VARIABLE on lateinit variables
Provide delegating constructors for descriptors for compatibility.
2017-08-31 11:28:08 +03:00
Mikhail Glukhikh 3623f581b8 Eliminate a set of warnings, mostly nullability ones 2017-08-18 15:10:27 +03:00
Mikhail Glukhikh c5a81691fb Partial code cleanup: can be private and some others applied 2017-08-01 17:08:56 +03:00
Mikhael Bogdanov 27365dc4be Copy common utils from Native 2017-08-01 15:52:27 +02:00
Mikhail Glukhikh 951e8cd91a Code cleanup: unnecessary local variable applied 2017-07-21 18:58:48 +03:00
Alexander Udalov 41ea0e8ef8 Introduce AnnotationDescriptor.fqName
Could be used instead of ".annotationClass.fqName" to avoid the unneeded
resolution of the annotation class descriptor
2017-07-20 13:25:38 +03:00
Dmitry Petrov a687dea898 Introduce special IrDeclarationOrigin's for for-loop variables
FOR_LOOP_ITERATOR
 - temporary variable for for-loop iterator

FOR_LOOP_VARIABLE
 - `x` in `for (x in xs)`

FOR_LOOP_IMPLICIT_VARIABLE
 - temporary variable for for-loop with destructuring, e.g.:
   for ((x, y) in xys)
   =>
   for (tmp in xys) {
     val (x, y) = tmp
   }
2017-07-13 10:59:51 +03:00
Dmitry Petrov ae71833a12 Use original descriptors for functions when generating stubs
Descriptors for builtin class members on JVM are substituted.
2017-06-27 13:00:10 +03:00
Alexander Udalov e6001f57fa Remove dependency of module 'backend' on 'backend.jvm' and 'ir.tree'
This breaks the circular dependency between 'backend' and 'backend.jvm'
2017-06-06 19:55:06 +03:00
Dmitry Petrov 30182c38ce Fix toString and hashCode for array members of data classes
Generate them as special intrinsics that would be mapped to proper
platform-specific calls by BEs.

 #KT-16945 Fixed
2017-05-26 09:32:29 +03:00
Dmitry Petrov 425c66b0cd Separate stub generation for external dependencies from PSI2IR 2017-05-24 11:18:52 +03:00
Dmitry Petrov 952f53d37c Use DeclarationStubGenerator for built-ins initialization 2017-05-24 11:18:52 +03:00
Dmitry Petrov ec9427a36b Minor: make DeepCopySymbolsRemapper open 2017-05-24 11:18:52 +03:00
Dmitry Petrov 6fd762cfce Provide DeclarationStubGenerator as a separate class in IR utilities 2017-05-24 11:18:52 +03:00
Dmitry Petrov 7204a929f3 Move SymbolTable to common IR utilities 2017-05-24 11:18:52 +03:00
Dmitry Petrov 2cda5aaeb5 Additional customization for DeepCopyIrTreeWithSymbols
1. Allow overriding 'getNonTransformedLoop'
2. Allow descriptor remapping on deep copy
2017-05-19 14:49:34 +03:00
Dmitry Petrov b9dee7fcf3 Extract SymbolRemapper interface for DeepCopy customization 2017-05-19 14:49:34 +03:00
Dmitry Petrov e902cff937 Add 'getTypeArgumentOrDefault' extension for IrMemberAccessExpression 2017-05-05 09:59:30 +03:00
Dmitry Petrov f5fde2c24f Dump absent type arguments 2017-05-05 09:59:30 +03:00
Dmitry Petrov fdb4de355c Use original descriptors to create symbols for callable references 2017-05-05 09:59:30 +03:00
Dmitry Petrov d5feb2d6f4 Deep copy fixes + sanitize file names for module dumps 2017-05-04 13:51:17 +03:00
Dmitry Petrov b83620fdb9 Minor: DeepCopyIrTree: make some utility methods 'protected' 2017-05-04 09:33:03 +03:00
Dmitry Petrov e600a1af30 Minor: IrDeclarationOrigin.NEW_INSTANCE_RECEIVER -> INSTANCE_RECEIVER 2017-05-04 09:33:03 +03:00
Dmitry Petrov 7bd75df1f1 Minor: small refactorings in IrElementTransformerVoid 2017-05-04 09:33:03 +03:00
Dmitry Petrov fa4dc26814 Put 'thisReceiver' declaration in class
Interfaces also have 'thisReceiver'
2017-05-04 09:33:03 +03:00
Dmitry Petrov 90ec53b3b0 Generate catch-block body within proper scope 2017-05-04 09:33:03 +03:00
Dmitry Petrov acefd0d891 Minor refactor and fix in Scope constructors 2017-05-04 09:33:03 +03:00
Dmitry Petrov 54294eaaa7 Minor fix and deprecation in DeepCopyIrTree 2017-05-04 09:33:03 +03:00
Dmitry Petrov 4dd199fedf OldDeepCopyIrTree --> DeepCopyIrTree (for migration) 2017-05-04 09:33:03 +03:00
Dmitry Petrov 5ec9cb3171 OldDeepCopyIrTree: old DeepCopyIrTree working with new IrElement hierarchy 2017-05-04 09:33:03 +03:00
Dmitry Petrov b53807ab83 Drop IrBuiltinsOperatorsBuilder 2017-05-04 09:33:03 +03:00
Dmitry Petrov 9c3387e174 Deprecate IrMemberFunctionBuilder 2017-05-04 09:33:03 +03:00
Dmitry Petrov 6f2c8140cf IrDelegatingConstructorCall should have substituted descriptor 2017-05-04 09:33:03 +03:00
Dmitry Petrov a511540aad Render receivers as 'this@owner: type'
Add test for generic inner class with generic outer class.
2017-05-04 09:33:03 +03:00
Dmitry Petrov 57b2a4461c Call IrSymbol.bind in declaration constructors 2017-05-04 09:33:03 +03:00
Dmitry Petrov 208bf5c667 Bind declaration symbols in DeepCopyIrTree.
Check that symbols are bound.
2017-05-04 09:33:03 +03:00
Dmitry Petrov 2b0d3440ad Descriptors in calls are substituted,
and symbols refer to the original descriptors.
2017-05-04 09:33:03 +03:00
Dmitry Petrov d7a362b4f6 Binding: all current tests are green. 2017-05-04 09:33:03 +03:00
Dmitry Petrov 00e4accb7b Add 'isBound' property to IrSymbol 2017-05-04 09:33:03 +03:00
Dmitry Petrov 2b48908586 Local delegated properties implementation + some more fixes 2017-05-04 09:33:03 +03:00
Dmitry Petrov c9777fd79f Add symbols to references
TODO: fix some more tests
2017-05-04 09:33:03 +03:00
Dmitry Petrov 0595e93952 Use SymbolTable to create symbols for declarations
Introduce hierarchical sub-tables (for variables, type parameters, and value parameters).
First version passing all tests.
2017-05-04 09:33:03 +03:00
Dmitry Petrov 209864e6a3 Minor: fix IrFunctionImpl#accept 2017-05-04 09:33:03 +03:00
Dmitry Petrov f96a21e899 Redo IrSymbol as a light-weight declaration reference
Strip it of any "useful" information but a reference to the corresponding
symbol owner (file or a declaration).
TODO: add that useful information to declarations.

NB not all IrDeclarations have IrSymbols (IrProperty doesn't - at least now).
2017-05-04 09:33:03 +03:00