Commit Graph

3410 Commits

Author SHA1 Message Date
Igor Yakovlev c3a6d0b499 [WASM] Fix invalid constructors call flow for exceptions 2022-02-03 21:25:58 +01:00
Igor Yakovlev e30b449454 [WASM] Replace non-performance way of building String from CharArray 2022-02-03 21:25:58 +01:00
Igor Yakovlev a44b103da9 [WASM] Fix invalid equals/hashCode for Double.NaN and Float.NaN 2022-02-03 21:25:58 +01:00
Igor Yakovlev ea76501f9e [WASM] Implement ConstrainedOnceSequence 2022-02-03 21:25:58 +01:00
Igor Yakovlev d0370bd145 [WASM] Fix invalid Array.fill methods implementations 2022-02-03 21:25:58 +01:00
Igor Yakovlev 5ed104063d [WASM] Implement missing test asserter 2022-02-03 21:25:58 +01:00
Igor Yakovlev ece0f83ab2 [WASM] Implement std kotlin.time 2022-02-03 21:25:57 +01:00
Igor Yakovlev 1052ebb44d [WASM] Fix invalid rounding for Double to Int/Long conversion 2022-02-03 21:25:57 +01:00
Igor Yakovlev b4435fe091 [WASM] Escape wasm trap on division of s32/s64 min values on -1 2022-02-03 21:25:57 +01:00
Igor Yakovlev 0acb1c0c05 [WASM] Implemented Wasm unhandled exceptions on JS site 2022-02-03 21:25:57 +01:00
Igor Yakovlev e32f9eb2ce [WASM] throwableExtensions implementation 2022-02-03 21:25:57 +01:00
Alexander Korepanov 769fbcf3d0 [JS IR] Improve performance for runtime typecheck
This is a part of KT-42743
2022-01-31 09:15:58 +00:00
Alexander Korepanov d584cfc31d Remove workaround for KT-45620 from NumbersTest.kt. 2022-01-28 17:10:01 +00:00
Sergej Jaskiewicz d5e46e0607 [JS IR] Introduce intrinsics for slicing array-like objects 2022-01-27 11:06:16 +00:00
Sergej Jaskiewicz 08e6116ecb [JS IR] Introduce jsArguments() intrinsic function
`jsArguments()` is lowered into a reference of the `arguments` object.

This is useful for extracting varargs, when calling Kotlin code from
JavaScript. For a concrete example, see KT-15223.
2022-01-27 11:06:16 +00:00
Dmitriy Dolovov 3ec4a8d6f3 [IR] Rename LinkageError symbol to IrLinkageError
This is needed to 1) avoid ambiguity about the type of linkage used in Kotlin/Native compiler, 2) have the same exception name in JS and Native backends.

^KT-50775
2022-01-26 13:36:24 +03:00
Nikolay Krasko da556452c9 Use project directory as a base for stdlib js build
Some sources for kotlin-stdlib-js-ir are not copied to build dir
and used directly from the project.

Modify kotlin.test/js-ir as well, while there's no evidence of the
problem so far.

Should be removed after KT-50876 fix.

^KTI-730 In Progress
2022-01-25 00:58:54 +03:00
Nikolay Krasko 87bf6e010e Use relative paths in stdlib klib artifacts
Intentionally use doFirst section to trick gradle and not affect
inputs with absolute path usage.

Old behaviour can be returned by kotlin.build.use.absolute.paths.in.klib
in local.properties

Should be removed after KT-50876 fix.

^KTI-730 In Progress
2022-01-20 21:50:20 +03:00
Igor Yakovlev c76e7bc9d8 [WASM] Any.toString implementation 2022-01-19 17:01:11 +03:00
Sergej Jaskiewicz ceb744b53b Revert "[JS IR] [runtime] Remove valueOf method from Long"
This reverts commit e13b6b2a90.

The significance of the breakage caused by the removal of `valueOf`
was underestimated.

