Cleanup: remove commented out code

This commit is contained in:
Rubidium
2023-01-26 22:50:43 +01:00
committed by rubidium42
parent 5863d78cb4
commit 71b46db8d0
9 changed files with 2 additions and 26 deletions

View File

@@ -607,7 +607,6 @@ public:
switch(_token)
{
case TK_STRING_LITERAL: {
//SQObjectPtr id(SQString::Create(_ss(_vm), _lex._svalue,_lex._longstr.size()-1));
_fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetConstant(_fs->CreateString(_lex._svalue,_lex._longstr.size()-1)));
Lex();
}
@@ -840,7 +839,6 @@ public:
unsigned char flags = (hasattrs?NEW_SLOT_ATTRIBUTES_FLAG:0)|(isstatic?NEW_SLOT_STATIC_FLAG:0);
SQInteger table = _fs->TopTarget(); //<<BECAUSE OF THIS NO COMMON EMIT FUNC IS POSSIBLE
_fs->AddInstruction(_OP_NEWSLOTA, flags, table, key, val);
//_fs->PopTarget();
}
if(separator == ',') //hack recognizes a table from the separator
_fs->SetIntructionParam(tpos, 1, nkeys);
@@ -1053,7 +1051,6 @@ public:
if(tonextcondjmp != -1)
_fs->SetIntructionParam(tonextcondjmp, 1, _fs->GetCurrentPos() - tonextcondjmp);
if(_token == TK_DEFAULT) {
// _fs->AddLineInfos(_lex._currentline, _lineinfo);
Lex(); Expect(':');
SQInteger stacksize = _fs->GetStackSize();
_last_stacksize = _fs->GetStackSize();
@@ -1167,11 +1164,6 @@ public:
}
SQTable *enums = _table(_ss(_vm)->_consts);
SQObjectPtr strongid = id;
/*SQObjectPtr dummy;
if(enums->Get(strongid,dummy)) {
dummy.Null(); strongid.Null();
Error("enumeration already exists");
}*/
enums->NewSlot(SQObjectPtr(strongid),SQObjectPtr(table));
strongid.Null();
Lex();
@@ -1318,7 +1310,6 @@ public:
funcstate->AddLineInfos(_lex._prevtoken == '\n'?_lex._lasttokenline:_lex._currentline, _lineinfo, true);
funcstate->AddInstruction(_OP_RETURN, -1);
funcstate->SetStackSize(0);
//_fs->->_stacksize = _fs->_stacksize;
SQFunctionProto *func = funcstate->BuildProto();
#ifdef _DEBUG_DUMP
funcstate->Dump(func);

View File

@@ -177,7 +177,6 @@ SQInteger SQLexer::Lex()
else if ( CUR_CHAR == '-' ) { NEXT(); RETURN_TOKEN(TK_NEWSLOT); }
else if ( CUR_CHAR == '<' ) { NEXT(); RETURN_TOKEN(TK_SHIFTL); }
else if ( CUR_CHAR == '/' ) { NEXT(); RETURN_TOKEN(TK_ATTR_OPEN); }
//else if ( CUR_CHAR == '[' ) { NEXT(); ReadMultilineString(); RETURN_TOKEN(TK_STRING_LITERAL); }
else { RETURN_TOKEN('<') }
case '>':
NEXT();

View File

@@ -36,7 +36,6 @@ struct SQVM : public CHAINABLE_OBJ
};
struct CallInfo{
//CallInfo() { _generator._type = OT_NULL;}
SQInstruction *_ip;
SQObjectPtr *_literals;
SQObjectPtr _closure;