aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-11-11 17:18:21 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-22 13:45:40 +0100
commit8c7da024f0b8743c7e2ffd45e918bdc3e79d200a (patch)
tree151732c71b113c0914407fb0333eea6eb531edb6 /src
parent43e20d57011bbddd3beec773f6a8efb1269a8ead (diff)
Profiler: Preserve line information also for optimized bindings
Change-Id: Ibd5abb42364711fab454e6b9c13af53462730471 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp2
-rw-r--r--src/declarative/qml/v4/qv4bindings.cpp6
-rw-r--r--src/declarative/qml/v4/qv4bindings_p.h3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 24d2ef45e7..19df52798e 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -958,7 +958,7 @@ QObject *QDeclarativeVME::run(QList<QDeclarativeError> *errors,
QML_NEXT_INSTR(StoreV4Binding);
QDeclarativeAbstractBinding *binding =
- CTXT->v4bindings->configBinding(instr.value, target, scope, property);
+ CTXT->v4bindings->configBinding(instr.value, target, scope, property, instr.line);
bindValues.push(binding);
binding->m_mePtr = &bindValues.top();
binding->addToObject(target, property);
diff --git a/src/declarative/qml/v4/qv4bindings.cpp b/src/declarative/qml/v4/qv4bindings.cpp
index 0822321255..b398ac57b2 100644
--- a/src/declarative/qml/v4/qv4bindings.cpp
+++ b/src/declarative/qml/v4/qv4bindings.cpp
@@ -212,7 +212,7 @@ QV4Bindings::~QV4Bindings()
}
QDeclarativeAbstractBinding *QV4Bindings::configBinding(int index, QObject *target,
- QObject *scope, int property)
+ QObject *scope, int property, int line)
{
Binding *rv = bindings + index;
@@ -220,6 +220,7 @@ QDeclarativeAbstractBinding *QV4Bindings::configBinding(int index, QObject *targ
rv->property = property;
rv->target = target;
rv->scope = scope;
+ rv->line = line;
rv->parent = this;
addref(); // This is decremented in Binding::destroy()
@@ -239,6 +240,9 @@ void QV4Bindings::Binding::setEnabled(bool e, QDeclarativePropertyPrivate::Write
void QV4Bindings::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags)
{
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding);
+ if (parent->context())
+ QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Binding,
+ parent->context()->url, line);
parent->run(this, flags);
QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Binding);
}
diff --git a/src/declarative/qml/v4/qv4bindings_p.h b/src/declarative/qml/v4/qv4bindings_p.h
index 6bb15e4174..b961cc53fd 100644
--- a/src/declarative/qml/v4/qv4bindings_p.h
+++ b/src/declarative/qml/v4/qv4bindings_p.h
@@ -72,7 +72,7 @@ public:
virtual ~QV4Bindings();
QDeclarativeAbstractBinding *configBinding(int index, QObject *target,
- QObject *scope, int property);
+ QObject *scope, int property, int line);
#ifdef QML_THREADED_INTERPRETER
static void **getDecodeInstrTable();
@@ -95,6 +95,7 @@ private:
bool updating:1;
int property;
QObject *scope;
+ int line;
QObject *target;
quint32 executedBlocks;