#KT-50202 Open
2022-01-18 10:33:54 +00:00
Ilya Gorbunov 906a351a81 Regenerate standard library generated code 2022-01-17 15:38:27 +03:00
Dario Seidl 8d8bf6473b Fix typo in description of Float.ulp
Replace `Float.NIN_VALUE` with `Float.MIN_VALUE`.
2022-01-13 17:21:47 +03:00
Igor Yakovlev 82455c849d [WASM] Lazy properties initialization 2022-01-05 13:12:32 +01:00
Igor Yakovlev e58d4163ad [WASM] Add std methods for collections 2022-01-05 13:12:32 +01:00
Igor Yakovlev c9a92d71ae [WASM] Add kotlin.math tests 2022-01-05 13:12:32 +01:00
Igor Yakovlev adee0f1cb0 [WASM] Add kotlin.math implementation 2022-01-05 13:12:32 +01:00
Igor Laevsky a5ebd3c716 Re-generate built-ins 2022-01-01 21:46:55 +02:00
Igor Laevsky cfcbe9e1e2 [Wasm] Better preserve IR types after inlining 2022-01-01 20:04:44 +02:00
Ilya Gorbunov 2954769296 KT-50059 Stop publishing artifacts with 'modular' classifier 2021-12-29 17:43:56 +00:00
Iaroslav Postovalov 534cf0c6c8 stdlib: Simplify JS charArrayOf implementation (#4354)
#KT-16974 Fixed
2021-12-24 17:20:06 +03:00
Sergej Jaskiewicz 6dc69adcc9 [JS IR] Don't mark Char as a value class
Char will still be treated as a value class
(see JsInlineClassesUtils.kt)
2021-12-16 12:46:11 +00:00
Ilya Gorbunov a829a6743d KT-50173 Fix Regex.escapeReplacement function in JS 2021-12-12 00:27:31 +00:00
Mikhael Bogdanov 239e79a241 JvmDefaultWithCompatibility. Update documentation 2021-12-09 07:40:07 +01:00
Igor Yakovlev 72e360be83 [WASM] More optimal way to keep regex decomposition table 2021-12-09 00:57:55 +01:00
Mikhael Bogdanov 8c17d5f5a7 JvmDefaultWithCompatibility. Switch retention to source 2021-12-08 12:25:02 +01:00
Dmitry Petrov 93713a9ad4 JVM_IR KT-47939 use FunInterfaceConstructorReference as base class 2021-12-08 14:12:41 +03:00
Dmitry Petrov 9eeb8f54fb JVM_IR KT-47939 fixes after review 2021-12-08 14:12:39 +03:00
Dmitry Petrov e179598457 JVM_IR KT-47939 equality for fun interface constructor references 2021-12-08 14:12:38 +03:00
Ilya Goncharov 2a1396bafe [JS IR] Remove JsEagerInitialization after bootstrap update 2021-12-08 10:42:50 +00:00
Ilya Goncharov 0c74376cc4 rra/ilgonmic/after-test-promise
[JS] Node downloading for js ir integration kotlin test

[JS] Fix API of Promise

[JS IR] Promise symbol as lazy2

[JS] Support legacy compiler aftertest with promises

[JS IR] Generate finally for promised tests

[JS] Setup it tests for JS IR kotlin-test

Merge-request: KT-MR-5168

^KT-49738 fixed
2021-12-08 08:22:53 +00:00
Igor Yakovlev ea060dcf8a [WASM] Implement lazy with UnsafeLazyImpl 2021-12-07 21:33:34 +03:00
Igor Yakovlev d55e16a030 [WASM] Regex std implementation 2021-12-07 21:33:31 +03:00
Igor Yakovlev 86daff8ae8 [WASM] Fix invalid exception type for IOOB array access 2021-12-07 21:33:24 +03:00
Igor Yakovlev 34c6abe0bd [WASM] Add Long.toString(radix) implementation 2021-12-07 21:33:14 +03:00
Igor Yakovlev 73ca478fbd [WASM] Add string to double conversion to Stdlib
This version is not completely correct - there is some IEEE rouding issue that, apparently, require to implement different algorithm with BigIntegers implementation.
2021-12-07 21:33:07 +03:00
Igor Yakovlev 9408499da9 [WASM] Add std text implementations 2021-12-07 21:32:59 +03:00
Mikhael Bogdanov ea58c858d1 JvmDefault. Support @JvmDefaultWithCompatibility annotation
#KT-48217 Fixed
2021-12-06 14:20:24 +01:00
Ilya Gorbunov eba6a4a000 KT-44089 Reflect Android SDK version to determine whether platform implementatoins are eligible
SDK version sanity check, suppress all reflection errors, duplicate SDK reflection code for more robustness
2021-12-06 12:24:45 +03:00
Ilya Gorbunov fe77046fe4 KT-44089 Try to use all known PlatformImplementation classes in Android
Currently platform method implementations loaded are limited by the
java.specification.version system property value, however that property
always returns 0.9 in Android.
2021-12-06 12:24:43 +03:00
Ilya Gorbunov 9c90d4e471 KT-50033 Add missing public API packages to module-info and setup a test
The test checks that new packages are not accidentally non-exported,
so each new stdlib package must be either exported or specified in that
test's expected non-exported package list.
2021-12-06 00:58:51 +00:00