Commit Graph

456 Commits

Author SHA1 Message Date
Svetlana Isakova c5d9757b94 added renderers for constraint system and type bounds
moved classes
2014-02-11 21:07:08 +04:00
Pavel V. Talanov 80183c88cf Do not normalize visibilities for fake overrides
#KT-4525 Fixed
2014-02-11 20:13:11 +04:00
Pavel V. Talanov 4a3ccc4eac JDR: do not create package fragment for class statics if class cannot be resolved
This keeps behaviour consistent in rare cases when JavaClass can be found but not resolved
As of now this can happen in IDE if we take PsiClass from index but file structure is wrong so we can't resolve the class
Add test which documents this case
2014-02-11 17:17:34 +04:00
Pavel V. Talanov e4a0221abc Remove PackageFragmentDescriptor#getProvider method
PackageFragmentProvider should be hidden from the client of PackageFramentDescriptor
2014-02-11 17:17:05 +04:00
Pavel V. Talanov cd6a71ef81 Refactor JDR: add explicit binding between java classes and packages for their statics
Get rid of Kind in JavaPackageFragmentDescriptor and create subclass which exposes additional function
Add method in JavaClassDescriptor to get correponding package fragment
Remove JavaDescriptorResolver from context
2014-02-11 17:17:04 +04:00
Pavel V. Talanov 00a5e7ab15 Refactor JDR: remove some of the usages of JavaDescriptorResolver class 2014-02-11 17:17:03 +04:00
Pavel V. Talanov 16a2a5cd62 Refactor JDR: minor extract function in LazyJavaPackageFragmentProvider 2014-02-11 17:17:02 +04:00
Pavel V. Talanov 2fe2a50b14 Refactor JDR: use JavaResolverCache in LazyJavaPackageFragmentProvider directly
Remove LazyJavaClassResolverWithCache
This actually can affect behaviour because JavaResolverCache has slightly different logic (uses CLASS key in BindingContext as opposed to FQNAME_TO_CLASS_DESCRIPTOR)
2014-02-11 17:17:01 +04:00
Pavel V. Talanov 18d088cb71 Refactor JDR: create LazyJavaPackageFragmentProvider in injector 2014-02-11 17:17:00 +04:00
Pavel V. Talanov 737f538ea7 Minor: use orEmpty() instead of ?: listOf() in LazyJavaPackageFragmentProvider 2014-02-11 17:16:59 +04:00
Pavel V. Talanov 4153182fd2 Refactor JDR: minor, extract class 2014-02-11 17:16:58 +04:00
Evgeny Gerashchenko ce7e0a7457 Fixed problem with overriding method with non-trivial raw type (when erased type parameter has upper bound)
Also added cases for the code which was changed.
2014-02-06 13:52:59 +04:00
Andrey Breslav 8dc9aecbf8 DescriptorSearchRule removed 2014-02-05 18:12:01 +04:00
Andrey Breslav aa0dde3a78 Old implementation of JavaDescriptorResolver deleted 2014-02-05 18:12:01 +04:00
Andrey Breslav 9f918d48b5 JavaDescriptorResolver always uses lazy mode 2014-02-05 18:12:01 +04:00
Andrey Breslav 76c722b81c Utilities moved closer to their usages and rewritten to Kotlin 2014-02-05 18:12:00 +04:00
Andrey Breslav e119ca27ca AnnotationLoadingUtil created. Relevant code/constants moved there 2014-02-05 18:11:51 +04:00
Andrey Breslav aed1ccf771 getKotlinBuiltinClassDescriptor() moved to DescriptorResolverUtils 2014-02-05 18:07:35 +04:00
Andrey Breslav 3d1f2c25e2 resolveCompileTimeConstantValue() rewritten to Kotlin 2014-02-05 18:07:35 +04:00
Andrey Breslav 6aca05023a OBJECT_FQ_NAME moved to DescriptorResolverUtils 2014-02-05 18:07:35 +04:00
Andrey Breslav e60bd514fa StorageManager&ExceptionTracker delivered where needed
- GlobalContext introduced to group the two
- Caches track exceptions
2014-02-04 15:24:27 +04:00
Andrey Breslav a90dbc48ef Information about LockBasedStorageManager instances added to assertions 2014-02-04 15:23:14 +04:00
Alexey Sedunov 7f74ea5081 Translate KotlinSafeDeleteProcessor to Kotlin 2014-02-03 13:47:02 +04:00
Alexander Udalov 1107ae9a11 Revert hack for annotations on built-ins
This reverts commit 5cae5c0338
2014-01-31 16:46:18 +04:00
Alexander Udalov e28819b42e Revert "Using default renderer in LoadBuiltinsTest."
This reverts commit 1d21ebf882.

Conflicts:
	compiler/testData/builtin-classes.txt
	core/descriptors/src/org/jetbrains/jet/renderer/DescriptorRendererImpl.java

