Commit Graph

1567 Commits

Author SHA1 Message Date
Ilya Gorbunov 0eba06405a Use InputStream as another guess for estimated size in InputStream.readBytes() 2016-11-22 23:37:29 +03:00
Ilya Gorbunov e41cbe6fe1 Check that the length of a file can be represented as Int. 2016-11-22 23:37:27 +03:00
Ilya Gorbunov c90ee13656 Performance: use byte array buffer directly to read the entire contents of a file.
#KT-14883 Fixed
2016-11-22 23:37:05 +03:00
Ilya Gorbunov 6a70761783 Minor: normalize '@Test' annotation casing in all tests. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 50cd620f92 Remove java.util.* imports from common code. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 5c2fe13a89 Refer to java.util.Arrays fully-qualified in generated code 2016-11-16 18:47:42 +03:00
Ilya Gorbunov fae5c88f22 Remove java.util references from the common code 2016-11-16 18:47:42 +03:00
Ilya Gorbunov 63535393e7 Move Comparator to kotlin.comparisons and make it imported by default.
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov 090bd76ac9 Introduce type aliases for jvm collections in kotlin.collections
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov 09072f6cdc Remove toInt() conversion as it's hardly required.
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov 8de67d039b Expose maximum version component value as a constant, increase it to 255.
Add tests for KotlinVersion, document remaining parts of API.
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov 5f7d779370 Introduce KotlinVersion API
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov 8feaaf4df0 Allow to annotate generated API with SinceKotlin and annotate new array functions. 2016-11-08 18:08:59 +03:00
Ilya Gorbunov dceec89572 JS: Array.toString is const, Array.contentToString is shallow, Array.contentDeepToString is deep and self-reference aware
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov f3da656d6e contentEquals, contentHashCode, contentToString: Add js implementation and tests
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov a868eecb1a Introduce contentEquals/HashCode/ToString for Arrays. Different methods for deep equals/hashCode/toString rather than overloads with a parameter, because most of the time it would be constant, and make these methods inline-only.
Make `contentEquals` infix function.
Add docs.
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov 61ef26614d Fixup after merge (temporary until collection typealiases are introduced in stdlib) 2016-11-08 03:56:39 +03:00
Ilya Gorbunov a067888fed Provide no-op members in JS ArrayList to work with capacity.
#KT-14637
2016-11-07 21:58:43 +03:00
Ilya Gorbunov 660dc94f7c Move Closeable to its usage, move internal Serializable to kotlin package in JS, introduce internal typealias in kotlin.io in JVM. 2016-11-07 21:39:36 +03:00
Alexander Udalov 3db459c1d8 JS: drop Collections.reverse and java.util.Collections altogether 2016-11-07 12:27:54 +03:00
Alexander Udalov e8fecea871 JS: drop Collections.max 2016-11-07 12:27:52 +03:00
Alexander Udalov 316fbd820b JS: drop Collections.sort 2016-11-07 12:27:13 +03:00
Alexander Udalov 30a7790dca Minimize references to java.util.Collections in stdlib sources
Only three usages are left in platform-independent code: in reverse, sort and
sortWith for mutable lists
2016-11-07 12:20:14 +03:00
Alexander Udalov b52f67132e Fix some warnings in JS-specific stdlib sources 2016-11-07 12:20:14 +03:00
Ilya Gorbunov 49ea0f5984 Relax generic variance in Array.flatten 2016-10-31 22:05:38 +03:00
Ilya Gorbunov 1c7196a1fb Allow to reference internal API in stdlib tests 2016-10-26 17:47:15 +03:00
Ilya Gorbunov 8d76617094 Merge ReversedViews tests in one file as they can all run now in JS.
Make SynchronizedLazyValTest jvm-only.
2016-10-26 17:47:15 +03:00
Ilya Gorbunov badbcd08de Annotate explicitly stdlib tests, which must be excluded from JS stdlib tests with @JvmVersion, do not use file naming convention, use preprocessor instead. 2016-10-26 17:47:15 +03:00
Ilya Gorbunov baccac30fb Annotate explicitly stdlib sources, which must be excluded from JS stdlib with @JvmVersion, do not use file naming convention. 2016-10-26 17:47:15 +03:00
Ilya Gorbunov 0ac461927c Minor: Fix TODOs in stdlib tests 2016-10-18 17:13:17 +03:00
Ilya Gorbunov e6887ea4e5 Use abstract readonly collections as base classes for implementing collection properties of regex MatchResult 2016-10-14 19:06:25 +03:00
Ilya Gorbunov 703ee6bd78 Have mutable collection interfaces specified explicitly to get rid of platform types in parameter and return types. 2016-10-14 19:06:25 +03:00
Ilya Gorbunov a57321dea8 Annotate all new API with SinceKotlin in kotlin-stdlib and kotlin-test 2016-10-13 08:37:30 +03:00
Ilya Gorbunov a8f381cabc Annotate with SinceKotlin all in stdlib-jre7 and jre8 2016-10-13 08:37:28 +03:00
Ilya Gorbunov a239231c75 Revert dropping inline-only extensions for Throwable, to be able to use runtime of 1.1 with language version of 1.0 which makes mapped builtin members unavailable again.
#KT-14213 Fixed
2016-10-11 16:46:14 +03:00
Denis Zharkov 1ad9f1c985 Fix serialVersionUID for EmptyMap and EmptySet
Otherwise removal of redundant special stubs
leads to InvalidClassException during deserialization
2016-10-07 11:59:15 +03:00
Ilya Gorbunov 56ecbe52b2 Add a test verifying #KT-14194 Fixed 2016-10-07 00:15:48 +03:00
Ilya Gorbunov 282629f618 Remove overrides of equals and hashCode from AbstractCollection and AbstractMap.values, making the equality referential again. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov 7dde8df9ae Make mutation methods in AbstractMutable-collections abstract rather than implement them unsupported. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov f88a009653 Do not recreate entries, keys and values collections on each access to property. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov c6654fc9d8 Remove unused/redundant implementation details. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov 38f030dce4 Split AbstractMap into readonly and mutable. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov a5c0f11d60 Split AbstractCollection, List, Set in JS to readonly Abstract[Collection] and mutable AbstractMutable[Collection].
Update compatibility type aliases.
2016-09-28 22:06:03 +03:00
Ilya Gorbunov 2bb1d6d5b4 Provide implementation of read-only AbstractCollection, AbstractList and AbstractSet,
Alias AbstactMutableCollection to java.util.AbstractCollection.
Change inheritance hierarchy of reversed list views.
2016-09-28 22:06:03 +03:00
Ilya Gorbunov 1ea02198e0 Add tests to ensure #KT-10786 Fixed and #KT-8724 Fixed 2016-09-24 07:08:21 +03:00
Ilya Gorbunov 23d2654afd Refactor Map-InternalMap to provide specialized linked string map and set 2016-09-24 07:08:21 +03:00
Ilya Gorbunov e342593d2e Flatten HashMap hierarhy, provide string-keyed map and set specializations. 2016-09-24 07:08:21 +03:00
Ilya Gorbunov 828e7f8744 Add tests to ensure #KT-7473 and #KT-13459 and #KT-13429 are Fixed. 2016-09-24 07:08:21 +03:00
Ilya Gorbunov 75069143c7 Rewrite ArrayList, AbstractList, AbstractCollection in kotlin.
AbstractList is imported from GWT.
#KT-12386
2016-09-24 07:08:21 +03:00
Ilya Gorbunov 47be8e664a Minor: replace var with val. 2016-09-22 22:28:14 +03:00