mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Implement order-independent purge (#1173)
Each symbol passed to purge is collected in a list before mass removal. Fixes the issue described in gbdev/rgbds issue #1152. --------- Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
11
test/asm/purge-deferred.asm
Normal file
11
test/asm/purge-deferred.asm
Normal file
@@ -0,0 +1,11 @@
|
||||
DEF prefix EQUS "cool"
|
||||
DEF {prefix}banana EQU 1
|
||||
|
||||
ASSERT DEF(prefix)
|
||||
ASSERT DEF(coolbanana)
|
||||
|
||||
; purging `prefix` should not prevent expanding it to purge `coolbanana`
|
||||
PURGE prefix, {prefix}banana
|
||||
|
||||
ASSERT !DEF(prefix)
|
||||
ASSERT !DEF(coolbanana)
|
||||
0
test/asm/purge-deferred.err
Normal file
0
test/asm/purge-deferred.err
Normal file
0
test/asm/purge-deferred.out
Normal file
0
test/asm/purge-deferred.out
Normal file
Reference in New Issue
Block a user