summaryrefslogtreecommitdiff
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/squirrel/squirrel/sqcompiler.cpp1
-rw-r--r--src/3rdparty/squirrel/squirrel/sqstate.cpp4
-rw-r--r--src/3rdparty/squirrel/squirrel/sqvm.cpp6
3 files changed, 8 insertions, 3 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp
index 9eb71d457..00e5df04f 100644
--- a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp
@@ -836,6 +836,7 @@ public:
SQInteger val = _fs->PopTarget();
SQInteger key = _fs->PopTarget();
SQInteger attrs = hasattrs ? _fs->PopTarget():-1;
+ (void)attrs; // assert only
assert((hasattrs && attrs == key-1) || !hasattrs);
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
diff --git a/src/3rdparty/squirrel/squirrel/sqstate.cpp b/src/3rdparty/squirrel/squirrel/sqstate.cpp
index 35878e197..eaad6a3f7 100644
--- a/src/3rdparty/squirrel/squirrel/sqstate.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqstate.cpp
@@ -252,7 +252,9 @@ SQInteger SQSharedState::CollectGarbage(SQVM *vm)
SQVM *vms = _thread(_root_vm);
vms->Mark(&tchain);
+#ifndef NDEBUG
SQInteger x = _table(_thread(_root_vm)->_roottable)->CountUsed();
+#endif
_refs_table.Mark(&tchain);
MarkObject(_registry,&tchain);
MarkObject(_consts,&tchain);
@@ -289,8 +291,10 @@ SQInteger SQSharedState::CollectGarbage(SQVM *vm)
t = t->_next;
}
_gc_chain = tchain;
+#ifndef NDEBUG
SQInteger z = _table(_thread(_root_vm)->_roottable)->CountUsed();
assert(z == x);
+#endif
return n;
}
#endif
diff --git a/src/3rdparty/squirrel/squirrel/sqvm.cpp b/src/3rdparty/squirrel/squirrel/sqvm.cpp
index ee1acbf32..5419c94cf 100644
--- a/src/3rdparty/squirrel/squirrel/sqvm.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqvm.cpp
@@ -1471,8 +1471,8 @@ bool SQVM::DeleteSlot(const SQObjectPtr &self,const SQObjectPtr &key,SQObjectPtr
bool SQVM::Call(SQObjectPtr &closure,SQInteger nparams,SQInteger stackbase,SQObjectPtr &outres,SQBool raiseerror,SQBool can_suspend)
{
-#ifdef _DEBUG
-SQInteger prevstackbase = _stackbase;
+#ifndef NDEBUG
+ SQInteger prevstackbase = _stackbase;
#endif
switch(type(closure)) {
case OT_CLOSURE: {
@@ -1504,7 +1504,7 @@ SQInteger prevstackbase = _stackbase;
default:
return false;
}
-#ifdef _DEBUG
+#ifndef NDEBUG
if(!_suspended) {
assert(_stackbase == prevstackbase);
}