Debugging fixes.
Change-Id: I53b7301c28314210f96acc358744ff7e2a65546d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
b9c3d61eeb
commit
50eef1d4a1
|
@ -123,9 +123,7 @@ FunctionDebugInfo *Debugger::debugInfo(VM::FunctionObject *function) const
|
|||
QString Debugger::name(VM::FunctionObject *function) const
|
||||
{
|
||||
if (FunctionDebugInfo *i = debugInfo(function))
|
||||
if (i->function)
|
||||
if (const QString *n = i->function->name)
|
||||
return *n;
|
||||
return i->name;
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
|
10
debugging.h
10
debugging.h
|
@ -47,9 +47,15 @@ namespace Debugging {
|
|||
class Debugger;
|
||||
|
||||
struct FunctionDebugInfo { // TODO: use opaque d-pointers here
|
||||
IR::Function *function;
|
||||
QString name;
|
||||
unsigned startLine, startColumn;
|
||||
FunctionDebugInfo(IR::Function *function): function(function), startLine(0), startColumn(0) {}
|
||||
|
||||
FunctionDebugInfo(IR::Function *function):
|
||||
startLine(0), startColumn(0)
|
||||
{
|
||||
if (function->name)
|
||||
name = *function->name;
|
||||
}
|
||||
|
||||
void setSourceLocation(unsigned line, unsigned column)
|
||||
{ startLine = line; startColumn = column; }
|
||||
|
|
|
@ -29,6 +29,10 @@ class CompressTemps: public IR::StmtVisitor, IR::ExprVisitor
|
|||
public:
|
||||
void run(IR::Function *function)
|
||||
{
|
||||
#ifdef DEBUG_TEMP_COMPRESSION
|
||||
qDebug() << "starting on function" << (*function->name) << "with" << function->tempCount << "temps.";
|
||||
#endif // DEBUG_TEMP_COMPRESSION
|
||||
|
||||
_seenTemps.clear();
|
||||
_nextFree = 0;
|
||||
_active.reserve(function->tempCount);
|
||||
|
|
Loading…
Reference in New Issue