Commit Graph

2226 Commits

Author SHA1 Message Date
Ilya Matveev 29ce88a6f0 stdlib: Minor refactorings for strings
Remove unused include <errno.h> in KString.cpp.
Rename variables in StringBuilder.reverse().
Use const char* instead of char* in checkParsingErrors.
2017-04-26 17:30:29 +07:00
Ilya Matveev 9aa0777efb stdlib: Use iswspace_Konan in parseDouble/parseFloat 2017-04-26 17:30:29 +07:00
Ilya Matveev 4a16087a21 stdlib: Add indentation extensions for strings 2017-04-26 17:30:29 +07:00
Ilya Matveev a8dad22332 stdlib: Always find an empty substring
This patch fixes the following tests:
    external_stdlib_text_StringTest/replace.kt
    external_stdlib_text_StringTest/replaceDelimited.kt
    external_stdlib_text_StringTest/replaceFirst.kt
2017-04-26 17:30:29 +07:00
Ilya Matveev a4f3691a7b stdlib: Rewrite deep content operations for Arrays 2017-04-26 17:30:29 +07:00
Ilya Matveev f958573d05 stdlib: StringBuilder: Use Apache Harmony reverse() implementation
This patch uses a Apache Harmony's approach to reverse surrogate
pairs.
2017-04-26 17:30:29 +07:00
Ilya Matveev 7f9e65ef17 stdlib: Remove unused C++ methods for string parsing
Now toByte, toShort, toInt and toLong methods use their "...OrNull"
analogs implemented in Kotlin insetad of "parse..." functions
implemented in C++. This patch removes unused C++ methods.
2017-04-26 17:30:29 +07:00
Ilya Matveev 0553b119b2 stdlib: Fix number parsing 2017-04-26 17:30:29 +07:00
Ilya Matveev 8df15dca5a tests: Update box tests (1050294:id) 2017-04-25 17:46:02 +07:00
Ilya Matveev 569ceff5f9 tests: Don't remove stdlib tests when update external ones 2017-04-25 17:46:02 +07:00
Alexander Gorshenev 5b4eb47235 Simplified IR awareness of KonanDescriptorSerializer. 2017-04-25 01:24:49 +03:00
Alexander Gorshenev 39f2c3d7fb Added support of inline properties. 2017-04-25 01:24:49 +03:00
Vasily Levchenko 92964e1eae kotlin-compiler:1.1-20170424.172927-491 2017-04-24 22:35:39 +03:00
Nikolay Igotti 13dbbd361b Fix GTK demo on Linux 2017-04-21 16:48:08 +03:00
Nikolay Igotti be646930cc Prevent init order issues in maps (#517) 2017-04-21 16:02:11 +03:00
Svyatoslav Scherbina 509965a691 Add minor improvement to samples/gtk 2017-04-21 14:03:36 +03:00
Svyatoslav Scherbina ea2d7cbf01 Handle lambda argument of staticCFunction 2017-04-21 14:03:36 +03:00
Svyatoslav Scherbina c6ad4c3307 Disable the buggy optimization in interop stubs generator 2017-04-21 14:03:36 +03:00
Ilya Matveev 64757267ef stdlib: StringBuilder: Use copyOfRange for array copying 2017-04-21 16:23:27 +07:00
Ilya Matveev e9d6013efd stdlib: Refactor toString with radix for Int and Long 2017-04-21 16:23:27 +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 e8479d1148 stdlib: Ignore case in String.toBoolean 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 95034225a8 stdlib: Throw NoSuchElementException from array iterators 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 f2fd80e9e3 stdlib: Add CharSequence extensions 2017-04-21 16:23:27 +07:00
Ilya Matveev f9c6b6e6e4 stdlib: Add StringBuilder.reverse method 2017-04-21 16:23:27 +07:00
Nikolay Igotti 5517ed7296 GTK sample (#515)
* GTK sample

* Add full UTF8 recoding ability to interop
2017-04-20 23:09:36 +03:00
Alexander Gorshenev 5368eb0f2f Only sort contributed methods for vtable generation. 2017-04-20 22:46:48 +03:00
Alexander Gorshenev 7d111c4d31 Slightly refactored cross compilation infrastructure. 2017-04-20 18:37:45 +03:00
Svyatoslav Scherbina 8b148fd35c Make interop callback types more precise 2017-04-20 17:36:22 +03:00
Svyatoslav Scherbina c0b40ffedb Remove callbacks-related hacks from samples/libcurl 2017-04-20 17:36:22 +03:00
Svyatoslav Scherbina 3f84ba462f Rework interop callbacks
*   Do not rely on type inference and `CFunctionType`;
*   Represent struct-typed parameters and return values as `CValue<*>`
    (currently supported only on JVM).
2017-04-20 17:36:22 +03:00
Svyatoslav Scherbina cc73c7e009 Reduce amount of redundant empty lines in C interop stubs 2017-04-20 17:36:22 +03:00
Svyatoslav Scherbina ee70deae49 Fix broken Interop:Indexer:updatePrebuilt task 2017-04-20 17:36:22 +03:00
Vasily Levchenko a679b05456 CODEGEN: compiler calculates path of compile unit as absolute path 2017-04-19 23:42:13 +03:00
Vasily Levchenko 65efdb18cf UTIL: java.io.File like wrapper for operation with files 2017-04-19 23:42:13 +03:00
Kjell Winblad 93ef9c5e5c Fix small typo (#510) 2017-04-19 22:10:47 +03:00
Vasily Levchenko ee116b1a91 CODEGEN: conversion IR line/column numbering to dwarf one 2017-04-19 21:08:26 +03:00
Alexander Gorshenev 4cf27e44ec Turned conext.log("text") into context.log{"text"} so that the argument
evaluated lazily. This is especially useful when the text is constructed from
large IR pieces using ir2stringWhole().
2017-04-19 15:53:08 +03:00
Vasily Levchenko 3bdc7f6514 kotlin-compiler:1.1-20170418.161005-471 2017-04-19 15:29:00 +03:00
Ilya Matveev 46229636fc stdlib: Add plus/minus extensions for Set 2017-04-19 18:27:32 +07:00
Ilya Matveev b9b8c6e192 stdlib: Suppress/fix warnings in stdlib
This patch fixes redundant safe calls/casts/type projections
and suppresses some casts which are actually safe but reported
as unsafe.
2017-04-19 18:27:32 +07:00
Ilya Matveev fcece669ec stdlib: Add AbstractMutableList implementation
The implementation is based on the AbstractMutableList class
of JS backend.
2017-04-19 18:27:32 +07:00
Ilya Matveev 9da229896b stdlib: Fix variance for map and collection extensions 2017-04-19 18:27:32 +07:00
Ilya Matveev 7878c8fc1b tests: Remove mistakenly added binaries 2017-04-19 18:27:32 +07:00
Ilya Matveev 859618b546 stdlib: Add some Map extensions
This patch copies some Map extensions from Kotlin JVM stdlib:
 - none
 - onEach
 - getValue
 - min/maxBy and min/maxWith
 - asIterable and asSequence
2017-04-19 18:27:32 +07:00
Ilya Matveev fd7f379ff5 stdlib: Add binary search for lists 2017-04-19 18:27:32 +07:00
Ilya Matveev 1c081d351b stdlib: Add Grouping.eachCount extension 2017-04-19 18:27:32 +07:00