From 2431ed811aa2e81561458115508ad9f0dbb52d9e Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Tue, 9 Mar 2021 21:29:48 +0100 Subject: [PATCH] don't remove typecasts in asmsub argument lists --- .../prog8/compiler/BeforeAsmGenerationAstChanger.kt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/compiler/src/prog8/compiler/BeforeAsmGenerationAstChanger.kt b/compiler/src/prog8/compiler/BeforeAsmGenerationAstChanger.kt index 23e1585cc..17492bd1a 100644 --- a/compiler/src/prog8/compiler/BeforeAsmGenerationAstChanger.kt +++ b/compiler/src/prog8/compiler/BeforeAsmGenerationAstChanger.kt @@ -154,16 +154,6 @@ internal class BeforeAsmGenerationAstChanger(val program: Program, val errors: I // The only place for now where we can do this is for: // asmsub register pair parameter. - if(typecast.type in WordDatatypes) { - val fcall = typecast.parent as? IFunctionCall - if (fcall != null) { - val sub = fcall.target.targetStatement(program) as? Subroutine - if (sub != null && sub.isAsmSubroutine) { - return listOf(IAstModification.ReplaceNode(typecast, typecast.expression, parent)) - } - } - } - if(sourceDt in PassByReferenceDatatypes) { if(typecast.type==DataType.UWORD) { if(typecast.expression is IdentifierReference) {