Commit Graph

1251 Commits

Author SHA1 Message Date
Alexander Udalov 3358108c3f Retain data flow info after == (equals)
#KT-2825 In Progress
2012-11-16 17:56:11 +04:00
Alexander Udalov 1fbe9b9a31 Retain data flow info after binary calls
Make autocasts in CandidateResolver when checking value argument types

 #KT-2825 In Progress
2012-11-16 17:56:11 +04:00
Svetlana Isakova 96c1564c54 added ExpressionTypingServices.deparenthesize()
(with type resolution)
2012-11-16 15:32:59 +04:00
Svetlana Isakova 6d3981503b refactoring (removed duplicated code) 2012-11-16 15:32:58 +04:00
Alexander Udalov c261fa2c35 Fix line separators in TestGenerator
Do not convert line separators when loading copyright text. This fixes problems
when generating tests on Windows systems
2012-11-13 21:27:47 +04:00
Andrey Breslav 7e7e779e80 No printing of verbose compiler output in Ant task and REPL 2012-11-13 19:38:20 +04:00
Natalia.Ukhorskaya ba2eab526a Extension properties in class: don't put receiver on stack for GETFIELD/PUTFIELD instruction
#KT-3031 Fixed
2012-11-13 19:03:20 +04:00
Andrey Breslav ef403cc91a Alternative methods for progress reporting 2012-11-13 13:45:45 +04:00
Andrey Breslav cca21e96c1 Progress class moved to jvm backend 2012-11-13 13:45:44 +04:00
Evgeny Gerashchenko 3fce07b83a Arranged generator classes into packages to make it possible to compile GenerateInjectors separately. 2012-11-12 20:40:23 +04:00
Evgeny Gerashchenko 8d7e79c806 Renamed & moved AllInjectorsGenerator. 2012-11-12 19:54:22 +04:00
Evgeny Gerashchenko 47dd399cdd Regenerated tests. 2012-11-12 19:54:22 +04:00
Evgeny Gerashchenko 7b677d7ff1 Moved test generating code into TestsGenerator, got rid of duplicates. 2012-11-12 18:30:50 +04:00
Svetlana Isakova 82e9d1f4fa logic for fake value arguments creation
moved to 'resolveFakeCall' method
2012-11-12 15:32:12 +04:00
Svetlana Isakova a90db452ff resolveFakeCall instead of resolveExactSignature
usage changed in tests
2012-11-12 15:32:12 +04:00
Svetlana Isakova e9c8be8449 complete type inference only for one candidate
(the most specific)
to avoid exponential resolve of value arguments for several candidates
where type inference is incomplete (or depends on expected type)
2012-11-12 15:32:11 +04:00
Svetlana Isakova dda3091dfb 'CANNOT_COMPLETE_RESOLVE' error added 2012-11-12 15:32:11 +04:00
Svetlana Isakova e7750c6dc7 OverloadingConflictResolver made singleton 2012-11-12 15:32:11 +04:00
Natalia.Ukhorskaya b5a3486131 Back-end: correct indexes of local variables for double and long
#KT-3033 Fixed
2012-11-12 15:03:54 +04:00
Natalia.Ukhorskaya 94fbf2bdf4 Add labels for extension properties
#KT-2824 Fixed
2012-11-12 13:23:00 +04:00
Nikolay Krasko c081ced616 KT-2499 If Java class is imported, it is visible in completion three times: as Java class, Kotlin class and package
- Add java trace into delegation for lazy resolve session
 #KT-2499 Fixed
2012-11-09 14:49:23 +04:00
Evgeny Gerashchenko e691a0bc93 Considering variances when checking for erased casts. 2012-11-08 22:02:52 +04:00
Evgeny Gerashchenko 8365cee0b5 Fixed bug in TypeUtils.intersect().
For "Foo", "Foo?" it returned "{Foo}" instead of "Foo"
2012-11-08 21:59:17 +04:00
Alexey Sedunov 8cff709bfb #KT-3023 Fixed 2012-11-07 18:33:21 +04:00
Alexander Udalov 415b6f8efe Generate bridges for super-calls only when needed
#KT-2887 Fixed
2012-11-07 17:06:19 +04:00
Alexander Udalov 89b8bbec57 Do not add extra 'this' parameter for TImpl's accessor
Fixes weird cases like super-call from a closure inside a trait with a required
class
2012-11-07 17:06:18 +04:00
Alexander Udalov 2edb89b5c5 Refactor mysterious code in ExpressionCodegen
'super' receiver is now generated in visitSuperExpression()
2012-11-07 17:06:17 +04:00
Alexander Udalov cd35a6626e KT-2963 VerifyError using traits with required classes
#KT-2963 Fixed
2012-11-07 17:06:14 +04:00
Natalia.Ukhorskaya f139b637f3 Automatically cast error for intrinsic methods in array
#KT-2997 Fixed
2012-11-07 16:28:46 +04:00
Pavel V. Talanov 2eb017fa1e Remove redundant parameter from JavaDescriptorResolver#getJavaPackageScope
Minor warnings fixed in affected files
2012-11-07 16:12:31 +04:00
Andrey Breslav 6feceaa161 PsiElement for receiver declaration in a function type
This fixes the following assertion:

