Codechange: use commented out code, or guard by #ifdef

This commit is contained in:
Rubidium 2023-01-26 22:49:57 +01:00 committed by rubidium42
parent ae422be979
commit 5863d78cb4
2 changed files with 9 additions and 7 deletions

View File

@ -140,7 +140,6 @@ void SQVM::Finalize()
SQVM::~SQVM()
{
Finalize();
//sq_free(_callsstack,_alloccallsstacksize*sizeof(CallInfo));
REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this);
}
@ -712,7 +711,6 @@ bool SQVM::Execute(SQObjectPtr &closure, SQInteger target, SQInteger nargs, SQIn
return false;
}
if (_funcproto(_closure(temp_reg)->_function)->_bgenerator) {
//SQFunctionProto *f = _funcproto(_closure(temp_reg)->_function);
SQGenerator *gen = SQGenerator::Create(_ss(this), _closure(temp_reg));
_GUARD(gen->Yield(this));
Return(1, ci->_target, temp_reg);
@ -747,8 +745,10 @@ exception_restore:
if (ShouldSuspend()) { _suspended = SQTrue; _suspended_traps = traps; return true; }
const SQInstruction &_i_ = *ci->_ip++;
//dumpstack(_stackbase);
//printf("%s %d %d %d %d\n",g_InstrDesc[_i_.op].name,arg0,arg1,arg2,arg3);
#ifdef _DEBUG_DUMP
dumpstack(_stackbase);
printf("%s %d %d %d %d\n",g_InstrDesc[_i_.op].name,arg0,arg1,arg2,arg3);
#endif
switch(_i_.op)
{
case _OP_LINE:
@ -1053,7 +1053,9 @@ common_call:
exception_trap:
{
SQObjectPtr currerror = _lasterror;
// dumpstack(_stackbase);
#ifdef _DEBUG_DUMP
dumpstack(_stackbase);
#endif
SQInteger n = 0;
SQInteger last_top = _top;
if(ci) {

View File

@ -1067,7 +1067,7 @@ static inline bool SlIsObjectCurrentlyValid(SaveLoadVersion version_from, SaveLo
*/
static inline VarType GetVarMemType(VarType type)
{
return type & 0xF0; // GB(type, 4, 4) << 4;
return GB(type, 4, 4) << 4;
}
/**
@ -1078,7 +1078,7 @@ static inline VarType GetVarMemType(VarType type)
*/
static inline VarType GetVarFileType(VarType type)
{
return type & 0xF; // GB(type, 0, 4);
return GB(type, 0, 4);
}
/**