Commit Graph

24 Commits

Author SHA1 Message Date
Ilya Gorbunov 9cc8f44390 Support mod and floorDiv extensions in constant evaluator
Ignore evaluation tests for floorDiv and mod with FIR for now.
2021-03-05 23:46:57 +03:00
Alexander Udalov 742fef9042 Rewrite generator for OperationsMapGenerated
Do not generate operations as lambdas; instead use `when` over
strings/enums, which is generated to tableswitch in the bytecode.

This reduces the proguarded compiler jar size by ~0.57%.

 #KT-23565 Fixed
2021-01-12 14:38:41 +01:00
Alexander Udalov a21f273570 Fix compiler warnings in compiler code 2020-08-17 21:18:20 +02:00
Ivan Kylchik 895c32e21c Create separate source set for interpreter map generator
A separate source set is needed so that the generator no longer depends
on the generated code
2020-06-25 10:45:19 +03:00
Ivan Kylchik 8044b47984 Create internalName extension method that returns fqName as jvm internal 2020-06-24 16:13:02 +03:00
Ivan Kylchik f028d6c898 Move interpreter files to separate module 2020-06-24 16:13:01 +03:00
Ivan Kylchik e4f88e83fe Get rid of compile time check in generator for ir builtins map
These checks are unnecessary because we use all methods from given
classes
2020-06-24 16:13:01 +03:00
Ivan Kylchik c6240face0 Add test for generation builtins map for interpreter 2020-06-24 16:12:57 +03:00
Ivan Kylchik 9542eb36ec Support interpretation of String's plus method and its extension version 2020-06-24 16:12:56 +03:00
Ivan Kylchik 530252eea8 Move State.kt in separate package 2020-06-24 16:12:51 +03:00
Ivan Kylchik 900e78b39b Add hashCode, equals and toString methods from String in builtin map 2020-06-24 16:12:51 +03:00
Ivan Kylchik 2310a04e4e Add toString, hashCode and equals primitives methods in ir builtin map 2020-06-24 16:12:49 +03:00
Ivan Kylchik 731fb9bc70 Make ir interpreter to work with minimal dependence on ir lowerings 2020-06-24 16:12:48 +03:00
Ivan Kylchik 2985e8bcd3 Clean up code of ir builtins map generator 2020-06-24 16:12:47 +03:00
Ivan Kylchik cbc9c19faf Add methods for message and clause from Throwable in ir builtins map 2020-06-24 16:12:46 +03:00
Ivan Kylchik 4345294ac1 Add all methods from Any class in ir builtins map 2020-06-24 16:12:46 +03:00
Ivan Kylchik 5209f4a9c0 Add not null (!!) operator in ir builtins map 2020-06-24 16:12:45 +03:00
Ivan Kylchik 45555d681d Add methods from arrays classes in ir builtins map 2020-06-24 16:12:44 +03:00
Ivan Kylchik f99829ce5e Implement trim function interpretation in compile time 2020-06-24 16:12:43 +03:00
Ivan Kylchik f6373a647e Create simple interpreter that evaluate constant values 2020-06-24 16:12:41 +03:00
Ivan Kylchik a27a07ce81 Create generator for map with builtin operations 2020-06-24 16:12:41 +03:00
Alexander Udalov d115a1ff9c Minor, fix some warnings such as "unused main argument" in generators 2020-05-27 23:29:21 +02:00
Abduqodiri Qurbonzoda 1203df7405 Deprecate floating point to integral types lesser than Int #KT-30360 2020-01-22 23:27:35 +03:00
Ilya Gorbunov 7ec04a1bf9 generators: extract OperationsMap generator to a separate source set
Refactor generators so that OperationsMapGenerator is in its own
source set with minimal dependencies.
2020-01-22 06:16:56 +03:00