Igor Laevsky
22c161bcee
[Wasm] Run unit tests for the wasm stdlib (fail on verifier for now)
2021-11-03 16:23:02 +03:00
Igor Laevsky
46b56c7642
[Wasm] Improve string constructor in stdlib
2021-11-03 16:23:01 +03:00
Igor Laevsky
cb10bd3a95
[Wasm] Port stdlib and kotlin.test build to wasm gradle plugin
2021-11-03 16:23:01 +03:00
Svyatoslav Kuzmich
766377a041
[Wasm] Remove WasmForeign annotation
...
No longer needed since external interfaces are supported
2021-10-28 18:47:38 +03:00
Svyatoslav Kuzmich
4fc461a2ff
[Wasm] Imporove external interface support
...
* Support boxing/unboxing when casting to Any
* Support ===, equals, hashCode, toString
* Support adapting String in interop boundary
2021-10-23 01:26:12 +03:00
Svyatoslav Kuzmich
baa53b5cf3
[Wasm][Stdlib] Use array copy in String.toCharArray()
...
And don't use copy during internal non-mutating algorithms
2021-10-23 01:26:11 +03:00
Svyatoslav Kuzmich
0f66f85cf9
[Wasm] Support main function
2021-10-15 13:58:55 +03:00
Igor Laevsky
cb5bef1535
[Wasm] Remove unnecessary testHelpers and add assertions from stdlib
2021-10-14 17:24:06 +03:00
Igor Laevsky
bede039c08
[Wasm] Add compiler support for the kotlin.test library
2021-10-14 17:24:05 +03:00
Igor Laevsky
7943298240
[Wasm] Add sorting function to the stdlib
2021-10-14 17:24:04 +03:00
Igor Laevsky
049e48e780
[Wasm] Keep error message for the IAE exception
2021-10-14 17:24:03 +03:00
Igor Laevsky
14eee7c539
[Wasm] Add kotlin-test-wasm library
2021-10-14 17:24:02 +03:00
Svyatoslav Kuzmich
3bce0cc055
[Wasm] Support coroutines
...
- Reuse JS IR Suspend function lowering
- Fix types
- Disable reinterpretCast-based optimization for inline
classes
- Add basic support to Wasm stdlib
- Explicitly transform suspend functions into regular functions
with continuations
- Clean suspend function handling from JS IR codegen
2021-10-12 08:42:01 +03:00
Svyatoslav Kuzmich
9ef899ef10
[Wasm] Reuse Callable reference and SAM lowerings from JS
2021-10-08 07:24:41 +03:00
Svyatoslav Kuzmich
1ed2748334
[Wasm] Generate [K][Suspend]FunctionN on demand and support big arity
2021-10-08 07:24:41 +03:00
Svyatoslav Kuzmich
fa3e75463e
[Wasm] Support throwIAE and throwNoBranchMatchedException
...
Add a couple of test stubs
Unmute tests
2021-10-02 06:14:36 +00:00
Svyatoslav Kuzmich
ab9a23cbfa
[Wasm][Stdlib] Reuse K/N collections and StringBuilder
2021-10-01 17:18:49 +03:00
Abduqodiri Qurbonzoda
f8bcba0b76
Align JS String.equals/compareTo(ignoreCase) behavior with JVM #KT-48999
2021-09-30 15:35:50 +00:00
Svyatoslav Kuzmich
dd45714137
[Wasm] Add property reference stdlib part
2021-09-27 17:08:55 +03:00
Svyatoslav Kuzmich
5c05ff48ff
[Wasm] Copy property reference lowering from K/N
2021-09-27 17:07:39 +03:00
Ilya Gorbunov
7666377565
Control Duration init block assertions on JVM with -ea option
...
On other platforms enable them unconditionally
2021-09-24 16:17:54 +00:00
Ilya Gorbunov
96611de344
Stabilize Duration, DurationUnit and related top-level functions KT-46784
...
Co-authored-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2021-09-24 16:17:53 +00:00
Abduqodiri Qurbonzoda
261d0c2783
Promote collection builders to stable #KT-47421
2021-09-21 11:25:28 +00:00
Igor Laevsky
15668e2266
[WASM] Lower Unit to Void in order to mark statements with no result
2021-09-16 20:24:44 +03:00
Abduqodiri Qurbonzoda
3ddc29363a
Remove deprecated Common synchronized and deprecate it in JS #KT-46101
2021-09-16 19:38:37 +03:00
Abduqodiri Qurbonzoda
d9f8ce899a
Promote rotateLeft and rotateRight to stable
2021-09-16 19:27:21 +03:00
Svyatoslav Kuzmich
de7fa8c778
[Wasm][Stdlib] Add kotlin.js.JsExport annotation
2021-09-16 14:20:34 +03:00
Igor Laevsky
6ca965af6f
WASM: Generate throw instruction instead of wasmThrow call
2021-09-08 19:56:33 +03:00
Abduqodiri Qurbonzoda
97eb28144f
Introduce Common readln() and readlnOrNull() top-level functions #KT-48456
2021-09-05 15:31:11 +00:00
Mikhail Glukhikh
ed035d99ab
Migrate -Xopt-in to -opt-in in Gradle Kotlin scripts
2021-09-03 15:40:47 +03:00
Abduqodiri Qurbonzoda
94b371af5b
Remove brittle ‘contains’ optimization in minus/removeAll/retainAll #KT-45438
2021-09-02 05:58:19 +03:00
Igor Laevsky
5db8ec6551
WASM: Don't use intrinsics to specify NaN's
2021-08-06 17:34:21 +03:00
Abduqodiri Qurbonzoda
d7b10f31b4
Add Regex splitToSequence samples
2021-08-05 10:32:32 +00:00
Igor Laevsky
d8569b6a03
WASM: NFC. Remove dead code
2021-08-04 16:23:38 +03:00
Igor Laevsky
af865544ff
WASM: Implement string hashcode
2021-08-04 16:23:38 +03:00
Igor Laevsky
80140207b5
WASM: Properly handle nullable exported strings
2021-08-04 16:23:36 +03:00
Igor Laevsky
468fe4196d
WASM: Implement string.compareTo and string.subSequence
2021-08-04 16:23:35 +03:00
Igor Laevsky
0eba74a9d2
WASM: Impelment float to string conversion operations
2021-08-04 16:23:32 +03:00
Igor Laevsky
f34a079699
WASM: Implement integer to string conversion operations
2021-08-04 16:23:32 +03:00
Igor Laevsky
2538caa84f
WASM: NFC. Rename string import/export functions
2021-08-04 16:23:31 +03:00
Igor Laevsky
ebde1e5491
WASM: Crude println implementation with the wasm-native strings
2021-08-04 16:23:30 +03:00
Igor Laevsky
fc0ae851a2
WASM: Don't special case string equality, it now goes through normal .equals method
2021-08-04 16:23:29 +03:00
Igor Laevsky
d90e3618f9
WASM: NFC. Rename WasmReinterpret into WasmNoOpCast.
2021-08-04 16:23:28 +03:00
Igor Laevsky
0f84525bdc
WASM: Implement wasm-native strings part 1
...
There are several changes here but they all required for at least one test to pass.
- Implemented String class and several utility functions using built-in CharArray
- Added new constant memory segment to hold string literals and required funcs to work with them
- Added very crude mostly incorrect rudimentary ability to pass strings back to javascript
2021-08-04 16:23:28 +03:00
Igor Laevsky
9ccdffe8ad
WASM: NFC. Rename WasmPrimitive into WasmAutoboxed and add few comments.
2021-08-04 16:23:27 +03:00
Alexander Udalov
91c39ed01c
Build: remove obsolete compiler arguments
...
These compiler arguments enable features which are enabled by default in
the current Kotlin anyway.
The only exception is in :compiler:cli which uses an old language
version.
2021-07-27 13:35:38 +02:00
Abduqodiri Qurbonzoda
b65c477e68
Regex.splitToSequence, CharSequence.splitToSequence(Regex) #KT-23351
2021-07-20 14:09:24 +00:00
Svyatoslav Kuzmich
a468792a19
[Wasm] Support Milestone 3 of V8 Wasm GC
...
Advance V8 version to 9.2.212
Relevant Wasm GC changes:
https://github.com/WebAssembly/gc/commit/f9f8ffa445c2c0fe4ac284a1d12a8c5477da4457
2021-07-15 10:59:06 +00:00
Mikhail Glukhikh
47c8bab48e
Replace -Xuse-experimental with -Xopt-in in codebase
2021-07-12 21:26:17 +03:00
Ilya Gorbunov
3f6e2be687
Duration: do not use scientific format for large values
...
The largest duration value formatted in ns with maximal decimals
would fit in 40 chars.
2021-07-12 04:39:25 +00:00