Commit Graph

612 Commits

Author SHA1 Message Date
Alexey Andreev dde50a34db Fix comparison of boolean values in JS BE
See KT-16984
2017-05-26 18:26:08 +03:00
Gaetan Zoritchak c00918c9f8 KT-17853: Kotlin.js switched parameters of Math.atan2
https://youtrack.jetbrains.com/issue/KT-17853
The current exposition of the JavaScript [Math object] switched the parameters names. 
The correct version is `atan2(y,x)`.
2017-05-16 17:41:43 +02:00
Alexey Andreev 1900b20e6e Implement inlining of Array constructor in JS BE
See KT-15456
2017-05-11 17:10:45 +03:00
Ilya Gorbunov 2792dbf988 Import for buildSequence in generated code for sequences 2017-05-05 18:01:02 +03:00
Ilya Gorbunov ef72371fd7 Add samples for contentToString and contentDeepToString array operations 2017-05-03 17:44:30 +03:00
Marek Langiewicz 934b0b8c38 Fix List.takeLast for lists without RandomAccess 2017-05-03 16:38:15 +02:00
Ilya Gorbunov 8da4839f22 Document IllegalArgumentException thrown from string-number conversion
functions when an invalid radix is specified
#KT-17635 Fixed
2017-05-03 17:32:49 +03:00
Zalim Bashorov fb1c4320b6 KJS: check hashCode property only for objects to avoid extra boxing for primitive values
Also in Nashorn everything has hashCode including primitive types,
so the result can be different at Nashorn and at other engines.
2017-04-26 13:07:34 +03:00
Alexey Andreev 38aecb14a2 Improve Number.hashCode implementation in JavaScript
Fix KT-13577
2017-04-26 11:52:54 +03:00
Ilya Gorbunov 2db8714fc5 Fix null values being treated as missing in 'put' method of a specialized string-keyed map 2017-04-19 18:32:47 +03:00
Ilya Gorbunov 37c3d8f204 Sort out warnings related to inline and library functions in stdlib-js 2017-04-18 18:51:20 +03:00
Ilya Gorbunov 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov ac46f1e23d Cleanup warnings in stdlib-js 2017-04-18 18:51:20 +03:00
Ilya Gorbunov 4a5d8534c1 Fix array iterators to adhere to Iterator contract
#KT-17453 Fixed

Change expected exceptions in tests.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov f22375601b Remove unneeded suppressions 2017-04-18 12:47:11 +03:00
Ilya Gorbunov 8f452ed046 Cleanup warnings in stdlib and generated code 2017-04-18 12:47:04 +03:00
Alexey Andreev 7e6df03421 Fix improper handling of coroutine interceptors
Don't use coroutine facade in following cases:
* When calling coroutine functions in non-suspend mode (i.e.
  suspend flag is either false or skipped).
* When passing continuation from suspend function to suspend function.

Use facade only for corresponding intrinsics.
Reason: interceptor should not be called on each suspend function
invocation, it should be called after resume from innermost
suspend function.

Fix KT-17067. The example provided with the issue is very similar to
dispatchResume.kt which passes after these changes.

Add test to prove that KT-17446 is no more reproducible.
2017-04-18 11:22:18 +03:00
Alexey Andreev 7077de02e7 Fix passing non-string value to print/println in node.js
See KT-15484
2017-04-11 16:15:25 +03:00
Mikhail Zarechenskiy 86c4ad1165 Drop erroneously used @Deprecated annotation from parameter
Annotation @native is deprecated itself and @deprecated on parameter doesn't have message, which cause compilation error after 3c4afcd
2017-04-10 12:48:10 +03:00
Anton Bannykh 3eb5ce7d9a JS: polyfill ArrayBuffer.isView in order to support PhantomJS 2017-03-31 21:20:01 +03:00
Anton Bannykh 9b34e21619 JS: fixed <Type>Array.iterator methods; added -Xtypedarray compiler key
The <Type>Array.iterator used to lack next<Type>() method (KT-16626).

