Commit Graph

30 Commits

Author SHA1 Message Date
Dmitry Petrov cb1b9c2ccf IR testData: IrSimpleFunction.isOperator 2019-11-29 13:53:05 +03:00
Jiaxiang Chen 0441e484a6 PSI2IR: For implicit function return, use expression's end offset as start offset of the IrReturn to generarate correct line number. 2019-11-26 17:59:28 +03:00
Dmitry Petrov 82c527c2cc IR: IrProperty.isFakeOverride 2019-11-01 14:55:10 +03:00
Dmitry Petrov 2682057767 IR tests: update testData for IrSimpleFunction.isFakeOverride 2019-11-01 14:55:09 +03:00
Steven Schäfer 76ab631214 psi2ir: Optimize generated data class members
- Access underlying fields directly, instead of using accessors. This is
  safe since data classes are always final.
- Don't generate a temporary variable in hashCode to use as the
  accumulator.

Both optimizations are effectively present in the current JVM backend
and with these changes the generated code is much closer to what the
current backend generates.
2019-09-18 18:56:42 +02:00
Steven Schäfer a90ac2438d Set correct field visibility in psi2ir 2019-08-28 19:41:11 +02:00
Mads Ager 6c7a904663 Psi2Ir: Mark accessors with no bodies as default accessors.
They are currently marked as defined even when they get a
default implementation. That makes it hard to figure out
if the accessor should be removed when introducing a backing
field in the JVM_IR backend.
2019-08-28 19:25:13 +02:00
Dmitry Petrov bdec8b04e8 Minor: trim in RenderIrElementVisitor 2019-07-31 10:37:35 +03:00
Dmitry Petrov 11eea6e86a psi2ir: generate IrConstructorCall elements in IR builder helpers 2019-04-26 17:43:24 +03:00
Dmitry Petrov 37b1c175ce IR: introduce IrConstructorCall / IrConstructorCallImpl 2019-04-26 17:43:24 +03:00
Anton Bannykh 9c3e452396 IR: (update test data) NOT(Boolean) -> Boolean.not 2019-03-25 17:49:15 +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
Dmitry Petrov 4c3d0cd9d7 KT-29861 startOffset/endOffset for 'valueOf' function of enum class 2019-02-15 16:25:16 +03:00
Dmitry Petrov 1b0d410a6f KT-29862 startOffset of class declaration
NB startOffset of primary class constructor declaration should still
point to the 'class' keyword (because of debugger requirements).
2019-02-15 16:25:16 +03:00
Dmitry Petrov 6f97db81c8 Update testData after IR type rendering changes 2018-12-07 10:51:55 +03:00
Dmitry Petrov 7dd906db44 KT-28324 More exact startOffset for function/constructor declarations
Function/constructor declaration start offset is the start offset of the
corresponding declaration token, if available.
2018-11-22 10:09:31 +03:00
Igor Chevdar 2ff87ab1ce Fixed tests on IR copier 2018-11-15 19:13:06 +03: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 Savvinov 00036ba498 [BE IR] Skip comments for determining startOffset of declaration 2018-10-31 14:52:03 +03:00
Dmitry Petrov 38e9c86443 Update testData for irCfg and sourceRanges tests 2018-06-29 14:01:54 +03:00
Roman Artemev 960fba3c4e Fix test failures 2018-06-15 16:23:06 +03:00
Dmitry Petrov 729efaf912 IR: IrConstructor.isPrimary
NB this is required for Kotlin/JS.
2018-05-11 11:24:46 +03:00
Dmitry Petrov 9717345e3b IR: IrField.isFinal 2018-05-11 11:24:46 +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 c2b9803933 Generate source information for synthesized data class members
For now, bind such elements to data class declaration.

 #KT-20443 Fixed
2017-10-31 17:34:32 +03:00
Dmitry Petrov 8b32d54a62 Minor: fix testData format for IR source range tests 2017-05-04 09:33:03 +03:00
Dmitry Petrov a840cf7643 Fix source range tests: support "undefined" offsets 2017-05-04 09:33:03 +03:00
Dmitry Petrov 2a97fb17ba Fix source information mapping in PsiSourceManager
Add tests for source information mapping

KT-17108 source information corrupted on PSI -> IR transformation
2017-03-29 13:03:38 +03:00