Commit Graph

883 Commits

Author SHA1 Message Date
Konstantin Anisimov 9f4e1a92d8 Unify inlining procedure for "function" and "lambda" 2017-04-10 18:45:28 +07:00
Nikolay Igotti 100e4df05d Concurrency prototype (#453)
* Concurrent executors

* Review feedback
2017-04-07 15:16:04 +03:00
Alexander Gorshenev 49674d2b1b Some mangling disambiguation tests. 2017-04-07 13:47:52 +03:00
Alexander Gorshenev f91bc457db Disambiguate upper bounds in the mangling. 2017-04-07 13:47:52 +03:00
Ilya Matveev a69def4254 tests: Generate test tasks for stdlib tests
This patch updates the test execution harness to work with the
new stdlib tests. It allows one to execute stdlib tests as
a part of external testing (./gradlew run_external) or separately
(./gradlew run_external -Pprefix=external_stdlib).
2017-04-07 17:21:11 +07:00
Ilya Matveev 85827b4880 tests: Copy stdlib tests from Kotlin/JVM
This patch copies Kotlin/JVM stdlib tests (libraries/stdlib/test)
excepting ones with explicit java dependencies. It also transforms
the tests to use them as box-tests.
2017-04-07 17:21:11 +07:00
Igor Chevdar 8690b00790 Refactoring 2017-04-07 08:01:16 +07:00
Igor Chevdar db50381bc9 Inline: set correct containing declaration + some fixes
1. Containing declaration can be computed as parent from the IR.

2. Sometimes we need to substitute FunctionDescriptor which is defined
inside an inline function call but nevertheless leaks to the outside:

public inline fun <T, R> T.myLet(f: (T) -> R): R = f(this)

interface foo {
    fun bar(): String
}

fun box(): String {
    val baz = "OK".myLet {
        object : foo {
            override fun bar() = it
        }
    }
    return baz.bar()
}
2017-04-07 08:01:16 +07:00
Konstantin Anisimov 3c2b5a9762 Fixed "interop0" failure 2017-04-06 16:25:11 +03:00
Konstantin Anisimov 53bc4b1872 Eliminated special treatment for lambda parameter -> argument map building
Fix for ClassDescriptors substitution
2017-04-06 16:25:11 +03:00
Konstantin Anisimov 82917eafbd Move copying descriptors and types in InlineCopyIr 2017-04-06 16:25:11 +03:00
Konstantin Anisimov 7ec89caf27 Avoid evaluation ANONIMOUS_FUNCTION as argument 2017-04-06 16:25:11 +03:00
SvyatoslavScherbina 058bb728df kotlin-compiler: 1.1-20170403.193854-443 (#452) 2017-04-05 20:48:58 +03:00
Igor Chevdar f5e3519d3a Inline: implemented properties copying 2017-04-05 14:30:03 +03:00
Igor Chevdar e9b207595a Inline: correct set of super class for ClassDescriptor 2017-04-05 14:30:03 +03:00
Vasily Levchenko 461b977cae TEST: build slack teamcity properties for testing:
- NEVER commit if konan-reporter-token contains real token.
2017-04-05 14:27:16 +03:00
Alexander Gorshenev 3f625ce1b2 More primitive types for constants. 2017-04-05 12:09:43 +03:00
Alexander Gorshenev 429bc31b82 No serialization for "external public inline" functions. 2017-04-05 12:09:43 +03:00
Konstantin Anisimov a70d5293b3 Typo fixed 2017-04-04 18:02:01 +07:00
Konstantin Anisimov 5f9f0e55d0 Optimize import 2017-04-04 18:02:01 +07:00
Konstantin Anisimov c7de1d452f Move type operations in DeepCopyIrTreeWithDescriptors 2017-04-04 18:02:01 +07:00
Konstantin Anisimov 276c14a896 Minor refactoring 2017-04-04 18:02:01 +07:00
Konstantin Anisimov 90b910fd53 Igor's fixes 2017-04-04 18:02:01 +07:00
Konstantin Anisimov 526a496d59 Assert prevents compiling stdlib - should be suspended 2017-04-04 18:02:01 +07:00
Konstantin Anisimov 36ddaa46e4 Assert if deserializer failed to fetch FunctionDeclaration 2017-04-04 18:02:01 +07:00
Konstantin Anisimov 2381e453d8 Type substitution relocated in DeepCopyIrWithDescriptors 2017-04-04 18:02:01 +07:00
Igor Chevdar ee3e408dcb Added recursive inlining 2017-04-04 11:58:52 +03:00
Igor Chevdar b9507d9036 Do not inline arguments that are IrBlock or IrCallableReference 2017-04-04 11:58:52 +03:00
Igor Chevdar d9e400f39e * Enabled inlining of stdlib
* Fixed two bugs in inlining
2017-04-04 11:58:52 +03:00
Igor Chevdar fffbff1365 Inline: need to clone all arguments for inline function call 2017-04-04 11:58:52 +03:00
Igor Chevdar 791712a22a Fixed bug with inline function call: run substituter on descriptors 2017-04-04 11:58:52 +03:00
Igor Chevdar 8d5ec79192 Supported empty vararg parameter in inline function call 2017-04-04 11:58:52 +03:00
Igor Chevdar 492187cb4c Fixed visibility
Function declared in inline function is not always local - it can
be declared in a local class
2017-04-04 11:58:52 +03:00
Igor Chevdar b960d8b84a Fixed containing declaration during copying of function descriptor 2017-04-04 11:58:52 +03:00
Igor Chevdar 6c1c86abaf Fixed dispatch receiver during copying of function descriptor 2017-04-04 11:58:52 +03:00
Igor Chevdar 8dbdd9422d Copying of memberScope of local class in inline function 2017-04-04 11:58:52 +03:00
Igor Chevdar fc55e9fba1 Added phase to IrValidator: ensure that all IR nodes are different 2017-04-04 11:58:52 +03:00
Igor Chevdar dc7e00aa2a Added function declarations stack for debugging 2017-04-04 11:58:52 +03:00
Alexander Gorshenev 1c2af73468 Bumped minimal MacOS version from 10.10 to 10.11. 2017-04-03 15:02:17 +03:00
Svyatoslav Scherbina 7f0b8a6778 Fix number of interop issues 2017-03-31 17:24:41 +03:00
Vasily Levchenko 5a001faaaa IR:STRING_CONCATINATION: don't stop on first cancatination, please check children 2017-03-31 12:05:06 +03:00
Svyatoslav Scherbina 50c3be3fc2 Simplify working with values in interop
* Access primitive interop array elements and struct fields without `.value`
* Simplify C*Var* interop types names
2017-03-31 11:44:07 +03:00
Alexander Gorshenev 9fd555471a A couple of konanc driver tests. 2017-03-31 11:07:01 +03:00
Alexander Gorshenev 742934a1d8 Load metadata lazily per package fragment. 2017-03-31 11:06:38 +03:00
Alexander Gorshenev 8c30ae38b6 Serializer warning cleanup. 2017-03-30 20:54:18 +03:00
Alexander Gorshenev f63862e98d Added correspondingClass support in enum serialization. 2017-03-30 20:49:43 +03:00
Alexander Gorshenev b763e003ae IrContinue support in IR serializer. 2017-03-30 20:49:43 +03:00
Alexander Gorshenev 5b66a62da5 Default function argument support in IR serializer. 2017-03-30 20:49:43 +03:00
Alexander Gorshenev aa7e3f40fd Initial support of enums in IR serialization. 2017-03-30 20:49:43 +03:00
Konstantin Anisimov d34e5205ae Typo fixed 2017-03-30 22:50:16 +07:00