From a8b3536d6e5e7eb1c51fb20df071185dbce317a2 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 8 May 2019 13:29:50 +0200 Subject: Move compileModule() into qv4codegen.cpp This is a better fit for the method. In turn, remove all the V4_BOOTSTRAP conditions from qv4engine_p.h and make sure we don't include or compile it in bootstrap mode. Change-Id: I5933b0724e561313ca20c420b83e4d70e63bddf5 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4codegen_p.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/qml/compiler/qv4codegen_p.h') diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index ad86483132..ece76e4406 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -52,6 +52,7 @@ #include "private/qv4global_p.h" #include +#include #include #include #include @@ -59,6 +60,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE using namespace QQmlJS; @@ -683,6 +686,9 @@ public: QQmlRefPointer generateCompilationUnit(bool generateUnitData = true); static QQmlRefPointer createUnitForLoading(); + static QQmlRefPointer compileModule( + bool debugMode, const QString &url, const QString &sourceCode, + const QDateTime &sourceTimeStamp, QList *diagnostics); Context *currentContext() const { return _context; } BytecodeGenerator *generator() const { return bytecodeGenerator; } -- cgit v1.2.3 From 6ac109398d954d12e14067f5ba30bb6576863121 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 9 May 2019 15:48:09 +0200 Subject: Make sure we don't include qv4stackframe_p.h in qmldevtools The only thing we need is CallData, which is now provided as separate file. Change-Id: Iccbab67ac30d09077075b200f18d1d694f3ecb2a Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4codegen_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/compiler/qv4codegen_p.h') diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index ece76e4406..962ccc8562 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include -- cgit v1.2.3 From 7f7d87c68da4cb29b2b2b9c324c6863228da0c26 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 7 May 2019 12:47:33 +0200 Subject: Split CompiledData::CompilationUnit in two We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4codegen_p.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/qml/compiler/qv4codegen_p.h') diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index 962ccc8562..8cf56b6cb7 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -684,9 +684,8 @@ public: Reference referenceForName(const QString &name, bool lhs, const QQmlJS::AST::SourceLocation &accessLocation = QQmlJS::AST::SourceLocation()); - QQmlRefPointer generateCompilationUnit(bool generateUnitData = true); - static QQmlRefPointer createUnitForLoading(); - static QQmlRefPointer compileModule( + QV4::CompiledData::CompilationUnit generateCompilationUnit(bool generateUnitData = true); + static QV4::CompiledData::CompilationUnit compileModule( bool debugMode, const QString &url, const QString &sourceCode, const QDateTime &sourceTimeStamp, QList *diagnostics); -- cgit v1.2.3 From 510378d180cdaa85be47e7e3af6844d20e772037 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 6 May 2019 13:50:06 +0200 Subject: Remove QUrl-related special casing in the compiler QUrl is being added to the bootstrap set. Change-Id: Ia96bbcf6e0ef808435ecddfa114fdcd213361bbf Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4codegen_p.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/qml/compiler/qv4codegen_p.h') diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index 8cf56b6cb7..e519da0142 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -662,9 +662,7 @@ protected: public: QList errors() const; -#ifndef V4_BOOTSTRAP QList qmlErrors() const; -#endif Reference binopHelper(QSOperator::Op oper, Reference &left, Reference &right); Reference jumpBinop(QSOperator::Op oper, Reference &left, Reference &right); -- cgit v1.2.3