Commit Graph

37664 Commits

Author SHA1 Message Date
Alexey Sedunov 5c55b9fbbe Configuration: Check that project-level common arguments are not changed through platform-specific holders 2017-03-16 03:14:34 +03:00
Alexey Sedunov ce434585e3 J2K: Convert BaseKotlinCompilerSettings and its inheritors 2017-03-16 03:14:32 +03:00
Alexey Sedunov f8e5065845 J2K: Convert BaseKotlinCompilerSettings and its inheritors (rename to .kt) 2017-03-16 03:14:31 +03:00
Pavel V. Talanov f1c0d5316f Refactor delegate members to light members conversion 2017-03-15 20:55:42 +03:00
Pavel V. Talanov eedcc19209 J2K KtLightClassBase: rename file 2017-03-15 20:55:41 +03:00
Pavel V. Talanov 04591bb938 LightClassDataHolder: refactor, extract subinterfaces 2017-03-15 20:55:40 +03:00
Pavel V. Talanov 6d595e30c2 ClassFileFactory, minor: make done() public and use in LightClassDataProvider 2017-03-15 20:55:40 +03:00
Pavel V. Talanov d62db8dc6b LightClassGenerationSupport: refactor, minor
Use typealias where appropriate
Less verbose method names
2017-03-15 20:55:39 +03:00
Pavel V. Talanov a645dc109a KotlinLightClassBuilderFactory, LightClassBuilder: refactor, clarify 2017-03-15 20:55:38 +03:00
Pavel V. Talanov c73e58516b Refactor LightClassDataProvider: drop LightClassDataProvider class
Move code to inheritors
Improve api to avoid getting empty file lists in random places
2017-03-15 20:55:37 +03:00
Pavel V. Talanov ab0d939626 searchHelpers: remove hack relying on light classes triggering resolve 2017-03-15 20:55:08 +03:00
Pavel V. Talanov feae5079ed Light classes: refactor, introduce lazyPub util to reduce verbosity 2017-03-15 20:55:07 +03:00
Pavel V. Talanov ba185d7616 LightClassDataProvider: refactor, extract class filters to separate classes 2017-03-15 20:55:05 +03:00
Pavel V. Talanov 48cae0e480 KtLightField/Method: Use equality in equivalence checks
Avoid computing delegate to determine equivalence
2017-03-15 20:55:03 +03:00
Pavel V. Talanov 8054020f61 IDELightClassContexts: @PublishedApi affects codegen 2017-03-15 20:55:02 +03:00
Pavel V. Talanov d846d05527 PsiElementChecker: minor
Check own members before inners' since it triggers the computation of outer stub
2017-03-15 20:55:01 +03:00
Pavel V. Talanov d34b73befb Light class codegen: all objects are considered static
Simplify code handling access flag computation
Fix a problem where kotlin nested object wasn't producing a nested light class
2017-03-15 20:55:01 +03:00
Pavel V. Talanov d94da5af40 Frontend: create component functions for properties with error types
Fixes an inconsistency in light classes where we could have different
  class structure depending on whether the type was resolved
2017-03-15 20:55:00 +03:00
Pavel V. Talanov fa58f1b4d7 KtLightMethod(Field): use dummyDelegate to determine modifier properties 2017-03-15 20:54:59 +03:00
Pavel V. Talanov abf206a134 KtLightMethod(Field): do not use clsDelegate in hashCode && equality checks 2017-03-15 20:54:58 +03:00
Pavel V. Talanov fee29c47c8 KtLightMethod: use dummy delegate to compute parameter count and isContructor 2017-03-15 20:54:56 +03:00
Pavel V. Talanov 3e7357a5d7 IDELightClassTest: provide tools to check laziness of light class construction
StubComputationTracker knows which context was used to construct light class
2017-03-15 20:54:55 +03:00
Pavel V. Talanov daef8a0eed Light classes in IDE: Make light class delegate construction a two step process
Step 0: Light class object is created, no delegates are computed
Step 1: constructs dummy delegate which can not be relied upon to know signature of any member
		It can be used to construct light field and light method objects
		(which can correctly respond to some queries) before constructing real delegate
Step 2:
		Construct real delegate if dummy delegate is not enough to respond to a query

This speeds up multiple scenarios where getMethods() and getFields() are called on numerous classes

Dummy delegate's faster consruction is achieved by using specially setup dumb analysis instead of ide analysis

