Commit Graph

24 Commits

Author SHA1 Message Date
Dmitry Petrov cb1b9c2ccf IR testData: IrSimpleFunction.isOperator 2019-11-29 13:53:05 +03:00
Dmitry Petrov 2682057767 IR tests: update testData for IrSimpleFunction.isFakeOverride 2019-11-01 14:55:09 +03:00
Steven Schäfer af74fd047a psi2ir: Consistently use type unit for statements
These changes allow us to accurately distinguish between statements and
expressions in the IR.

This also fixes the types of non-exhaustive conditional statements.
2019-10-31 11:13:44 +03:00
Dmitry Petrov 9a82f926a1 IR: descriptor-less rendering of IR elements (work in progress) 2019-03-21 11:23:51 +03:00
Dmitry Petrov e49eae528c IR: don't use descriptors in rendering (work in progress)
There's some descriptor-based code remaining. Need some more work on IR.
2019-03-21 11:23:51 +03:00
Ting-Yuan Huang 6bbb0269b1 IR: Set when.origin for IrIfElseImpl
Change-Id: I38510b59e3dc936baadbfe3ef2702990493815e5
2019-03-13 08:48:20 +01:00
Mikhael Bogdanov 1e3277d0e6 Set proper origin for cascaded if expression 2019-03-13 08:27:07 +01:00
Dmitry Petrov bd1491ac8a psi2ir: Merge constant entries in string template expressions
This is required to handle UCNs properly, see KT-28006.

 #KT-28006
2018-11-08 12:29:15 +03:00
Dmitry Petrov 38e9c86443 Update testData for irCfg and sourceRanges tests 2018-06-29 14:01:54 +03:00
Dmitry Petrov 9137e68d4e Implement special desugaring for numeric comparisons in PSI2IR
This introduces the following IR built-in functions required for proper
implementation of the number comparisons:

- ieee754Equals(T, T): Boolean,
    for each T in {Float?, Double?}

- less(T, T): Boolean
  lessOrEqual(T, T): Boolean
  greater(T, T): Boolean
  greaterOrEqual(T, T): Boolean
    for each T in {Int, Long, Float, Double}
2018-02-07 14:30:59 +03:00
Dmitry Petrov 6cb68531ae Minor: add missing "'" 2018-01-17 12:31:07 +03:00
Dmitry Petrov fdd000c94f Update testData to new format 2018-01-17 12:31:07 +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 2b3043bf9f Fix CFG problem for 'when' in Konan
If type of 'when' expression is 'Nothing', it should be kept that way
even if the expression itself is implicitly coerced to Unit.
2017-06-22 10:21:54 +03:00
Dmitry Petrov 8c32719f3d Render 'type' for IrTypeOperatorCall expressions, update testData. 2017-03-07 11:56:52 +03:00
Dmitry Petrov d0134f2c64 KT-16437 Incorrect type inference for some when coerced to Unit
If the result of 'when' is not used in an expression,
this 'when' expression has type 'Unit' despite of whatever FE has inferred.
2017-03-01 09:25:38 +03:00
Mikhail Zarechenskiy 62ac91a121 Add operator 'rem' to builtIns
Also deprecate operator 'mod'
2016-12-14 15:29:00 +03:00
Mikhail Glukhikh 07eae1d206 IR to CFG: type operator unrolling 2016-10-18 09:09:50 +03:00
Mikhail Glukhikh ea13386d0b IR to CFG: member access unrolling 2016-10-18 09:09:50 +03:00
Mikhail Glukhikh 5a04c72e75 Break / continue implementation, test with break / continue, related changes in loop & loop tests 2016-10-18 09:09:49 +03:00
Mikhail Glukhikh e03e13af43 Do..while loop implementation and first test 2016-10-18 09:09:49 +03:00
Mikhail Glukhikh bcf2b410ba While loop implementation && first loop test 2016-10-18 09:09:48 +03:00
Mikhail Glukhikh 979f2231a1 IR to CFG: when implementation in function generator, some when tests 2016-10-18 09:09:48 +03:00
Mikhail Glukhikh eaf10a4675 IR to CFG test generator, sequential function tests 2016-10-18 09:09:47 +03:00