Commit Graph

2641 Commits

Author SHA1 Message Date
Igor Chevdar 56e08e40e8 Added some corner tests on escape analysis 2017-08-07 16:45:51 +03:00
Igor Chevdar 31d2618b9c Made escape analysis a bit more conservative for now 2017-08-07 16:45:51 +03:00
Robert Hencke 72ca603d71 Reduce boilerplate for applying kotlin-gradle-plugin. 2017-08-07 17:25:52 +07:00
Alexander Gorshenev a0e15a7776 Eliminated some warnings. 2017-08-07 12:36:32 +03:00
Igor Chevdar 9eb2bb7fbc Fixed some bugs in escape analysis 2017-08-04 17:48:50 +03:00
Alexander Gorshenev 21ad2d97e6 Fix broken build.
The fix for d8 readline() broke hello1 and hello2 tests.
2017-08-04 15:50:27 +03:00
Konstantin Anisimov 51f74b4203 Printing double value - check if it represented as exponential 2017-08-04 16:06:20 +07:00
Konstantin Anisimov 8b7cad339e Print result coeff as double 2017-08-04 16:06:20 +07:00
Alexander Gorshenev b4660d03a1 Initial .wasm file generation for the wasm32 target.
Some basic launcher.js and runtime.
2017-08-03 17:51:48 +03:00
Alexander Gorshenev 9ec5b24832 Brought some musl math functions for wasm32. 2017-08-03 17:51:48 +03:00
Alexander Gorshenev c5d78b5b54 Brought Holger Weiss's c99-snprintf to runtime. 2017-08-03 17:51:48 +03:00
Konstantin Anisimov 91fc291bfa Now each test normalized on Kotlin-jvm time
Average value also is average of normalized values
2017-08-03 18:21:49 +07:00
Konstantin Anisimov 99218ba65f Copyright inserted
Results are normalized on run cycles count
2017-08-03 18:21:49 +07:00
Konstantin Anisimov b3fe93cc18 Enable performance testsuite 2017-08-03 18:21:49 +07:00
Igor Chevdar df754c0215 Removed debug code 2017-08-03 13:44:42 +03:00
igotti-google 5e55a75d59 Work around 32-bit build problem (struct merging by LLVM) 2017-08-03 00:39:09 +03:00
Nikolay Igotti beb10306dd Add Kotlin object inspection to simplify debugging (#763) 2017-08-02 18:55:52 +03:00
Igor Chevdar eabe2435bf Rewrote escape analysis 2017-08-02 18:44:04 +03:00
Ilya Matveev 7eb2572dc3 gradle-plugin, tests: Use separate methods to edit build.gradle 2017-08-02 20:22:08 +07:00
Ilya Matveev effe54d470 stdlib: Add also function 2017-08-02 20:20:09 +07:00
Vasily Levchenko d0ec24a5f2 [kotlin compiler][update] 1.1-20170729.003925-731 2017-07-31 12:56:29 +03:00
Vasily Levchenko f07273d55f [debug][test] build fix 2017-07-28 17:52:58 +03:00
Ilya Matveev 843c4514f7 gradle-plugin, tests: remove excludeDependentModules from def-file 2017-07-28 10:57:08 +07:00
Ilya Matveev 10ce5b3b1f gradle-plugin: Use enum for konan-specific project properties 2017-07-28 10:57:08 +07:00
Ilya Matveev 8b239d1025 gradle-plugin: Annotate properties not used for UP-TO-DATE check
This patch annotates all task properties which are not used for
UP-TO-DATE checks with Gradle's @Internal annotation (see https://
docs.gradle.org/4.0/javadoc/org/gradle/api/tasks/Internal.html) to
fix Gradle validation warnings.
2017-07-28 10:57:08 +07:00
Ilya Matveev f98380810e gralde-plugin, tests: Ignore 'target' test on Windows 2017-07-28 10:57:08 +07:00
Ilya Matveev 1b4f3536d0 gradle-plugin: Mention several available options in GRADLE_PLUGIN.md 2017-07-28 10:57:08 +07:00
Ilya Matveev 2ed2b262d2 gradle-plugin, tests: Escape windows path separator in konan.home 2017-07-28 10:57:08 +07:00
Ilya Matveev da3be1f04b gradle-plugin: Correct some incremental tests 2017-07-28 10:57:08 +07:00
Ilya Matveev 60c87e890f gradle-plugin: Refactor config containers 2017-07-28 10:57:08 +07:00
Ilya Matveev dc1d24eaa7 gradle-plugin: Don't use a default src path if another one is defined 2017-07-28 10:57:08 +07:00
Ilya Matveev 6534f36dbd gradle-plugin: Fix incremental build for 'manifest' argument 2017-07-28 10:57:08 +07:00
Ilya Matveev 19df1e26e5 gradle-plugin: Add a test for default values 2017-07-28 10:57:08 +07:00
Ilya Matveev 8f56e81831 gradle-plugin: Add path test 2017-07-28 10:57:08 +07:00
Ilya Matveev 5dcbfeb4cf gradle-plugin: Add tests for incremental build 2017-07-28 10:57:08 +07:00
Ilya Matveev 7fbb1fcfc7 gradle-plugin: Make manifest parameter optional 2017-07-28 10:57:08 +07:00
Ilya Matveev 12f815eabb backend: Add a call lowering pass before inlining
Some inlined calls may require additional processing before the
inlining pass. E.g. assert() calls must be removed if assertions are
disabled by compiler flags. This patch adds an additional pass
before inlining and uses it for assertions removal.
2017-07-27 11:49:54 +07:00
Ilya Matveev 0e67fbb7ad tests: Add assert tests 2017-07-27 11:49:54 +07:00
Ilya Matveev a2e9fa324b backend: Use symbols for assertions processing 2017-07-27 11:49:54 +07:00
Ilya Matveev de5bc71ffc backend: Correct assertion in 'for' loop lowering
The frontend uses one of two origins for loop variables:
LOOP_VARIABLE and IMPLICIT_LOOP_VARIABLE. This patch takes
this into account.
2017-07-25 22:26:17 +07:00
Ilya Matveev bef8d6bef1 backend: Set 'origin' property for generated variables in 'for' loops 2017-07-25 22:26:17 +07:00
Ilya Matveev 42c4391654 backend: Process 'until MIN_VALUE' in for loops
This patch takes into account a corner case available for loops
over a progression (see backend.native/tests/external/codegen/box/
ranges/forInUntil/forInUntilMinint.kt test):

