From 8b1e1e68fa4574086185a9495ea444bbfc7db8d5 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Fri, 26 Feb 2021 01:10:00 +0100 Subject: [PATCH] switch to Kotlin's new JVM IR compilation --- .idea/kotlinc.xml | 2 +- compiler/build.gradle | 2 ++ .../src/prog8/compiler/astprocessing/StatementReorderer.kt | 3 ++- compilerAst/build.gradle | 2 ++ docs/docs.iml | 2 +- docs/source/conf.py | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 0dd4b3546..9b02d599e 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/compiler/build.gradle b/compiler/build.gradle index 5200904cb..400b70857 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -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 } } diff --git a/compiler/src/prog8/compiler/astprocessing/StatementReorderer.kt b/compiler/src/prog8/compiler/astprocessing/StatementReorderer.kt index 27bf40763..c704a0ab6 100644 --- a/compiler/src/prog8/compiler/astprocessing/StatementReorderer.kt +++ b/compiler/src/prog8/compiler/astprocessing/StatementReorderer.kt @@ -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) diff --git a/compilerAst/build.gradle b/compilerAst/build.gradle index 626ccfcae..419473614 100644 --- a/compilerAst/build.gradle +++ b/compilerAst/build.gradle @@ -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 } } diff --git a/docs/docs.iml b/docs/docs.iml index 9918696de..cc5eb432c 100644 --- a/docs/docs.iml +++ b/docs/docs.iml @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 81760e85a..89d7d53b3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,7 +20,7 @@ import os # -- Project information ----------------------------------------------------- project = 'Prog8' -copyright = '2019, Irmen de Jong' +copyright = '2021, Irmen de Jong' author = 'Irmen de Jong'