Add operator 'rem' to builtIns

Also deprecate operator 'mod'
This commit is contained in:
Mikhail Zarechenskiy
2016-12-13 20:55:40 +03:00
parent 2bb48fc802
commit 62ac91a121
10 changed files with 455 additions and 151 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ CONTENT
2 GET_VAR 'value-parameter m: Int' type=kotlin.Int origin=null
3 GET_VAR 'number: Int' type=kotlin.Int origin=null
4 CONST Int type=kotlin.Int value='10'
5 CALL 'mod(Int): Int' type=kotlin.Int origin=PERC
5 CALL 'rem(Int): Int' type=kotlin.Int origin=PERC
OUTGOING -> BB 2
CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
BB 2
+1 -1
View File
@@ -32,7 +32,7 @@ CONTENT
4 WHEN type=kotlin.Unit origin=null
5 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
6 GET_VAR 'm: Int' type=kotlin.Int origin=null
7 CALL 'mod(Int): Int' type=kotlin.Int origin=PERC
7 CALL 'rem(Int): Int' type=kotlin.Int origin=PERC
8 CONST Int type=kotlin.Int value='0'
9 CALL 'compareTo(Int): Int' type=kotlin.Int origin=GT
OUTGOING -> BB 3, 4
@@ -32,7 +32,7 @@ FILE /augmentedAssignment1.kt
$this: GET_VAR 'x: Int' type=kotlin.Int origin=DIVEQ
other: CONST Int type=kotlin.Int value='4'
SET_VAR 'x: Int' type=kotlin.Unit origin=PERCEQ
CALL 'mod(Int): Int' type=kotlin.Int origin=PERCEQ
CALL 'rem(Int): Int' type=kotlin.Int origin=PERCEQ
$this: GET_VAR 'x: Int' type=kotlin.Int origin=PERCEQ
other: CONST Int type=kotlin.Int value='5'
FUN public fun testProperty(): kotlin.Unit
@@ -59,6 +59,6 @@ FILE /augmentedAssignment1.kt
other: CONST Int type=kotlin.Int value='4'
BLOCK type=kotlin.Unit origin=PERCEQ
CALL '<set-p>(Int): Unit' type=kotlin.Unit origin=PERCEQ
<set-?>: CALL 'mod(Int): Int' type=kotlin.Int origin=PERCEQ
<set-?>: CALL 'rem(Int): Int' type=kotlin.Int origin=PERCEQ
$this: CALL '<get-p>(): Int' type=kotlin.Int origin=PERCEQ
other: CONST Int type=kotlin.Int value='5'
@@ -26,7 +26,7 @@ FILE /simpleOperators.kt
FUN public fun test5(a: kotlin.Int, b: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='test5(Int, Int): Int'
CALL 'mod(Int): Int' type=kotlin.Int origin=PERC
CALL 'rem(Int): Int' type=kotlin.Int origin=PERC
$this: GET_VAR 'value-parameter a: Int' type=kotlin.Int origin=null
other: GET_VAR 'value-parameter b: Int' type=kotlin.Int origin=null
FUN public fun test6(a: kotlin.Int, b: kotlin.Int): kotlin.ranges.IntRange