changed -breakinstr option so that you now specify the exact instruction to use for a %breakpoint.

also fixed a IR issue with x=not x.
This commit is contained in:
Irmen de Jong
2024-01-22 21:07:51 +01:00
parent 84a7e86fe3
commit 64c132ee0a
12 changed files with 28 additions and 47 deletions

View File

@@ -110,7 +110,8 @@ internal class AssignmentGen(private val codeGen: IRCodeGen, private val express
value.add(origAssign.value)
} else {
require(origAssign.operator.endsWith('='))
value = PtBinaryExpression(origAssign.operator.dropLast(1), origAssign.target.type, origAssign.value.position)
val operator = if(origAssign.operator=="==") "==" else origAssign.operator.dropLast(1)
value = PtBinaryExpression(operator, origAssign.target.type, origAssign.value.position)
val left: PtExpression = origAssign.target.children.single() as PtExpression
value.add(left)
value.add(origAssign.value)