aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-09-11 13:46:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-24 14:34:33 +0200
commit63ddfee7550b4d12ddb56e4575d8bb27c664c41e (patch)
tree4aa6281bec7705bc183829b1a776916d8b0054ce /src/qml/compiler
parentaa1760f84bd711cf56159075630fb71d38a4087b (diff)
V4 debugger: retrieve formals and locals.
Change-Id: I47507a4d7d1b429b9c43ed3a7822079efe577327 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qqmlcodegenerator_p.h5
-rw-r--r--src/qml/compiler/qv4jsir_p.h6
-rw-r--r--src/qml/compiler/qv4ssa.cpp2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/qml/compiler/qqmlcodegenerator_p.h b/src/qml/compiler/qqmlcodegenerator_p.h
index 8de08a81d1..1830b62772 100644
--- a/src/qml/compiler/qqmlcodegenerator_p.h
+++ b/src/qml/compiler/qqmlcodegenerator_p.h
@@ -166,8 +166,9 @@ struct Pragma
struct ParsedQML
{
- ParsedQML()
- : jsGenerator(&jsModule, sizeof(QV4::CompiledData::QmlUnit))
+ ParsedQML(bool debugMode)
+ : jsModule(debugMode)
+ , jsGenerator(&jsModule, sizeof(QV4::CompiledData::QmlUnit))
{}
QString code;
QQmlJS::Engine jsParserEngine;
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index 7b0ee52737..8d090cab1e 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -683,12 +683,14 @@ struct Q_QML_EXPORT Module {
Function *rootFunction;
QString fileName;
bool isQmlModule; // implies rootFunction is always 0
+ bool debugMode;
Function *newFunction(const QString &name, Function *outer);
- Module()
+ Module(bool debugMode)
: rootFunction(0)
, isQmlModule(false)
+ , debugMode(debugMode)
{}
~Module();
@@ -764,7 +766,7 @@ struct Function {
int indexOfArgument(const QStringRef &string) const;
bool variablesCanEscape() const
- { return hasDirectEval || !nestedFunctions.isEmpty(); }
+ { return hasDirectEval || !nestedFunctions.isEmpty() || module->debugMode; }
};
struct BasicBlock {
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index c9ff6ad53c..d1ebbcc26b 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -2858,7 +2858,7 @@ void Optimizer::run()
static bool doSSA = qgetenv("QV4_NO_SSA").isEmpty();
static bool doOpt = qgetenv("QV4_NO_OPT").isEmpty();
- if (!function->hasTry && !function->hasWith && doSSA) {
+ if (!function->hasTry && !function->hasWith && !function->module->debugMode && doSSA) {
// qout << "SSA for " << *function->name << endl;
// qout << "Starting edge splitting..." << endl;
splitCriticalEdges(function);