Commit Graph

1216 Commits

Author SHA1 Message Date
Konstantin Anisimov bafa7e7c3c CODEGEN: Support for "break" and "continue" implemented 2016-12-02 16:28:19 +03:00
Konstantin Anisimov 03e94c6877 TEST: tests for "break" and "continue" added 2016-12-02 16:28:19 +03:00
Nikolay Igotti 3cee19d28e Fix couple compiler warnings. 2016-12-02 16:06:04 +03:00
Nikolay Igotti 83dcb0fc3a Fix array init and add listOf(). (#109) 2016-12-02 13:18:57 +03:00
Svyatoslav Scherbina 35dfb35246 Review feedback 2016-12-02 16:48:20 +07:00
Svyatoslav Scherbina aecbe0e5f6 backend/tests: do not check output in main_exception 2016-12-02 16:48:20 +07:00
Svyatoslav Scherbina f4014b0f29 runtime: add trivial stack traces to exceptions 2016-12-02 16:48:20 +07:00
Svyatoslav Scherbina b7b99d5684 backend/tests: allow tests to be marked as disabled
disabled tests can be run manually
2016-12-02 16:47:40 +07:00
Svyatoslav Scherbina e65b22569c backend/tests: add disabled test 'array_to_any' 2016-12-02 16:47:40 +07:00
Alexander Gorshenev 80c50c24e6 Renamed Kotlin_start to Konan_start. 2016-12-01 19:20:12 +04:00
Alexander Gorshenev 80e39cb7c9 Eliminated mangled name resolution for Kotlin_start.
Made Kotlin_start private in order to not pollute
the namespace of the default package.
2016-12-01 19:20:12 +04:00
Alexander Gorshenev 0e7b13027e Changed AllocStringInstance to accept data and length. 2016-12-01 19:20:12 +04:00
Alexander Gorshenev d0cd28fe5a Underscore is not needed on Linux for resolution of 'kfun:_start()'. 2016-12-01 19:20:12 +04:00
Alexander Gorshenev 2c89fee837 Simplified launcher to utilize some ready made functionality. 2016-12-01 19:20:12 +04:00
Alexander Gorshenev 62be62e5d6 Added a test for exception handling in 'start'. 2016-12-01 19:20:12 +04:00
Alexander Gorshenev 22d748001d Added "start" function between the C launcher and Kotlin "main" 2016-12-01 19:20:12 +04:00
Alexander Gorshenev 1aa7b23853 For better incrementality, specified :stdlib output file, as it is
non-standard for that kind of gradle task.
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
Vasily Levchenko 28918f92f7 kotlin-compiler: 1.1-20161201.112229-281 2016-12-01 15:26:10 +03:00
Nikolay Igotti fbf4db6428 Fix RTTI bugs. (#105) 2016-12-01 15:08:08 +03:00
Svyatoslav Scherbina 71a8886856 backend: add minor code improvements
Including:

* Introduce parameter scope.
* Use more appropriate descriptor types.
* Use words 'parameter' and 'arguments' more correctly.
2016-12-01 13:20:05 +07:00
Svyatoslav Scherbina a65aef0198 backend: rework variables
* use descriptor instead of name to refer to variables
* bind variables to scopes
* begin refactoring mapping between LLVM and IR parameters
2016-12-01 13:20:05 +07:00
Nikolay Igotti e131622ef7 Use memmove() for potentially overlapping ranges. 2016-11-22 13:10:25 +03:00
Nikolay Igotti bb6da99feb Fix ArrayList tests. 2016-11-30 17:39:50 +03:00
Alexander Gorshenev 95433e8a82 Moved a couple more Konan specific annotations to "konan" package 2016-11-30 17:45:07 +04:00
Alexander Gorshenev b2983850b6 Moved Konan specific annotation "@Used" to "konan" package. 2016-11-30 17:45:07 +04:00
Alexander Gorshenev bd5b4b2f52 Annotation used 2016-11-30 17:45:07 +04: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
Vasily Levchenko b38a76e910 CODEGEN: AllocArrayInstance and AllocInstance return ArrayHeader * and ObjHeader * respectively 2016-11-30 14:49:23 +03:00
Vasily Levchenko b62536f807 RUNTIME: AllocArrayInstance and AllocInstance return ArrayHeader * and ObjHeader * respectively 2016-11-30 14:49:23 +03:00
Nikolay Igotti d4fda3bfe2 String <-> CharArray conversion, ArrayBuilder by @elizarov (#98) 2016-11-30 13:06:36 +03:00
Svyatoslav Scherbina badecf8210 Interop, backend: remove code avoiding zero-length C arrays 2016-11-30 15:00:55 +07:00
Svyatoslav Scherbina 8dc42bbe35 Interop: support allocating zero bytes 2016-11-30 15:00:55 +07:00
Svyatoslav Scherbina 0e43e0d0d8 backend: add test for empty string literal
also restore removed disabled test
2016-11-30 15:00:55 +07:00
Nikolay Igotti 51d6dfe713 Append all variable allocations to prologue. (#97) 2016-11-29 16:14:29 +03:00
SvyatoslavScherbina 075562f46b Merge pull request #93 from JetBrains/try-catch-finally
Implement throw and try-catch-finally in backend

add corresponding tests
2016-11-29 15:01:23 +07:00
Svyatoslav Scherbina 0c81cfdb24 Review feedback, part 2:
implement return to any target from FinalizingScope
2016-11-29 14:01:07 +07:00
Svyatoslav Scherbina d44b79fa51 Review feedback, part 1 2016-11-29 13:06:02 +07:00
Konstantin Anisimov 5ae4e3372b CODEGEN: support for safe cast type operator added 2016-11-28 21:48:01 +03:00
Konstantin Anisimov 837ae60eaf TEST: tests for safe cast added 2016-11-28 21:48:01 +03:00
Vasily Levchenko c35af302b0 TEST: coercion test enchancement from @olonho 2016-11-28 19:32:37 +03:00
Vasily Levchenko 835ab152f3 CODEGEN: fix evaluateBlock()
- we shouldn't ignore variable name to return
2016-11-28 19:32:37 +03:00
Vasily Levchenko de06d069b1 STDLIB: return original ++ operations 2016-11-28 19:32:37 +03:00
Vasily Levchenko 0887dfabae CODEGEN: coercion fixed
- do not let evaluateWhen ignore case when there're no result expected.
2016-11-28 19:32:37 +03:00
Vasily Levchenko 90d705aae2 kotlin-compiler: 1.1-20161128.112645-274 2016-11-28 19:24:18 +03:00
Alexander Gorshenev 5627688390 A million element byte array segfaults 2016-11-28 20:15:15 +04:00