EA-37795 - assert: DescriptorResolver.checkBounds

java.lang.AssertionError: (
        public val categoryName: String,
        public val defaultReoccurrenceRate: DateReoccurrence,
        datesCollection: Collection<Date>) {

	at org.jetbrains.jet.lang.resolve.DescriptorResolver.checkBounds(DescriptorResolver.java:1137)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.checkTypesInClassHeaders(TypeHierarchyResolver.java:447)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.process(TypeHierarchyResolver.java:154)
	at org.jetbrains.jet.lang.resolve.TopDownAnalyzer.doProcess(TopDownAnalyzer.java:125)

Caused by misbehavior of the JetFunctionType class
2012-11-06 15:29:14 +04:00
Andrey Breslav 4cda4ce388 EA-39105 - ISE: TraceBasedRedeclarationHandler.report
Fixed:
java.lang.IllegalStateException: No declaration found found for org.jetbrains.jet.lang.descriptors.TypeParameterDescriptorImpl@...
	at org.jetbrains.jet.lang.resolve.TraceBasedRedeclarationHandler.report(TraceBasedRedeclarationHandler.java:48)
	at org.jetbrains.jet.lang.resolve.TraceBasedRedeclarationHandler.handleRedeclaration(TraceBasedRedeclarationHandler.java:39)
2012-11-06 14:32:54 +04:00
Natalia.Ukhorskaya 91e83c2860 Wrong instruction for invoke private function
#KT-2202 Fixed
2012-11-02 11:49:10 +04:00
Natalia.Ukhorskaya 481afeb914 Use getfield or putfield instructions for private properties instead of invokevirtual getA or setA 2012-11-02 11:18:47 +04:00
Andrey Breslav ec255e8342 NO_RECEIVER_PARAMETER is now simply null 2012-11-01 19:53:22 +04:00
Andrey Breslav a325d86e20 Properly reporting illegal use of 'super' in extension functions 2012-11-01 19:53:22 +04:00
Andrey Breslav 20906e34ce Tests for diagnostics on this and super are moved and broken into smaller parts 2012-11-01 19:53:22 +04:00
Andrey Breslav 4955ce5caa ReceiverDescriptor renamed to ReceiverValue 2012-10-31 23:38:53 +04:00
Andrey Breslav a91a99e5be getImplicitReceiverHierarchy() returns a List 2012-10-31 23:38:53 +04:00
Andrey Breslav 555ac07b55 Migrating scopes onto ReceierParameterDescriptor
Getting rid of getImplicitReceiver() in JetScope
2012-10-31 23:33:12 +04:00
Andrey Breslav bc592cb5cd Migrating descriptors onto ReceiverParameterDescriptor 2012-10-31 23:33:12 +04:00
Pavel V. Talanov 4b85fd152d Change parameter names in NamespaceComparator so that is clear what is "actual" and "expected" 2012-10-31 17:02:46 +04:00
Natalia.Ukhorskaya 3b58eb4b60 Generate copy function for data classes
#KT-2779 Fixed
2012-10-31 15:46:48 +04:00
Alexander Udalov 4c5fe70804 Do not compare boxed values with 0 via IFEQ/IFNE 2012-10-30 22:54:20 +04:00
Rafael Cordones cb99f26807 KT-3002 optimized ==/!=0
Optimize byte-code generation for integer comparisons != and ==.
Work done in Hackergarten Vienna.
Co-authored-by: Kilian Matt <kilian.matt@gmail.com>
2012-10-30 22:11:04 +04:00
Evgeny Gerashchenko 58b904adb9 Regenerated lazy resolve test. 2012-10-30 18:41:00 +04:00
Evgeny Gerashchenko 78d62fa0c0 Supported loading named objects within class objects from compiled library. 2012-10-30 18:41:00 +04:00
Evgeny Gerashchenko a71fa35187 Supported loading named objects within named objects from compiled library. 2012-10-30 18:41:00 +04:00
Alexander Udalov 3ca976ee77 Generate bridges for delegates 2012-10-30 16:48:02 +04:00
Alexander Udalov 288e3a7b40 Cast arguments to proper types when generating delegates
Also minor refactoring in a couple places to adopt this style
2012-10-30 16:47:50 +04:00