aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-10-22 12:05:18 +0200
committerLars Knoll <lars.knoll@qt.io>2017-10-22 12:26:28 +0200
commitaceb0d0cd2da89aebbf17729869b9e977290c826 (patch)
treeb29e815e32277710058bc32c571281937183fd43 /src/qml/jsruntime/qv4engine.cpp
parent6ecbe6441f825489b5fafde1a274952933254c7f (diff)
parent1bb9c7b517e7995201d2a31cd1e852c02ad8c1bc (diff)
Merge remote-tracking branch 'origin/dev' into HEAD
Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4isel_moth_p.h src/qml/compiler/qv4ssa.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm_p.h src/qml/jit/qv4regalloc.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexp.cpp src/qml/jsruntime/qv4regexp_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp tests/auto/qml/qml.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp Change-Id: I1577e195c736f3414089036b957a01cb91a3ca23
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index d10fd78973..d63320b595 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -134,10 +134,6 @@ ExecutionEngine::ExecutionEngine()
, m_engineId(engineSerial.fetchAndAddOrdered(1))
, regExpCache(0)
, m_multiplyWrappedQObjects(0)
-#ifndef QT_NO_QML_DEBUGGER
- , m_debugger(0)
- , m_profiler(0)
-#endif
{
memoryManager = new QV4::MemoryManager(this);
@@ -469,12 +465,6 @@ ExecutionEngine::ExecutionEngine()
ExecutionEngine::~ExecutionEngine()
{
-#ifndef QT_NO_QML_DEBUGGER
- delete m_debugger;
- m_debugger = 0;
- delete m_profiler;
- m_profiler = 0;
-#endif
delete m_multiplyWrappedQObjects;
m_multiplyWrappedQObjects = 0;
delete identifierTable;
@@ -502,13 +492,13 @@ ExecutionEngine::~ExecutionEngine()
void ExecutionEngine::setDebugger(Debugging::Debugger *debugger)
{
Q_ASSERT(!m_debugger);
- m_debugger = debugger;
+ m_debugger.reset(debugger);
}
void ExecutionEngine::setProfiler(Profiling::Profiler *profiler)
{
Q_ASSERT(!m_profiler);
- m_profiler = profiler;
+ m_profiler.reset(profiler);
}
#endif // QT_NO_QML_DEBUGGER
@@ -650,21 +640,17 @@ Heap::DateObject *ExecutionEngine::newDateObjectFromTime(const QTime &t)
Heap::RegExpObject *ExecutionEngine::newRegExpObject(const QString &pattern, int flags)
{
bool global = (flags & QV4::CompiledData::RegExp::RegExp_Global);
- bool ignoreCase = false;
- bool multiline = false;
- if (flags & QV4::CompiledData::RegExp::RegExp_IgnoreCase)
- ignoreCase = true;
- if (flags & QV4::CompiledData::RegExp::RegExp_Multiline)
- multiline = true;
+ bool ignoreCase = (flags & QV4::CompiledData::RegExp::RegExp_IgnoreCase);
+ bool multiline = (flags & QV4::CompiledData::RegExp::RegExp_Multiline);
Scope scope(this);
- Scoped<RegExp> re(scope, RegExp::create(this, pattern, ignoreCase, multiline));
- return newRegExpObject(re, global);
+ Scoped<RegExp> re(scope, RegExp::create(this, pattern, ignoreCase, multiline, global));
+ return newRegExpObject(re);
}
-Heap::RegExpObject *ExecutionEngine::newRegExpObject(RegExp *re, bool global)
+Heap::RegExpObject *ExecutionEngine::newRegExpObject(RegExp *re)
{
- return memoryManager->allocObject<RegExpObject>(re, global);
+ return memoryManager->allocObject<RegExpObject>(re);
}
Heap::RegExpObject *ExecutionEngine::newRegExpObject(const QRegExp &re)