mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 01:29:28 +00:00
constants have p8c_ prefix instead of p8v_ in the asm
This commit is contained in:
parent
09c6cb4d6b
commit
37fcde30d6
@ -37,7 +37,8 @@ class AsmGen6502(val prefixSymbols: Boolean): ICodeGeneratorBackend {
|
||||
is PtAsmSub, is PtSub -> node.name = "p8s_${node.name}"
|
||||
is PtBlock -> node.name = "p8b_${node.name}"
|
||||
is PtLabel -> node.name = "p8l_${node.name}"
|
||||
is PtVariable, is PtConstant, is PtMemMapped, is PtSubroutineParameter -> node.name = "p8v_${node.name}"
|
||||
is PtConstant -> node.name = "p8c_${node.name}"
|
||||
is PtVariable, is PtMemMapped, is PtSubroutineParameter -> node.name = "p8v_${node.name}"
|
||||
else -> node.name = "p8_${node.name}"
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class CallGraph(private val program: Program) : IAstVisitor {
|
||||
return allIdentifiersAndTargets.filter { decl===it.value }.map{ it.key } + assemblyBlocks
|
||||
}
|
||||
|
||||
private val prefixes = listOf("p8b_", "p8v_", "p8s_", "p8l_", "p8_", "")
|
||||
private val prefixes = listOf("p8b_", "p8v_", "p8s_", "p8c_", "p8l_", "p8_", "")
|
||||
private fun nameInAssemblyCode(name: String, knownAsmPrefixes: List<String> = emptyList()): Boolean {
|
||||
if(knownAsmPrefixes.isNotEmpty())
|
||||
return allAssemblyNodes.any {
|
||||
|
@ -38,6 +38,7 @@ Element type prefix
|
||||
Block ``p8b_``
|
||||
Subroutine ``p8s_``
|
||||
Variable ``p8v_``
|
||||
Constant ``p8c_``
|
||||
Label ``p8l_``
|
||||
other ``p8_``
|
||||
============ ========
|
||||
|
@ -2,7 +2,7 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
- make constants have p8c_ prefix instead of p8v_
|
||||
- add unit tests for chained comparisons and for var -> const optimization
|
||||
- add INFO error level and move some warnings to info
|
||||
- add switch to enable INFO error messages (default is WARN and up)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user