endif()
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
- katie_definition(-DQT_NO_DEBUG -DNDEBUG)
+ katie_definition(-DQT_NO_DEBUG)
endif()
try_compile(bsymbolic_functions_test
namespace JSC {
-#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
+#if !defined(QT_NO_DEBUG) || ENABLE(OPCODE_SAMPLING)
static UString escapeQuotes(const UString& str)
{
}
}
-#endif // !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
+#endif // !defined(QT_NO_DEBUG) || ENABLE(OPCODE_SAMPLING)
#if DUMP_CODE_BLOCK_STATISTICS
static HashSet<CodeBlock*> liveCodeBlockSet;
, m_numParameters(0)
, m_ownerExecutable(ownerExecutable)
, m_globalData(0)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_instructionCount(0)
#endif
, m_needsFullScopeChain(ownerExecutable->needsActivation())
static void dumpStatistics();
-#if !defined(NDEBUG) || ENABLE_OPCODE_SAMPLING
+#if !defined(QT_NO_DEBUG) || ENABLE_OPCODE_SAMPLING
void dump(ExecState*) const;
void printStructures(const Instruction*) const;
void printStructure(const char* name, const Instruction*, int operand) const;
Vector<Instruction>& instructions() { return m_instructions; }
void discardBytecode() { m_instructions.clear(); }
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
unsigned instructionCount() { return m_instructionCount; }
void setInstructionCount(unsigned instructionCount) { m_instructionCount = instructionCount; }
#endif
int m_numParameters;
private:
-#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
+#if !defined(QT_NO_DEBUG) || ENABLE(OPCODE_SAMPLING)
void dump(ExecState*, const Vector<Instruction>::const_iterator& begin, Vector<Instruction>::const_iterator&) const;
const char* registerName(ExecState*, int r) const;
JSGlobalData* m_globalData;
Vector<Instruction> m_instructions;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
unsigned m_instructionCount;
#endif
expected by the callee.
*/
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
static bool s_dumpsGeneratedCode = false;
#endif
void BytecodeGenerator::setDumpsGeneratedCode(bool dumpsGeneratedCode)
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
s_dumpsGeneratedCode = dumpsGeneratedCode;
#else
Q_UNUSED(dumpsGeneratedCode);
bool BytecodeGenerator::dumpsGeneratedCode()
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
return s_dumpsGeneratedCode;
#else
return false;
m_scopeNode->emitBytecode(*this);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_codeBlock->setInstructionCount(m_codeBlock->instructions().size());
if (s_dumpsGeneratedCode)
RegisterID()
: m_refCount(0)
, m_isTemporary(false)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_didSetIndex(false)
#endif
{
: m_refCount(0)
, m_index(index)
, m_isTemporary(false)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_didSetIndex(true)
#endif
{
void setIndex(int index)
{
Q_ASSERT(!m_refCount);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_didSetIndex = true;
#endif
m_index = index;
int m_refCount;
int m_index;
bool m_isTemporary;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
bool m_didSetIndex;
#endif
};
return this[codeBlock()->thisRegister()].jsValue();
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void CallFrame::dumpCaller()
{
int signedLineNumber;
const MarkedArgumentBuffer& emptyList() const { return *globalData().emptyList; }
Interpreter* interpreter() { return globalData().interpreter; }
Heap* heap() { return &globalData().heap; }
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void dumpCaller();
#endif
static const HashTable* arrayTable(CallFrame* callFrame) { return callFrame->globalData().arrayTable; }
#endif
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void Interpreter::dumpCallFrame(CallFrame* callFrame)
{
ALWAYS_INLINE Register::Register()
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
*this = JSValue();
#endif
}
MarkedArgumentBuffer()
: m_isUsingInlineBuffer(true)
, m_markSet(Q_NULLPTR)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_isReadOnly(false)
#endif
{
, m_size(size)
, m_isUsingInlineBuffer(true)
, m_markSet(Q_NULLPTR)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_isReadOnly(true)
#endif
{
m_buffer = buffer;
m_size = size;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_isReadOnly = true;
#endif
}
VectorType m_vector;
ListSet* m_markSet;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
bool m_isReadOnly;
#endif
if (c <= 0xFF) {
r = globalData->smallStrings.singleCharacterStringRep(c);
if (r->isIdentifier()) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
checkSameIdentifierTable(globalData);
#endif
return r;
currentIdentifierTable()->remove(r);
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void Identifier::checkSameIdentifierTable(ExecState* exec)
{
Q_UNUSED(exec);
static PassRefPtr<UString::Rep> add(ExecState* exec, UString::Rep* r)
{
if (r->isIdentifier()) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
checkSameIdentifierTable(exec);
#endif
return r;
static PassRefPtr<UString::Rep> add(JSGlobalData* globalData, UString::Rep* r)
{
if (r->isIdentifier()) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
checkSameIdentifierTable(globalData);
#endif
return r;
static PassRefPtr<UString::Rep> addSlowCase(ExecState*, UString::Rep* r);
static PassRefPtr<UString::Rep> addSlowCase(JSGlobalData*, UString::Rep* r);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
static void checkSameIdentifierTable(ExecState*);
static void checkSameIdentifierTable(JSGlobalData*);
#endif
{
Q_ASSERT(Heap::isCellMarked(cell));
if (!cell->structure()->typeInfo().overridesMarkChildren()) {
-#ifdef NDEBUG
+#ifdef QT_NO_DEBUG
asObject(cell)->markChildrenDirect(*this);
#else
Q_ASSERT(!m_isCheckingForDefaultMarkViolation);
// By the time this is destroyed, heap.destroy() must already have been called.
delete interpreter;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
// Zeroing out to make the behavior more predictable when someone attempts to use a deleted instance.
interpreter = 0;
#endif
return jsString(exec, builder.release());
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
JSValue QT_FASTCALL globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
{
CStringBuffer string;
JSValue QT_FASTCALL globalFuncEncodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&);
JSValue QT_FASTCALL globalFuncEscape(ExecState*, JSObject*, JSValue, const ArgList&);
JSValue QT_FASTCALL globalFuncUnescape(ExecState*, JSObject*, JSValue, const ArgList&);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
JSValue QT_FASTCALL globalFuncJSCPrint(ExecState*, JSObject*, JSValue, const ArgList&);
#endif
void JSObject::markChildren(MarkStack& markStack)
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
bool wasCheckingForDefaultMarkViolation = markStack.m_isCheckingForDefaultMarkViolation;
markStack.m_isCheckingForDefaultMarkViolation = false;
#endif
markChildrenDirect(markStack);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
markStack.m_isCheckingForDefaultMarkViolation = wasCheckingForDefaultMarkViolation;
#endif
}
return new (exec) JSNotAnObject(exec, exception);
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
char* JSValue::description()
{
static const size_t size = 32;
bool isCell() const;
JSCell* asCell() const;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
char* description();
#endif
public:
MarkStack(void* jsArrayVPtr)
: m_jsArrayVPtr(jsArrayVPtr)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_isCheckingForDefaultMarkViolation(false)
#endif
{
MarkStackArray<JSCell*> m_values;
static size_t s_pageSize;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
public:
bool m_isCheckingForDefaultMarkViolation;
#endif
void clearBase()
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_slotBase = JSValue();
#endif
}
void clearValue()
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_value = JSValue();
#endif
}
const int numMatches = pcre_exec(m_regExp, Q_NULLPTR, s.ascii(), s.size(), startOffset, 0, offsetVector, offsetVectorSize);
if (numMatches < 0) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
if (numMatches != PCRE_ERROR_NOMATCH)
fprintf(stderr, "jsRegExpExecute failed with result %d\n", numMatches);
#endif
namespace JSC {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void ScopeChainNode::print() const
{
Q_ASSERT(globalData);
Q_ASSERT(globalObject);
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
// Due to the number of subtle and timing dependent bugs that have occurred due
// to deleted but still "valid" ScopeChainNodes we now deliberately clobber the
// contents in debug builds.
ScopeChainIterator begin() const;
ScopeChainIterator end() const;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void print() const;
#endif
};
{
if (m_node)
m_node->deref();
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_node = 0;
#endif
}
// Returns the depth of the current call frame's scope chain
int localDepth() const;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void print() const { m_node->print(); }
#endif
#define DUMP_STRUCTURE_ID_STATISTICS 0
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
#define DO_PROPERTYMAP_CONSTENCY_CHECK 0
#else
#define DO_PROPERTYMAP_CONSTENCY_CHECK 0
static const unsigned newTableSize = 16;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
static bool shouldIgnoreLeaks;
static HashSet<Structure*>& ignoreSet = *(new HashSet<Structure*>);
#endif
Q_ASSERT(m_prototype);
Q_ASSERT(m_prototype.isObject() || m_prototype.isNull());
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
if (shouldIgnoreLeaks)
ignoreSet.add(this);
else
fastFree(m_propertyTable);
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
HashSet<Structure*>::iterator it = ignoreSet.find(this);
if (it != ignoreSet.end())
ignoreSet.remove(it);
liveStructureSet.remove(this);
#endif
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
if (m_count) {
qDebug("LEAK: %u Structure", m_count);
}
void Structure::startIgnoringLeaks()
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
shouldIgnoreLeaks = true;
#endif
}
void Structure::stopIgnoringLeaks()
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
shouldIgnoreLeaks = false;
#endif
}
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
#define DUMP_PROPERTYMAP_STATS 0
#else
#define DUMP_PROPERTYMAP_STATS 0
bool isValid(ExecState*, StructureChain* cachedPrototypeChain) const;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
volatile int m_count;
#endif
void setTransitionTable(TransitionTable* table)
{
Q_ASSERT(usingSingleTransitionSlot());
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
setSingleTransition(0);
#endif
m_transitions.m_table = table;
#include "Platform.h"
#ifndef ALWAYS_INLINE
-#if COMPILER(GCC) && defined(NDEBUG) && !COMPILER(MINGW)
+#if COMPILER(GCC) && defined(QT_NO_DEBUG) && !COMPILER(MINGW)
#define ALWAYS_INLINE inline __attribute__((__always_inline__))
#else
#define ALWAYS_INLINE inline
CrossThreadRefCounted(T* data, ThreadSafeSharedBase* threadedCounter)
: m_threadSafeRefCounter(threadedCounter)
, m_data(data)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_threadId(0)
#endif
{
void threadSafeDeref();
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
bool isOwnedByCurrentThread() const { return !m_threadId || m_threadId == currentThread(); }
#endif
RefCountedBase m_refCounter;
ThreadSafeSharedBase* m_threadSafeRefCounter;
T* m_data;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
ThreadIdentifier m_threadId;
#endif
};
{
Q_ASSERT(isOwnedByCurrentThread());
m_refCounter.ref();
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
// Store the threadId as soon as the ref count gets to 2.
// The class gets created with a ref count of 1 and then passed
// to another thread where to ref count get increased. This
threadSafeDeref();
delete this;
} else {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
// Clear the threadId when the ref goes to 1 because it
// is safe to be passed to another thread at this point.
if (m_threadId && m_refCounter.refCount() == 1)
void initializeDates()
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
static bool alreadyInitialized;
Q_ASSERT(!alreadyInitialized);
alreadyInitialized = true;
#include "Assertions.h"
#include <string.h>
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
namespace WTF {
static bool staticIsForbidden;
}
} // namespace WTF
-#endif // NDEBUG
+#endif // QT_NO_DEBUG
namespace WTF {
void fastFree(void*);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void fastMallocForbid();
void fastMallocAllow();
#endif
using WTF::tryFastRealloc;
using WTF::fastFree;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
using WTF::fastMallocForbid;
using WTF::fastMallocAllow;
#endif
#define DUMP_HASHTABLE_STATS 0
#define CHECK_HASHTABLE_CONSISTENCY 0
-#ifdef NDEBUG
+#ifdef QT_NO_DEBUG
#define CHECK_HASHTABLE_ITERATORS 0
#define CHECK_HASHTABLE_USE_AFTER_DESTRUCTION 0
#else
{
Q_ASSERT(!(reinterpret_cast<intptr_t>(ptr) & 3));
m_ptrAndFlags = reinterpret_cast<intptr_t>(ptr) | (m_ptrAndFlags & 3);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_leaksPtr = ptr;
#endif
}
protected:
intptr_t m_ptrAndFlags;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced.
#endif
};
protected:
RefCountedBase()
: m_refCount(1)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
, m_deletionHasBegun(false)
#endif
{
Q_ASSERT(!m_deletionHasBegun);
Q_ASSERT(m_refCount > 0);
if (m_refCount == 1) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
m_deletionHasBegun = true;
#endif
return true;
return false;
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
bool deletionHasBegun() const
{
return m_deletionHasBegun;
friend class CrossThreadRefCounted;
int m_refCount;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
bool m_deletionHasBegun;
#endif
};
*/
void QDesignerWidgetDataBaseInterface::insert(int index, QDesignerWidgetDataBaseItemInterface *item)
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
qDebug() << "insert at " << index << ' ' << item->name() << " derived from " << item->extends();
#endif
m_items.insert(index, item);
*/
void QDesignerWidgetDataBaseInterface::append(QDesignerWidgetDataBaseItemInterface *item)
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
qDebug() << "append " << item->name() << " derived from " << item->extends();
#endif
m_items.append(item);
}
}
}
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
qDebug() << "WidgetDataBase::loadPlugins(): " << addedPlugins << " added, " << replacedPlugins << " replaced, " << removedPlugins << "deleted.";
#endif
}
const QString &includeFile,
bool promoted, bool custom)
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
qDebug() << "appendDerived " << className << " derived from " << baseClassName;
#endif
// Check.
// Create this item, inheriting its base properties
const int baseIndex = db->indexOfClassName(baseClassName);
if (baseIndex == -1) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
qDebug() << "appendDerived failed due to missing base class";
#endif
return 0;
void QZipWriterPrivate::addEntry(EntryType type, const QString &fileName, const QByteArray &contents/*, QFile::Permissions permissions, QZip::Method m*/)
{
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
static const char *entryTypes[] = {
"directory",
"file ",