mirror of
https://github.com/irmen/prog8.git
synced 2024-07-13 12:29:05 +00:00
message
This commit is contained in:
parent
ff8de8e42d
commit
161c02ced3
@ -1019,7 +1019,6 @@ class IRCodeGen(
|
||||
}
|
||||
}
|
||||
|
||||
// TODO use this everywhere a PtJump is used
|
||||
private fun branchInstr(goto: PtJump, branchOpcode: Opcode) = if (goto.address != null)
|
||||
IRInstruction(branchOpcode, address = goto.address?.toInt())
|
||||
else if (goto.generatedLabel != null)
|
||||
|
@ -593,7 +593,7 @@ internal class AstChecker(private val program: Program,
|
||||
// CONST can only occur on simple types (byte, word, float)
|
||||
if(decl.type== VarDeclType.CONST) {
|
||||
if (decl.datatype !in NumericDatatypes)
|
||||
err("const modifier can only be used on numeric types (byte, word, float)")
|
||||
err("const can only be used on numeric types (byte, word, float)")
|
||||
}
|
||||
|
||||
// FLOATS enabled?
|
||||
|
@ -110,7 +110,7 @@ class TestAstChecks: FunSpec({
|
||||
compileText(C64Target(), true, text, writeAssembly = true, errors=errors)
|
||||
errors.errors.size shouldBe 1
|
||||
errors.warnings.size shouldBe 0
|
||||
errors.errors[0] shouldContain "const modifier can only be used"
|
||||
errors.errors[0] shouldContain "const can only be used"
|
||||
}
|
||||
|
||||
test("array indexing is not allowed on a memory mapped variable") {
|
||||
|
@ -2,7 +2,8 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
- IR: use branchInstr() everywhere a PtGoto is used in IRCodeGen
|
||||
- fix discord string bug for if key!="." : "ERROR undefined symbol: prog8_interned_strings.string_3"
|
||||
|
||||
- [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 ....
|
||||
|
||||
...
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
main {
|
||||
sub start() {
|
||||
ubyte xx=12
|
||||
|
||||
if xx==12
|
||||
txt.print("gottem")
|
||||
str name="irmen"
|
||||
if name=="." {
|
||||
cx16.r0++
|
||||
}
|
||||
txt.nl()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user