From 885df9156f1929e010aab30037b234ef75d929a9 Mon Sep 17 00:00:00 2001
From: Irmen de Jong <irmen@razorvine.net>
Date: Tue, 19 Sep 2023 00:08:17 +0200
Subject: [PATCH] todo

---
 .../src/prog8/buildversion/BuildVersion.kt    | 10 ++++----
 docs/source/todo.rst                          |  2 ++
 examples/test.p8                              | 24 +++++++------------
 3 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/compiler/src/prog8/buildversion/BuildVersion.kt b/compiler/src/prog8/buildversion/BuildVersion.kt
index e875d0151..fec9cac3d 100644
--- a/compiler/src/prog8/buildversion/BuildVersion.kt
+++ b/compiler/src/prog8/buildversion/BuildVersion.kt
@@ -6,10 +6,10 @@ package prog8.buildversion
 const val MAVEN_GROUP = "prog8"
 const val MAVEN_NAME = "compiler"
 const val VERSION = "9.5-SNAPSHOT"
-const val GIT_REVISION = 4101
-const val GIT_SHA = "31c132c2ebfef803ae197489fc7eaf56642501ac"
-const val GIT_DATE = "2023-09-14T21:04:23Z"
+const val GIT_REVISION = 4108
+const val GIT_SHA = "c319233ddc7f43a05e2090e293abbed8d80ce8cf"
+const val GIT_DATE = "2023-09-18T21:22:03Z"
 const val GIT_BRANCH = "master"
-const val BUILD_DATE = "2023-09-14T21:06:25Z"
-const val BUILD_UNIX_TIME = 1694725585234L
+const val BUILD_DATE = "2023-09-18T21:27:55Z"
+const val BUILD_UNIX_TIME = 1695072475414L
 const val DIRTY = 1
diff --git a/docs/source/todo.rst b/docs/source/todo.rst
index da18ce56e..498213b6b 100644
--- a/docs/source/todo.rst
+++ b/docs/source/todo.rst
@@ -1,6 +1,8 @@
 TODO
 ====
 
+- fix compiler error with vm/expericodegen: petaxian  (minimal error cases in test.p8)
+
 - [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!
diff --git a/examples/test.p8 b/examples/test.p8
index 644282626..1fd71d5ca 100644
--- a/examples/test.p8
+++ b/examples/test.p8
@@ -1,20 +1,14 @@
-%import textio
-
-%zeropage basicsafe
-
 main {
+    uword[] pages = [ &page_credits.chars_1]
+
     sub start() {
-        ubyte arg3 = 200
-        uword result = calc(101, 202, arg3)
-        txt.print_uw(result)
-
-        str name = "irmen"
-        ubyte[] array = [1,2,3,4]
-        bool xx = 44 in array
-        bool yy = 'a' in name
+        ; cx16.r0  = pages[0]       ; TODO fix IR compiler error undefined symbol pages
+        uword @shared foo = pages[0]    ; TODO fix IR compiler error no chunk with label 'page_credits.chars_1'  (caused by optimizer)
     }
 
-    sub calc(ubyte a1, ubyte a2, ubyte a3) -> uword {
-        return a1 as uword + a2 + a3
-    }
+}
+
+page_credits {
+  ubyte[] chars_1 = [11]
+  ; TODO fix IR compiler crash when this array is moved into main block itself
 }