removed 'aug' property in PtAssignment , it wasn't used for anything

This commit is contained in:
Irmen de Jong 2022-04-03 15:56:14 +02:00
parent d616cb283b
commit 95f16c38a9
4 changed files with 4 additions and 6 deletions

View File

@ -38,15 +38,13 @@ class PtSubroutineParameter(val name: String, val type: DataType, position: Posi
} }
class PtAssignment(val augmentable: Boolean, position: Position) : PtNode(position) { class PtAssignment(position: Position) : PtNode(position) {
val target: PtAssignTarget val target: PtAssignTarget
get() = children[0] as PtAssignTarget get() = children[0] as PtAssignTarget
val value: PtExpression val value: PtExpression
get() = children[1] as PtExpression get() = children[1] as PtExpression
override fun printProperties() { override fun printProperties() { }
print("aug=$augmentable")
}
} }

View File

@ -445,7 +445,6 @@ class AstToXmlConverter(internal val program: PtProgram,
private fun write(assign: PtAssignment) { private fun write(assign: PtAssignment) {
xml.elt("assign") xml.elt("assign")
xml.attr("aug", assign.augmentable.toString())
xml.pos(assign.position) xml.pos(assign.position)
xml.startChildren() xml.startChildren()
write(assign.target) write(assign.target)

View File

@ -96,7 +96,7 @@ class IntermediateAstMaker(val program: Program) {
return PtNop(srcAssign.position) return PtNop(srcAssign.position)
} }
val assign = PtAssignment(srcAssign.isAugmentable, srcAssign.position) val assign = PtAssignment(srcAssign.position)
assign.add(transform(srcAssign.target)) assign.add(transform(srcAssign.target))
assign.add(transformExpression(srcAssign.value)) assign.add(transformExpression(srcAssign.value))
return assign return assign

View File

@ -5,6 +5,7 @@ For next release
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
- vm: support no globals re-init option - vm: support no globals re-init option
- vm: make registers typed? so that it's immediately obvious what type they represent. Much like regular variables in memory. - vm: make registers typed? so that it's immediately obvious what type they represent. Much like regular variables in memory.
- vm: don't store symbol names in instructions to make optimizing the IR easier? but what about jumps to labels. And it's no longer readable by humans.
- vm codegen/assembler: variable memory locations should also be referenced by the variable name instead of just the address, to make the output more human-readable - vm codegen/assembler: variable memory locations should also be referenced by the variable name instead of just the address, to make the output more human-readable
- vm: how to remove all unused subroutines? (in the assembly codegen, we let 64tass solve this for us) - vm: how to remove all unused subroutines? (in the assembly codegen, we let 64tass solve this for us)
- vm: rather than being able to jump to any 'address' (IPTR), use 'blocks' that have entry and exit points -> even better dead code elimination possible too - vm: rather than being able to jump to any 'address' (IPTR), use 'blocks' that have entry and exit points -> even better dead code elimination possible too