switch to Kotlin's new JVM IR compilation

This commit is contained in:
Irmen de Jong 2021-02-26 01:10:00 +01:00
parent fd11927708
commit 8b1e1e68fa
6 changed files with 9 additions and 4 deletions

2
.idea/kotlinc.xml generated
View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JvmCompilerArguments">
<option name="jvmTarget" value="1.8" />
<option name="jvmTarget" value="11" />
</component>
</project>

View File

@ -34,6 +34,7 @@ dependencies {
compileKotlin {
kotlinOptions {
jvmTarget = "11"
useIR = true
// verbose = true
// freeCompilerArgs += "-XXLanguage:+NewInference"
}
@ -42,6 +43,7 @@ compileKotlin {
compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
useIR = true
}
}

View File

@ -377,7 +377,8 @@ internal class StatementReorderer(val program: Program, val errors: IErrorReport
return emptyList()
}
// TODO use a pointer loop instead of individual assignments
// TODO use memcopy instead of individual assignments
// TODO what does assigning a struct var use?
return alv.value.mapIndexed { index, value ->
val idx = ArrayIndexedExpression(identifier, ArrayIndex(NumericLiteralValue(DataType.UBYTE, index, position), position), position)
Assignment(AssignTarget(null, idx, null, position), value, value.position)

View File

@ -33,6 +33,7 @@ dependencies {
compileKotlin {
kotlinOptions {
jvmTarget = "11"
useIR = true
// verbose = true
// freeCompilerArgs += "-XXLanguage:+NewInference"
}
@ -41,6 +42,7 @@ compileKotlin {
compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
useIR = true
}
}

View File

@ -5,7 +5,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="jdk" jdkName="Python 3.8 virtualenv" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -20,7 +20,7 @@ import os
# -- Project information -----------------------------------------------------
project = 'Prog8'
copyright = '2019, Irmen de Jong'
copyright = '2021, Irmen de Jong'
author = 'Irmen de Jong'