mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
cleanups
This commit is contained in:
parent
5b3ccab7dc
commit
ae45ce517e
@ -56,7 +56,7 @@ internal class BuiltinFunctionsAsmGen(private val program: Program,
|
||||
ident
|
||||
}
|
||||
}
|
||||
val argExpressions = mutableListOf(argExpression);
|
||||
val argExpressions = mutableListOf(argExpression)
|
||||
val fcall = BuiltinFunctionCall(IdentifierReference(listOf(name), Position.DUMMY), argExpressions, Position.DUMMY)
|
||||
fcall.linkParents(scope)
|
||||
translateFunctioncall(fcall, func, discardResult = false, resultToStack = false, null)
|
||||
|
@ -612,7 +612,7 @@ class AstToXmlConverter(internal val program: PtProgram,
|
||||
}
|
||||
if(asmSub.clobbers.isNotEmpty()) {
|
||||
xml.elt("clobbers")
|
||||
xml.attr("registers", asmSub.clobbers.map {it.name}.joinToString(","))
|
||||
xml.attr("registers", asmSub.clobbers.joinToString(",") { it.name })
|
||||
xml.endElt()
|
||||
}
|
||||
if(asmSub.retvalRegisters.isNotEmpty()) {
|
||||
|
@ -7,7 +7,6 @@ import prog8.ast.walk.AstWalker
|
||||
import prog8.ast.walk.IAstModification
|
||||
import prog8.code.core.*
|
||||
import prog8.code.target.VMTarget
|
||||
import prog8.code.target.virtual.VirtualMachineDefinition
|
||||
import kotlin.math.floor
|
||||
|
||||
|
||||
|
@ -265,7 +265,7 @@ fun determineCompilationOptions(program: Program, compTarget: ICompilationTarget
|
||||
.flatMap { (it as Directive).args }.toSet()
|
||||
val floatsEnabled = allOptions.any { it.name == "enable_floats" }
|
||||
val noSysInit = allOptions.any { it.name == "no_sysinit" }
|
||||
var zpType: ZeropageType =
|
||||
val zpType: ZeropageType =
|
||||
if (zpoption == null)
|
||||
if (floatsEnabled) ZeropageType.FLOATSAFE else ZeropageType.KERNALSAFE
|
||||
else
|
||||
|
@ -7,7 +7,6 @@ import prog8.ast.statements.*
|
||||
import prog8.ast.walk.AstWalker
|
||||
import prog8.ast.walk.IAstModification
|
||||
import prog8.ast.walk.IAstVisitor
|
||||
import prog8.code.ast.PtIdentifier
|
||||
import prog8.code.core.*
|
||||
import prog8.code.target.VMTarget
|
||||
|
||||
|
@ -7,7 +7,6 @@ import prog8.ast.statements.*
|
||||
import prog8.ast.walk.IAstVisitor
|
||||
import prog8.code.*
|
||||
import prog8.code.core.ArrayDatatypes
|
||||
import prog8.code.core.ElementToArrayTypes
|
||||
import prog8.code.core.Position
|
||||
import java.util.*
|
||||
|
||||
|
@ -987,8 +987,7 @@ class FunctionCallExpression(override var target: IdentifierReference,
|
||||
// multiple return values. Can occur for asmsub routines. If there is exactly one register return value, take that.
|
||||
val registerReturns = stmt.asmReturnvaluesRegisters.filter {it.registerOrPair != null }
|
||||
if(registerReturns.size==1) {
|
||||
val reg = registerReturns.single().registerOrPair!!
|
||||
return when(reg) {
|
||||
return when(registerReturns.single().registerOrPair!!) {
|
||||
RegisterOrPair.A,
|
||||
RegisterOrPair.X,
|
||||
RegisterOrPair.Y -> InferredTypes.InferredType.known(DataType.UBYTE)
|
||||
|
@ -855,3 +855,4 @@ case you have to use { } to enclose them::
|
||||
}
|
||||
else -> txt.print("don't know")
|
||||
}
|
||||
|
||||
|
@ -155,3 +155,4 @@ And for the Commander X16::
|
||||
cx16.set_irq(uword handler_address, boolean useKernal) ; vsync irq
|
||||
cx16.set_rasterirq(uword handler_address, uword rasterline) ; note: disables kernal irq handler! sys.wait() won't work anymore
|
||||
cx16.restore_irq() ; set everything back to the systems default irq handler
|
||||
|
||||
|
@ -34,7 +34,7 @@ class GraphicsWindow(val pixelWidth: Int, val pixelHeight: Int, val pixelScaling
|
||||
contentPane.background = Color.BLACK
|
||||
isResizable = false
|
||||
isLocationByPlatform = true
|
||||
defaultCloseOperation = JFrame.EXIT_ON_CLOSE
|
||||
defaultCloseOperation = EXIT_ON_CLOSE
|
||||
image = graphicsConfiguration.createCompatibleImage(pixelWidth, pixelHeight, Transparency.OPAQUE)
|
||||
contentPane.add(BitmapScreenPanel(image, pixelScaling), BorderLayout.CENTER)
|
||||
pack()
|
||||
|
Loading…
x
Reference in New Issue
Block a user