Commit Graph

78 Commits

Author SHA1 Message Date
Ilya Gorbunov cbc3480d9e Split common builtin companion tests from JVM-only tests
Remove duplicated tests from NumbersJVMTest.
2018-07-03 19:58:53 +03:00
Svyatoslav Kuzmich 83f8cfaa66 [JS IR BE] hashCode, toString, number conversion support 2018-07-03 19:51:58 +03:00
Nico Mandery 5c16633175 fix typos in documentation of JsQualifier annotation (#1733) 2018-06-27 19:34:27 +03:00
Ilya Gorbunov 6d027bbbfc Remove state from parts of multifile classes
Split COROUTINE_SUSPENDED marker to expect and actual because Kotlin/JS backend
expects it to be property without getter.

Update EXPECTED_REACHABLE_NODES in JS test data.

#KT-24986 Fixed
2018-06-22 11:35:05 +03:00
Anton Bannykh 6df9919eba JS IR: add DefaultContructorMarker to the runtime 2018-06-21 13:27:17 +03:00
Roman Artemev 02628e8de3 [JS IR BE] Support exceptions in IR BE runtime 2018-06-19 17:09:24 +03:00
Roman Artemev 17d71f1e46 [JS IR BE] Implement type check
* IrTypeOperator lowering
 * runtime support
 * refactoring
2018-06-14 18:40:06 +03:00
Ilya Gorbunov 1ee37b1772 Update ReadMe for stdlib-js 2018-06-07 14:39:48 +03:00
Ilya Gorbunov 0f972f2412 Restore default parameter values in JS collection constructors
Even if they now have overloads that will be selected when these parameters are omitted.
This is to preserve compatibility with the libraries compiled against the older library.

#KT-24782 Fixed
2018-06-06 15:32:34 +03:00
Roman Artemev 4b8d906e45 Add runtime for JS IR BE 2018-06-05 21:21:18 +03:00
Roman Artemev 9d2092e86d Fix visibility of @JsName-annotated symbols in stdlib-js 2018-05-29 13:57:34 +03:00
Neonailol ede2e227c2 KT-23356 Cross-platform function to convert CharArray slice to String
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-05-26 06:06:53 +03:00
Ilya Gorbunov 418db53ba4 Array.copyOf docs: do not use 'primitive default' term, rewrite description
#KT-22298
2018-05-25 21:52:36 +03:00
Valeriy Zhirnov 9239de9a02 KT-22298 Improve docs for Array.copyOf(newSize: Int)
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com>
2018-05-25 21:52:36 +03:00
Alexander Udalov bf3419c3bd Introduce OptionalExpectation for annotations missing on some platforms
This commits adds a new annotation OptionalExpectation to the standard
library, which is experimental. To enable its usage, either pass
'-Xuse-experimental=kotlin.ExperimentalMultiplatform' as a compiler
argument, or '-Xuse-experimental=kotlin.Experimental' and also annotate
each usage with `@UseExperimental(ExperimentalMultiplatform::class)`

 #KT-18882 Fixed
2018-05-24 13:14:51 +02:00
Ilya Gorbunov e7b445e4b5 Fix incorrect @returns tag usage and improve padStart/End docs
#KT-24371 Fixed
2018-05-16 17:43:12 +03:00
Florian Steitz d7bada0c29 [KT-10456] Added JS implementation for Int.toString(radix) and similar overloads 2018-05-11 15:42:11 +03:00
Alexander Udalov c57864e46c Require "-Xuse-experimental=kotlin.Experimental" on usages of Experimental
Since we're not yet sure of the design of Experimental/UseExperimental,
we're making them "experimental" themselves in some sense, in that the
user is required to provide the magic argument
"-Xuse-experimental=kotlin.Experimental" to be allowed to use either
Experimental or UseExperimental. This is more convenient than the
previous approach of "-language-version 1.3
-Xskip-metadata-version-check" because it's simpler and does not cause
pre-release binaries to be produced
2018-05-04 13:48:24 +02:00
Ilya Gorbunov ecf0d7ec0d Reformat stdlib tests and samples
#KT-5558
2018-04-27 05:28:57 +03:00
Ilya Gorbunov add09e0f2e Reformat stdlib: js part
#KT-5558
2018-04-27 05:28:48 +03:00
Ilya Gorbunov ad43c0f4cb Reformat stdlib: collections
#KT-5558
2018-04-27 00:49:06 +03:00
Ilya Gorbunov 502418e690 Put copyrights to the generated standard library sources
Read copyright template from .idea/copyright/apache.xml profile
2018-04-26 21:57:50 +03:00
Ilya Gorbunov e21c235bbb Add or update copyrights in the standard library sources 2018-04-26 21:57:50 +03:00
Ilya Gorbunov 40cd02bba6 idl2k: read copyright from profile and put it in the generated files
Also reword autogenerated warning a bit.
2018-04-26 21:57:50 +03:00
Ilya Gorbunov 579822c114 Regenerate w3c declarations to get new MDN references 2018-04-26 14:09:05 +03:00
Zalim Bashorov 8871cf660c [stdlib-js] Split core.kt in stdlib-js into few files to simplify using part of it in JS IR BE related tests 2018-04-25 22:18:57 +03:00
Ilya Gorbunov c239d346f7 Correctly indent upper bound separator in the generated stdlib code 2018-04-20 23:14:57 +03:00
Ilya Gorbunov 481620ba32 Suppress dokka warnings for external classes exposing JS API to Kotlin
Usually MDN link in the class description is enough.
2018-04-20 06:39:01 +03:00
Ilya Gorbunov 4f80f6d715 Sort .js files before passing them to merger to ensure stable output
#KT-23705 Fixed
2018-04-19 01:22:13 +03:00
Ilya Gorbunov 9c7fefba69 Restore default values in actual functions that have default values in expect
Suppress error about default argument values in actuals.
The suppression can be removed when/if KT-23548 is implemented.

This is to avoid degrading experience in docs and IDE when working with
these functions.
2018-04-12 17:53:00 +03:00
Ilya Gorbunov f7546c809d Minor: use common implementation of doubleTotalOrderEquals for tests 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 2826733e87 Put common sources into kotlin-stdlib-sources going into dist 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 0e4925a20f Remove UNUSED_PARAMETER warning suppression from actual declarations 2018-04-12 17:53:00 +03:00
Ilya Gorbunov ac3de447ae Do not use code preprocessing anymore 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 9dd87d89ba Remove default values in actual functions that have default values in expect
Remove suppressions about default values in expect declarations
2018-04-12 17:53:00 +03:00
Ilya Gorbunov f7b2eba680 Do not mix expect/non-expect overloads of minOf/maxOf
Workaround for KT-22520
2018-04-12 17:53:00 +03:00
Ilya Gorbunov 912c69aaa3 Suppress expect-actual mismatch for relaxed array extensions
Due to KT-21937
2018-04-12 17:53:00 +03:00
Ilya Gorbunov ba873e2b46 stdlib tests: provide expect/actual helper functions 2018-04-12 17:53:00 +03:00
Ilya Gorbunov ee9608f8db stdlib-js: add actual modifiers where required 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 0fb3393ee1 stdlib-js: build as multiplatform 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 69ebb3bfb0 Switch to the new stdlib source generation scheme
Remove old generated sources for stdlib-jvm and stdlib-js
2018-04-12 17:53:00 +03:00
Ilya Gorbunov f45e3ac7d9 kotlin-stldib-js: do not import experimental sourceset in IDEA
Temporary workaround to prevent multiple IDEA modules sharing the same content root error.
2018-03-30 16:03:19 +03:00
Anton Bannykh 7b860eab36 Merge kotlin-experimental into kotlin standard library (KT-23055 fixed)
* kotlin-experimental.js has been already merged into kotlin.js
* change library name to kotlin in kotlin-experimental.meta.js in order to produce correct require calls
* concatenate kotlin-experimental.meta.js with kotlin.meta.js
* suppress multiple module declaration warning for such use case
2018-03-26 23:13:28 +03:00
Ilya Gorbunov 7a40b4c5f1 Refactor: extract JVM-specific tests into separate files
Make KotlinVersion random comparison test running in JS
2018-03-22 17:08:43 +03:00
Anton Bannykh e377a30929 Use mocha instead of QUnit for debugging stdlib tests in browser 2018-03-15 17:54:17 +03:00
Anton Bannykh 338bde23fc JS stdlib: run kotlin.test library tests 2018-03-15 17:54:17 +03:00
Anton Bannykh ed80252ba8 JS: fix double compareTo behaviour for NaN and +-0 (KT-22723) 2018-02-28 15:01:58 +03:00
Anton Bannykh a7d980a890 JS: use Mocha + NodeJs instead of Karma + PhantomJs to run stdlib tests (again) 2018-02-27 16:41:00 +03:00
Ilya Gorbunov 00b23a0fe9 Rearrange kotlin-stdlib-js library sources
Move kotlin.* api inside kotlin directory.
Update copyright paths.
2018-02-26 17:11:08 +03:00
Alexander Udalov 31e762c679 Move 1.3-specific part of stdlib to another source set 2018-02-15 13:14:37 +01:00