Introduce LazyLightClassDataHolder: which manages creation of Step 1 and Step 2 delegates
Introduce MemberIndex: keeping track of member creation order, helps matching light class delegates created in different contexts
KtLightMethod and Field: make use of dummy delegate
KtLightMethod no longer extends LightMethod since it requires eager delegate construction
KtLightMethod now implements PsiAnnotationMethod for convenience (ClsMethodImpl implements PsiAnnotationMethod)
2017-03-15 20:54:55 +03:00
Pavel V. Talanov ed9e94c632 KtLightModifierListWithExplicitModifiers: fix equals 2017-03-15 20:53:59 +03:00
Pavel V. Talanov d01aaeb65c Refactor light classes: Delegate LightClassDataHolder construction to LightClassGenerationSupport 2017-03-15 20:53:58 +03:00
Pavel V. Talanov 00e84fb483 Light classes: Refactor construction
Introduce LightClassDataHolder: which now is reponsible for constructing clsDelegate
Move out light big chunk of delegate building logic out of LightClassDataProvider into LightClassBuilder
LightClassData only holds information about single class
2017-03-15 20:53:37 +03:00
Pavel V. Talanov 22fb9ec5e1 Refactor light classes: move light members creation to their respective classes 2017-03-15 20:52:51 +03:00
Pavel V. Talanov 15b063d236 J2K LightClassGenerationSupport: rename file 2017-03-15 20:52:50 +03:00
Pavel V. Talanov dd2d9c1dc2 J2K LightClassGenerationSupport: convert code 2017-03-15 20:52:49 +03:00
Pavel V. Talanov 71161e218b Refactor LightClassData: remove redundant entities 2017-03-15 20:52:48 +03:00
Pavel V. Talanov 0a0e628068 Refactor: move code to new package 2017-03-15 20:52:26 +03:00
Pavel V. Talanov ac368ac182 Light classes test: test methods & fields with same name 2017-03-15 20:52:25 +03:00
Pavel V. Talanov 955fe9e1e6 Light class tests: add tests
- test Jvm* annotations with wrong arguments
  - test JvmStatic annotation
  - test JvmName annotation
2017-03-15 20:52:24 +03:00
Pavel V. Talanov dbcd141a46 Extract superclass from AnnotationResolver 2017-03-15 20:52:24 +03:00
Pavel V. Talanov 8794005234 JvmPlatform#getDefaultImports: avoid recomputing JvmBuiltins
We need to use LockBasedStorageManager() (instead of NO_LOCKS) since getDefaultImports()
    can be called concurrently in certain scenarios
2017-03-15 20:52:23 +03:00
Pavel V. Talanov bbe3b3cabe WrappedType: introduce WrappedTypeFactory to encapsulate wrapped types creation 2017-03-15 20:52:22 +03:00
Pavel V. Talanov 85420d1ffd MemberCodegen: Do not try to write inner class metadata for inner class 2017-03-15 20:51:22 +03:00
Pavel V. Talanov 1441aea2ea Light classes: allow light classes for inner/nested classes to be build separately
Avoid analyzing/generating bytecode for outers
2017-03-15 20:51:22 +03:00
Pavel V. Talanov 6924ddeace Clarify logic in KotlinTypeMapper.mapType() dealing with enum entries
This allows to write correct class signatures for enum entries
    regardless of whether ASM_TYPE slice was written to
2017-03-15 20:51:20 +03:00
Pavel V. Talanov 6f6a595fef Refactor FileScopeFactory 2017-03-15 20:51:19 +03:00
Pavel V. Talanov d7c1993194 FileScopeFactory: postpone default import resolver construction 2017-03-15 20:51:18 +03:00
Pavel V. Talanov babb3b557d J2K ImportPath: kotlinify 2017-03-15 20:51:17 +03:00
Pavel V. Talanov 50d0f5bde6 J2K ImportPath: autoconvert 2017-03-15 20:50:12 +03:00
Pavel V. Talanov 91e8d9e211 J2K ImportPath: rename file 2017-03-15 20:49:22 +03:00
Simon Ogorodnik e7753c31db Minor: Add Dokka format param to build-docs script
To have an ability to change it in TeamCity between custom builds
2017-03-15 19:43:14 +03:00
Simon Ogorodnik 38047240d3 Fix documentation for stdlib
Add forgotten files to file list used by
Dokka when generating documentation
2017-03-15 18:26:52 +03:00
Simon Ogorodnik 5c4ba53f42 Optimization of Basic Code Completion
Now we first search for simple reference variants, then for extensions
 Because extension search is slow
 #KT-16856
2017-03-15 17:50:29 +03:00
Simon Ogorodnik 4906ddfc29 Optimization of Basic Code Completion
Now we don't perform code formatting on temporary psi used
  in ShadowedDeclarationFilter
  #KT-16856
2017-03-15 17:50:20 +03:00
Mikhail Glukhikh bbab0f11ca Cleanup: fix some "leaking this" warnings 2017-03-15 17:36:08 +03:00
Mikhail Glukhikh 045a23ae10 Cleanup: apply "Convert lambda to reference" 2017-03-15 17:36:02 +03:00