Commit Graph

12282 Commits

Author SHA1 Message Date
Alexander Udalov 18df0de2d5 Extract JvmClassName.byFqName().getAsmType() logic 2013-10-04 18:32:40 +04:00
Alexander Udalov bee32b8138 Delete useless method from NamespaceCodegen
It was already present in PackageClassUtils
2013-10-04 18:32:40 +04:00
Alexander Udalov 8729c88aa2 Refactor CodegenBinding & PsiCodegenPredictor
Use ASM Type to store names of classes, use strings in PsiCodegenPredictor.
Inline some methods, move closer to their usages
2013-10-04 18:32:40 +04:00
Alexander Udalov 035a7cccda Delete unused slice in CodegenBinding 2013-10-04 18:32:40 +04:00
Alexander Udalov 6015db3487 Delete unneeded method from PsiCodegenPredictor 2013-10-04 18:32:40 +04:00
Alexander Udalov 6edee687a2 Refactor CodegenBinding.getJvmInternalFQNameImpl
Simplify code, make sure empty string is never returned
2013-10-04 18:32:40 +04:00
Alexander Udalov f4abaaee10 Delete JvmClassName.byType
Replace JvmClassName by ASM Type in many places of JVM codegen: it wasn't used
to abstract anything, but there was a lot of useless conversions between the
two
2013-10-04 18:32:39 +04:00
Alexander Udalov 57ed81521d Don't call .getFqName() when writing package src class name
Package$src class names contain dollars, and JvmClassName.getFqName() doesn't
work very well for such names
2013-10-04 18:32:39 +04:00
Alexander Udalov 6898274f47 Delete JvmClassName.getDescriptor()
It shouldn't be available in descriptor.loader.java, since it wouldn't depend
on ASM and its descriptors won't make any sense there. Most of the places where
this method was used were in codegen. The few exceptions are reading
annotations for compiled Kotlin classes by ASM visitors, but that will be
abstracted away soon
2013-10-04 18:32:39 +04:00
Alexander Udalov 45bc7c2926 Delete JvmClassName.byClass, refactor JvmAnnotationNames
Store constant class names as instances of FqName instead of JvmClassName. This
is done to minimize usages of the method 'JvmClassName.getFqName()', since it's
wrong and shouldn't be used
2013-10-04 18:32:39 +04:00
Alexander Udalov 6aab9fe04e Delete JvmClassName.byClassDescriptor
It only worked correctly by coincidence: mapping from the Kotlin world to the
JVM world should always be done through JetTypeMapper
2013-10-04 18:32:39 +04:00
Alexander Udalov ead8833a88 Minor, fix warnings in codegen 2013-10-04 18:32:39 +04:00
Alexander Udalov 54db0e30c0 Delete signature name from JvmClassName 2013-10-04 18:32:39 +04:00
Alexander Udalov 1cb68e9cf4 Move KotlinToJavaTypesMap, AsmTypeConstants to frontend.java
They're used only in compiler
2013-10-04 18:32:38 +04:00
Alexander Udalov 73b867d1e5 Simplify JvmPrimitiveType, PrimitiveType
Delete utility methods from interfaces, move once-used methods to where they're
used
2013-10-04 18:32:38 +04:00
Alexander Udalov 1578d891cb Remove PsiClassFinder
Inline the implementation into JavaClassFinderImpl
2013-10-04 18:32:38 +04:00
Alexander Udalov 7fa39eb41b Delete InjectorForJDR.getPsiClassFinder()
Replace its usages by getJavaClassFinder(). Remove code duplication in
AnalyzerFacadeForJVM/LazyResolveTestUtil
2013-10-04 18:32:38 +04:00
Natalia Ukhorskaya c4c3657549 Show only last 'configure kotlin' notification, old notifications should be expired 2013-10-04 15:30:58 +04:00
Alexander Udalov 19dd2e5e1b Create special classes for decompiled Java enums
Simplify logic in JavaConstructorResolver and JavaClassResolver
2013-10-04 01:03:34 +04:00
Alexander Udalov 01e46bbd11 Move caching logic from java class scope to descriptor 2013-10-04 01:03:34 +04:00
Nikolay Krasko d0e4245112 Add test for enum highlighting 2013-10-03 23:35:54 +04:00
Nikolay Krasko b09ef86eab Print file text with placed textAttributesKey to avoid adding them manually 2013-10-03 23:35:54 +04:00
Nikolay Krasko f09ba64234 Refactoring: Use generators for highlighting tests
- Store options for test in file
- Change default for namesHighlightingTest
- Combine highlighting and deprecated tests
2013-10-03 23:35:53 +04:00
Nikolay Krasko 62be09df87 KT-4017 Syntax highlighting drops constantly for ~0.5s with every little change in the source
#KT-4017 Fixed
2013-10-03 23:35:52 +04:00
Nikolay Krasko 3fa2b990a6 Don't force out of block modification after exception in analyze, use special dependency 2013-10-03 23:35:52 +04:00
Nikolay Krasko 27ae5d0d64 Refactoring: Remove warnings 2013-10-03 23:35:51 +04:00
Nikolay Krasko 344ed3f606 Refactoring: Fix warnings 2013-10-03 23:35:50 +04:00
Andrey Breslav 4cd5c66c27 No need to escape exceptions in recursionDetected() 2013-10-03 15:49:20 +04:00
Andrey Breslav db34868b6e Migrate existing code to LockBasedStorageManager.NO_LOCKS 2013-10-03 15:49:20 +04:00
Andrey Breslav aa90302d1b Tests for storage manager 2013-10-03 15:49:20 +04:00
Andrey Breslav 0591ceb7f0 Make ReenteringLazyValueComputationException debuggable in tests & internal mode 2013-10-03 15:49:20 +04:00
Andrey Breslav 5f4af8fb03 Distinguishing first and subsequent recursive calls to lazy values 2013-10-03 15:49:20 +04:00
Andrey Breslav eb20d358b0 Fall-through case removed 2013-10-03 15:49:20 +04:00
Andrey Breslav 41a73645c6 Using enum instead of Object constants 2013-10-03 15:49:20 +04:00
Andrey Breslav d7773415bf Support storage manager with no locks 2013-10-03 15:49:19 +04:00
Andrey Breslav 0c83832f27 Use ReentrantLock instead of intrinsic locks in LockBasedStorageManager 2013-10-03 15:49:19 +04:00
Andrey Breslav ee72479344 Thread-safe lazy values used in lazy resolve 2013-10-03 15:49:19 +04:00
Andrey Breslav 344a57f2d5 isComputed() supported for lazy values 2013-10-03 15:49:19 +04:00
Andrey Breslav 7dfe1f963d Support returning default values on subsequent calls after recursion detection 2013-10-03 15:49:19 +04:00
Andrey Breslav e13063017a Exception class moved 2013-10-03 15:49:19 +04:00
Andrey Breslav 9bb77b09a3 Lazy values unified in the project 2013-10-03 15:49:19 +04:00
Andrey Breslav 9064cbd664 Support not null lazy value with default on reentry 2013-10-03 15:49:18 +04:00
Andrey Breslav f987efc510 isComputed() supported in simple lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 36ce914613 Support recursion detection in lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 98dc11bd1b Support recording exceptions in lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 38437a1c25 Encoding changed for non-blocking lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 13aa3b4e6f Unused classes removed 2013-10-03 15:49:18 +04:00
Andrey Breslav f3cd83c744 All storage-related code moved to util.runtime 2013-10-03 15:49:18 +04:00
Andrey Breslav 48605074aa Lazy values: change encoding, now NOT_COMPUTED is an explicit object, and null is stored as such 2013-10-03 15:49:17 +04:00
Andrey Breslav 51dfdf795f Recursion-tolerant notnull lazy values 2013-10-03 15:49:17 +04:00