aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-07-04 17:01:02 +0200
committerErik Verbruggen <erik.verbruggen@digia.com>2014-08-08 10:45:12 +0200
commit6333e0913fc0078c0221a8909ced8df03a568992 (patch)
tree40661d956eb9a87ba3f695811de0e3c591ab7583 /src/qml/compiler/qv4codegen.cpp
parent94669499fd943fc72095afd739a21cd8e675f14f (diff)
Add support for conditional breakpoints and evaluate.
Also centralized the context state saver and added line number saving, so that the JS jobs for evaluation of breakpoint conditions don't change the state of the current engine context. Task-number: QTBUG-37119 Task-number: QTCREATORBUG-11516 Change-Id: Ia21b3d64e239e5b67f3c07e1c006d8e6748f29b6 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 2d45543305..2f80b0e519 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -1950,7 +1950,8 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
IR::BasicBlock *entryBlock = function->newBasicBlock(0);
IR::BasicBlock *exitBlock = function->newBasicBlock(0, IR::Function::DontInsertBlock);
- function->hasDirectEval = _env->hasDirectEval || _env->compilationMode == EvalCode;
+ function->hasDirectEval = _env->hasDirectEval || _env->compilationMode == EvalCode
+ || _module->debugMode; // Conditional breakpoints are like eval in the function
function->usesArgumentsObject = _env->parent && (_env->usesArgumentsObject == Environment::ArgumentsObjectUsed);
function->usesThis = _env->usesThis;
function->maxNumberOfArguments = qMax(_env->maxNumberOfArguments, (int)QV4::Global::ReservedArgumentCount);