Commit Graph

33 Commits

Author SHA1 Message Date
Dmitry Petrov cb1b9c2ccf IR testData: IrSimpleFunction.isOperator 2019-11-29 13:53:05 +03:00
Steven Schäfer 733c7579aa Normalize names of temporary variables in IrTextTests 2019-11-05 14:58:47 +03:00
Dmitry Petrov bdec8b04e8 Minor: trim in RenderIrElementVisitor 2019-07-31 10:37:35 +03:00
Dmitry Petrov ffd9b45ef3 IrFunctionExpression: add 'origin'
This is actually either a LAMBDA or an ANONYMOUS_FUNCTION.
Not quite sure if it's really required, but some tools such as IR-based
decompiler might require this information.
2019-07-19 11:36:19 +03:00
Dmitry Petrov ed2b4a8bec Introduce IrFunctionExpression IR element
Use it to represent proper function expressions (lambdas and anonymous
functions).
2019-07-19 11:36:18 +03:00
Dmitry Petrov e3fd74a580 IR: annotations are represented as IrConstructorCall elements
Also, they are rendered somewhat nicer
2019-04-26 17:43:24 +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 6f97db81c8 Update testData after IR type rendering changes 2018-12-07 10:51:55 +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
Mikhael Bogdanov 4fb434c0de Move out jvm-specific part from ir-common
#KT-27005 Fixed
2018-10-02 11:12:21 +02:00
Mikhael Bogdanov 1a1bb53381 Update IR text test
Additional implicit coercions to unit was added
2018-08-15 14:18:15 +03:00
Svyatoslav Scherbina 226f16b44e ir.tree: fix .originalKotlinType for transformed IR types 2018-07-03 09:55:12 +03:00
Dmitry Petrov 799fcc2606 Fix IrType rendering, update testData 2018-06-29 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 1eb693b8ee Transform variable-as-function calls for extension functions
In the following code example
  fun test(f: Any.() -> Unit) = 42.f()
front-end resolves variable-as-function call for 'f' as 'invoke'
with signature 'Function1<Any, Unit>#Any.() -> Unit'.
However, Function1<Any, Unit> has a single 'invoke' method
with signature 'Function1<Any, Unit>#(Any) -> Unit'.
This didn't cause any problems with loosely typed JVM and JS back-ends.
However, in IR with symbols this means a reference to non-existing
declaration.
2017-05-04 09:33:03 +03:00
Dmitry Petrov 78a601af87 Generate parameter declarations for fake overrides 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 c9777fd79f Add symbols to references
TODO: fix some more tests
2017-05-04 09:33:03 +03:00
Dmitry Petrov 8cea27b5bb Generate IrTypeParameter and IrValueParameter declarations 2017-05-04 09:33:03 +03:00
Michael Bogdanov e543972dad Properly calculate safe call receivers 2016-10-18 09:10:05 +03:00
Dmitry Petrov a51efaacc9 Introduce IrGetValue as a replacement for IrThisReference / IrGetExtensionReceiver / IrGetVariable. 2016-10-18 09:09:59 +03:00
Dmitry Petrov 8551bcf103 Refactor IrWhen. 2016-10-18 09:09:38 +03:00
Dmitry Petrov a8a6477ce5 IrOperator -> IrStatementOrigin 2016-10-18 09:09:21 +03:00
Dmitry Petrov c699e2d24c Include declaration origin in testData. 2016-10-18 09:09:19 +03:00
Dmitry Petrov 4e112b3f88 testData format update: detailed descriptor rendering. 2016-10-18 09:09:04 +03:00
Dmitry Petrov a3dadd9e3f Callable references now can have receivers and arguments
(for bound references implementation).
2016-10-18 09:08:53 +03:00
Dmitry Petrov 05b9eda809 Generate "raw" IR in Psi2IrTranslator. 2016-10-18 09:08:37 +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 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