Commit Graph

61 Commits

Author SHA1 Message Date
Mikhail Glukhikh 19f1a3de1a [FIR2IR] Populate overridden symbols also with public symbol inheritors 2020-05-28 22:19:21 +03:00
Mikhail Glukhikh 85760770a8 [FIR2IR] Initialize built-in symbols at start of conversion 2020-05-28 22:18:20 +03:00
Mikhail Glukhikh cd24745f1f [FIR2IR] Add primitive signature composer & use it for external classes 2020-05-28 22:18:13 +03:00
Vitaly fe047f9b47 [JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR 2020-05-27 00:32:56 +03:00
Mikhail Glukhikh 3652ac9354 [FIR2IR] Mute 2 failing BB tests
Looks like both tests are failing because now only classes from
'kotlin.*' are considered "external" and generated with declarations.
2020-05-14 13:40:37 +03:00
Mikhail Glukhikh e7e80be34a [FIR2IR] Populate overridden symbols even for !isOverride
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.

This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Jinseong Jeon 0890b8bad3 FIR2IR: set superQualifierSymbol for property access 2020-04-30 12:26:47 +03:00
Jinseong Jeon 57fe01c375 FIR2IR: populate overriddenSymbols for overriding functions
#KT-38416 Fixed
2020-04-27 11:50:24 +03:00
Dmitriy Novozhilov 7f02d57d88 [FIR] Correctly detect super type in delegated constructor call 2020-04-17 12:37:29 +03:00
Mikhail Glukhikh 5c758af0a6 [FIR] Use ScopeSession from resolve transformer in FIR2IR 2020-04-09 15:22:55 +03:00
Mikhail Glukhikh a4c7619c89 [FIR2IR] Introduce & use FirBuiltInsPackageFragment
Without this commit, JVM name mapping logic in BE does not work for FIR,
because FIR cannot use old BuiltInsPackageFragmentImpl descriptor.
In this commit we add our own implementation thus fixing
a pack of FIR black box tests.
2020-03-24 10:37:53 +03:00
Mikhail Glukhikh 2308e5bb7c FIR2IR: in case of use-site generic type use call from original class 2020-02-28 15:29:02 +03:00
Alexander Udalov 3278451b07 JVM IR: do not generate certain special bridges as final
Special bridges which are generated as a replacement for a non-final
fake override and use invokespecial to call the already existing
implementation in the superclass, should not be final. Otherwise we
can't generate an override for the original Kotlin function in a
subclass with the same JVM signature.
2020-02-13 14:34:18 +01:00
Steven Schäfer 07737f8fc6 JVM IR: Fix BridgeLowering 2020-02-07 18:44:50 +03:00
Mark Punzalan 692a83f7bb [FIR] Add FirCheckNotNullCall converted to CHECK_NOT_NULL intrinsic
function call.
2019-12-11 16:54:15 +03:00
Mads Ager 98ceee784a JVM_IR: More special bridge rewriting.
If there is an existing method that will have its argument types
remapped to boxed types, make sure to reflect that in the IR so
that code will be generated for a boxed value instead of a
primitive value.
2019-11-25 17:37:57 +03:00
Georgy Bronnikov 307c82e3a4 JVM_IR: redirect to correct function in special brigdes
The fix in MethodSignatureMapper allows us to avoid the hack
with orphanedCopy() in BridgeLowering.
2019-11-20 21:00:59 +03:00
Mads Ager 15ed342282 JVM_IR: Generate args check in existing methods for special bridge methods.
Fix the number of arguments checked (1 for getOrDefault and 2 for
remove).
2019-11-19 19:10:04 +03:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Svyatoslav Kuzmich 918d470e1b [JS IR BE] Simplify throwable lowering.
- Make kotlin.Throwable class extenral
- Add runtime function 'extendThrowable' to use instead of delegating
  constructors to Throwable
2019-07-03 20:37:48 +03:00
pyos 6b2d874ccc JVM_IR: generate non-null assertions for arguments 2019-05-21 18:30:27 +03:00
Svyatoslav Kuzmich 0de1242f68 [JS IR BE] Unmute passed tests 2019-05-06 19:34:25 +03:00
Dmitry Petrov 8be7f7f1f7 IR: Make sure that symbols refer to original descriptors only
If a descriptor is a WrappedDeclarationDescriptor, it SHOULD NOT be
substituted.
2019-03-29 16:00:56 +03:00
Georgy Bronnikov 72ea4cc3d7 Remove descriptors from BridgeLowering 2019-02-23 00:42:16 +03:00
Dmitry Petrov 740d5ec468 Mute some tests in JS_IR after adding basic dynamic expressions support 2019-02-14 16:03:11 +03:00
Svyatoslav Kuzmich aa811dcfb3 [JS IR BE] Add KJS_WITH_FULL_RUNTIME directive to compiler tests 2019-01-24 16:14:40 +03:00
Denis Zharkov 254380d418 Generate special bridges for removeAt/getOrDefault
In case we extending some Map specialization with non-trivial type arguments,
e.g. Map<String, String> from Kotlin point-of-view it has
"remove(String, String)" signature while in Java it's "remove(Object, Object)".

So, we generate an override "remove(String, String)" in first Kotlin class of the hierarchy,
which body delegates to "super.remove(Object, Object)"

Also, we generate a final override for "remove(Object, Object)" to allow
for Java inheritors choose only the version with String while overriding.

The main idea of the fix is to make mayBeUsedAsSuperImplementation
return true in case of PlatformDependent annotations.
Otherwise, we weren't able to choose the impl from the java.util.Map
as a delegate in our bridge.

Another part of the fix is overriding `isDeclaration`:
it was necessary because otherwise bridge-generation algorithm
was assuming that there's already an actual declaration
in the first sub-class (TestMap) in the test and we need to
delegate to the latter instead of the method from the interface

^KT-26069 Fixed
2019-01-14 14:54:18 +03:00
Mikhael Bogdanov d76cb32781 Specify JVM target backend for test with java type inheritance 2018-12-21 16:09:11 +01:00
Anton Bannykh 995ac7aac2 [JS IR BE]: make deleteProperty non-inline due to new inliner limitations 2018-10-18 14:24:05 +03:00
romanart 71f109387a Update tests 2018-10-17 14:10:37 +03:00
Svyatoslav Kuzmich 4c38d55f21 [JS IR BE] Unmute tests 2018-10-15 00:03:45 +03:00
Svyatoslav Kuzmich bdc3daf972 [JS IR BE] Support Enum::values 2018-10-10 19:35:17 +03:00
Anton Bannykh 2e709a81fa [JS IR BE] Arrays, varargs 2018-09-18 14:36:20 +03:00
Georgy Bronnikov 433afcd669 JVM_IR. Mute failing tests 2018-09-14 03:12:23 +03:00
Svyatoslav Kuzmich ad58fdd158 [JS IR BE] Unmute tests after adding stdlib 2018-09-04 20:19:04 +03:00
Pavel Punegov 2ff6047845 Update ignore tag for Native backend 2018-08-28 13:48:43 +03:00
Svyatoslav Kuzmich 439350d41a [JS IR BE] Cast types in bridges 2018-08-07 14:41:50 +03:00
Svyatoslav Kuzmich 625983b28a [JS IR BE] Enum class lowering 2018-07-23 15:08:18 +03:00
Svyatoslav Kuzmich 1abb4f42ac [JS IR BE] Add ranges to runtime, rangeTo for primitive numbers 2018-07-17 20:18:29 +03:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Anton Bannykh 96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Denis Zharkov ed79891ee6 Fix type mapping for parameter of Collection<Int>::remove override
In the case the single parameter of override has `Integer` type instead
of `int` type (while in common case it would be just `int`)

See the comment inside forceSingleValueParameterBoxing for clarification

 #KT-19892 Fixed
2017-08-31 12:38:08 +03:00
Ilya Matveev eda43c8b45 Mute tests with standard collection extensions in native 2017-03-10 19:59:37 +03:00
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00
Alexey Andreev 115f6ced87 JS: fix support of throwable constructors without message and/or cause parameters 2017-01-25 13:52:16 +03:00
Alexey Andreev 6f4d8decc7 JS: add support of custom exceptions inherited from kotlin.Throwable that call super constructor from secondary constructor 2017-01-25 13:52:16 +03:00
Alexey Andreev f34093db9f JS: make kotlin.Throwable = Error. See KT-15312 2017-01-25 13:52:13 +03:00
Ilya Gorbunov 38840bb529 Do not reference java.util in tests that run on JS backend. 2016-11-21 18:20:33 +03:00
Zalim Bashorov aa2a4f0794 KJS: implement Throwable in Kotlin instead of use it as alias of JS Error
* Make it an inheritor of JS Error. Otherwise, Chakra engine doesn't fill stack trace of exception; In other engines inheritance has some good effects too.
* Copy all properties from internally created instance of JS Error

 #KT-6985 Fixed
 #KT-2328 Fixed
 #KT-8019 Fixed
 #KT-10911 Fixed
2016-11-17 16:22:27 +03:00
Zalim Bashorov 596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00