Reverting a part of this (related to the field 'prettyFunctionTypes') because
will need to add a test that deserialized built-ins (obtained by
KotlinBuiltIns.getInstance()) are consistent with lazy resolved built-ins. This
test would break because while DescriptorRenderer renders pretty function types
it compares descriptors to the ones from KotlinBuiltIns, but in case of lazy
resolve descriptors created for built-ins would be different from
KotlinBuiltIns, so renderer wouldn't correctly render a function type
2014-01-31 16:46:18 +04:00
Alexander Udalov c39338798b Delete outdated hack in Unit 2014-01-31 16:46:18 +04:00
Alexander Udalov 1538191c66 Fix variance in Progression and Range 2014-01-31 16:46:17 +04:00
Alexander Udalov 1c9d614137 Add copyright and auto-generation notice to built-in sources 2014-01-31 16:46:17 +04:00
Alexander Udalov 877d9f2220 Update year to 2014 in generated files 2014-01-31 16:46:16 +04:00
Alexander Udalov 75ab8ac5ec Don't try to generate optimized "in" for LongRange
#KT-4097 Fixed
2014-01-31 16:46:14 +04:00
Andrey Breslav 0f4994f8b0 Created LockBasedStorageManagerWithExceptionTracking 2014-01-30 21:03:53 +04:00
Andrey Breslav 210827b1d5 ExceptionUtils rewritten in Kotlin 2014-01-30 21:03:53 +04:00
Andrey Breslav d0787795b6 StorageManager supports centralized exception handling 2014-01-30 21:03:52 +04:00
Andrey Breslav 5378bded1e Minor: reorder methods and constructors 2014-01-30 21:03:52 +04:00
Andrey Breslav 707255eef6 Automatic toString() for LockBasedStorageManager 2014-01-29 15:34:50 +04:00
Natalia Ukhorskaya 36810c5bbb Move IS_PURE for constant inside CompileTimeConstant 2014-01-28 18:21:45 +04:00
Natalia Ukhorskaya 3f429116e5 Add constructor parameter for compileTimeConstant (can be used in annotation) 2014-01-28 18:21:44 +04:00
Natalia Ukhorskaya 97da2def08 Record COMPILE_TIME_INITIALIZER for all final variables 2014-01-28 18:21:42 +04:00
Natalia Ukhorskaya 694db27da0 Make IntegerValueTypeConstant implements CompileTimeValue<Number>. getValue() method for it is now deprecated - getValue(expectedType) should be used 2014-01-28 18:21:38 +04:00
Alexander Udalov 11c023cfb2 Unmark source roots in 'builtins' and 'runtime.jvm'
This is needed because until we have modules and dependencies implemented in
our IDEA plugin, the whole project always is analyzed to highlight any file in
the project. This resulted in weird errors in different modules in Kotlin
project because two declarations were found for each built-in class: the one in
kotlin-runtime.jar and the one (totally unrelated) in the 'builtins' module
2014-01-27 20:36:08 +04:00
Alexander Udalov e46c54f514 Serialize built-ins on 'ant dist'
Don't store binary data in the repository anymore. From now on any test on the
compiler requires that 'ant dist' was executed at least once since the last
update of the built-ins
2014-01-27 18:33:49 +04:00
Alexander Udalov 5cae5c0338 Don't fail on annotated built-ins
Unit.VALUE is annotated right now (with "suppress"), so deserialization was
throwing an exception from AnnotationDeserializer.UNSUPPORTED. Return empty
collections of annotations instead; here we use the fact that it's the only
annotation in built-ins and its presence is useless to the type checker
2014-01-27 18:33:49 +04:00
Alexander Udalov 61ad9fba4a Remove duplicated sources of built-ins
BuiltInsSerializer now serializes built-ins found in two source roots:
core/builtins/native and core/builtins/src

Add return types to some declarations in core/builtins/src, because now that
BuiltInsSerializer processes them, it launches lazy resolution which can't
always deduce the return type
2014-01-27 18:33:48 +04:00
Alexander Udalov 3b4c341046 Generate Kotlin sources of progression iterators 2014-01-27 18:33:48 +04:00
Alexander Udalov dc66561ca5 Create module 'builtins', move 'runtime' -> 'runtime.jvm'
'builtins' will be used for platform-independent core built-in definitions,
'runtime.jvm' for things that should be present at runtime in order for Kotlin
code to execute correctly on JVM

ProgressionUtil goes to 'builtins' right now because progression iterators
depend on it, but should be rewritten to Kotlin later
2014-01-27 18:33:47 +04:00
Alexander Udalov c1777f28f9 Fix NPE in annotation deserializer 2014-01-23 22:02:59 +04:00
Andrey Breslav 04b47439bd Use findAnnotation() instead of iterating through all annotations 2014-01-22 19:04:43 +04:00
Andrey Breslav ca7d5a2988 Java annotation resolution made lazy 2014-01-22 19:04:43 +04:00
Andrey Breslav 7d10cfa4a5 Annotations.findAnnotation() added 2014-01-22 19:04:43 +04:00
Andrey Breslav 2ac0853225 Make room for laziness in the Annotations interface 2014-01-22 19:04:42 +04:00