DIRECTOR: LINGO: Remove old if code

This commit is contained in:
djsrv 2021-06-16 16:27:21 -04:00 committed by D.J. Servilla
parent dac5b6230c
commit 03e6a56c5c
2 changed files with 0 additions and 35 deletions

View File

@ -251,37 +251,6 @@ int LingoCompiler::codeFunc(Common::String *s, int numpar) {
return ret;
}
void LingoCompiler::codeLabel(int label) {
_labelstack.push_back(label);
debugC(4, kDebugCompile, "codeLabel: Added label %d", label);
}
void LingoCompiler::processIf(int toplabel, int endlabel) {
inst iend;
debugC(4, kDebugCompile, "processIf(%d, %d)", toplabel, endlabel);
while (true) {
if (_labelstack.empty()) {
warning("Lingo::processIf(): Label stack underflow");
break;
}
int label = _labelstack.back();
_labelstack.pop_back();
// This is beginning of our if()
if (!label)
break;
debugC(4, kDebugCompile, "processIf: label at %d", label);
WRITE_UINT32(&iend, endlabel - label + 1);
(*_currentAssembly)[label] = iend; /* end, if cond fails */
}
}
void LingoCompiler::registerMethodVar(const Common::String &name, VarType type) {
if (!_methodVars->contains(name)) {
(*_methodVars)[name] = type;

View File

@ -46,9 +46,7 @@ public:
int codeFloat(double f);
int codeFunc(Common::String *s, int numpar);
int codeInt(int val);
void codeLabel(int label);
int codeString(const char *s);
void processIf(int toplabel, int endlabel);
void registerFactory(Common::String &s);
void registerMethodVar(const Common::String &name, VarType type);
@ -66,8 +64,6 @@ public:
Common::HashMap<Common::String, VarType, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> *_methodVars;
Common::HashMap<Common::String, VarType, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> *_methodVarsStash;
Common::Array<int> _labelstack;
bool _hadError;
public: