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
808cf75060
Fixed bug: resolution task wasn't recreated
...
The old resolved calls were used
2014-04-30 13:34:34 +04:00
Svetlana Isakova
928b28e080
Complete type inference for nested calls
...
inside non resolved invocation
2014-04-30 13:34:31 +04:00
Andrey Breslav
550c0ed998
Report "UNSUPPORTED" on usages of typedef
2014-04-29 19:12:55 +04:00
Andrey Breslav
31e859356f
A test that fails in lazy mode (currently disabled)
2014-04-29 19:12:55 +04:00
Denis Zharkov
cb1e762fc4
Optimizations of When expression with int constants:
...
Added test with dense constants (tableswitch should be used)
2014-04-25 18:17:37 +04:00
Denis Zharkov
3bc1c45fde
Refactored tests for switch optimization of When expression
2014-04-25 18:17:36 +04:00
Denis Zharkov
95345a9bd4
Tests for switchOptimization: shuffled and added sparse version
2014-04-25 18:17:36 +04:00
Denis Zharkov
1952781e4b
SwitchOptimization: generating `lookupswitch' opcode for 'when' in case of integral types
2014-04-25 18:17:36 +04:00
Denis Zharkov
c73533d214
Switch Optimization
2014-04-25 18:16:24 +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
f7235e9d82
Fix abstract nested class in enums in JVM back-end
...
It caused InstantiationError because the enum had an incorrect ACC_ABSTRACT
flag
2014-04-24 16:10:13 +04:00
Alexander Udalov
d913dfb1aa
Correctly map declaration owner in JVM codegen
...
"context.contextKind()" was incorrect in
ExpressionCodegen.intermediateValueForProperty(), because it represents the
context of the call site, not the context of the property declaration
#KT-4878 Fixed
2014-04-24 16:10:12 +04:00
Alexander Udalov
fbf9f5f7d0
Don't generate bridges for equals(), hashCode(), toString()
...
Otherwise an assertion is failing in the algorithm which is related to an
inconsistency of java.lang.Object inheritance in JDR (KT-4890)
2014-04-24 16:10:12 +04:00
Andrey Breslav
f0a29f190b
USELESS_HIDDEN_IMPORT diagnostic fixed for LAZY mode
2014-04-18 21:28:23 +04:00
Alexander Udalov
cdceaec79f
Fix unjustified descriptorToDeclaration in bridge codegen
...
Delegated and synthesized members don't usually have a declaration as well as
fake overrides
2014-04-18 17:18:51 +04:00
Alexander Udalov
5e138a606b
Report "cannot infer visibility" for delegated members
2014-04-17 19:51:32 +04:00
Alexander Udalov
1deb55bfde
Add positioning strategy for diagnostics on illegal fake overrides
...
"funcitonTypes.kt" test data file was changed because now that there is a
positioning strategy, it takes the liberty of filtering out those diagnostics
that were reported on syntactically invalid elements
2014-04-17 19:51:31 +04:00
Alexander Udalov
5ae339d940
Fix "Cannot infer visibility" for fake overrides
...
#KT-4785 Fixed
2014-04-17 19:51:31 +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
Alexey Sedunov
3952a121fb
Pseudocode: Track PSI elements which correspond to jump instructions
2014-04-17 19:00:56 +04:00
Andrey Breslav
d28ca5bdfa
Empty parameter list should go before '->' in a lambda
...
Example:
val x = { -> foo() }
2014-04-14 19:15:08 +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
fc838dbb53
Refactor ImplementationBodyCodegen.getTraitImplementations()
...
Make it static, extract a method which finds an implementation in a trait for a
fake override
2014-04-11 21:57:46 +04:00
Alexander Udalov
28940256e3
Minor, add bytecode text test on bridges for fake overrides
2014-04-11 21:57:45 +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
04c237cc22
Generate bridges for fake overrides when needed
...
#KT-3985 Fixed
#KT-4145 Fixed
2014-04-11 21:57:44 +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
Nikolay Krasko
a7bc9ec96c
Minor: use directive with current ABI version in test data
2014-04-04 02:10:29 +04:00
Alexander Udalov
cbe6e49a93
Consider outer classes when topsorting hierarchy
...
- when building a topsorted hierarchy, consider not only edges to the class'
superclasses, but also from inner/nested classes to their container. This
effectively means that a class cannot inherit from its nested class. Similar
cases (see the tests) are disallowed in Java.
- filter classes by their presence in TopDownAnalysisContext, not by being a
MutableClassDescriptor (otherwise analysis for local classes ends up trying
to do something with outer superclasses)
- delete outdated comment: topsort is needed not only for better diagnostics,
but also for correct order of fake overrides construction
2014-04-03 19:12:56 +04:00
Alexander Udalov
9b2291d381
Fix StackOverflowError on cyclic hierarchy Java<->Kotlin
...
Report errors not only when superclasses are MutableClassDescriptorLite, but
any classes
#KT-2115 Fixed
2014-04-03 19:04:12 +04:00
Andrey Breslav
d5eea09146
Imports moved from under the script node to top level
2014-04-01 12:36:52 +04:00
Andrey Breslav
77261330b9
Only use script parameters from definition
...
Passing parameters of a _single_ script into TopDownAnalyser makes no sense
2014-04-01 12:25:33 +04:00
Andrey Breslav
f81bf5ea73
Do not add functions and properties with inferred types as script class memebrs
2014-04-01 12:25:31 +04:00
Mikhael Bogdanov
e2f3a589e7
KT-3308 Support local generic functions in codegen
...
#KT-3308 Can'tReproduce
2014-04-01 11:18:16 +04:00
Mikhael Bogdanov
4269729b0a
KT-3214: Verify error when get array convention is used with varargs
...
#KT-3214 Can'tReproduce
2014-04-01 11:18:16 +04:00
Mikhael Bogdanov
596dc68ea4
KT-4340: Jvm backend generates invalid synthetic accessor for private extension property
2014-04-01 11:18:15 +04:00
Evgeny Gerashchenko
dadc8351b6
Added tests for compiling Java against TraitImpl and extension members.
2014-03-31 22:39:58 +04:00
Natalia Ukhorskaya
4a79bfa16d
Generate static accessors fro protected functions in different packages
...
#KT-4617 Fixed
2014-03-31 21:27:13 +04:00
Mikhael Bogdanov
5b5ecca12a
Inline test: check that no any inline method is called directly
2014-03-31 20:04:23 +04:00
Mikhael Bogdanov
0d239a3e0e
Moving local fun callee generation to CallReceiver
2014-03-31 20:04:10 +04:00
Mikhael Bogdanov
7dc662f613
Optimization for const closures: access it via GETSTATIC
2014-03-31 20:04:09 +04:00
Mikhael Bogdanov
c7c1e33655
Move local fun callee generation to pushArgumentsWithCallReceiver.
...
Local fun callee generation via resolvedCall.resultingDescriptor not call
2014-03-31 20:03:43 +04:00
Evgeny Gerashchenko
829cd95469
KT-4770 Javac fails against Kotlin inner class
...
#KT-4770 fixed
2014-03-28 16:46:26 +04:00
Alexander Udalov
ea4daed0ac
Use FqNameUnsafe instead of FqName in JVM intrinsics
...
#KT-4777 Fixed
2014-03-27 22:46:44 +04:00
Alexander Udalov
0deea6b83c
Add test for obsolete issue
...
#KT-1936 Obsolete
2014-03-27 03:06:59 +04:00
Andrey Breslav
298ddcf0ad
Do not resolve annotation arguments when only a type is requested
...
This replaces the logic that always did complete constructor call resolution by a request to typeResolver when only a type is needed
2014-03-26 21:10:29 +04:00
Andrey Breslav
72b2fa77f7
Test for recursively annotated class object added
2014-03-26 21:10:29 +04:00
Andrey Breslav
4b5a192e4c
Don't add primary constructors parameters for properties
2014-03-26 21:10:27 +04:00