Ilya Gorbunov
800ff20fc7
Exclude rangeUntil operation from constant evaluation and interpretation #KT-52933
2022-08-24 22:22:54 +00:00
Dmitriy Novozhilov
f3116cb64a
Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code
2021-07-20 13:33:46 +03:00
Jinseong Jeon
fcdb8866d2
FIR: rewrite evaluator to use eval utils in frontend.common
2021-06-19 21:58:47 -07:00
Jinseong Jeon
477c1c8cd7
Migrate CompileTimeType and OperationsMap to frontend.common
2021-06-19 21:58:47 -07:00
Jinseong Jeon
720104de78
Temporarily allow deprecated conversions in FIR operations map
...
Also, switch to the new copyright header
2021-06-19 21:35:35 -07:00
Jinseong Jeon
fc5d1d8cb5
FirConstKind has been renamed to ConstantValueKind ( d243319)
2021-06-19 21:35:35 -07:00
Jinseong Jeon
bb297b87bd
Avoid hard-coded operator names in CompileTimeConstantEvaluator
2021-06-19 21:35:34 -07:00
Jinseong Jeon
a969924248
FIR: generate operations map for CompileTimeConstantEvaluator
2021-06-19 21:35:34 -07:00
Ilya Gorbunov
8041c3aa1d
Support Char.code in constant evaluator, KT-46036
...
But do not consider Char.code a pure integer constant.
2021-04-16 03:58:34 +03:00
Abduqodiri Qurbonzoda
40d1849f33
Migrate compiler, idea and others to new case conversion api
2021-04-08 03:22:02 +03:00
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