Commit Graph

840 Commits

Author SHA1 Message Date
Alexander Udalov 406462d422 Regenerate FIR tree visitors and transformers 2019-09-03 16:37:53 +02:00
Dmitriy Novozhilov 54eb4cf928 [FIR] Add synthetic else branch to when if it's missing to LightTreeFirBuilder 2019-09-02 11:12:35 +03:00
Dmitriy Novozhilov 5c29af4b53 [FIR] Tests. Update some outdated FIR testdata 2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov f494e0008c [FIR] Minor. Add kdoc to FirDataFlowAnalyzer 2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov 286a322b55 [FIR] Remove DummyFirDataFlowAnalyzer 2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov 92acd30bd6 [FIR] Refactor Condition classes 2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov 84787013dd [FIR] Fix CFG form for boolean operators 2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov 63bd920f16 [FIR] Tests. Make cfg graphs more strict 2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov a87891bec9 [FIR] Some control flow graph building fixes
- fix edges for `continue` and labeled return
- fix deadness for init block and properties
2019-09-02 10:43:10 +03:00
Dmitriy Novozhilov 9508fc60c9 [FIR] Remove FirUncheckedNotNullCastImpl from FIR 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov c2602fda1f [FIR] Transform all qualified access nodes with smartcasts 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov c1a8344b45 [FIR] Add forgotten nullability for receivers of safe calls 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov fd84202c08 [FIR] Add fir node for qualified access with smartcast 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov 04b6c48ae7 [FIR] Disable smartcasts to Nothing? 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov b58a03458e [FIR] Tests. Improve style of control flow graphs
Add borders to control flow graphs of different functions
Highlight enter and exit nodes of each graph
2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov 7851657b98 [FIR] Store fir in DataFlowVariable 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov 163c5d699f [FIR] Pass flow to right operand of && expression 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov 59205cac13 [FIR] Tests. Add orthogonal edge routing for cfg dumps 2019-09-02 10:43:09 +03:00
Dmitriy Novozhilov b2e95eebab [FIR] Add processing of loops with constant boolean value in condition 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov a60115c452 [FIR] Fix propagating deadness for loops and when expressions 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov 006cb536e0 [FIR] Add detecting dead edges for boolean operators with consts 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov fd1347f2b7 [FIR] Tests. Add instruction for configuring tool for cfg dump viewing 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov b7e1e7704e [FIR] Tests. Change extension for testdata with cgf from .cfg.dot to .dot
Also remove cfg dumps in made with old renderer
2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov 7e43a0d9ef [FIR] Add boolean constant folding for DFA 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov 78f7211587 [FIR] Add test for smartcast with return in elvis 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov 98b3901f9c [FIR] Fix bug in building cfg for || 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov fc43c8a74b [FIR] Add inlining of control flow graphs of in-place anonymous functions 2019-09-02 10:43:08 +03:00
Dmitriy Novozhilov e72d8e675a [FIR] Add invocation kind to anonymous functions 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov e937e4b261 [FIR] Add bound smartcasts 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov e6c04c0454 [FIR] hold one-to-one mapping for data flow variable and Fir 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov bda8c7ee1c [FIR] Fix smartcasts on when subject 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov 200c13baf5 [FIR] Add tests for smartcasts 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov 7a81c37f5c [FIR] Fix building cfg for binary or 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov 2d3e9fe539 [FIR] Add creating simple type for type parameters symbols 2019-09-02 10:43:07 +03:00
Mikhail Glukhikh b1731749c0 Add failing test for smart-cast branch 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov b4a4d4d709 [FIR] Add renderer to .dot for control flow graph tests 2019-09-02 10:43:07 +03:00
Dmitriy Novozhilov 2e501e0f97 [FIR] Implement Data Flow Analysis 2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov 216b9ad933 [FIR] Add logic system for data flow analysis 2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov 6e0f4f140f [FIR] Minor. Add set of type operations to FirOperation 2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov 6b4e95ec52 [FIR] Add tests for control flow graph building 2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov fc982cc7e8 [FIR] Add data flow analyzer that delegates to CFG builder 2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov 9f0781c9de [FIR] Add references to control flow graph to FirFunction and FirProperty
Also add updating CFG references anfter data flow analyzer builds graph
That graph is needed for further control flow analysis
2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov 56ac1201b6 [FIR] Add abstract data flow analyzer with callbacks for body resolve transformer 2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov dcfc75a58f [FIR] Add control flow graph and infrastructure for building it
For some of language constructions cfg is dummy (e.g. for finally blocks
  or anonymous initializers)
2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov 198599f3c7 [FIR] Add builtins types to FirSession 2019-09-02 10:43:05 +03:00
Dmitriy Novozhilov 7d4c635e85 [FIR] Minor. Add util functions for checks that type is builtin 2019-09-02 10:43:05 +03:00
Dmitriy Novozhilov 38fa0122e8 [FIR] Add synthetic else branch to when if it's missing
This change is needed for correct work of data flow, because for
  non-exhaustive when there is a else branch in terms of control flow
  graph.

This change leads to some errors when when is actually exhaustive, but
  we still add else branch. Those errors will be gone when exhaustive
  checker will be introduced
2019-09-02 10:43:05 +03:00
Simon Ogorodnik 99972a08a1 [FIR] Fix table rendering 2019-08-30 16:51:25 +03:00
Simon Ogorodnik 438c90b477 Silence fir bench output for diagnostic smoke tests 2019-08-30 16:32:48 +03:00
Simon Ogorodnik 312e93859b Add more info to fir bench report & format as table
Properly measure raw fir builder time in fir benchmark
2019-08-30 16:32:48 +03:00