Commit Graph

824 Commits

Author SHA1 Message Date
Andrey Breslav 5ab979864b Temporarily revert changes that create separate class descriptors for each PSI class 2014-05-16 12:27:14 +04:00
Andrey Breslav 291741754b Guard loading top-level classes with a check that they are not Kotlin binaries 2014-05-14 17:15:01 +04:00
Andrey Breslav 64f0a8d420 Provide access to package fragments generated for static members of Java classes 2014-05-13 19:39:32 +04:00
Andrey Breslav 87750d633c JavaDescriptorResolver supports resolving classes by PSI elements, not by FqNames 2014-05-13 19:39:31 +04:00
Alexey Sedunov 5fc1725b33 Extract Function: Type parameters inference 2014-05-12 12:55:02 +04:00
Alexander Udalov c7277250d9 Use ReflectionTypes instead of KotlinBuiltIns in type checker 2014-05-08 16:45:15 +04:00
Valentin Kipyatkov 717977af61 No more java lookup elements in code completion (except for one case) 2014-05-07 22:50:21 +04:00
Alexander Udalov 42d167d17e Add missing copyrights across the project 2014-05-05 20:43:35 +04:00
Alexander Udalov b7746cbee7 Move module 'serialization' to core/ 2014-05-05 20:43:34 +04:00
Alexander Udalov 16daeb9544 Misc refactorings in KotlinBuiltIns
- delete fields which were supposed to be used for caching, but mistakenly were
  never used
- delete/inline unused methods and constants
- delete useless logic related to root package fragment: package fragment
  providers are only supposed to find packages they're aware of
2014-05-05 20:42:35 +04:00
Andrey Breslav 775c941f8a hasSynthesizedParameterNames() pulled up into CallableDescriptor 2014-04-30 16:30:17 +04:00
Svetlana Isakova 775606f80a Do not remove trivial substitutions
to avoid substituting a new type parameter by default instead of leaving the same
 #KT-4887 Fixed
2014-04-30 13:34:34 +04:00
Svetlana Isakova a57b4f6459 Render inferred and not inferred type parameters
while rendering a resolved call
2014-04-30 13:34:34 +04:00
Svetlana Isakova e59fa2083e Substituted special error type for not inferred parameter
Rendered it as T (of red color) in the renderer HTML_FOR_NOT_INFERRED_TYPE_PARAMETERS
 instead of '???' without information about type parameter
2014-04-30 13:34:32 +04:00
Andrey Breslav c6bd4a22ef Iterators replaced with streams where appropriate 2014-04-29 19:11:47 +04:00
Andrey Breslav 19719f9747 Deprecated _tmp functions replaced by library ones 2014-04-29 19:11:47 +04:00
Andrey Breslav 4181bcc319 JavaCallableMemberDescriptor.hasSynthesizedParameterNames() introduced 2014-04-29 19:11:47 +04:00
Alexander Udalov 61675de305 Optimize PropertyMetadataImpl instance creation
Create all property metadatas in <clinit> and save them to a static array
$propertyMetadata. Getter/setter of each delegated property will then just
obtain the corresponding instance from that array

 #KT-4232 Fixed
2014-04-24 16:10:15 +04:00
Alexander Udalov 6b348bfc6e Make Ref fields volatile
Otherwise local shared variables are not safe to use from several threads
2014-04-24 16:10:11 +04:00
Alexander Udalov af421f53da Rename FQNAMES -> FQ_NAMES 2014-04-24 16:10:11 +04:00
Andrey Breslav bb87a6bb59 Only create lazy annotations for descriptors from code 2014-04-18 21:28:21 +04:00
Nikolay Krasko 068c9636fc Refactoring: rename TEXT to FQNAMES_IN_TYPES 2014-04-18 13:25:58 +04:00
Alexander Udalov 4c973b79ee Get rid of poorly named NotInferredVisibilitySink
Also make TraceBasedErrorReporter invoke OverrideResolver to report "cannot
infer visibility", because there's some additional logic there
2014-04-17 19:51:31 +04:00
Alexander Udalov 34e7584aec Move some utilities from OverridingUtil to OverrideResolver
OverridingUtil will be present at runtime and we should strive to minimize the
size of our runtime classes

