Commit Graph

1025 Commits

Author SHA1 Message Date
Alexander Gorshenev 67867dd6fb Removed some leftovers. 2017-04-27 22:55:52 +03:00
Alexander Gorshenev 53d01129ce Disallow serialization of private and other non-exported functions. 2017-04-27 22:55:52 +03:00
Alexander Gorshenev ee6d70fb0f When searching a descriptor by name,
only search in exported symbols.
2017-04-27 17:06:21 +03:00
Ilya Matveev 55c3b79786 tests: Update box tests (1053418:id) 2017-04-27 17:27:39 +07:00
Alexander Gorshenev 0859abbb9d Somewhat simplified descriptor management for IR serialization.
The public descriptors don't need to keep their containing declaration index.
KonanIr.KotlinDescriptor already has this index, so use it instead.
That allows to remove some more clutter from KonanLinkData.
2017-04-27 12:33:35 +03:00
Alexander Gorshenev 503399ade3 Moved local declaration descriptor serialization
from KonanLinkData where it serves no purpose,
to KonanIr where it belongs.
2017-04-27 12:33:35 +03:00
Alexander Gorshenev 2c1fa5e965 Removed indices from the descriptor serializations.
The reason they have been introduced initially was
because those indices were calcuated irrelative to the descriptros themselves.

The current scheme with hashing the mangled name allows to calcuate
the indices for the descriptors, rather than storing them.

The measurements didn't reveal any slowdowns because of hash
recalculations, rather there may be even a minor improvement
because of a 2% smaller volume of module protobuf.
2017-04-27 12:33:35 +03:00
Alexander Gorshenev 31c490e14e Reflect the absence of parent fqname index in the absence of protobuf extension. 2017-04-27 12:33:35 +03:00
Alexander Gorshenev 0cc3fa56ab Properly process root package symbol table index. 2017-04-27 12:33:35 +03:00
Nikolay Igotti 2d2ae56435 Update compiler (#531) 2017-04-27 12:15:56 +03:00
Alexander Gorshenev 28c03a36cc Collected pieces of library management in KonanLibrary interface.
In anticipation of klib implementation.
2017-04-27 12:13:27 +03:00
Alexander Gorshenev f56e68e255 Make sure type arguments are serialized in the proper order. 2017-04-27 12:13:16 +03:00
Alexander Gorshenev 2ae88c9731 Some more use of .propertyIfAccessor . 2017-04-27 12:13:16 +03:00
Svyatoslav Scherbina 8a0b494c2e Apply interop filtering
Also actualize .def files
2017-04-26 20:07:06 +03:00
Vasily Levchenko ab392bf9ed LINK: return occasionally deleted in 7d111c4d extracting debug info on MacOS.
This code generates .dSYM folder containing debug info in dwarf format, it is place where debuger lookup symbols  and type declarations.
2017-04-26 18:50:19 +03:00
Ilya Matveev 4a16087a21 stdlib: Add indentation extensions for strings 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
Svyatoslav Scherbina ea2d7cbf01 Handle lambda argument of staticCFunction 2017-04-21 14:03:36 +03: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 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 f9c6b6e6e4 stdlib: Add StringBuilder.reverse method 2017-04-21 16:23:27 +07: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 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
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
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 7878c8fc1b tests: Remove mistakenly added binaries 2017-04-19 18:27:32 +07:00
Alexander Gorshenev c7963a86c1 Start a new serializer for each class.
The consequence of that would be the type tables started anew for each class.
Without that the ever growing common global type table is written to each class.
Making the class protobufs bigger and bigger.
2017-04-19 14:12:53 +03:00
Alexander Gorshenev e2bf81d7d8 Captured type constructor support in serializer. 2017-04-19 14:06:50 +03:00
Vasily Levchenko 1544045643 CODEGEN: Initial support for emiting debug information.
- avoiding generating debug info using function scope (prolog/epilog problem).
- bit logging.
- extracted function for debug location.
- attempted to reset debug location at the start of the function (not working but looks like it's right way).
- private modifier added to non public functions
- removied IrFunction::line copy of IrElement::line() extention function.
- added FileScope used in  IrToBitcode::visitFile()
- local variable support
- mechanism of central managment of debug info emitting
2017-04-19 09:52:05 +03:00
Vasily Levchenko 747ad0efda VERSIONING: 1st aproach 2017-04-19 09:52:05 +03:00
Vasily Levchenko 84d62eb471 DEBUGINFO: makes debug info stab usable from konan compiler 2017-04-19 09:52:05 +03:00
Vasily Levchenko 05c25e4e0a LINK: makes macosx based target awared about dsymuil on link stage
- added verbosing symbol information (perhaps it's require special flag).
2017-04-19 09:52:05 +03:00
Vasily Levchenko 7e9a01b6ba DRIVER: added '-g' key to enable emitting debug information 2017-04-19 09:52:05 +03:00
Alexander Udalov a4eceb3e3a kotlin-compiler:1.1-20170417.154352-466
- Fix usage of new Kotlin command line arguments API
(cherry picked from commit fb8534d05d2f69902fd1add631754f7cdfb75c89)
2017-04-18 19:36:00 +03:00
Alexander Gorshenev e60754474a Preserve origin LAMBDA. The inliner seems to be looking at it. 2017-04-18 13:54:37 +03:00
Alexander Gorshenev d79875ac7c A couple of functions in stdlib are marked with @InlineExposed. 2017-04-18 13:54:37 +03:00
Alexander Gorshenev f959c4e43c a little warning cleanup 2017-04-18 13:54:37 +03:00
Alexander Gorshenev ce85975fac Slightly lighter weight when constructs. 2017-04-18 13:54:37 +03:00