Dmitry Petrov
703d3405ed
Generate class members (functions, properties, nested classes).
2016-10-18 09:08:31 +03:00
Dmitry Petrov
19e95d232a
Classes & type aliases, initial import.
2016-10-18 09:08:31 +03:00
Dmitry Petrov
b17e3b0299
Varargs.
2016-10-18 09:08:30 +03:00
Dmitry Petrov
d45811a5da
Empty loops.
2016-10-18 09:08:30 +03:00
Dmitry Petrov
179a06672b
IrExpression.type is no longer nullable.
...
Change expression typing contract.
2016-10-18 09:08:29 +03:00
Dmitry Petrov
be86739d3a
IrBlockBody
...
Change block typing contract.
2016-10-18 09:08:29 +03:00
Dmitry Petrov
8bef05703e
Inline rematerializable safe call receivers.
2016-10-18 09:08:28 +03:00
Dmitry Petrov
1ff12b4cb6
Loops and break/continue can have labels (as strings) (for KJS & other transpilers).
2016-10-18 09:08:28 +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
54e6bbd007
Don't introduce additional variables for simple array assignment.
2016-10-18 09:08:26 +03:00
Dmitry Petrov
abb106c885
Fix operator markup for '!==' and '!in'.
2016-10-18 09:08:25 +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
8bba49cba6
Block expressions & types.
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
97593fa19e
Make 'when' great again.
2016-10-18 09:08:20 +03:00
Dmitry Petrov
f787f8ecbf
Refactor desugaring (& operator conventions generation), step 1.
2016-10-18 09:08:20 +03:00
Dmitry Petrov
c0d521266b
Use ternary 'if' for 'when' (and also '||' as ',' in 'when').
2016-10-18 09:08:20 +03:00
Dmitry Petrov
70dfb75f82
Shrinking IR: GetProperty / SetProperty expressions are now generated as calls.
2016-10-18 09:08:19 +03:00
Dmitry Petrov
de5181d642
More tests for 'when'
2016-10-18 09:08:18 +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
Dmitry Petrov
ace98b91cc
Handle infix function calls in binary expressions.
2016-10-18 09:08:16 +03:00
Dmitry Petrov
3614b0a06c
Generate IMPLICIT_NOTNULL for (nullability flexible type) -> (non-null type) implicit conversion.
2016-10-18 09:08:15 +03:00
Dmitry Petrov
2b6171057e
Fix type of increment/decrement for array element.
...
Minor cleanup.
2016-10-18 09:08:15 +03:00
Dmitry Petrov
64d630faa3
Detailed "operator" convention information (for JS).
2016-10-18 09:08:14 +03:00
Dmitry Petrov
4a62a6b7c3
Prefix increment / decrement.
...
Refactor IrLValue.
2016-10-18 09:08:14 +03:00
Dmitry Petrov
8de21aadfa
'?:' (currently represented as binary expression with operator ELVIS)
2016-10-18 09:08:13 +03:00
Dmitry Petrov
0d94c3aeb4
'in' and '!in' operators.
2016-10-18 09:08:12 +03:00
Dmitry Petrov
96e3c52878
Equality and identity operators.
2016-10-18 09:08:12 +03:00
Dmitry Petrov
db5843adc8
Desugar comparison operators as IrBinaryOperatorExpression.
...
They are not exactly 'compareTo' calls (although annotated with a related 'compareTo' function),
and require special treatment in BEs.
2016-10-18 09:08:11 +03:00
Dmitry Petrov
1b018a6ead
Desugar basic binary operators (+, -, *, /, %, ..).
...
Fold String.plus calls to IrStringConcatenationExpression.
2016-10-18 09:08:11 +03:00
Dmitry Petrov
287d804131
Rematerialize simple expressions (local variables, literals, $this, $receiver) when generating calls.
2016-10-18 09:08:11 +03:00
Dmitry Petrov
c1583c4368
Complex augmented assignment test.
...
Fix string literal creation for empty string template.
2016-10-18 09:08:10 +03:00
Dmitry Petrov
64d7a97145
IR, testing framework: if no tree labels were provided in source file, use default golden file.
2016-10-18 09:08:10 +03:00
Dmitry Petrov
888b1685ed
Introduce name hints for temporary variables.
...
Split IrValue.kt into a subpackage.
2016-10-18 09:08:09 +03:00
Dmitry Petrov
d7412c449e
IR: augmented assignment for array access expressions
2016-10-18 09:08:07 +03:00
Dmitry Petrov
0a57eb8ea4
IR:
...
- smart casts handling separated from expression generation
- improved infrastructure for desugaring
2016-10-18 09:08:07 +03:00
Dmitry Petrov
ecf6ab9e25
IR:
...
- Redo smart casts handling (yet again).
Front-end typing information can't be used for expressions in IR,
since it provides inferred type for PSI expressions for the last corresponding resoled call.
- Assignments handling, initial implementation.
2016-10-18 09:08:07 +03:00
Dmitry Petrov
c4bbcadb34
IR: Collapse desugared blocks as a postprocessing pass.
2016-10-18 09:08:06 +03:00
Dmitry Petrov
aa7bf4637b
IR:
...
- function with expression bodies are desugared to blocks with return statement;
- property initializers are generated as regular expression bodies.
2016-10-18 09:08:06 +03:00
Dmitry Petrov
f903fb8ad3
IR: destructuring declarations in regular statements
2016-10-18 09:08:05 +03:00