Also add a comment to getOverriddenDescriptors()
2014-04-17 19:51:30 +04:00
Alexander Udalov 3dffd428ad Refactor OverrideResolver and OverridingUtil
Fix warnings, simplify code. Untangle a very complex code related to
diagnostics on multiple default values and different names of parameters in
supertypes; fix a bug there, add test
2014-04-17 19:51:30 +04:00
Alexander Udalov 4f9f5d231b Fix incorrect diagnostic message for CONFLICTING_OVERLOADS
- the member and the container were mixed up
- don't output "defined in" part of the message, because we tell later where
  it's already defined in
- fix an instability of the diagnostic order in OverloadResolver by using
  LinkedHashSet
2014-04-17 19:51:29 +04:00
Alexander Udalov 4a60c59f39 Minor, fix KotlinSignature of DFS methods 2014-04-14 16:02:10 +04:00
Alexander Udalov 79e7ee91e4 Generate bridges for trait implementations properly
The intent was to keep the bridge codegen model as simple as possible: we
should be able to figure out all necessary bridges only by a minimal interface
that FunctionHandle provides (isAbstract, isDeclaration, getOverridden)

Add different tests for bridges

 #KT-318 Obsolete
2014-04-11 21:57:47 +04:00
Alexander Udalov b0db6a4526 Rewrite bridge generation to Kotlin, make it abstract 2014-04-11 21:57:46 +04:00
Alexander Udalov 478766815d Consider all real functions, not only declarations in bridge codegen
There should be bridges to all of the functions present in bytecode
2014-04-11 21:57:45 +04:00
Alexander Udalov 11386c0f7a Simplify codegen for trait methods with implementations
- use existing framework (FunctionCodegen.generateMethod) which will take care
  of all subtleties of method generation (bridges, annotations, thrown
  exceptions, etc)
- call to "generateThisOrOuter" was not needed, since when we're generating
  delegation to TImpl, "this" is always "ALOAD 0"
2014-04-11 21:57:43 +04:00
Alexander Udalov 089cba5791 Warn about unwrapFakeOverride in a comment 2014-04-11 21:39:56 +04:00
Tal Man aeb5bae556 Refactoring of CompileTimeConstant, introduce flag to represent a constant being referenced by a variable 2014-04-09 14:47:05 -04:00
zarechenskiy 43b41f6db9 Implement formatMethod in JavaSignatureFormatter without PSI 2014-04-04 17:40:37 +04:00
zarechenskiy fe48051041 Remove acces to JavaPropertyInitializerEvaluator through ServiceLoader by injecting it in GenerateInjectors 2014-04-04 17:40:37 +04:00
zarechenskiy 2e4028ba3a Move method createArrayType to JavaType and drop JavaElementFactory 2014-04-04 17:40:36 +04:00
zarechenskiy 735df2e340 Drop getExternal method from JavaSignatureFormatter 2014-04-04 17:40:36 +04:00
Alexander Udalov 77b2b29641 Show uninitialized descriptor's name in DeclarationDescriptor.toString() 2014-04-04 17:40:34 +04:00
Nikolay Krasko 5606c21f89 Remove synchronous VFS refresh to avoid deadlocks (KT-4584)
#KT-4584 Fixed
2014-04-04 02:10:31 +04:00
Alexander Udalov 750d3e8de7 Drop MutableClassDescriptorLite
Inline it into MutableClassDescriptor
2014-04-03 19:13:11 +04:00
Alexander Udalov a485f24217 Don't serialize signature to string to check against toString/hashCode/equals 2014-04-03 01:24:39 +04:00
Andrey Breslav 0f422df98f In non-lazy mode, script classes are normal MutableClassDescriptors 2014-04-02 15:48:57 +04:00
Andrey Breslav 64a80baacc Support script return value field in LAZY mode 2014-04-01 12:36:51 +04:00
Andrey Breslav b8119a57ab Script parameters supported in LAZY mode 2014-04-01 12:36:51 +04:00
Andrey Breslav 5166c73060 Property descriptor initialization moved to DescriptorResolver 2014-04-01 12:25:32 +04:00
Andrey Breslav 5ef329b713 Store scope for body resolution in ScriptDescriptor 2014-04-01 12:25:31 +04:00
Andrey Breslav bbf9523c04 getValueParameters() removed from ScriptDescriptor 2014-04-01 12:25:30 +04:00
Andrey Breslav 04f21eee50 getReturnType() removed from ScriptDescriptor 2014-04-01 12:25:30 +04:00
Andrey Breslav 39c06e19e4 Minor. Comment removed 2014-04-01 12:25:30 +04:00
Andrey Breslav 7191763c17 Extract interface: ScriptDescriptor 2014-04-01 12:25:29 +04:00