1
0
mirror of https://github.com/KarolS/millfork.git synced 2025-01-12 03:30:09 +00:00

Add better configuration flag fillouts

This commit is contained in:
Karol Stasiak 2019-06-12 10:08:52 +02:00
parent b15490c5bf
commit eaaa98a8e3

View File

@ -32,6 +32,21 @@ case class Context(errorReporting: Logger,
def filloutFlags(): Context = {
var addons = Map[CompilationFlag.Value, Boolean]()
if (flags.contains(CompilationFlag.EmitNative65816Opcodes)
|| flags.contains(CompilationFlag.EmitEmulation65816Opcodes)
|| flags.contains(CompilationFlag.EmitHudsonOpcodes)
|| flags.contains(CompilationFlag.Emit65CE02Opcodes)) {
addons += CompilationFlag.EmitCmosOpcodes -> true
}
if (flags.contains(CompilationFlag.EmitEZ80Opcodes)) {
addons += CompilationFlag.EmitZ80Opcodes -> true
}
if (flags.contains(CompilationFlag.EmitZ80Opcodes) || flags.contains(CompilationFlag.EmitSharpOpcodes)) {
addons += CompilationFlag.EmitExtended80Opcodes -> true
}
if (flags.contains(CompilationFlag.EmitZ80Opcodes) || flags.contains(CompilationFlag.EmitIntel8085Opcodes)) {
addons += CompilationFlag.EmitIntel8080Opcodes -> true
}
if (flags.contains(CompilationFlag.OptimizeForSpeed)) {
addons += CompilationFlag.InlineFunctions -> true
}