diff --git a/.idea/libraries/jetbrains_kotlinx_cli_jvm.xml b/.idea/libraries/jetbrains_kotlinx_cli_jvm.xml index 290747d78..299337d3c 100644 --- a/.idea/libraries/jetbrains_kotlinx_cli_jvm.xml +++ b/.idea/libraries/jetbrains_kotlinx_cli_jvm.xml @@ -1,8 +1,8 @@ - + - + diff --git a/.idea/libraries/slf4j_simple.xml b/.idea/libraries/slf4j_simple.xml index 373f5dc8a..ae54f3c96 100644 --- a/.idea/libraries/slf4j_simple.xml +++ b/.idea/libraries/slf4j_simple.xml @@ -1,9 +1,9 @@ - + - - + + diff --git a/codeCore/build.gradle b/codeCore/build.gradle index 5e26b02c3..a4a1d97a3 100644 --- a/codeCore/build.gradle +++ b/codeCore/build.gradle @@ -32,10 +32,10 @@ dependencies { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } } diff --git a/codeGenCpu6502/build.gradle b/codeGenCpu6502/build.gradle index c54a52fdf..a839dec28 100644 --- a/codeGenCpu6502/build.gradle +++ b/codeGenCpu6502/build.gradle @@ -36,10 +36,10 @@ dependencies { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } test { diff --git a/codeGenExperimental/build.gradle b/codeGenExperimental/build.gradle index 0135be55c..7fffb5b8f 100644 --- a/codeGenExperimental/build.gradle +++ b/codeGenExperimental/build.gradle @@ -36,10 +36,10 @@ dependencies { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } } diff --git a/codeGenIntermediate/build.gradle b/codeGenIntermediate/build.gradle index fad8f7d1b..174451126 100644 --- a/codeGenIntermediate/build.gradle +++ b/codeGenIntermediate/build.gradle @@ -36,10 +36,10 @@ dependencies { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } test { diff --git a/codeOptimizers/build.gradle b/codeOptimizers/build.gradle index c343d8b1a..75889f6fd 100644 --- a/codeOptimizers/build.gradle +++ b/codeOptimizers/build.gradle @@ -33,10 +33,10 @@ dependencies { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } } diff --git a/compiler/build.gradle b/compiler/build.gradle index f572640f0..4ea8dadae 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -36,7 +36,7 @@ dependencies { implementation "org.antlr:antlr4-runtime:4.12.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" // implementation "org.jetbrains.kotlin:kotlin-reflect" - implementation 'org.jetbrains.kotlinx:kotlinx-cli:0.3.5' + implementation 'org.jetbrains.kotlinx:kotlinx-cli:0.3.6' implementation "com.michael-bull.kotlin-result:kotlin-result-jvm:1.1.18" testImplementation project(':intermediate') @@ -59,10 +59,10 @@ configurations { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } test { diff --git a/compiler/src/prog8/buildversion/BuildVersion.kt b/compiler/src/prog8/buildversion/BuildVersion.kt index 80b24a229..3087b34ae 100644 --- a/compiler/src/prog8/buildversion/BuildVersion.kt +++ b/compiler/src/prog8/buildversion/BuildVersion.kt @@ -5,11 +5,11 @@ package prog8.buildversion */ const val MAVEN_GROUP = "prog8" const val MAVEN_NAME = "compiler" -const val VERSION = "9.3-SNAPSHOT" -const val GIT_REVISION = 4012 -const val GIT_SHA = "9167ba499de99696aa7c6887d4867eae70eb5caf" -const val GIT_DATE = "2023-07-30T15:49:35Z" +const val VERSION = "9.5-SNAPSHOT" +const val GIT_REVISION = 4097 +const val GIT_SHA = "UNKNOWN" +const val GIT_DATE = "2023-09-08T19:29:49Z" const val GIT_BRANCH = "master" -const val BUILD_DATE = "2023-07-30T16:41:27Z" -const val BUILD_UNIX_TIME = 1690735287514L +const val BUILD_DATE = "2023-09-12T19:47:42Z" +const val BUILD_UNIX_TIME = 1694548062963L const val DIRTY = 1 diff --git a/compilerAst/build.gradle b/compilerAst/build.gradle index a0d73bc40..81034674c 100644 --- a/compilerAst/build.gradle +++ b/compilerAst/build.gradle @@ -36,7 +36,7 @@ configurations.all { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } } } diff --git a/dbusCompilerService/build.gradle b/dbusCompilerService/build.gradle index 695d100e9..7dd3dee33 100644 --- a/dbusCompilerService/build.gradle +++ b/dbusCompilerService/build.gradle @@ -28,9 +28,9 @@ dependencies { implementation project(':codeCore') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" // implementation "org.jetbrains.kotlin:kotlin-reflect" - implementation 'org.jetbrains.kotlinx:kotlinx-cli:0.3.5' + implementation 'org.jetbrains.kotlinx:kotlinx-cli:0.3.6' implementation "com.github.hypfvieh:dbus-java:3.3.2" - implementation "org.slf4j:slf4j-simple:2.0.7" + implementation "org.slf4j:slf4j-simple:2.0.9" } configurations.all { @@ -41,15 +41,15 @@ configurations.all { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } test { java { - srcDirs = ["${project.projectDir}/test"] + srcDir "${project.projectDir}/test" } } } diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 94458fa1a..b599e424c 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -1,7 +1,8 @@ TODO ==== -- prefix prog8 subroutines with p8s_ instead of p8_ to not let them clash with variables in the asm?? +- optimize assembly output for (word1 & word2 ==0) ... (no need for stack pushes) see attemptAssignToByteCompareZero(). + - [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 .... - IR: reduce the number of branch instructions such as BEQ, BEQR, etc (gradually), replace with CMP(I) + status branch instruction - IR: reduce amount of CMP/CMPI after instructions that set the status bits correctly (LOADs? INC? etc), but only after setting the status bits is verified! @@ -53,12 +54,10 @@ Libraries: - fix the problems in atari target, and flesh out its libraries. - c128 target: make syslib more complete (missing kernal routines)? - pet32 target: make syslib more complete (missing kernal routines)? -- c64: make the graphics.BITMAP_ADDRESS configurable (VIC banking) Optimizations: -- optimize assembly output for ( word1 & word2 ==0) ... (no need for stack pushes) see attemptAssignToByteCompareZero(). - VariableAllocator: can we think of a smarter strategy for allocating variables into zeropage, rather than first-come-first-served? for instance, vars used inside loops first, then loopvars, then uwords used as pointers, then the rest - various optimizers skip stuff if compTarget.name==VMTarget.NAME. Once 6502-codegen is done from IR code, diff --git a/gradle.properties b/gradle.properties index 23c700e24..9d0a920cf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ org.gradle.daemon=true kotlin.code.style=official javaVersion=11 kotlinVersion=1.9.10 -version=9.4.2 +version=9.5-SNAPSHOT diff --git a/httpCompilerService/build.gradle b/httpCompilerService/build.gradle index 110c11503..ce3073820 100644 --- a/httpCompilerService/build.gradle +++ b/httpCompilerService/build.gradle @@ -29,11 +29,11 @@ dependencies { implementation project(':compiler') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" // implementation "org.jetbrains.kotlin:kotlin-reflect" - implementation 'org.jetbrains.kotlinx:kotlinx-cli:0.3.5' + implementation 'org.jetbrains.kotlinx:kotlinx-cli:0.3.6' implementation "org.takes:takes:1.24.4" implementation "javax.json:javax.json-api:1.1.4" implementation "org.glassfish:javax.json:1.1.4" - implementation "org.slf4j:slf4j-simple:2.0.7" + implementation "org.slf4j:slf4j-simple:2.0.9" } configurations.all { @@ -44,15 +44,15 @@ configurations.all { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } test { java { - srcDirs = ["${project.projectDir}/test"] + srcDir "${project.projectDir}/test" } } } diff --git a/httpCompilerService/src/prog8/http/TestHttp.kt b/httpCompilerService/src/prog8/http/TestHttp.kt index cbb0a101b..5dbe44760 100644 --- a/httpCompilerService/src/prog8/http/TestHttp.kt +++ b/httpCompilerService/src/prog8/http/TestHttp.kt @@ -28,7 +28,7 @@ class Jsonding: RsJson.Source { class RequestParser : Take { override fun act(request: Request): Response { val form = RqFormBase(request) - val names = form.names() + // val names = form.names() val a = form.param("a").single() val args = CompilerArguments( Path(a), @@ -44,7 +44,7 @@ class RequestParser : Take { splitWordArrays = false, varsHighBank = null, ) - val compilationResult = compileProgram(args) + compileProgram(args) return RsJson(Jsonding()) } } diff --git a/intermediate/build.gradle b/intermediate/build.gradle index ec73cc408..c7417cf7c 100644 --- a/intermediate/build.gradle +++ b/intermediate/build.gradle @@ -33,10 +33,10 @@ dependencies { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } } diff --git a/parser/build.gradle b/parser/build.gradle index d494b709c..b9a8707fb 100644 --- a/parser/build.gradle +++ b/parser/build.gradle @@ -28,13 +28,14 @@ generateGrammarSource { arguments += ["-no-listener","-no-visitor"] } + sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } antlr { - srcDirs = ["${project.projectDir}/antlr"] + srcDirs = ["${project.projectDir}/antlr"] } } } diff --git a/virtualmachine/build.gradle b/virtualmachine/build.gradle index e93e70fc5..633ebd0cf 100644 --- a/virtualmachine/build.gradle +++ b/virtualmachine/build.gradle @@ -35,10 +35,10 @@ dependencies { sourceSets { main { java { - srcDirs = ["${project.projectDir}/src"] + srcDir "${project.projectDir}/src" } resources { - srcDirs = ["${project.projectDir}/res"] + srcDir "${project.projectDir}/res" } }