mirror of
https://github.com/irmen/prog8.git
synced 2024-09-10 09:54:32 +00:00
give error when using %option merge in module scope
This commit is contained in:
parent
0c9daf6eaf
commit
ad14c88fde
@ -7,7 +7,6 @@ import prog8.ast.expressions.*
|
|||||||
import prog8.ast.statements.*
|
import prog8.ast.statements.*
|
||||||
import prog8.ast.walk.IAstVisitor
|
import prog8.ast.walk.IAstVisitor
|
||||||
import prog8.code.core.*
|
import prog8.code.core.*
|
||||||
import prog8.code.target.C64Target
|
|
||||||
import prog8.code.target.Cx16Target
|
import prog8.code.target.Cx16Target
|
||||||
import prog8.code.target.VMTarget
|
import prog8.code.target.VMTarget
|
||||||
import prog8.compiler.builtinFunctionReturnType
|
import prog8.compiler.builtinFunctionReturnType
|
||||||
@ -832,6 +831,10 @@ internal class AstChecker(private val program: Program,
|
|||||||
if(directive.args.any {it.name !in arrayOf("align_word", "align_page", "no_symbol_prefixing", "force_output", "merge", "splitarrays", "verafxmuls")})
|
if(directive.args.any {it.name !in arrayOf("align_word", "align_page", "no_symbol_prefixing", "force_output", "merge", "splitarrays", "verafxmuls")})
|
||||||
err("using an option that is not valid for blocks")
|
err("using an option that is not valid for blocks")
|
||||||
}
|
}
|
||||||
|
if(directive.parent is Module) {
|
||||||
|
if(directive.args.any {it.name !in arrayOf("enable_floats", "no_sysinit", "splitarrays")})
|
||||||
|
err("using an option that is not valid for modules")
|
||||||
|
}
|
||||||
if(directive.args.any { it.name=="verafxmuls" } && compilerOptions.compTarget.name != Cx16Target.NAME)
|
if(directive.args.any { it.name=="verafxmuls" } && compilerOptions.compTarget.name != Cx16Target.NAME)
|
||||||
err("verafx option is only valid on cx16 target")
|
err("verafx option is only valid on cx16 target")
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ TODO
|
|||||||
====
|
====
|
||||||
|
|
||||||
- improve the working of %option merge: should be able to merge your own stuff into say textio. , and improve the docs about it too.
|
- improve the working of %option merge: should be able to merge your own stuff into say textio. , and improve the docs about it too.
|
||||||
- give error when using %option merge in module scope.
|
|
||||||
|
|
||||||
- [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 ....
|
- [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 ....
|
||||||
- [on branch: ir-less-branch-opcodes] IR: reduce the number of branch instructions such as BEQ, BEQR, etc (gradually), replace with CMP(I) + status branch instruction
|
- [on branch: ir-less-branch-opcodes] IR: reduce the number of branch instructions such as BEQ, BEQR, etc (gradually), replace with CMP(I) + status branch instruction
|
||||||
|
Loading…
Reference in New Issue
Block a user