Commit Graph

67 Commits

Author SHA1 Message Date
Anton Bannykh b7ffdb9fde JS IR: support kotlin.test 2019-04-05 12:30:21 +03:00
Ilya Gorbunov 04bbf23936 Add explicit imports of kotlin.ranges more specific functions
The extensions 'contains' and 'reversed' from kotlin.ranges can be more
specific for IntRange, LongRange, etc than the same functions from
kotlin.collections, yet they lose in overload resolution to the latter
ones when invoked from kotlin.collections package
because of same package package extensions are preferred (KT-30633).
2019-04-02 21:28:33 +03:00
Abduqodiri Qurbonzoda ba61695a45 Check for index-out-of-bound in elementAt function (KT-30051) 2019-03-12 21:39:09 +03:00
Ilya Gorbunov db4c4132f6 Make JvmPackageName a common internal annotation 2019-03-08 23:35:37 +03:00
Abduqodiri Qurbonzoda fc85781bfc Implement asList, slice & sliceArray extension functions for UArrays 2019-03-08 23:34:34 +03:00
Roman Artemev 0ec75f1534 [JS IR BE] Temporary fix K/JS stdlib 2019-03-04 23:24:14 +03:00
Svyatoslav Kuzmich a01407eec9 [JS IR BE] Don't mangle Any::equals method 2019-02-28 20:13:56 +03:00
Svyatoslav Kuzmich c4ffe36a21 [JS IR BE] Add CharSequence type check 2019-02-25 15:09:25 +03:00
Svyatoslav Kuzmich 53d15ea27c [JS IR BE] Fix arrays type checks 2019-02-12 18:45:34 +03:00
Svyatoslav Kuzmich c9e2ed4e1f Undo unnecessary changes to stdlib
Partially revert "[stdlib] Reduce usage of extension functions"
2019-01-29 19:06:32 +03:00
Svyatoslav Kuzmich b239c80531 [JS IR BE] Add a few kotlin.test stubs to IR runtime 2019-01-29 19:06:31 +03:00
Svyatoslav Kuzmich 2818d3767e [JS IR BE] Covert Char into inline class 2019-01-24 23:05:56 +03:00
Svyatoslav Kuzmich a5f537adc5 [JS IR BE] Implement *Array.plus(Collection<>) in typed Kotlin without dynamic helper 2019-01-24 23:05:56 +03:00
Svyatoslav Kuzmich 8c89ffbe2d [JS IR BE] Load builtins from code to runtime
Bypass builtins deserialization mechanism in legacy JS backend and load
bultins direcly as kotlin code.

This way we won't have separated IR declarations for Enum, Char, Long

Some "native" builtins are implemented in libraries/stdlib/js/irRuntime/builtins/
Other builtins are moved by MoveExternalDeclarationsToSeparatePlace and
used only in compile-time
2019-01-24 23:05:56 +03:00
Svyatoslav Kuzmich eea7e85d3a [stdlib] Reduce usage of extension functions 2019-01-24 16:14:40 +03:00
Ilya Gorbunov 0ac85ad715 Document that sorting is stable in each platform
#KT-12473 Fixed
2019-01-17 18:38:37 +03:00
Ilya Gorbunov 23950042f6 Clarify how elements of arrays are compared by contentEquals function
Add clarification only for the particular group of overloads including
 arrays of object and floating point numbers.

#KT-22942 Fixed
2019-01-11 21:04:03 +03:00
Ilya Gorbunov 51eb21d44b Provide stable sorting when JS engine sorting doesn't look stable
#KT-12473
2019-01-11 20:53:29 +03:00
Ilya Gorbunov 7c3c454654 Remove specialization of toTypedArray for LongArray and BooleanArray in JS
The default implementation for primitive arrays returns an array of correct type.

#KT-29187 Fixed
2019-01-11 20:53:29 +03:00
Roman Artemev d35b20f764 [JS IR BE] Implement private members lowering to extract private methods from class and transform them into static function
* fix kotlin.Long
 * update tests
2019-01-11 20:28:04 +03:00
Ilya Gorbunov fcef876c7e Update copyright in generated stdlib sources 2019-01-11 19:23:12 +03:00
Roman Artemev c5922bf74b Refact stdlib generator, add support for different backends
[JS IR BE] Runtime fixes
 * Do not generate external declarations for IR BE
 * Move `arrayToString` helper function out of shared JS stdlib
 * Fix arrays type check for IR BE