for (i in 0 until Int.MIN_VALUE) { ... }

Here we cannot use subtraction to obtain a right bound of the loop
due to an overflow. Instead we consider any loop with MIN_VALUE in
it's right bound as empty loop. Such behaviour is similar to the one
of 'until' method.

So now the empty check for a loops with 'until' call:

for (i in first until bound) { ... }

is as follows:

val last = getProgressionLast(first, bound, step) // Only if step==1
if (first <= last && bound > <Int|Long|Char>.MIN_VALUE) {
    do { ... } while(i != last)
}

Further improvements: We can generate a simpler IR for some simple
frequent cases (e.g. for until calls without steps) and eliminate
loops if we can prove that they are empty.
2017-07-25 22:26:17 +07:00
Ilya Matveev 295ab0a679 [kotlin compiler][update] 1.1-20170724.005554-711 2017-07-24 15:54:16 +07:00
Ilya Matveev 0ddc002b8d backend: Use IrComposite instead of IrBlock in headers of 'for' loops 2017-07-20 10:35:40 +07:00
Daniel c4acdf1b25 Fix humanReadable formatting of bytes.
Previously, Long.humanReadable would display byte unit suffixes as `kB`, `MB`, etc., even though the calculations on byte counts were using base 2 for calculations.

I've revised this to display sizes in the format of `kiB` or `MiB`, for kebibyte, and mebibyte - the base 2 unit equivalents of kilobyte and megabyte respectively.
2017-07-19 10:33:59 +07:00
Ilya Matveev d6e0f67d4e tests: Add test for nested 'for' loops 2017-07-18 17:05:58 +07:00
Ilya Matveev 6ea341be06 tests: Move 'for' loop lowering tests into 'controlflow' directory 2017-07-18 17:05:58 +07:00
Ilya Matveev 745fc711f8 backend: Add caching for unary and binary operation symbols 2017-07-18 17:05:58 +07:00
Ilya Matveev 01f0540fac backend: Don't cast step in 'for' loop lowering 2017-07-18 17:05:58 +07:00
Ilya Matveev 3184ae57c6 backend: Don't calculate last element in 'for' loop if the step is 1 2017-07-18 17:05:58 +07:00