Commit Graph

1262 Commits

Author SHA1 Message Date
SvyatoslavScherbina 786374ef86 Add basic support for class references
Also use class name for `Any.toString` and `Throwable.toString`.
2017-09-26 10:59:45 +03:00
Svyatoslav Scherbina a6ca64871f Implement explicit and implicit object pinning for interop
This allows passing Kotlin primitive arrays directly to native
2017-09-26 09:50:42 +03:00
Svyatoslav Scherbina d8ed1f4414 Hide nativeMemUtils and pointerSize 2017-09-26 09:50:42 +03:00
Svyatoslav Scherbina 388aba5040 Export property accessors if the property is exported
This fixes `@PublishedApi` support for properties.
2017-09-26 09:50:42 +03:00
Vasily Levchenko 197f77f8e3 [tests] string builder appendln tests 2017-09-25 17:51:33 +03:00
Ilya Matveev 412d0485e4 box-tests: Remove duplicating assertions from testUtils.kt
The testUtils.kt contains some assertions which are now implemented
in stdlib. This patch removes them from testUtils.kt
2017-09-25 13:45:11 +03:00
Alexander Gorshenev f1c3e866b4 A couple of tests for default libraries. 2017-09-25 12:49:22 +03:00
Alexander Gorshenev 27f7e4263b Auto link everything found in dist/klib.
Disable such behavior with -nodefaultlibs.
Omit libraries from the link stage if their packages have not been referenced.
2017-09-25 12:49:22 +03:00
Ilya Matveev 2f4163ece6 unit-tests: Fix filenames for Windows 2017-09-25 11:31:22 +03:00
Ilya Matveev 6db5bbb4f0 unit-tests: Disable tests for unit tests support on wasm32 2017-09-25 11:31:22 +03:00
Ilya Matveev 4c3016d21b unit-tests: Minor fixes before review 2017-09-25 11:31:22 +03:00
Ilya Matveev 2d757c4150 unit-tests: Add assertion and annotation tests 2017-09-25 11:31:22 +03:00
Ilya Matveev 1e5a27505a unit-tests: Support Ignore annotation 2017-09-25 11:31:22 +03:00
Ilya Matveev 6440e6694d unit-tests: Rename annotations After/Before -> AfterEach/BeforeEach 2017-09-25 11:31:22 +03:00
Ilya Matveev 345e3570cc unit-tests: Support tests in objects 2017-09-25 11:31:22 +03:00
Ilya Matveev 02fb8d3eb1 unit-tests: Assert library 2017-09-25 11:31:22 +03:00
Ilya Matveev 74fdfa17f0 unit-tests: Support for companion object tests 2017-09-25 11:31:22 +03:00
Ilya Matveev f1c59707dd unit-tests: Top level test support 2017-09-25 11:31:22 +03:00
Ilya Matveev 45992a2b75 unit-tests: Simple support for test classes 2017-09-25 11:31:22 +03:00
Vasily Levchenko f26e5b5f02 unit-tests: Create a simple test runner implementation 2017-09-25 11:31:22 +03:00
Alexander Gorshenev 298820612c The linker -S flag to omit unnecessary symbols from the final binary
was missing for raspberrypi.
2017-09-21 17:18:50 +03:00
Aleksey Kladov 298778cc09 [build] fix conflict between bulid and jars tasks
The file `backend.native/build/libs/backend.native.jar` was produced
by two different tasks `:backend.native:jar` (default task of Java
Plugin) and `backend.native:jars` (our custom task). This caused the
`:dist: task to never be UP-TO-DATE.
2017-09-19 18:18:17 +03:00
Vasily Levchenko 1d26d30521 [kotlin compiler][update] 1.1-20170916.214502-895
gradle-plugin: 1.1-20170916.215405-873
stdlib: 1.1-20170916.214349-804
2017-09-19 11:17:03 +03:00
Vasily Levchenko 7ca9332d2f [lower][debug] KT-20206 non existing source location in loops over range 2017-09-18 15:07:45 +03:00
Vasily Levchenko 3416c53634 [command line][utility] print location with more detail 2017-09-18 15:07:45 +03:00
Svyatoslav Scherbina 79455c5161 Support interop modularity
* Add list of included headers into the manifest
* Implement importing "foreign" type declarations
* Implement forward declarations more natively in the compiler
* Represent Objective-C categories as Kotlin extension methods and
  properties

Also:
* Do some refactoring in stub generation
* Call bridges directly in stubs for Objective-C properties
2017-09-14 16:47:26 +03:00
Vasily Levchenko 82b2b76c09 [codegen][debug] fix of KT-20207 (problem with accessing structs)
- removed artifacts of dwarf type generation, instead debugger will use runtime debugger functions
- fixed variable offset calculation
2017-09-14 05:48:21 +03:00
Alexander Gorshenev b367a0d255 HTML5 canvas drawing demo. 2017-09-13 19:04:59 +03:00
Alexander Gorshenev 820a009163 Pass the list of static libraries from the cinterop tool to the compiler. 2017-09-13 12:23:49 +03:00
Alexander Gorshenev eb0e584cb4 Allow linking static libraries from klibs.
Resolve static libraries in cinterop tool.
2017-09-13 12:23:49 +03:00
Alexander Gorshenev e9720b7e13 Allow including external binaries within klibs with -includeBinary flag.
Link such binaries in case they are javascripts on wasm32.
Otherwise don't do anything useful yet.
2017-09-13 12:23:49 +03:00
Alexander Gorshenev c363732eb5 Report an explicit error when linker invocation fails.
In addition ir makes exit code 1, rather than 0 if it
was the only problem during compilation.
2017-09-13 12:21:24 +03:00
Ilya Matveev c32b84efd1 stdlib: Move exit function to porting layer 2017-09-07 18:48:10 +03:00
Ilya Matveev ea667ebc5c stdlib: Add exitProcess function 2017-09-07 18:48:10 +03:00
Svyatoslav Scherbina 4e285a5ef4 Implement equals, hashCode and toString for Objective-C objects 2017-09-06 23:57:19 +03:00
Svyatoslav Scherbina 12df524138 Disable inheriting Objective-C initializers by Kotlin classes
Unoverridden inherited Objective-C initializer can lead to
creating uninitialized Kotlin instances.
Throw exception when such an initializer gets called.
2017-09-06 23:57:19 +03:00
Svyatoslav Scherbina 324f54ba1e Implement @ExportObjCClass 2017-09-06 23:57:19 +03:00
Svyatoslav Scherbina aece25344f Simplify immutableBinaryBlobOf support in codegen 2017-09-06 23:57:19 +03:00
Svyatoslav Scherbina 07f26dc1df Rework Objective-C constructors and support 'initBy' intrinsic 2017-09-06 23:57:19 +03:00
Svyatoslav Scherbina 5a7e3e20b4 Support exposing Kotlin methods as Objective-C actions and outlets 2017-09-06 23:57:19 +03:00
Alexander Gorshenev 63ace8add9 Produce a warning in case we could not find an entry point. 2017-09-05 18:15:42 +03:00
Nikolay Igotti 65aa2d4d77 Workaround KT-19612 (#828) 2017-09-01 14:08:48 +03:00
Ilya Matveev f68380c2d2 CLI: Add --check_dependencies flag 2017-09-01 11:38:25 +07:00
Igor Chevdar c4fefcd462 Fixes in escape analysis 2017-08-30 13:55:01 +03:00
Igor Chevdar 136c62a62c Added test on workers with invalid transfer attempt 2017-08-29 16:39:49 +03:00
Nikolay Igotti f74265126e Fix performance bug, review feedback on indexer changes (#818) 2017-08-29 16:12:44 +03:00
Nikolay Igotti 7d72beb27c Improve memory tracing, fix 32-bit platforms (#815) 2017-08-29 10:21:47 +03:00
Igor Chevdar 1d434899cb Fixed bug with globals deinitialization 2017-08-28 14:51:14 +05:00
Ilya Matveev f218d36aa9 build: Fix javaArgs in stdlib build 2017-08-28 10:55:53 +07:00
Igor Chevdar 3522627ce3 Added FrameOverlay struct 2017-08-24 19:48:55 +05:00