mirror of
https://github.com/irmen/prog8.git
synced 2025-11-02 13:16:07 +00:00
fix pointer[i].field compiler crash
This commit is contained in:
@@ -389,22 +389,6 @@ _after:
|
||||
// this will be further modified elsewhere
|
||||
val ident = IdentifierReference(right.chain, right.position)
|
||||
return listOf(IAstModification.ReplaceNode(expr.right, ident, expr))
|
||||
|
||||
// TODO hmmm , replace cx16.r1 = listarray[2]^^.value with a temp pointer var to contain the indexed value
|
||||
// val assign = expr.parent as? Assignment
|
||||
// if(assign!=null) {
|
||||
// val ptrDt = expr.left.inferType(program).getOrUndef()
|
||||
// val pointerVar = VarDecl.createAuto(ptrDt)
|
||||
// val pointerIdent = IdentifierReference(pointerVar.name.split("."), expr.position)
|
||||
// val tgt = AssignTarget(pointerIdent, null, null, null, false, null, position = expr.position)
|
||||
// val assignPtr = Assignment(tgt, expr.left, AssignmentOrigin.USERCODE, expr.position)
|
||||
// val derefValue = PtrDereference(pointerIdent.nameInSource + right.chain, false, expr.position)
|
||||
// return listOf(
|
||||
// IAstModification.InsertBefore(assign, assignPtr, assign.parent as IStatementContainer),
|
||||
// IAstModification.ReplaceNode(assign.value, derefValue, assign),
|
||||
// IAstModification.InsertFirst(pointerVar, expr.definingSubroutine!!)
|
||||
// )
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user