Commit Graph

57200 Commits

Author SHA1 Message Date
Ivan Cilcic b8ef09a157 Repalce work with stack variable to work with extension functions 2019-08-30 11:50:34 +03:00
Ivan Cilcic fd461a5147 Fix current package removing from properties 2019-08-30 11:50:34 +03:00
Ivan Cilcic f0e7dcc4f6 Fix superTypes test by adding parameter to primary constructor 2019-08-30 11:50:34 +03:00
Ivan Cilcic f0c7aadb20 Exctract common code from psi and fir visualizer classes 2019-08-30 11:50:33 +03:00
Ivan Cilcic d504774527 Create fir renderer class 2019-08-30 11:50:33 +03:00
Ivan Cilcic 7a45155eb3 Create tests for fir visualizer 2019-08-30 11:50:33 +03:00
Ivan Cilcic 2179f97006 Create fir visualizer abstract test class and extract common code with psi tests 2019-08-30 11:50:32 +03:00
Ivan Cilcic fe328f8c7a Add some additional information to psi renderer
1) Trim unused spaces in annotations
2) Rewrote fq name rendering
3) Added annotations to for loop variable
4) Added type arguments render along to type parameters in functions
2019-08-30 11:50:32 +03:00
Ivan Cilcic 8fb2383845 Move psi visualizer test to separate "psi" package 2019-08-30 11:50:32 +03:00
Ivan Cilcic aebe8c36f5 Add test methods and data for uncommon cases
Uncommon means mostly that aren't present in raw fir builder data
2019-08-30 11:50:31 +03:00
Ivan Cilcic 8047aa22a4 Add test methods and data base on raw fir builder test data 2019-08-30 11:50:31 +03:00
Ivan Cilcic fd8205e317 Add removing current file package name from fq name 2019-08-30 11:50:31 +03:00
Ivan Cilcic d2e47aea01 Change render to separate package names with slash symbol 2019-08-30 11:50:30 +03:00
Ivan Cilcic 08c9fa5259 Rewrite Annotator to be able to put several annotations in one position 2019-08-30 11:50:30 +03:00
Ivan Cilcic 1c2ffa65ca Revert commit with changes in DescriptorRenderer 2019-08-30 11:50:30 +03:00
Ivan Cilcic 3a12bac910 Wrote separate descriptor renderer
It was easier to write my own renderer than change current one
2019-08-30 11:50:29 +03:00
Ivan Cilcic b57c34fd4d Remove rendering from super and this expressions and from package directive 2019-08-30 11:50:29 +03:00
Ivan Cilcic d0e1234434 Add separate method to render special functions
Specials functions are elvis (?:) and exclexcl (!!)
2019-08-30 11:50:29 +03:00
Ivan Cilcic e94417e27b Remove unnecessary data from render result 2019-08-30 11:50:28 +03:00
Ivan Cilcic feec5b1a7c Make annotation process a little clearer 2019-08-30 11:50:28 +03:00
Ivan Cilcic e23e662ba7 Remove names from value parameters list 2019-08-30 11:50:28 +03:00
Ivan Cilcic 6fa7435cd4 Add additional options to DescriptorRender
1) renderContextNearLocalVariable - if true renderer add fq name for local variables after "@" symbol
2) fullContextForLocalVariable - if true then renderer add all fq names for local variables, else only last one
3) useBaseClassAsReceiver - if true then renderer uses dispatch receiver as extension receiver if the last is null
2019-08-30 11:50:27 +03:00
Ivan Cilcic 1879fd19eb Create simple renderer for old frontend
It uses DescriptorRendererImpl that isn't quite good.
2019-08-30 11:50:27 +03:00
Ivan Cilcic e69e6a1eeb Create simple text annotator based on binary search
Co-authored-by: Simon Ogorodnik <simon.ogorodnik@jetbrains.com>
2019-08-30 11:50:27 +03:00
Ivan Cilcic 77c330d94e Make a structure for frontend visualizer
Created visualizer module in compiler. It will contain basic tests for renderer. Additionally added three different modules in visualizer:
1) psi - will contain renderer for old frontend
2) fir - renderer for new frontend
3) common - will contain common code for both renderers
2019-08-30 11:50:26 +03:00
Mikhail Glukhikh e895a0b8a0 FIR resolve: integrate implicit receivers into ImplicitReceiverStack
It can work both by order & by name
2019-08-30 11:47:34 +03:00
Mikhail Glukhikh f2c77c45e9 FIR: simplify rendering of dispatch & extension receivers 2019-08-30 11:47:33 +03:00
Mikhail Glukhikh dfacc2d68f FIR builder test: remove always-false check 2019-08-30 11:47:33 +03:00
Mikhail Glukhikh e36a75250b FIR: visit/transform dispatch & extension receivers only once 2019-08-30 11:47:33 +03:00
Mikhail Glukhikh 5defe22651 FIR [MapArguments]: transform only arguments but not all children 2019-08-30 11:47:33 +03:00
Mikhail Glukhikh 8bb539ce19 FIR resolve: integrate receiverExpression inside ReceiverValue 2019-08-30 11:47:33 +03:00
Mikhail Glukhikh 0962755fde FIR2IR: drop field receiver consistency check (due to delegate field case) 2019-08-30 11:47:33 +03:00
Mikhail Glukhikh 75c4c88d0a FIR: set receivers for invoke case more precisely 2019-08-30 11:47:32 +03:00
Mikhail Glukhikh 62bb127fc9 FIR: add K/J test with getValue() / value fake cycle 2019-08-30 11:47:32 +03:00
Mikhail Glukhikh f0f4ddecc0 FIR: set dispatch receiver for field symbols 2019-08-30 11:47:32 +03:00
Mikhail Glukhikh bd5e1aeef5 FIR2IR: change backing field visibility to private 2019-08-30 11:47:32 +03:00
Mikhail Glukhikh 271c15114c FIR: add test with problematic cases 2019-08-30 11:47:32 +03:00
Mikhail Glukhikh 652fd7ee73 FIR: fix dispatch receivers for objects 2019-08-30 11:47:31 +03:00
Mikhail Glukhikh 29b406c731 FIR: set dispatch receiver for backing field access 2019-08-30 11:47:31 +03:00
Mikhail Glukhikh 13d14df8ae FIR: set dispatch receiver for data class generated functions 2019-08-30 11:47:31 +03:00
Mikhail Glukhikh 0d5cfa97a5 FIR2IR: read & set dispatch & extension receivers
NB: this commit includes receiver-based assertions yet failing for some tests
2019-08-30 11:47:31 +03:00
Mikhail Glukhikh b531e535b6 FIR call resolve: set values of dispatch & extension receivers 2019-08-30 11:47:31 +03:00
Mikhail Glukhikh 67a7243361 FIR (rename): candidateOwner -> boundSymbol 2019-08-30 11:47:31 +03:00
Mikhail Glukhikh 8633a33108 FIR: add new qualified access implementation (FirThisReceiverExpression) 2019-08-30 11:47:30 +03:00
Mikhail Glukhikh c63919f224 FIR tree: add dispatch & extension receivers 2019-08-30 11:47:30 +03:00
Mikhail Glukhikh da22898a19 FIR2IR: set 'SetField' type to Unit, convert explicit 'this' references 2019-08-30 11:47:30 +03:00
Mikhail Glukhikh 6604539154 FIR: set bound symbol for explicit this references 2019-08-30 11:47:30 +03:00
victor.petukhov aa79064a96 Remove deprecated spec tests map generators 2019-08-30 11:39:09 +03:00
Dmitriy Novozhilov e4938c6c36 [FIR] Remove status map from intersection type 2019-08-30 11:10:31 +03:00
Dmitriy Novozhilov ef4ef08b1d [FIR] Add default upper bound for java type parameters 2019-08-30 11:10:31 +03:00