mirror of
https://github.com/KarolS/millfork.git
synced 2025-08-09 10:24:57 +00:00
Fix optimized struct assignments (again)
This commit is contained in:
@@ -196,6 +196,10 @@ object Z80StatementCompiler extends AbstractStatementCompiler[ZLine] {
|
||||
case s: ContinueStatement =>
|
||||
compileContinueStatement(ctx, s) -> Nil
|
||||
case ExpressionStatement(e@FunctionCallExpression(name, params)) =>
|
||||
env.maybeGet[Type](name) match {
|
||||
case Some(_) =>
|
||||
params.flatMap(p => Z80ExpressionCompiler.compile(ctx, p, ZExpressionTarget.NOTHING)) -> Nil
|
||||
case _ =>
|
||||
env.lookupFunction(name, params.map(p => Z80ExpressionCompiler.getExpressionType(ctx, p) -> p)) match {
|
||||
case Some(i: MacroFunction) =>
|
||||
val (paramPreparation, inlinedStatements) = Z80MacroExpander.inlineFunction(ctx, i, params, e.position)
|
||||
@@ -204,6 +208,7 @@ object Z80StatementCompiler extends AbstractStatementCompiler[ZLine] {
|
||||
case _ =>
|
||||
Z80ExpressionCompiler.compile(ctx, e, ZExpressionTarget.NOTHING) -> Nil
|
||||
}
|
||||
}
|
||||
case ExpressionStatement(e) =>
|
||||
Z80ExpressionCompiler.compile(ctx, e, ZExpressionTarget.NOTHING) -> Nil
|
||||
case RawBytesStatement(contents, _) =>
|
||||
|
Reference in New Issue
Block a user