From 5a5635358f9a1af1c5c9d11e848e3e7f636f51de Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 2 Jan 2019 20:40:24 +0100 Subject: [PATCH] Add an assertion where we expect sym['W'] to have a symbol --- lslopt/lsldeadcode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lslopt/lsldeadcode.py b/lslopt/lsldeadcode.py index 038ba81..e7abf62 100644 --- a/lslopt/lsldeadcode.py +++ b/lslopt/lsldeadcode.py @@ -428,8 +428,8 @@ class deadcode(object): if sym: # Mark as executed, so it isn't optimized out. # Make shallow copy. - # TODO: Needs more analysis to see if it's correct or not. - # (See constant_anomaly.lsl) + # TODO: Should the copy be a deep copy? + assert sym.get('W', False) is not False new = sym['W'].copy() if hasattr(new, 'orig'): del new.orig