aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf17
-rw-r--r--src/qml/jsruntime/jsruntime.pri2
-rw-r--r--src/qml/jsruntime/qv4script.cpp29
-rw-r--r--tools/qmljs/qmljs.pro2
4 files changed, 4 insertions, 46 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 10a0930287..b0bc49d477 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -4,20 +4,3 @@ CONFIG += warning_clean
MODULE_VERSION = 5.2.0
-# For the JS engine we need to be able to produce back traces,
-# and as we're using the C stack, we need the system to be able
-# to walk it properly. Unfortunately on Windows with i386 there
-# are no unwind tables, that can compensate for an omitted frame
-# pointer, so we have no choice but to disable the frame pointer
-# omission optimizations.
-# Only within the qtdeclarative module we support throwing V4
-# exceptions, hence the choice of applying this change here.
-win32:equals(QT_ARCH, "i386") {
- *msvc*: QMAKE_CXXFLAGS += -Oy-
- *g++*: QMAKE_CXXFLAGS += -fno-omit-frame-pointer
-}
-
-# Any code within this module has access to the private V4 API and
-# can therefore be subject to exception traversal. Support for exceptions
-# is therefore required, especially with older toolchains.
-CONFIG += exceptions
diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri
index 883205e92e..1809aa49e5 100644
--- a/src/qml/jsruntime/jsruntime.pri
+++ b/src/qml/jsruntime/jsruntime.pri
@@ -1,5 +1,3 @@
-CONFIG += exceptions
-
CONFIG += warn_off
INCLUDEPATH += $$PWD
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index a2d89a3278..6e2c26edaf 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -286,27 +286,6 @@ Function *Script::function()
return vmFunction;
}
-struct PrecompilingCodeGen : public QQmlJS::Codegen
-{
- struct CompileError {};
-
- PrecompilingCodeGen(bool strict)
- : QQmlJS::Codegen(strict)
- {}
-
- virtual void throwSyntaxError(const QQmlJS::AST::SourceLocation &loc, const QString &detail)
- {
- QQmlJS::Codegen::throwSyntaxError(loc, detail);
- throw CompileError();
- }
-
- virtual void throwReferenceError(const QQmlJS::AST::SourceLocation &loc, const QString &detail)
- {
- QQmlJS::Codegen::throwReferenceError(loc, detail);
- throw CompileError();
- }
-};
-
CompiledData::CompilationUnit *Script::precompile(ExecutionEngine *engine, const QUrl &url, const QString &source, bool parseAsBinding, QList<QQmlError> *reportedErrors)
{
using namespace QQmlJS;
@@ -350,10 +329,10 @@ CompiledData::CompilationUnit *Script::precompile(ExecutionEngine *engine, const
return 0;
}
- PrecompilingCodeGen cg(/*strict mode*/false);
- try {
- cg.generateFromProgram(url.toString(), source, program, &module, parseAsBinding ? QQmlJS::Codegen::QmlBinding : QQmlJS::Codegen::GlobalCode);
- } catch (const PrecompilingCodeGen::CompileError &) {
+ QQmlJS::Codegen cg(/*strict mode*/false);
+ cg.generateFromProgram(url.toString(), source, program, &module, parseAsBinding ? QQmlJS::Codegen::QmlBinding : QQmlJS::Codegen::GlobalCode);
+ errors = cg.errors();
+ if (!errors.isEmpty()) {
if (reportedErrors)
*reportedErrors << cg.errors();
return 0;
diff --git a/tools/qmljs/qmljs.pro b/tools/qmljs/qmljs.pro
index c67bb9caaf..3f984951f3 100644
--- a/tools/qmljs/qmljs.pro
+++ b/tools/qmljs/qmljs.pro
@@ -4,6 +4,4 @@ SOURCES = main.cpp
include($$PWD/../../src/3rdparty/masm/masm-defs.pri)
-CONFIG += exceptions
-
load(qt_tool)