Don't pass redundant label names to table_width
and list_start
(#1160)
This commit is contained in:
@@ -1,13 +1,29 @@
|
||||
; Macros to verify assumptions about the data or code
|
||||
|
||||
MACRO _redef_current_label
|
||||
if DEF(\1)
|
||||
PURGE \1
|
||||
endc
|
||||
if _NARG == 3 + (\3)
|
||||
DEF \1 EQUS "\<_NARG>"
|
||||
elif DEF(..)
|
||||
if .. - @ == 0
|
||||
DEF \1 EQUS "{..}"
|
||||
endc
|
||||
elif DEF(.)
|
||||
if . - @ == 0
|
||||
DEF \1 EQUS "{.}"
|
||||
endc
|
||||
endc
|
||||
if !DEF(\1)
|
||||
DEF \1 EQUS \2
|
||||
{\1}:
|
||||
endc
|
||||
ENDM
|
||||
|
||||
MACRO table_width
|
||||
DEF CURRENT_TABLE_WIDTH = \1
|
||||
if _NARG == 2
|
||||
REDEF CURRENT_TABLE_START EQUS "\2"
|
||||
else
|
||||
REDEF CURRENT_TABLE_START EQUS "._table_width\@"
|
||||
{CURRENT_TABLE_START}:
|
||||
endc
|
||||
_redef_current_label CURRENT_TABLE_START, "._table_width\@", 2, \#
|
||||
ENDM
|
||||
|
||||
MACRO assert_table_length
|
||||
@@ -18,12 +34,7 @@ ENDM
|
||||
|
||||
MACRO list_start
|
||||
DEF list_index = 0
|
||||
if _NARG == 1
|
||||
REDEF CURRENT_LIST_START EQUS "\1"
|
||||
else
|
||||
REDEF CURRENT_LIST_START EQUS "._list_start\@"
|
||||
{CURRENT_LIST_START}:
|
||||
endc
|
||||
_redef_current_label CURRENT_LIST_START, "._list_start\@", 1, \#
|
||||
ENDM
|
||||
|
||||
MACRO li
|
||||
|
Reference in New Issue
Block a user