The -Xtypedarray compiler key enables translation of primitive arrays
to TypedArrays, and primitive array`is`-checks (KT-15358, KT-14007,
KT-14614, KT-16056).
2017-03-27 23:09:34 +03:00
Ilya Gorbunov c98c2d9931 Remove 'nearly_stateless' category, do not mention statefulness for terminal operations.
#KT-16994
2017-03-24 19:06:06 +03:00
Ilya Gorbunov 4018db680e Sequence operation classification regarding their statefulness and laziness.
#KT-16994 Fixed
2017-03-24 19:06:06 +03:00
Sergey Mashkov 49c2f40f7d KT-16572 Add links to Mozilla Developer Network to kdocs of classes that we generate from IDL
regenerate
2017-03-17 13:04:34 +03:00
Sergey Mashkov 02721a0b7f KT-16252 IDL2K: Add ItemArrayLike interface implementation to collection-like classes
regenerate
2017-03-17 13:04:33 +03:00
Ilya Gorbunov 61e8848aa2 Add samples for sequence building API. 2017-03-07 13:32:39 +03:00
Ilya Gorbunov a04e6de047 Add groupingBy and eachCount sample. 2017-03-07 13:31:44 +03:00
Alexey Andreev 723c9be5a0 JS: fix class literal expression with primitive classes. See KT-16545 2017-03-07 10:46:08 +03:00
Anton Bannykh fcffd190d0 JS: prohibited extension function arguments in external functions; removed extension receiver in jQuery declarations. 2017-03-03 20:37:59 +03:00
Anton Bannykh 9e5ecc11b7 JS: fixed Double.NaN behaviour (KT-13610). 2017-03-02 14:29:50 +03:00
Alexey Andreev 0c0e0aab09 JS: add some docs to declarations related to interop 2017-03-01 16:09:21 +01:00
Dmitry Jemerov 322379e6ae Assorted stdlib KDocs 2017-03-01 16:09:01 +01:00
Anton Bannykh 3eb5b3e08c JS: changed BoxedChar visibility to internal 2017-02-24 13:46:29 +03:00
Ilya Gorbunov 6e8f227121 Drop ERROR deprecations in JS library that were introduced in 1.1-rc 2017-02-22 17:28:02 +03:00
Ilya Gorbunov 8e951dee16 Drop remaining ERROR deprecations from kotlin-stdlib-js.
Leave only `native`, `parseInt`, `parseFloat` and `noImpl`.
2017-02-22 17:28:02 +03:00
Ilya Gorbunov 3cea5c4510 Drop entire java.util package from kotlin-stdlib-js
#KT-6561 Fixed
2017-02-22 17:28:02 +03:00
Anton Bannykh 4c808e8691 JS: concat vararg arguments using Kotlin.concat and Kotlin.concatPrimitive functions in order to be binary compatible with (Kotlin PrimitiveArray -> JS TypedArrays) mapping. 2017-02-15 18:58:29 +03:00
Ilya Gorbunov c6cb389591 JS kotlin.dom: deprecate asElementList harder.
Minor: correct exception message.
2017-02-09 22:15:51 +03:00
Ilya Gorbunov ec01200997 Introduce ItemArrayLike interface and replace multiple asList adapters with the single one. 2017-02-08 23:31:58 +03:00
Ilya Gorbunov 41c980bcab Massive deprecations in kotlin.dom 2017-02-08 23:31:58 +03:00
Ilya Gorbunov 365f8d0256 Drop pre-1.0 deprecated dom helpers. 2017-02-08 23:31:58 +03:00
Ilya Gorbunov 287a513f23 Provide KDoc for js collection implementations. 2017-02-08 20:13:22 +03:00
Ilya Gorbunov 2269b9839f Restrict visibility of AbstractMap.SimpleEntry in JS 2017-02-08 20:13:22 +03:00
Ilya Gorbunov fc7b1c8611 KDoc for mutable abstract collections.
Document abstract overrides.
2017-02-08 20:13:22 +03:00
Denis Zharkov 4f6a77cf38 Introduce createCoroutineUnchecked intrinsic
Also use it for buildSequence implenentation

 #KT-16155 Fixed
2017-02-07 11:08:27 +03:00
Denis Zharkov 230564fb4a Minor. Get rid of code duplications for resume call wrapping in stdlib
Use processBareContinuationResume instead
2017-02-07 11:07:04 +03:00
Denis Zharkov 6dde567be4 Optimize startCoroutine impls, move them to common stdlib
Do not wrap initial continuation for startCoroutine in SafeContinuation

This changes leaves only internal declarations and intrinsics as platform
dependent parts of the coroutine library, the rest parts (public API)
is implemented through them in common module
2017-02-07 11:07:04 +03:00
Denis Zharkov a65d86293b Improve coroutines library layout
- Split CoroutinesLibrary into common and JVM parts
- Get rid of startCoroutine duplications
- Make suspendCoroutine implementation to be platform independent
2017-02-07 11:07:04 +03:00
Denis Zharkov 258ee0db75 Introduce startCoroutineUninterceptedOrReturn coroutine intrinsic
#KT-15716 Fixed
2017-02-07 11:07:04 +03:00
Denis Zharkov 29b0b30031 Make createCoroutine return a safe continuation
#KT-15718 Fixed
2017-02-07 11:06:50 +03:00