Commit Graph

73 Commits

Author SHA1 Message Date
Ilya Matveev e64a5f42f0 stdlib: Improve character API.
The patch adds methods for surrogate characters processing and Unicode
category support needed for regular expression library.
2017-06-14 10:33:45 +07:00
Ilya Matveev a70f170e80 [SQUASHME] bitset: fix logical operations. 2017-06-07 11:11:36 +07:00
Ilya Matveev 6ff43d690f stdlib: Add BitSet implementation. 2017-06-07 11:11:36 +07:00
Alexander Gorshenev 5192bd1313 Entry point selection.
$ kotlinc -entry foo.bar.qux ...

selects `qux(args: Array<String>):Unit` in the package `foo.bar` as an entry point.

The short flag is `-e`.
2017-06-05 20:56:10 +03:00
Igor Chevdar 111a5b0e34 Fixed some tests 2017-05-30 14:50:15 +03:00
Ilya Matveev 0553b119b2 stdlib: Fix number parsing 2017-04-26 17:30:29 +07:00
Ilya Matveev 0cb7e5ba72 stdlib: StringBuilder: insert "null" if the argument is null
This patch changes the behaviour of StringBuilder.append and
StringBuilder.insert methods if the argument is null in accordance
with Kotlin JVM.
2017-04-21 16:23:27 +07:00
Ilya Matveev 89270c8108 stdlib: Implement toString with radix in accordance with Kotlin JVM
Old Int.toString(radix: Int) and Long.toString(radix: Long)
implementations didn't add sign for negative values. E.g.
-1.toString(16) == "0xff..ff" while JVM returns "-1" in such case.
This patch fixes this behaviour and allow us to use any radix between
2 and 36 as JVM does.
2017-04-21 16:23:27 +07:00
Ilya Matveev 5eabda0ba4 tests: Move StringBuilder tests into single file 2017-04-21 16:23:27 +07:00
Ilya Matveev 9607033c11 stdlib: Add insert methods in StringBuilder 2017-04-21 16:23:27 +07:00
Ilya Matveev f9c6b6e6e4 stdlib: Add StringBuilder.reverse method 2017-04-21 16:23:27 +07:00
Ilya Matveev 7bf9669f57 stdlib: Add clear and remove methods in AbstractMutableCollection 2017-04-18 12:48:07 +07:00
Ilya Matveev 321386d95e stdlib: Improve ArrayList.removeAll implementation.
This patch replaces ArrayList.removeAll implementation with a
faster one. It also adds the AbstractMutableCollection class
containing default implementations for addAll, removeAll and
retainAll methods and fixes tests to check if removeAll removes
all occurrences found or not.
2017-04-18 12:48:07 +07:00
Nikolay Igotti b5c60e3082 Support data parsing operations (#380) 2017-03-23 12:54:24 +03:00
Ilya Matveev 20ffd6d90b tests: Add test for assertion fail 2017-03-13 16:25:48 +03:00
Nikolay Igotti 3cd4f76397 Add startsWith()/endsWith(). (#281) 2017-02-28 17:03:51 +03:00
Ilya Matveev 00e5e070d7 tests: Add a test for list sorting 2017-02-28 10:59:25 +03:00
Nikolay Igotti 45bb2fdb8b Add some string operations, refactor runtime. (#249) 2017-02-17 14:31:28 +03:00
Nikolay Igotti 38c6b5e9ad More stdlib: sorting, better Appendable, other minor changes. (#245) 2017-02-16 17:00:37 +03:00
Nikolay Igotti 4b27074979 Extremely conservative escape analysis. (#212) 2017-02-08 19:15:55 +03:00
Nikolay Igotti 6192dc254a Fix way how function table is built. Allows to extend Exception class. (#210) 2017-02-01 15:43:28 +03:00
Nikolay Igotti 1c878e4843 Improve object init order. (#187) 2017-01-20 13:31:01 +03:00
Nikolay Igotti 90577d440a Improve object arrays support. (#182)
Also fix the way how symbol names are being generated. Before arrays2.kt was not linking.
2017-01-16 12:22:27 +03:00
Nikolay Igotti b1101ba43e Cycle collector. (#175) 2017-01-11 17:38:03 +03:00
Svyatoslav Scherbina 8b83cb2adf backend: enable some tests 2017-01-11 19:32:25 +07:00
Svyatoslav Scherbina 5d8a28e5fc backend/tests: add runtime/memory/throw_cleanup.kt 2016-12-30 14:48:51 +07:00
Nikolay Igotti ddf47e9359 Add more init tests. 2016-12-28 15:26:44 +03:00
Svyatoslav Scherbina 8b40b9645a backend/tests: add disabled tests memory_var{1..4} 2016-12-28 13:51:14 +07:00
Nikolay Igotti e65b86ab21 Memory management design and implementation. (#148) 2016-12-27 15:01:18 +02:00
Svyatoslav Scherbina 62737efd54 backend: add tests:
* test for uninitialized vals
* test initializers3: global `var` of reference type
* expression_as_statement (disabled): using type operator as statement

Also enable test break1.
2016-12-23 11:40:31 +07:00
Konstantin Anisimov 5f097350ac TEST: test for global variable initialization added 2016-12-20 12:46:22 +03:00
Nikolay Igotti 3b7321ef94 Boxing. 2016-12-20 15:33:38 +07:00
Nikolay Igotti c9f2e1ca22 More standard library operations. (#124) 2016-12-08 15:44:22 +03:00
Nikolay Igotti 6fb4b47cb1 Add init test. 2016-12-07 17:44:46 +03:00
Alexander Gorshenev 4dba5fdec4 Disable NAN toString test for now. 2016-12-07 00:22:50 +04:00
Konstantin Anisimov b71ee37669 TEST: array_list1 test enabled 2016-12-06 16:44:44 +03:00
Nikolay Igotti 527efa661b Boundary values and their toString() test. (#90) 2016-12-06 16:03:23 +03:00
Vasily Levchenko 8892986be3 TEST:objects and companion objects. 2016-12-06 13:53:07 +03:00
Nikolay Igotti 618bf4cb80 Hash map by @elizarov, more stdlib code (#112) 2016-12-06 13:31:43 +03:00
Svyatoslav Scherbina 737a132b5d Review feedback 2016-12-05 15:17:40 +07:00
Nikolay Igotti 83dcb0fc3a Fix array init and add listOf(). (#109) 2016-12-02 13:18:57 +03:00
Alexander Gorshenev 62be62e5d6 Added a test for exception handling in 'start'. 2016-12-01 19:20:12 +04:00
Alexander Gorshenev 3f480eb846 Transfer C argv to Kotlin's args. 2016-12-01 19:20:12 +04:00
SvyatoslavScherbina e38ac775ad Calling Kotlin from C++ runtime (#107)
* backend: support exporting Kotlin functions for C++ runtime

* runtime: implement several functions in Kotlin

* Throw{NullPointer,ArrayIndexOutOfBounds,ClassCast}Exception

* runtime: add literal declared in Kotlin as empty string

Also
* add corresponding test
* use empty string literal in strdedup2
  (however keep it disabled)

* fixup! runtime: add literal declared in Kotlin as empty string

* Review feedback: add more TheEmptyString() usages

Also improve string index checks in runtime
2016-12-01 16:10:03 +03:00
Nikolay Igotti f9167ea91e Attempt of listOf() support. (#92) 2016-12-01 16:09:26 +03:00
Nikolay Igotti 85aca55ee5 Add hashCode() for primitives. (#104) 2016-12-01 16:07:06 +03:00
Nikolay Igotti bb6da99feb Fix ArrayList tests. 2016-11-30 17:39:50 +03:00
KonstantinAnisimov 90b6a12a5c Canonical name (#99)
* TEST: enabled testRetainAll

* Method resolution spared of annotations and generics

* TEST: test for canonical names "interface+generic" added

* Methods' canonical names support:

- Recursive iteration of method argument types
- Arguments in question are delivered from topmost overriden ancestor of this method
2016-11-30 16:19:28 +03:00
Nikolay Igotti e9b0ebb95e Ranges support. (#73) 2016-11-30 15:38:47 +03:00
Nikolay Igotti d4fda3bfe2 String <-> CharArray conversion, ArrayBuilder by @elizarov (#98) 2016-11-30 13:06:36 +03:00