GP-0: Fix tests broken by agressive Sleigh symbol check.

This commit is contained in:
Dan 2023-03-27 15:49:08 -04:00
parent 6f35c7ec47
commit e259fbd65c
2 changed files with 8 additions and 9 deletions

View File

@ -98,6 +98,14 @@ public enum DebuggerPcodeUtils {
symbol = findUserSymbol(nm);
}
if (symbol == null) {
/**
* TODO: This may break things that check for the absence of a symbol
*
* I don't think it'll affect expressions, but it could later affect user Sleigh
* libraries than an expression might like to use. The better approach would be
* to incorporate a better error message into the Sleigh compiler, but it won't
* always know the use case for a clear message.
*/
throw new SleighException("Unknown register or label: '" + nm + "'");
}
return symbol;

View File

@ -125,15 +125,6 @@ public enum SleighProgramCompiler {
}
}
}
@Override
public SleighSymbol findSymbol(String nm) {
SleighSymbol symbol = super.findSymbol(nm);
if (symbol == null) {
throw new SleighException("Unknown register: '" + nm + "'");
}
return symbol;
}
}
/**