Svyatoslav Scherbina
e8f97b0436
Represent Objective-C block pointers in methods as Kotlin functions
...
Also do some refactoring.
2017-10-17 13:23:21 +03:00
Mike Sinkovsky
f4c90e1a86
fix gradle 4.2 warning on windows ( #937 )
2017-10-13 12:54:22 +03:00
Alexander Gorshenev
17ae2343d4
There is not platform.posix for wasm32.
2017-10-12 10:56:21 +03:00
Alexander Gorshenev
2445357166
A test to check we don't throw away a library dependency only because it
...
it a default lib not needed in the main program.
2017-10-11 17:05:12 +03:00
SvyatoslavScherbina
7795a7856a
Support global variables in interop ( #903 )
2017-10-06 10:56:31 +03:00
Vasily Levchenko
3777d86be2
[tests][interop] fix sockets.def placement closer to test (fix build)
2017-10-06 06:29:08 +03:00
Igor Chevdar
fa21a260b1
Fixed coroutines for wasm
...
Replaced llvm indirectBr instruction with switch instruction.
2017-10-05 14:10:06 +03:00
Ilya Matveev
8fcc4c4f30
unit-tests: Add tests for test runner
2017-10-05 11:37:34 +03:00
Igor Chevdar
df3e114f31
Added phase RETURNS_INSERTION
...
Moved explicit insertion of return statement from code generator to a lowering
2017-10-04 13:31:30 +03:00
Alexander Gorshenev
606f98f9d3
Added minimal posix.def for windows.
2017-09-28 12:32:09 +03:00
Sergey Bogolepov
0fb788d580
Renamed targets. Added linux_ prefix
...
mips32 -> linux_mips32
mipsel32 -> linux_mipsel32
2017-09-26 16:18:33 +03:00
Sergey Bogolepov
b7978c3a1f
Renamed targets.
...
mips -> mips32
mipsel -> mipsel32
2017-09-26 16:18:33 +03:00
Sergey Bogolepov
46eed4efbb
Enabled disabled targets
2017-09-26 16:18:33 +03:00
Sergey Bogolepov
ca567ac35c
Added support for mipsel
2017-09-26 16:18:33 +03:00
Sergey Bogolepov
9187022721
Initial support for MIPS
2017-09-26 16:18:33 +03:00
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
Vasily Levchenko
197f77f8e3
[tests] string builder appendln tests
2017-09-25 17:51:33 +03:00
Alexander Gorshenev
f1c3e866b4
A couple of tests for default libraries.
2017-09-25 12:49: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
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
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
Igor Chevdar
136c62a62c
Added test on workers with invalid transfer attempt
2017-08-29 16:39:49 +03:00
Nikolay Igotti
109f84f9af
Immutable data prototype. ( #799 )
2017-08-22 16:21:10 +03:00
Svyatoslav Scherbina
99dd7227dc
Support Boolean in interop varargs and function pointers invocation
2017-08-18 17:45:41 +03:00
Svyatoslav Scherbina
5586d29764
Add basic support for calling C function pointers
...
Fix #739
2017-08-18 17:45:41 +03:00
Svyatoslav Scherbina
5c3e8d63d4
Support bit fields in interop
...
Fix #728
2017-08-16 15:03:58 +03:00
Svyatoslav Scherbina
d3185e3e19
Implement very basic Objective-C interop
...
Also refactor StubGenerator
2017-08-16 10:04:23 +03:00
Alexander Gorshenev
c7d5d6851d
Classified the rest of the wasm32 expected failures.
2017-08-09 17:34:26 +03:00
Alexander Gorshenev
77cbd39907
Global initializers for wasm32.
2017-08-09 17:34:26 +03:00
Alexander Gorshenev
26d383c8be
Support grow() operation for wasm32 memory.
2017-08-09 17:23:40 +03:00
Igor Chevdar
56e08e40e8
Added some corner tests on escape analysis
2017-08-07 16:45:51 +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
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
Ilya Matveev
effe54d470
stdlib: Add also function
2017-08-02 20:20:09 +07:00
Ilya Matveev
0e67fbb7ad
tests: Add assert tests
2017-07-27 11:49:54 +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
0ddc002b8d
backend: Use IrComposite instead of IrBlock in headers of 'for' loops
2017-07-20 10:35:40 +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
a97a310987
tests: Add tests for empty ranges in 'for' loops
2017-07-18 17:05:58 +07:00
Ilya Matveev
d474f207e3
backend: Don't create a Progression objects in 'for' loops
...
This patch optimizes the following pattern:
for (i in first..last step st) { ... }
In this case we need to create a Progression object and then call its
iterator() method causing at least 2 allocation per loop. This change
replaces such loops with the following constuction:
var inductionVar = first
checkProgressionStep(step) // check if step > 0
last = getProgressionLastElement(first, last, step)
if (first <= last) {
do {
i = inductionVar
inductionVar += step
...
} while(i != last)
}
2017-07-18 17:05:58 +07:00
Nikolay Igotti
1ad50bc33f
Workers draft ( #655 )
2017-06-21 11:26:09 +03:00
alexander-gorshenev
d3c24bb387
Different extensions (and KonanTarget communalization). ( #665 )
2017-06-19 12:45:57 +03:00
Ilya Matveev
07c8404a5e
backend: Fix enum constructor default parameters
...
The problem was observed in the follwing code:
enum class A(one: Int, val two: Int = one) ...
The problem is in the `two` default value. Here the enum constructor
lowering used an old (not lowered) symbol for `one`. Also the lowering
didn't copy the default expression for DEFAULT class.
The patch fixes both problems.
2017-06-14 19:42:29 +07:00