Roman Artemev
685b74769d
[JVM IR] Fix lineNumber passing into CoroutineTransformer.
...
- Get it from `IrFile` & `IrElement.startOffset` instead of descriptor
- Unmute stepping tests
2020-09-03 11:37:24 +03:00
Alexander Udalov
5aca8ebda8
Minor, add test case on metadata of lambdas in constructors
...
KT-41465
2020-09-02 20:04:05 +02:00
pyos
6b65a2ea7d
JVM_IR: move classes out of lambdas inlined into initializers
...
Fixes KT-41465
2020-09-02 20:03:38 +02:00
Florian Kistner
9775a2148a
203: Fix compilation
2020-09-02 18:48:57 +02:00
Pavel Kirpichenkov
2c816d8911
[FIR-IDE] Introduce resolver for a single candidate
...
The purpose of this resolver is to reuse parts of tower resolver in IDE tasks.
For now it can run resolution stages to check suitability of extension receiver.
2020-09-02 19:15:06 +03:00
Alexander Udalov
b8d16f3d46
Add EnclosingMethod information to bytecode listing tests
2020-09-02 16:46:05 +02:00
Alexander Udalov
d4ecde5cb0
Minor, don't use token COROUTINES_PACKAGE in bytecode listing tests
...
Most of the tests that are run both for 1.2 and 1.3 coroutines have
different expectation .txt files anyway.
2020-09-02 16:46:05 +02:00
Alexander Udalov
24aee1cce3
JVM IR: unmute tests on anonymous objects in inline lambdas
...
All tests on anonymous objects should use the NO_CHECK_LAMBDA_INLINING
directive, since the test framework can't tell an anonymous object from
a lambda and checking that anonymous objects are "inlined" makes no
sense.
2020-09-02 16:46:04 +02:00
Alexander Udalov
e7937db8fa
Add link to the online docs to kotlinc's help
...
#KT-35111 Fixed
2020-09-02 16:45:56 +02:00
Alexander Udalov
6b05e1d179
Add warning to 'kotlinc.bat help' that delimiters need to be escaped
...
Related to KT-41303, KT-41309.
2020-09-02 16:45:40 +02:00
Ilya Kirillov
c0e9f05921
FIR: make FirTypeParameterScope to be name aware
2020-09-02 11:16:18 +03:00
Ilya Kirillov
31f2c4a857
FIR: add fake source element to implicit function return statement
2020-09-02 11:16:16 +03:00
Mikhail Glukhikh
7c0467944d
FullPipelineModularizedTest: fix compilation
2020-09-01 21:58:26 +03:00
Mikhail Glukhikh
0324c0d02f
FullPipelineModularizedTest: code cleanup
2020-09-01 21:51:49 +03:00
Roman Artemev
fdbc657656
[IR] Fix isFileClass checker
2020-09-01 18:53:17 +03:00
Denis Zharkov
02b72e16ef
FIR: Temporary weaken required phase in ensureResolvedForCalls
...
Currently, lazy resolution in IDE immediately starts common body resolution
after STATUS (that lead to loops during recursive resolve)
2020-09-01 17:43:30 +03:00
Denis Zharkov
b0a7960b42
FIR: Call ensureResolved(TYPES) when computing supertypes of a class
2020-09-01 17:43:30 +03:00
Denis Zharkov
8427cc373f
FIR: Fix coroutines related IDE exception from TowerResolveManager
...
Do not try to steal tasks in suspendResolverTask
Otherwise, it might lead to resuming current coroutine through
"resume" methods that is kind of illegal when using suspendCoroutineUninterceptedOrReturn
2020-09-01 17:43:30 +03:00
Denis Zharkov
d532529c30
FIR: Add workaround for recursive contracts in ensureResolvedForCalls
2020-09-01 17:43:30 +03:00
Denis Zharkov
0a1440d80c
FIR: Optimize ensureResolvedForCalls for common case
2020-09-01 17:43:30 +03:00
Denis Zharkov
1c0e3b30a2
FIR: Use return type calculator in FirTypeMismatchOnOverrideChecker
2020-09-01 17:43:30 +03:00
Denis Zharkov
992a2d556a
FIR: Add ensureResolved calls for types of sub-expressions
...
These calls resolve a class that a type of expression is built upon
2020-09-01 17:43:30 +03:00
Denis Zharkov
d05e947d25
FIR: Ensure resolved callable symbols came out of the declared scopes
...
Otherwise, we need to add `ensureResolved` to almost any usage of process*:
- Call resolution need fully resolved callables
- UseSiteScope when binding overrides should ensure resolved for callables from supertypes
- checkers have to make sure they use correct overridden
- SAM resolver
2020-09-01 17:43:30 +03:00
Denis Zharkov
d80caf7dbf
FIR: Extract common code in FirPackageMemberScope
2020-09-01 17:43:30 +03:00
Denis Zharkov
b4aef21423
FIR: Simplify API for ensureResolved
...
Additional `as` casts look redundant, but it's a design issue (see KT-41421)
2020-09-01 17:43:30 +03:00
Denis Zharkov
bb84dc2ed4
FIR: Minor. Extract common parts in FirClassDeclaredMemberScope
2020-09-01 17:43:30 +03:00
Denis Zharkov
1cc68762e1
FIR: Minor. Fix error message
2020-09-01 17:43:30 +03:00
Denis Zharkov
4cdc36abb3
FIR: Drop unused 'phasedFir' callables
2020-09-01 17:43:30 +03:00
Denis Zharkov
c3c8115163
FIR: Use explicit version of 'ensureResolved'
2020-09-01 17:43:30 +03:00
Denis Zharkov
517056e0c6
FIR: Do not require specific phase for super-call receiver class
...
It's anyway defined in the outer context (outer class) that already
should have proper context
2020-09-01 17:43:30 +03:00
Denis Zharkov
fcc2abcf40
FIR: Fix phase requirement for call resolution
2020-09-01 17:43:30 +03:00
Denis Zharkov
ff182f191e
FIR: Fix some contracts resolutions side-effects
...
- Resolve anonymous objects' contents
- Update phase for constructors
- Do not transform annotations
(while resolving they may refer to other declarations that don't have yet CONTRACTS phase)
2020-09-01 17:43:30 +03:00
Denis Zharkov
67cc85e02b
FIR: Avoid redundant calls to ensureResolved during call resolution
...
Call ensureResolved only once when creating a candidate
2020-09-01 17:43:30 +03:00
Denis Zharkov
bf2fc10cd6
FIR: Extract AbstractFirBasedSymbol::ensureResolved extension
2020-09-01 17:43:30 +03:00
Denis Zharkov
2529f541ba
FIR: Prepare refactoring of phasedFir
...
- Rename PhasedFirFileResolver -> FirPhaseManager
- Move semantically significant parts to a component
2020-09-01 17:43:30 +03:00
Roman Artemev
cae29a5d1c
[IR] Clean up WrappedDescriptors API
2020-09-01 17:08:11 +03:00
Roman Artemev
c7b57c0fb3
[IR] Use only empty constructor to create WrappedDescriptor
2020-09-01 17:08:11 +03:00
Roman Artemev
fd88914cf9
[IR] Remove some descriptor usage from Common/JS/JVM backends
...
- replace descriptor-based builders with pure IR ones
- fix matchers
- fix Ir2Js
- rewrite some inliner-helpers to pure-IR implementations
2020-09-01 17:08:11 +03:00
Dmitry Petrov
8cb8284957
EnhancedNullability annotation in IR
...
Fixes KT-40115 & KT-40117.
Move FlexibleNullability annotation to 'kotlin.internal.ir'.
2020-09-01 16:06:03 +03:00
Roman Artemev
0bff406a12
[JS IR] Add infra to test compilation with error
...
- add bunch of tests
- fix help test
2020-09-01 14:53:08 +03:00
Roman Artemev
e592b3af1d
[JS IR] Fix CallsLowering's*
...
- need to fix dev mode since some methods are not handled
with intrinsic lowering
2020-09-01 14:53:08 +03:00
Roman Artemev
7a6415dc53
[JS IR] Enable IrError element's lowerings in JS
2020-09-01 14:53:08 +03:00
Roman Artemev
4dca3715fa
[JS IR | IR] Implement error element lowering to support compilation with errors
2020-09-01 14:53:08 +03:00
Roman Artemev
14b5424583
[JS IR] Support translation of IrError* elements
2020-09-01 14:53:08 +03:00
Roman Artemev
1fd5c1cc65
[IR] Support IrErrorType & IrErrorDeclaration in ir mangler
2020-09-01 14:53:08 +03:00
Roman Artemev
9c36487077
[IR] Disable mangle checker for IrErrorDeclarations
2020-09-01 14:53:07 +03:00
Roman Artemev
563af709a8
[Psi2Ir] Fix generation of IrError* nodes
...
- Provide detailed description
- Support syntax-incorrect statements
- Generate an error declaration if normal generation has failed
2020-09-01 14:53:07 +03:00
Roman Artemev
a60782f3df
[JS IR] Add CLI argument to setup error tolerance policy
...
- Make sure dev mode is enabled if code with errors is allowed
2020-09-01 14:53:07 +03:00
Roman Golyshev
90c89bddc5
FIR IDE: Add collecting scopes for declarations
...
- They are required to perform completion in default arguments,
return types, and other declaration parts (except for body)
2020-09-01 10:09:46 +00:00
Mikhail Zarechenskiy
9c217e3d99
Reuse revised variables during lambda analysis against type variables
...
#KT-41400 Fixed
2020-09-01 13:04:53 +03:00