Dmitriy Dolovov
ea3f4ad47f
Attach K/N stdlib sources on MPP project import
...
Issue #KT-30635:fixed
2019-04-04 17:34:42 +07:00
Dmitriy Dolovov
f9d9d7f737
Keep K/N stdlib upper than platform libraries in IDEA UI
2019-04-04 17:34:24 +07:00
Natalia Selezneva
97531c8ec2
Do not include buildSrc module dependencies into script dependencies (KT-30295)
...
^KT-30295 Fixed
2019-04-04 11:06:14 +03:00
Natalia Selezneva
aa99d8fcbe
Rename extension point for additional dependencies of scripts
2019-04-04 11:06:14 +03:00
pyos
4c01614136
Avoid leaking SamConstructorDescriptors from psi2ir
2019-04-04 09:45:00 +02:00
pyos
23d742237f
Add tests for merging SAM wrappers and references
2019-04-04 09:45:00 +02:00
pyos
e05c151a73
Remove explicit mention of an internal name from a test
2019-04-04 09:45:00 +02:00
pyos
ee59530f71
Fix casts of the null constant to SAM types
2019-04-04 09:45:00 +02:00
pyos
f47d9d54c0
psi2ir: add test for SAM-conversion of operator arguments
2019-04-04 09:45:00 +02:00
pyos
39c8939241
JVM_IR: optimize SAM conversion of lambda literals
...
Instead of materializing an invokable object and storing it in an
instance of the implementation, create a specialized class that calls
the lambda directly, resulting in one less nesting layer and one less
class.
2019-04-04 09:45:00 +02:00
pyos
b74586f84e
JVM_IR: implement single-abstract-method conversions
2019-04-04 09:45:00 +02:00
Mikhail Glukhikh
141e8d553e
FIR body resolve: support variable assignments
2019-04-04 10:31:15 +03:00
Mikhail Glukhikh
c56b471b71
FIR body resolve: handle constant types more precisely
2019-04-04 10:31:13 +03:00
Mikhail Glukhikh
cc2a5cfc06
FIR body resolve: calculate type even for resolved references
2019-04-04 10:31:12 +03:00
Mikhail Glukhikh
d7f0392f90
FIR body resolve: fix value parameter expected type
2019-04-04 10:31:11 +03:00
Mikhail Glukhikh
8a6c9a6aec
FIR deserializer: read nullability & add constructors
2019-04-04 10:31:09 +03:00
Mikhail Glukhikh
6e9d78d431
FIR structure: make implicit built-in types resolved
2019-04-04 10:31:08 +03:00
Mikhail Glukhikh
bf0190d96c
FIR structure: reuse StandardClassIds in implicit built-in typeRef
2019-04-04 10:31:07 +03:00
Mikhail Glukhikh
b3cf3c6579
FIR structure: include calleeReference into FirDelegatedConstructorCall
2019-04-04 10:31:05 +03:00
Mikhail Glukhikh
63d3100122
FIR structure: FirClassLikeDeclaration is now FirStatement
...
Done to support (in theory) local type aliases
2019-04-04 10:31:04 +03:00
Mikhail Glukhikh
4213a4c7e2
FIR Java: reuse StandardClassIds
2019-04-04 10:31:02 +03:00
Mikhail Glukhikh
a0fa9e6b48
Raw FIR: make component call a function call, its argument -> receiver
2019-04-04 10:31:01 +03:00
Mikhail Glukhikh
30697787a0
Raw FIR: set "implicit boolean" result type for some operator calls
2019-04-04 10:31:00 +03:00
Mikhail Glukhikh
eb1aaad41b
Raw FIR: generate Unit at the end of empty lambda
2019-04-04 10:30:52 +03:00
Mikhail Glukhikh
eb86c9e540
FIR: get rid of ANDAND / OROR by replacing with when
2019-04-04 10:30:49 +03:00
Mikhail Glukhikh
395651a21e
Raw FIR: swap branches in when for elvis and bang-bang
2019-04-04 10:30:48 +03:00
Mikhail Glukhikh
f77ba2dd3e
Raw FIR: make object/sealed/enum constructor visibility private
2019-04-04 10:30:47 +03:00
Mikhail Glukhikh
057156f323
Raw FIR builder: cleanup code
2019-04-04 10:30:45 +03:00
Mikhail Glukhikh
33729aaf9b
Raw FIR: add Any/Enum/Annotation to supertypes iff no supertypes exists
2019-04-04 10:30:44 +03:00
Mikhail Glukhikh
7dd89a48f0
Raw FIR: introduce FirConstructor.isPrimary
2019-04-04 10:30:43 +03:00
Mikhail Glukhikh
61c2e4e590
Raw FIR: handle local visibility for functions & classes
2019-04-04 10:30:41 +03:00
Mikhail Glukhikh
4187ea1f86
Raw FIR: add initializers to primary constructor properties
2019-04-04 10:30:40 +03:00
Ilya Matveev
1f2d31dffb
Update Kotlin/Native: 1.3-dev-9301
2019-04-04 14:24:09 +07:00
Mark Punzalan
a0940b1342
Use stricter assertions in for-loop bytecode text tests.
2019-04-04 09:07:19 +02:00
Mark Punzalan
dd65e0876f
Simplify loop building by encoding open/closed bound information in the
...
HeaderInfo object, and modifying the operator in the loop condition.
The "additional emptiness condition" is no longer necessary with this.
The open/closed property was removed from HeaderInfo in an earlier
commit, but bringing it back in to simplify the loop building makes
more sense.
Also expanded tests for evaluation order of range bounds.
2019-04-04 09:07:19 +02:00
Mark Punzalan
7680e7fd56
Use while loop for progressions that cannot overflow (instead of
...
do-while with enclosing "not empty" check).
Also do not add additional "not empty" condition for `until` loops when
the given bound is a constant != MIN_VALUE.
2019-04-04 09:07:19 +02:00
Mark Punzalan
ba0e016c4e
Add bytecode tests for array for-loop iteration.
2019-04-04 09:07:19 +02:00
Mark Punzalan
7afe121238
Eliminated the redundant ForLoopHeader.needsEmptinessCheck property, cast "bound" to progression type if necessary, fixed variable declaration order.
2019-04-04 09:07:19 +02:00
Mark Punzalan
6b83c04472
Cast step expression to the correct Number type, if necessary.
2019-04-04 09:07:19 +02:00
Mark Punzalan
f6e74079bb
Cleanup ForLoopsLowering: Add more comments, remove descriptor usages,
...
make code style consistent.
2019-04-04 09:07:19 +02:00
Mark Punzalan
ea9572ad28
Add DefaultProgressionHandler that handles for-loops over
...
non-specialized progressions, including "step" progressions.
DefaultProgressionHandler uses the "first/last/step" properties of
the progression when building the loop header.
2019-04-04 09:07:19 +02:00
Mark Punzalan
301ac90770
Remove "bound" and "closed" properties from HeaderInfo and
...
ForLoopHeader, instead assuming that all ranges are closed and that the
"last" property is already property calculated.
This means the HeaderInfo.last for arrays, "indices" and "until"
progressions are decremented from the bound. This simplifies the loop
construction and moves the work to the handlers. This will also simplify
the handling of "reversed()" in the future since we don't need to
consider the case where the lower bound is open.
2019-04-04 09:07:19 +02:00
Mark Punzalan
93deff5e57
Rename "lowerBound/upperBound" to "first/last" and move loopVariable to
...
ForLoopHeader base class.
These terms are less loaded and less confusing, especially with "downTo"
progressions, and once we start handling "reversed()".
2019-04-04 09:07:19 +02:00
Mark Punzalan
8e1be5424f
Handle for (i in a until Int.MIN_VALUE) corner case by adding
...
an additional "not empty" condition produced by the UntilHandler.
2019-04-04 09:07:19 +02:00
Mark Punzalan
7b153b2b68
Move building of "not empty" condition (used to check if loop is empty)
...
from ForLoopsLowering into ForLoopHeader, reducing the building logic in
ForLoopsLowering.
2019-04-04 09:07:19 +02:00
Mark Punzalan
a2e3d3635e
Replace HeaderInfo.increasing property with a "direction" enum property,
...
which is computed based on the value of "step" (if possible).
2019-04-04 09:07:19 +02:00
Mark Punzalan
ed9ede8936
Make HeaderInfo.step not nullable and have handlers explicitly provide
...
the step expression.
The semantics of "step" are now clearer: It will no longer be negated
based on the "increasing" property; if the progression is decreasing
(i.e., for "downTo" progressions), then it must be negative. The
"increasing" property is still used when building the emptiness
condition.
2019-04-04 09:07:19 +02:00
Mark Punzalan
40dbf8a3fd
Move elementType() and getProgressionType() extension methods into
...
ProgressionType.
2019-04-04 09:07:19 +02:00
Mark Punzalan
409d99a52a
Add ForLoopsLowering to JVM phases.
...
Also deleted StepHandler. Since the HeaderInfo.needLastCalculation is
only set to true for handling step progressions, deleted that property
and all associated logic around it.
2019-04-04 09:07:19 +02:00
Mark Punzalan
7276b7e66a
Fix compilation errors after rebasing.
2019-04-04 09:07:19 +02:00