Commit Graph

6130 Commits

Author SHA1 Message Date
Dmitry Petrov ec2cfd2389 AbstractClosureAnnotator for IR. 2016-10-18 09:09:02 +03:00
Dmitry Petrov ceeccfa1b7 Properties without accessors are generated as
IrGetBackingField / IrSetBackingField expressions.
2016-10-18 09:09:01 +03:00
Dmitry Petrov 513ef0c1c8 Add test for SAM adapter. 2016-10-18 09:09:00 +03:00
Dmitry Petrov d623c70778 Handle break/continue in loop header (condition for 'while', range for 'for'). 2016-10-18 09:08:59 +03:00
Dmitry Petrov 4cc5fb7454 Always generate temporary variables for receivers in a property compound assignment
(emulate 'resolve' behavior).
2016-10-18 09:08:57 +03:00
Dmitry Petrov 28b3ea27f3 Generate explicit call to 'Any()' if no superclass found.
Generate call super-constructor calls as IrDelegatedConstructorCall.
2016-10-18 09:08:57 +03:00
Dmitry Petrov 5cb7566975 Psi2IR acceptance test (failing). 2016-10-18 09:08:54 +03:00
Dmitry Petrov fe397eddbe Handle erroneous code (initial drop, TBD). 2016-10-18 09:08:53 +03:00
Dmitry Petrov 3c0cce4c48 Reflection literals (no bound member references yet). 2016-10-18 09:08:52 +03:00
Dmitry Petrov f2e778d2d0 Some more tests. 2016-10-18 09:08:51 +03:00
Dmitry Petrov 42988383e0 Local delegated properties. 2016-10-18 09:08:50 +03:00
Dmitry Petrov e42116bb6a Delegated implementations for properties and extension properties. 2016-10-18 09:08:50 +03:00
Dmitry Petrov 2438876173 Implementing interface by delegation: creating delegates in class. 2016-10-18 09:08:49 +03:00
Dmitry Petrov 264c8afc78 Type aliases. 2016-10-18 09:08:48 +03:00
Dmitry Petrov 1b5dd50359 Represent class instance initialization "as from resolve". 2016-10-18 09:08:48 +03:00
Dmitry Petrov 759f0168c2 Delegated properties. 2016-10-18 09:08:47 +03:00
Dmitry Petrov 865d2c43c7 Default arguments stored in function declarations. 2016-10-18 09:08:46 +03:00
Dmitry Petrov bd76e39a8c Enum entries generation (no underlying classes yet) 2016-10-18 09:08:44 +03:00
Dmitry Petrov 1022725fd1 Data class members generation.
Builder-style API for desugaring expressions.
2016-10-18 09:08:42 +03:00
Dmitry Petrov dc169e98d5 Local classes. 2016-10-18 09:08:42 +03:00
Dmitry Petrov 41d772d636 Object literal expressions. 2016-10-18 09:08:41 +03:00
Dmitry Petrov 86a52e6426 Character literals and string templates. 2016-10-18 09:08:41 +03:00
Dmitry Petrov 7adf173a66 Add tests for companion objects and various kinds of classes
(no representation for enum entries yet).
2016-10-18 09:08:39 +03:00
Dmitry Petrov a6bee7a22b Generate delegating constructor calls as IrDelegatingConstructorCall expressions
(they have different platform-level representation in JVM and JS).
2016-10-18 09:08:39 +03:00
Dmitry Petrov b3f605c4c4 Generate synthetic getter & setter descriptors for static properties in Java classes
(recognized as properties defined in classes without dispatchReceiver and extensionReceiver).
Fix 'when' generation for else-only case.
2016-10-18 09:08:37 +03:00
Dmitry Petrov 05b9eda809 Generate "raw" IR in Psi2IrTranslator. 2016-10-18 09:08:37 +03:00
Dmitry Petrov 8528c23194 Constructors represented "as in Java".
TODO: extract nested initializers somehow.
2016-10-18 09:08:35 +03:00
Dmitry Petrov 57c1b3e0e2 '!!' operator 2016-10-18 09:08:34 +03:00
Dmitry Petrov 92a7ecfac7 Render return target for IrReturn in tests.
Add tests for non-local returns from lambdas.
2016-10-18 09:08:34 +03:00
Dmitry Petrov e459105128 Primary constructor generation. 2016-10-18 09:08:34 +03:00
Dmitry Petrov 225d792939 Secondary constructors in classes. 2016-10-18 09:08:33 +03:00
Dmitry Petrov ac80195597 Anonymous function expressions ('fun(...) { ... }') and local functions (no closures yet). 2016-10-18 09:08:33 +03:00
Dmitry Petrov 83c3bdd788 Lambda expressions (no closures yet). 2016-10-18 09:08:32 +03:00
Dmitry Petrov 0b647ac358 Basic class members generation.
Split testData into 'classes' and 'expressions'.
2016-10-18 09:08:32 +03:00
Dmitry Petrov b17e3b0299 Varargs. 2016-10-18 09:08:30 +03:00
Dmitry Petrov be86739d3a IrBlockBody
Change block typing contract.
2016-10-18 09:08:29 +03:00
Dmitry Petrov dc4bb3015c Inline safe call chains. 2016-10-18 09:08:27 +03:00
Dmitry Petrov 3f256fab67 Variable as function calls. 2016-10-18 09:08:27 +03:00
Dmitry Petrov b3407de1e6 Array access expression. 2016-10-18 09:08:26 +03:00
Dmitry Petrov 17758d8c00 'try' 2016-10-18 09:08:24 +03:00
Dmitry Petrov c79b9c12d6 'throw' 2016-10-18 09:08:24 +03:00
Dmitry Petrov 4709aaafaa 'for' 2016-10-18 09:08:23 +03:00
Dmitry Petrov 03a666690b 'break' & 'continue' 2016-10-18 09:08:23 +03:00
Dmitry Petrov 87c7b4834b 'while' & 'do-while' loops 2016-10-18 09:08:22 +03:00
Dmitry Petrov 594a553a04 Safe calls. 2016-10-18 09:08:21 +03:00
Dmitry Petrov 985f3b20c7 Unary operators. 2016-10-18 09:08:21 +03:00
Dmitry Petrov b96626fd4c When expression.
Fix object & enum references.
2016-10-18 09:08:17 +03:00
Dmitry Petrov d6040d8570 Type operators. 2016-10-18 09:08:17 +03:00
Dmitry Petrov 5709826096 Refactoring.
'if' expressions (represented as 'when' without subject).
2016-10-18 09:08:16 +03:00
Dmitry Petrov 1ddf889d8a Comparisons:
- for primitive types and kotlin.String, use IrBinaryOperatorExpression
- for others, use call to 'compareTo'
2016-10-18 09:08:16 +03:00