Denis Zharkov
87b6374351
Get rid of redundant intrinsic
...
Also drop 'safe' parameter from TypeIntrinsics.checkcast,
because it's supposed to work as JVM checkcast (i.e. accepting nulls)
2015-12-28 18:31:40 +03:00
Denis Zharkov
39bbd7c795
Rework reified markers format
...
Use integer operation identifier instead of method name to differentiate
reified operations
2015-12-28 18:31:40 +03:00
Alexander Udalov
890c961383
Fix reflection internal error on enum nested classes query
...
#KT-10520 Fixed
2015-12-28 16:40:34 +03:00
Denis Zharkov
688a1b6305
Adjust type approximation to broken code and missing dependencies
...
- Do not run approximation if arguments number is different
- Add nullable Any? as supertype to MissingDependencyErrorClass
The latter is needed because otherwise TypeArgument.isConsistent became false
2015-12-28 11:13:39 +03:00
Denis Zharkov
722a152a74
Fix supertypes calculation for types with projections
...
Use captured types as replacement for non top-level entries
#KT-7296 Fixed
2015-12-28 11:13:39 +03:00
Denis Zharkov
397d2ca312
Fix captured approximation for case of flexible types
...
#KT-9294 Fixed
2015-12-28 11:13:38 +03:00
Denis Zharkov
b6edddbe8b
Make project compilable after member scope refinement
2015-12-28 11:13:38 +03:00
Denis Zharkov
ec0ec55ab5
Replace type entries of JsContext<*> with JsContext<JsNode>
...
It's needed to make method calls (e.g. replaceMe) on it typesafe,
otherwise it's value parameter type is subtype of captured
2015-12-28 11:13:37 +03:00
Denis Zharkov
9773e98d8a
Refine type from property setter parameter on assignment
...
In most cases these types are equals, the only known exception is
var-property contained in projected type member scope (see test data)
2015-12-28 11:13:37 +03:00
Denis Zharkov
e2c02f825f
Refine member scope for types with projections
...
Instead of erasing descriptors with conflicting substitution,
use invariant CapturedType(<projection>) as replacement for type parameter
within default member scope.
After substitution leave such types 'as is' everywhere except return types,
use common approximation for them.
#KT-9294 In Progress
#KT-5411 Fixed
#KT-8647 Fixed
#KT-9462 Fixed
#KT-9893 Fixed
#KT-7581 Fixed
#KT-7296 In Progress
2015-12-28 11:13:37 +03:00
Denis Zharkov
365ff593f3
Extract and normalize member scope calculation
...
Basically it's wrong to use original types' member scope
as a worker for SubstitutionScope.
Member scope should always be determined by type constructor's default one
and substitution/arguments
#KT-10448 Fixed
2015-12-28 07:44:56 +03:00
Denis Zharkov
58caff3411
Minor. Add tests checking not-null assertions
...
More precisely these tests check cases when expected type
was somehow obtained from captured type (in member scope with projections)
2015-12-28 07:44:56 +03:00
Denis Zharkov
7aaa6422b4
Introduce CustomSubstitutionCapability.substitutionToComposeWith
...
Mainly it's needed to prevent creation of subsituions composition
everytime we replacing arguments, because it's both unoptimal and wrong
When replace arguments in `A<E, F>` with <String, E> you got `A<String, String>`
as a result, that is unexpected.
But composition is only needed when previous substituion was abnormal
(e.g. RawSubsitution that should actually wrap new arguments), see RawTypes tests
2015-12-28 07:44:55 +03:00
Denis Zharkov
8d0a90a838
Preserve type capabilities of captured type
2015-12-28 07:44:55 +03:00
Denis Zharkov
e7dbcfe21f
Minor. Cleanup code
2015-12-28 07:44:54 +03:00
Denis Zharkov
555286849e
Minor. Move declaration closer to usages and optimize imports
2015-12-28 07:44:54 +03:00
Denis Zharkov
48b89a5db7
Replace unchecked 'is' on local class with unchecked 'as'
...
It became unchecked after latest changes (see parent commit)
2015-12-28 07:44:54 +03:00
Denis Zharkov
3fd35636ad
Fix type parameter list for local classes
...
Add captured parameters from enclosing functions
#KT-9584 Fixed
2015-12-28 07:44:53 +03:00
Denis Zharkov
73b961e885
Clean project code after #KT-3996 fix
...
No overload resolution ambiguity in smart-casts
2015-12-28 07:44:53 +03:00
Mikhail Glukhikh
0cc09872b6
Implicit exhaustive when annotation / highlighting
2015-12-26 10:46:44 +03:00
Mikhail Glukhikh
7d6ccc40c2
Implicit exhaustive whens now have exception in else branch #KT-8700 Fixed
2015-12-26 10:46:39 +03:00
Mikhail Glukhikh
011a9f23b9
Implicit exhaustive when check for definite variable initialization (KT-8700)
2015-12-26 10:46:35 +03:00
Mikhail Glukhikh
52c3fb03a2
ControlFlowInfo introduced to store variable states, related refactoring
2015-12-26 10:46:30 +03:00
Mikhail Glukhikh
0f3997c6ca
InitState / VariableUseState / VariableControlFlowState moved to a separate file
2015-12-26 10:46:25 +03:00
Mikhail Glukhikh
4c4456c808
PseudocodeVariablesData converted to Kotlin
2015-12-26 10:46:20 +03:00
Mikhail Glukhikh
7179b37d95
PseudocodeVariablesData.java --> PseudocodeVariablesData.kt
2015-12-26 10:46:16 +03:00
Mikhail Glukhikh
b93894953d
Exhaustive whens without else and 'Nothing' as the result are considered 'implicit exhaustive'
2015-12-26 10:46:11 +03:00
Mikhail Glukhikh
d62d7dd84f
Introduced binding context storage for implicit exhaustive when (KT-8700)
2015-12-26 10:46:06 +03:00
Mikhail Glukhikh
b805ce06c2
CFG exhaustive when else instruction for KT-8700
2015-12-26 10:46:01 +03:00
Alexander Udalov
697228eae0
Mark enum entry names as name ids for incremental compilation purposes
2015-12-25 20:16:18 +03:00
Alexander Udalov
3513a64351
Move utilities about companion property fields to JvmAbi
...
To reuse that logic in reflection
2015-12-25 20:16:18 +03:00
Alexander Udalov
0685f06200
Drop outdated stuff from metadata annotations
...
Make KotlinLocalClass and KotlinInterfaceDefaultImpls not retained at runtime,
to be maybe deleted in the future
2015-12-25 20:16:18 +03:00
Alexander Udalov
0ecf04dcc5
Drop KotlinDelegatedMethod, simplify related code in codegen
2015-12-25 20:16:18 +03:00
Alexander Udalov
39c10867a0
Drop 'index' JVM binary format extension
...
Compute the JVM parameer index manually instead
2015-12-25 20:16:18 +03:00
Alexander Udalov
8dc604ac8b
Drop compatibility flag, suppressing optimized generation of callable references
2015-12-25 20:16:18 +03:00
Alexander Udalov
64b48f4458
Drop compatibility flag, suppressing optimized generation of delegated property metadata
2015-12-25 20:16:18 +03:00
Alexander Udalov
002dc92d89
Drop old antlib.xml in org/jetbrains/jet/buildtools/ant
...
Use the new one in org/jetbrains/kotlin/ant instead
2015-12-25 20:16:18 +03:00
Alexander Udalov
dc6a176282
Drop old JVM binary format extensions: static in outer, impl class name
2015-12-25 20:16:18 +03:00
Alexander Udalov
fc74759231
Drop old enum entries from binary format
2015-12-25 20:16:18 +03:00
Alexander Udalov
57b96f38a9
Minor, remove/simplify unnecessary utilities in util.runtime
2015-12-25 20:16:18 +03:00
Alexander Udalov
b4addd0567
Move builtins-related logic from DeserializedPackageFragment to BuiltinsPackageFragment
2015-12-25 20:16:18 +03:00
Alexander Udalov
e7da56baf4
Restructure code in BuiltInsSerializer
2015-12-25 20:16:18 +03:00
Alexander Udalov
ddcdc11099
Write and read built-ins binary version
2015-12-25 20:16:18 +03:00
Alexander Udalov
906d706961
Deserialize builtins from new message
2015-12-25 20:16:18 +03:00
Alexander Udalov
7592f31596
Serialize built-ins to separate file .kotlin_builtins
2015-12-25 20:16:18 +03:00
Alexander Udalov
07a23cab10
Minor, make SerializedResourcePaths an interface
2015-12-25 20:16:18 +03:00
Alexander Udalov
75f046fa81
Drop Throwable#printStackTrace, make it a JVM-specific extension
2015-12-25 20:16:18 +03:00
Stanislav Erokhin
3d44471659
KT-10483 Missing smart cast on variable in variable as function call
...
#KT-10483 Fixed
2015-12-25 20:13:08 +03:00
Alexey Sedunov
4de26bed93
Minor: Add test for now-obsolete KT-8035 "Extended class is not open" quickfix fails on nested classes "
2015-12-25 18:51:03 +03:00
Alexey Sedunov
c90d283ff5
Quick Fixes: Implement 'Add val/var to primary constructor parameter' quick-fix for data classes
...
#KT-4038 Fixed
2015-12-25 18:50:59 +03:00