mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
Codechange: use commented out code, or guard by #ifdef
This commit is contained in:
parent
ae422be979
commit
5863d78cb4
12
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
12
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
@ -140,7 +140,6 @@ void SQVM::Finalize()
|
|||||||
SQVM::~SQVM()
|
SQVM::~SQVM()
|
||||||
{
|
{
|
||||||
Finalize();
|
Finalize();
|
||||||
//sq_free(_callsstack,_alloccallsstacksize*sizeof(CallInfo));
|
|
||||||
REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this);
|
REMOVE_FROM_CHAIN(&_ss(this)->_gc_chain,this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -712,7 +711,6 @@ bool SQVM::Execute(SQObjectPtr &closure, SQInteger target, SQInteger nargs, SQIn
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (_funcproto(_closure(temp_reg)->_function)->_bgenerator) {
|
if (_funcproto(_closure(temp_reg)->_function)->_bgenerator) {
|
||||||
//SQFunctionProto *f = _funcproto(_closure(temp_reg)->_function);
|
|
||||||
SQGenerator *gen = SQGenerator::Create(_ss(this), _closure(temp_reg));
|
SQGenerator *gen = SQGenerator::Create(_ss(this), _closure(temp_reg));
|
||||||
_GUARD(gen->Yield(this));
|
_GUARD(gen->Yield(this));
|
||||||
Return(1, ci->_target, temp_reg);
|
Return(1, ci->_target, temp_reg);
|
||||||
@ -747,8 +745,10 @@ exception_restore:
|
|||||||
if (ShouldSuspend()) { _suspended = SQTrue; _suspended_traps = traps; return true; }
|
if (ShouldSuspend()) { _suspended = SQTrue; _suspended_traps = traps; return true; }
|
||||||
|
|
||||||
const SQInstruction &_i_ = *ci->_ip++;
|
const SQInstruction &_i_ = *ci->_ip++;
|
||||||
//dumpstack(_stackbase);
|
#ifdef _DEBUG_DUMP
|
||||||
//printf("%s %d %d %d %d\n",g_InstrDesc[_i_.op].name,arg0,arg1,arg2,arg3);
|
dumpstack(_stackbase);
|
||||||
|
printf("%s %d %d %d %d\n",g_InstrDesc[_i_.op].name,arg0,arg1,arg2,arg3);
|
||||||
|
#endif
|
||||||
switch(_i_.op)
|
switch(_i_.op)
|
||||||
{
|
{
|
||||||
case _OP_LINE:
|
case _OP_LINE:
|
||||||
@ -1053,7 +1053,9 @@ common_call:
|
|||||||
exception_trap:
|
exception_trap:
|
||||||
{
|
{
|
||||||
SQObjectPtr currerror = _lasterror;
|
SQObjectPtr currerror = _lasterror;
|
||||||
// dumpstack(_stackbase);
|
#ifdef _DEBUG_DUMP
|
||||||
|
dumpstack(_stackbase);
|
||||||
|
#endif
|
||||||
SQInteger n = 0;
|
SQInteger n = 0;
|
||||||
SQInteger last_top = _top;
|
SQInteger last_top = _top;
|
||||||
if(ci) {
|
if(ci) {
|
||||||
|
@ -1067,7 +1067,7 @@ static inline bool SlIsObjectCurrentlyValid(SaveLoadVersion version_from, SaveLo
|
|||||||
*/
|
*/
|
||||||
static inline VarType GetVarMemType(VarType type)
|
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)
|
static inline VarType GetVarFileType(VarType type)
|
||||||
{
|
{
|
||||||
return type & 0xF; // GB(type, 0, 4);
|
return GB(type, 0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user