2018-11-29 22:04:53 +03:00
Ilya Gorbunov d7ff6c48ea Leave only 1.3 JS IR runtime sources
Update exclusions after merging coroutines sources into stdlib.
2018-11-28 06:05:03 +03:00
Svyatoslav Kuzmich 370b04df35 [JS IR BE] Inline classes lowering 2018-11-08 15:00:30 +03:00
Roman Artemev 6a05b1eee5 [JS IR BE] Add noWhenBranchMatchedException
* refact exception helpers
2018-10-25 15:48:42 +03: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 6a66663739 Update IR Runtime 2018-10-17 14:10:37 +03:00
Svyatoslav Kuzmich 5a057f8ca6 [JS IR BE] Support 'is Number' and 'is Comparable<>' 2018-10-14 23:53:03 +03:00
Svyatoslav Kuzmich 783f27c554 [JS IR BE] Support Number.to(Byte|Short|Int|Float|Double|Long) 2018-10-14 23:53:03 +03:00
Svyatoslav Kuzmich bad9534abd [JS IR BE] Support integer operation overflow 2018-10-14 23:53:02 +03:00
Svyatoslav Kuzmich 7074909230 [JS IR BE] Support enumValues<T>() and enumValueOf<T>(name) 2018-10-10 19:35:17 +03:00
Svyatoslav Kuzmich bdc3daf972 [JS IR BE] Support Enum::values 2018-10-10 19:35:17 +03:00
Svyatoslav Kuzmich c7bde6a5e6 [JS IR BE] Fix runtime compareTo(Number, Long) 2018-10-10 17:27:36 +03:00
Alexander Udalov 55c8b35eee Remove unneeded default imports in stdlib and tests 2018-10-01 13:39:02 +02:00
Svyatoslav Kuzmich 334c776b92 [JS IR BE] Fix @DoNotIntrinsify processing. Reuse it for compareTo 2018-09-28 20:27:01 +03:00
Svyatoslav Kuzmich b79dcbe8e6 [JS IR BE] Refactor equals and compareTo lowering 2018-09-24 18:21:57 +03:00
Anton Bannykh 8e347f9f39 [JS IR BE] lateinit support
* Functions with IrExpressionBody are lowered to IrBlockBody
* Implemented throwUninitializedPropertyAccessException function
2018-09-21 18:20:11 +03:00
Anton Bannykh beaf6df8c5 [JS IR BE] support CharSequence and String methods 2018-09-21 18:16:03 +03:00
Anton Bannykh 7d5a304cf6 [JS IR BE] support Char.rangeTo() 2018-09-18 15:43:55 +03:00
Anton Bannykh 2e709a81fa [JS IR BE] Arrays, varargs 2018-09-18 14:36:20 +03:00
Roman Artemev c0ef1311ba [JS IR BE] Fix runtime for Release coroutines 2018-09-17 15:29:16 +03:00
Roman Artemev 6bb77ba51d [JS IR BE] Get rid of parameters in doResume method. Make its signature similar for both 1.2 and 1.3 coroutines 2018-09-17 14:52:44 +03:00
Ilya Gorbunov 7a7fa56d74 [JS IR BE] New sequence builder mocks for building stdlib
#KT-26678
2018-09-16 23:30:36 +03:00
Zalim Bashorov 24dc8b33cd [JS IR BE] fix compilation of stdlib by IR BE after move coroutine related sources in stdlib 2018-09-07 19:22:35 +03:00
Svyatoslav Kuzmich 197a5969e2 [JS IR BE] Fix stdlib files list for 1.3 2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich c3b9a5108e [JS IR BE] Add more stdlib files to runtime
Keep old sources list for coroutine tests
2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich a01b6de2d8 [JS IR BE] Add missing exceptions 2018-09-04 20:19:03 +03:00
Roman Artemev d1621b80cc Fake wrapped descriptors first working draft
get rid of descriptors in Bridge and Enum lowerings
Replace property accessors function type with IrSimpleFunction because they couldn't be constructors
get rid of descriptors in Callable reference lowering
refactored descriptor factory and inner class lowering
Add isReified property to IrTypeParameter declaration
keep getting rid of descriptors
Get rid of descriptors in Shared Variable Manager
LocalDeclarationLowering also uses no descriptors
Fix psi2ir
Fix nested classes names
Fix outer reference in inner classes
Fix name generator
get rid of descriptors in coroutines - something is working
Fix name generator
Fix unbound symbols in JVM BE
Rename DeclarationFactory members
2018-08-31 15:34:18 +03:00
Ilya Gorbunov 056db883c3 Fix JS IR runtime compilation for tests after applying OptionalExpectation
Jvm-specific actuals were removed from stdlib/js runtime.
Recreate them in irRuntime so they can be resolved when compiling runtime for IR tests.
2018-08-31 04:17:42 +03:00
Anton Bannykh e7f9727783 JS: fix tests related to 1.3 migration 2018-08-30 22:27:24 +03:00