aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-12-14 19:01:23 +0100
committerLiang Qi <liang.qi@qt.io>2016-12-14 19:01:23 +0100
commit0e80d28aa5892d6bbb4d0017b1bc9a33489f4176 (patch)
tree0db2e10c8776d172bccaeaa7ee1fab3934b93073 /src/qml
parented32558d6280cae40578f735fd326327d571d993 (diff)
parent16c81bb0d493af00bc376784bcb7e03a4a037b04 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp10
-rw-r--r--src/qml/compiler/qqmlpropertycachecreator_p.h56
-rw-r--r--src/qml/compiler/qqmlpropertyvalidator.cpp4
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp12
-rw-r--r--src/qml/compiler/qv4compileddata.cpp2
-rw-r--r--src/qml/compiler/qv4compileddata_p.h16
-rw-r--r--src/qml/compiler/qv4ssa.cpp15
-rw-r--r--src/qml/debugger/qqmldebugconnector.cpp5
-rw-r--r--src/qml/debugger/qqmlmemoryprofiler.cpp4
-rw-r--r--src/qml/debugger/qqmlprofiler_p.h9
-rw-r--r--src/qml/doc/src/javascript/resources.qdoc8
-rw-r--r--src/qml/jit/qv4isel_masm.cpp49
-rw-r--r--src/qml/jsapi/qjsvalue.cpp16
-rw-r--r--src/qml/jsruntime/jsruntime.pri3
-rw-r--r--src/qml/jsruntime/qv4argumentsobject.cpp19
-rw-r--r--src/qml/jsruntime/qv4argumentsobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4context.cpp169
-rw-r--r--src/qml/jsruntime/qv4context_p.h47
-rw-r--r--src/qml/jsruntime/qv4context_p_p.h83
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp11
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4engine.cpp63
-rw-r--r--src/qml/jsruntime/qv4engine_p.h29
-rw-r--r--src/qml/jsruntime/qv4errorobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4function.cpp4
-rw-r--r--src/qml/jsruntime/qv4function_p.h18
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp262
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h38
-rw-r--r--src/qml/jsruntime/qv4global_p.h6
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp5
-rw-r--r--src/qml/jsruntime/qv4include.cpp1
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp14
-rw-r--r--src/qml/jsruntime/qv4lookup.cpp178
-rw-r--r--src/qml/jsruntime/qv4managed_p.h18
-rw-r--r--src/qml/jsruntime/qv4memberdata.cpp30
-rw-r--r--src/qml/jsruntime/qv4memberdata_p.h3
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4object.cpp11
-rw-r--r--src/qml/jsruntime/qv4object_p.h4
-rw-r--r--src/qml/jsruntime/qv4objectiterator.cpp19
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp16
-rw-r--r--src/qml/jsruntime/qv4profiling_p.h2
-rw-r--r--src/qml/jsruntime/qv4property_p.h4
-rw-r--r--src/qml/jsruntime/qv4qmlcontext.cpp (renamed from src/qml/qml/qqmlcontextwrapper.cpp)71
-rw-r--r--src/qml/jsruntime/qv4qmlcontext_p.h (renamed from src/qml/qml/qqmlcontextwrapper_p.h)37
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp9
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper_p.h17
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp12
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp217
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h3
-rw-r--r--src/qml/jsruntime/qv4runtimeapi_p.h5
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h48
-rw-r--r--src/qml/jsruntime/qv4script.cpp76
-rw-r--r--src/qml/jsruntime/qv4script_p.h3
-rw-r--r--src/qml/jsruntime/qv4string_p.h2
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp12
-rw-r--r--src/qml/jsruntime/qv4value.cpp52
-rw-r--r--src/qml/jsruntime/qv4value_p.h83
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp6
-rw-r--r--src/qml/memory/qv4mm.cpp16
-rw-r--r--src/qml/parser/qqmljs.g60
-rw-r--r--src/qml/parser/qqmljsast_p.h12
-rw-r--r--src/qml/parser/qqmljsgrammar.cpp1804
-rw-r--r--src/qml/parser/qqmljsgrammar_p.h12
-rw-r--r--src/qml/parser/qqmljsmemorypool_p.h5
-rw-r--r--src/qml/parser/qqmljsparser.cpp446
-rw-r--r--src/qml/parser/qqmljsparser_p.h4
-rw-r--r--src/qml/qml/qml.pri3
-rw-r--r--src/qml/qml/qqmlapplicationengine.cpp6
-rw-r--r--src/qml/qml/qqmlapplicationengine_p.h2
-rw-r--r--src/qml/qml/qqmlbinding.cpp73
-rw-r--r--src/qml/qml/qqmlbinding_p.h10
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp68
-rw-r--r--src/qml/qml/qqmlboundsignal_p.h6
-rw-r--r--src/qml/qml/qqmldelayedcallqueue.cpp1
-rw-r--r--src/qml/qml/qqmlerror.cpp2
-rw-r--r--src/qml/qml/qqmlexpression.cpp4
-rw-r--r--src/qml/qml/qqmlglobal.cpp2
-rw-r--r--src/qml/qml/qqmlglobal_p.h2
-rw-r--r--src/qml/qml/qqmlimport.cpp14
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp59
-rw-r--r--src/qml/qml/qqmljavascriptexpression_p.h13
-rw-r--r--src/qml/qml/qqmllocale.cpp64
-rw-r--r--src/qml/qml/qqmlmetatype.cpp2
-rw-r--r--src/qml/qml/qqmlnotifier.cpp6
-rw-r--r--src/qml/qml/qqmlnotifier_p.h2
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp25
-rw-r--r--src/qml/qml/qqmlproperty_p.h16
-rw-r--r--src/qml/qml/qqmlstringconverters.cpp12
-rw-r--r--src/qml/qml/qqmlstringconverters_p.h2
-rw-r--r--src/qml/qml/qqmltypeloader.cpp3
-rw-r--r--src/qml/qml/qqmltypewrapper.cpp1
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp7
-rw-r--r--src/qml/qml/qqmlvme.cpp1
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp6
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp11
-rw-r--r--src/qml/qml/qqmlxmlhttprequest_p.h4
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp37
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions_p.h18
-rw-r--r--src/qml/qml/v8/qv8engine.cpp5
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp23
-rw-r--r--src/qml/types/qqmldelegatemodel_p_p.h3
-rw-r--r--src/qml/types/qqmllistmodel.cpp48
-rw-r--r--src/qml/types/qqmllistmodel_p_p.h2
-rw-r--r--src/qml/types/qquickworkerscript.cpp16
105 files changed, 2364 insertions, 2498 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index e66e8ccbff..54d0cb4f46 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -758,7 +758,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node)
QQmlJS::AST::UiParameterList *p = node->parameters;
while (p) {
- const QStringRef &memberType = p->type;
+ const QString memberType = asString(p->type);
if (memberType.isEmpty()) {
recordError(node->typeToken, QCoreApplication::translate("QQmlParser","Expected parameter type"));
@@ -781,10 +781,10 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node)
// Must be a QML object type.
// Lazily determine type during compilation.
param->type = QV4::CompiledData::Property::Custom;
- param->customTypeNameIndex = registerString(p->type.toString());
+ param->customTypeNameIndex = registerString(memberType);
} else {
QString errStr = QCoreApplication::translate("QQmlParser","Invalid signal parameter type: ");
- errStr.append(memberType.toString());
+ errStr.append(memberType);
recordError(node->typeToken, errStr);
return false;
}
@@ -813,7 +813,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node)
return false;
}
} else {
- const QStringRef &memberType = node->memberType;
+ QString memberType = asString(node->memberType);
if (memberType == QLatin1String("alias")) {
return appendAlias(node);
} else {
@@ -858,7 +858,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node)
property->flags |= QV4::CompiledData::Property::IsReadOnly;
property->type = type;
if (type >= QV4::CompiledData::Property::Custom)
- property->customTypeNameIndex = registerString(memberType.toString());
+ property->customTypeNameIndex = registerString(memberType);
else
property->customTypeNameIndex = emptyStringIndex;
diff --git a/src/qml/compiler/qqmlpropertycachecreator_p.h b/src/qml/compiler/qqmlpropertycachecreator_p.h
index 10bcd1dbc1..3c14abc019 100644
--- a/src/qml/compiler/qqmlpropertycachecreator_p.h
+++ b/src/qml/compiler/qqmlpropertycachecreator_p.h
@@ -118,7 +118,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::buildMetaObje
bool needVMEMetaObject = obj->propertyCount() != 0 || obj->aliasCount() != 0 || obj->signalCount() != 0 || obj->functionCount() != 0;
if (!needVMEMetaObject) {
- for (auto binding = obj->bindingsBegin(), end = obj->bindingsEnd(); binding != end; ++binding) {
+ auto binding = obj->bindingsBegin();
+ auto end = obj->bindingsEnd();
+ for ( ; binding != end; ++binding) {
if (binding->type == QV4::CompiledData::Binding::Type_Object && (binding->flags & QV4::CompiledData::Binding::IsOnAssignment)) {
// If the on assignment is inside a group property, we need to distinguish between QObject based
// group properties and value type group properties. For the former the base type is derived from
@@ -162,7 +164,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::buildMetaObje
}
if (QQmlPropertyCache *thisCache = propertyCaches->at(objectIndex)) {
- for (auto binding = obj->bindingsBegin(), end = obj->bindingsEnd(); binding != end; ++binding)
+ auto binding = obj->bindingsBegin();
+ auto end = obj->bindingsEnd();
+ for ( ; binding != end; ++binding)
if (binding->type >= QV4::CompiledData::Binding::Type_Object) {
QQmlBindingInstantiationContext context(objectIndex, &(*binding), stringAt(binding->propertyNameIndex), thisCache);
QQmlCompileError error = buildMetaObjectRecursively(binding->value.objectIndex, context);
@@ -296,7 +300,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
QmlIR::PropertyResolver resolver(baseTypeCache);
- for (auto p = obj->propertiesBegin(), end = obj->propertiesEnd(); p != end; ++p) {
+ auto p = obj->propertiesBegin();
+ auto pend = obj->propertiesEnd();
+ for ( ; p != pend; ++p) {
if (p->type == QV4::CompiledData::Property::Var)
varPropCount++;
@@ -306,7 +312,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
return QQmlCompileError(p->location, QQmlPropertyCacheCreatorBase::tr("Cannot override FINAL property"));
}
- for (auto a = obj->aliasesBegin(), end = obj->aliasesEnd(); a != end; ++a) {
+ auto a = obj->aliasesBegin();
+ auto aend = obj->aliasesEnd();
+ for ( ; a != aend; ++a) {
bool notInRevision = false;
QQmlPropertyData *d = resolver.property(stringAt(a->nameIndex), &notInRevision);
if (d && d->isFinal())
@@ -340,7 +348,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
}
// Set up notify signals for properties - first normal, then alias
- for (auto p = obj->propertiesBegin(), end = obj->propertiesEnd(); p != end; ++p) {
+ p = obj->propertiesBegin();
+ pend = obj->propertiesEnd();
+ for ( ; p != pend; ++p) {
auto flags = QQmlPropertyData::defaultSignalFlags();
QString changedSigName = stringAt(p->nameIndex) + QLatin1String("Changed");
@@ -349,7 +359,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
cache->appendSignal(changedSigName, flags, effectiveMethodIndex++);
}
- for (auto a = obj->aliasesBegin(), end = obj->aliasesEnd(); a != end; ++a) {
+ a = obj->aliasesBegin();
+ aend = obj->aliasesEnd();
+ for ( ; a != aend; ++a) {
auto flags = QQmlPropertyData::defaultSignalFlags();
QString changedSigName = stringAt(a->nameIndex) + QLatin1String("Changed");
@@ -359,7 +371,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
}
// Dynamic signals
- for (auto s = obj->signalsBegin(), end = obj->signalsEnd(); s != end; ++s) {
+ auto s = obj->signalsBegin();
+ auto send = obj->signalsEnd();
+ for ( ; s != send; ++s) {
const int paramCount = s->parameterCount();
QList<QByteArray> names;
@@ -370,7 +384,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
paramTypes[0] = paramCount;
int i = 0;
- for (auto param = s->parametersBegin(), end = s->parametersEnd(); param != end; ++param, ++i) {
+ auto param = s->parametersBegin();
+ auto end = s->parametersEnd();
+ for ( ; param != end; ++param, ++i) {
names.append(stringAt(param->nameIndex).toUtf8());
if (param->type < builtinTypeCount) {
// built-in type
@@ -415,7 +431,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
// Dynamic slots
- for (auto function = objectContainer->objectFunctionsBegin(obj), end = objectContainer->objectFunctionsEnd(obj); function != end; ++function) {
+ auto function = objectContainer->objectFunctionsBegin(obj);
+ auto fend = objectContainer->objectFunctionsEnd(obj);
+ for ( ; function != fend; ++function) {
auto flags = QQmlPropertyData::defaultSlotFlags();
const QString slotName = stringAt(function->nameIndex);
@@ -425,7 +443,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
// protect against overriding change signals or methods with properties.
QList<QByteArray> parameterNames;
- for (auto formal = function->formalsBegin(), end = function->formalsEnd(); formal != end; ++formal) {
+ auto formal = function->formalsBegin();
+ auto end = function->formalsEnd();
+ for ( ; formal != end; ++formal) {
flags.hasArguments = true;
parameterNames << stringAt(*formal).toUtf8();
}
@@ -437,7 +457,9 @@ inline QQmlCompileError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObj
// Dynamic properties
int effectiveSignalIndex = cache->signalHandlerIndexCacheStart;
int propertyIdx = 0;
- for (auto p = obj->propertiesBegin(), end = obj->propertiesEnd(); p != end; ++p, ++propertyIdx) {
+ p = obj->propertiesBegin();
+ pend = obj->propertiesEnd();
+ for ( ; p != pend; ++p, ++propertyIdx) {
int propertyType = 0;
QQmlPropertyData::Flags propertyFlags;
@@ -561,7 +583,9 @@ inline void QQmlPropertyCacheAliasCreator<ObjectContainer>::appendAliasPropertie
return;
const auto allAliasTargetsExist = [this, &component](const CompiledObject &object) {
- for (auto alias = object.aliasesBegin(), end = object.aliasesEnd(); alias != end; ++alias) {
+ auto alias = object.aliasesBegin();
+ auto end = object.aliasesEnd();
+ for ( ; alias != end; ++alias) {
Q_ASSERT(alias->flags & QV4::CompiledData::Alias::Resolved);
const int targetObjectIndex = objectForId(component, alias->targetObjectId);
@@ -612,7 +636,9 @@ inline void QQmlPropertyCacheAliasCreator<ObjectContainer>::collectObjectsWithAl
if (object.flags & QV4::CompiledData::Object::IsComponent && objectIndex != objectContainer->rootObjectIndex())
return;
- for (auto binding = object.bindingsBegin(), end = object.bindingsEnd(); binding != end; ++binding) {
+ auto binding = object.bindingsBegin();
+ auto end = object.bindingsEnd();
+ for (; binding != end; ++binding) {
if (binding->type != QV4::CompiledData::Binding::Type_Object
&& binding->type != QV4::CompiledData::Binding::Type_AttachedProperty
&& binding->type != QV4::CompiledData::Binding::Type_GroupProperty)
@@ -707,7 +733,9 @@ inline void QQmlPropertyCacheAliasCreator<ObjectContainer>::appendAliasesToPrope
int effectivePropertyIndex = propertyCache->propertyIndexCacheStart + propertyCache->propertyIndexCache.count();
int aliasIndex = 0;
- for (auto alias = object.aliasesBegin(), end = object.aliasesEnd(); alias != end; ++alias, ++aliasIndex) {
+ auto alias = object.aliasesBegin();
+ auto end = object.aliasesEnd();
+ for ( ; alias != end; ++alias, ++aliasIndex) {
Q_ASSERT(alias->flags & QV4::CompiledData::Alias::Resolved);
int type = 0;
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp
index 45379d5155..383c20239f 100644
--- a/src/qml/compiler/qqmlpropertyvalidator.cpp
+++ b/src/qml/compiler/qqmlpropertyvalidator.cpp
@@ -412,7 +412,7 @@ QQmlCompileError QQmlPropertyValidator::validateLiteralBinding(QQmlPropertyCache
}
}
break;
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
case QVariant::Date: {
bool ok = false;
QQmlStringConverters::dateFromString(binding->valueAsString(qmlUnit), &ok);
@@ -437,7 +437,7 @@ QQmlCompileError QQmlPropertyValidator::validateLiteralBinding(QQmlPropertyCache
}
}
break;
-#endif // QT_NO_DATESTRING
+#endif // datestring
case QVariant::Point: {
bool ok = false;
QQmlStringConverters::pointFFromString(binding->valueAsString(qmlUnit), &ok);
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index 5e05485b93..ab2b0553a9 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -1570,19 +1570,15 @@ bool QQmlJavaScriptBindingExpressionSimplificationPass::simplifyBinding(QV4::IR:
if (!_canSimplify)
return false;
}
- if (!_canSimplify)
- return false;
}
if (_returnValueOfBindingExpression == -1)
return false;
- if (_canSimplify) {
- if (_nameOfFunctionCalled) {
- if (_functionCallReturnValue != _returnValueOfBindingExpression)
- return false;
- return detectTranslationCallAndConvertBinding(binding);
- }
+ if (_nameOfFunctionCalled) {
+ if (_functionCallReturnValue != _returnValueOfBindingExpression)
+ return false;
+ return detectTranslationCallAndConvertBinding(binding);
}
return false;
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index f8668b48e4..8586c84c3d 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -471,7 +471,7 @@ QString Binding::valueAsString(const Unit *unit) const
return QString::number(valueAsNumber());
case Type_Invalid:
return QString();
-#ifdef QT_NO_TRANSLATION
+#if !QT_CONFIG(translation)
case Type_TranslationById:
case Type_Translation:
return unit->stringAt(stringIndex);
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index 90cbe04505..2682365182 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -71,7 +71,7 @@
QT_BEGIN_NAMESPACE
// Bump this whenever the compiler data structures change in an incompatible way.
-#define QV4_DATA_STRUCTURE_VERSION 0x07
+#define QV4_DATA_STRUCTURE_VERSION 0x08
class QIODevice;
class QQmlPropertyCache;
@@ -207,9 +207,9 @@ struct String
struct Function
{
enum Flags : unsigned int {
- HasDirectEval = 0x1,
- UsesArgumentsObject = 0x2,
- IsStrict = 0x4,
+ IsStrict = 0x1,
+ HasDirectEval = 0x2,
+ UsesArgumentsObject = 0x4,
IsNamedExpression = 0x8,
HasCatchOrWith = 0x10
};
@@ -749,7 +749,9 @@ struct TypeReferenceMap : QHash<int, TypeReference>
r.errorWhenNotFound = true;
}
- for (auto prop = obj->propertiesBegin(), propEnd = obj->propertiesEnd(); prop != propEnd; ++prop) {
+ auto prop = obj->propertiesBegin();
+ auto propEnd = obj->propertiesEnd();
+ for ( ; prop != propEnd; ++prop) {
if (prop->type >= QV4::CompiledData::Property::Custom) {
// ### FIXME: We could report the more accurate location here by using prop->location, but the old
// compiler can't and the tests expect it to be the object location right now.
@@ -758,7 +760,9 @@ struct TypeReferenceMap : QHash<int, TypeReference>
}
}
- for (auto binding = obj->bindingsBegin(), bindingEnd = obj->bindingsEnd(); binding != bindingEnd; ++binding) {
+ auto binding = obj->bindingsBegin();
+ auto bindingEnd = obj->bindingsEnd();
+ for ( ; binding != bindingEnd; ++binding) {
if (binding->type == QV4::CompiledData::Binding::Type_AttachedProperty)
this->add(binding->propertyNameIndex, binding->location);
}
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 46de24c264..943700de44 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -1838,11 +1838,6 @@ public:
return *this;
}
- bool isEmpty() const
- {
- return worklistSize == 0;
- }
-
unsigned size() const
{
return worklistSize;
@@ -1850,7 +1845,7 @@ public:
Stmt *takeNext(Stmt *last)
{
- if (isEmpty())
+ if (worklistSize == 0)
return 0;
const int startAt = last ? last->id() + 1 : 0;
@@ -1866,6 +1861,10 @@ public:
--worklistSize;
Stmt *s = stmts.at(pos);
Q_ASSERT(s);
+
+ if (removed.at(s->id()))
+ return takeNext(s);
+
return s;
}
@@ -3992,9 +3991,7 @@ void optimizeSSA(StatementWorklist &W, DefUses &defUses, DominatorTree &df)
ExprReplacer replaceUses(defUses, function);
Stmt *s = 0;
- while (!W.isEmpty()) {
- s = W.takeNext(s);
- Q_ASSERT(s);
+ while ((s = W.takeNext(s))) {
if (Phi *phi = s->asPhi()) {
// dead code elimination:
diff --git a/src/qml/debugger/qqmldebugconnector.cpp b/src/qml/debugger/qqmldebugconnector.cpp
index 3adf335ffd..8a16d56c45 100644
--- a/src/qml/debugger/qqmldebugconnector.cpp
+++ b/src/qml/debugger/qqmldebugconnector.cpp
@@ -164,7 +164,10 @@ QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory()
{
// This is triggered when the plugin is unloaded.
QQmlDebugConnectorParams *params = qmlDebugConnectorParams();
- if (params && params->instance) {
+ if (params) {
+ params->pluginKey.clear();
+ params->arguments.clear();
+ params->services.clear();
delete params->instance;
params->instance = 0;
}
diff --git a/src/qml/debugger/qqmlmemoryprofiler.cpp b/src/qml/debugger/qqmlmemoryprofiler.cpp
index 53d4e7ab21..b89dbfd02d 100644
--- a/src/qml/debugger/qqmlmemoryprofiler.cpp
+++ b/src/qml/debugger/qqmlmemoryprofiler.cpp
@@ -62,13 +62,13 @@ static qmlmemprofile_pop_location *memprofile_pop_location;
static qmlmemprofile_save *memprofile_save;
static qmlmemprofile_is_enabled *memprofile_is_enabled;
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
extern QFunctionPointer qt_linux_find_symbol_sys(const char *symbol);
#endif
bool QQmlMemoryScope::doOpenLibrary()
{
-#if defined(Q_OS_LINUX) && !defined(QT_NO_LIBRARY)
+#if defined(Q_OS_LINUX) && QT_CONFIG(library)
if (state == Unloaded) {
memprofile_stats = (qmlmemprofile_stats *) qt_linux_find_symbol_sys("qmlmemprofile_stats");
memprofile_clear = (qmlmemprofile_clear *) qt_linux_find_symbol_sys("qmlmemprofile_clear");
diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h
index 6643695d11..242f26ee0d 100644
--- a/src/qml/debugger/qqmlprofiler_p.h
+++ b/src/qml/debugger/qqmlprofiler_p.h
@@ -204,6 +204,11 @@ public:
ref(new BindingRefCount(binding), QQmlRefPointer<QQmlRefCount>::Adopt), sent(false)
{}
+ RefLocation(QQmlBinding *binding, QV4::Function *function) :
+ Location(function->sourceLocation()), locationType(Binding),
+ ref(new BindingRefCount(binding), QQmlRefPointer<QQmlRefCount>::Adopt), sent(false)
+ {}
+
RefLocation(QV4::CompiledData::CompilationUnit *ref, const QUrl &url, const QV4::CompiledData::Object *obj,
const QString &type) :
Location(QQmlSourceLocation(type, obj->location.line, obj->location.column), url),
@@ -231,7 +236,7 @@ public:
typedef QHash<quintptr, Location> LocationHash;
- void startBinding(QQmlBinding *binding, QV4::FunctionObject *function)
+ void startBinding(QQmlBinding *binding, QV4::Function *function)
{
quintptr locationId(id(binding));
m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(),
@@ -326,7 +331,7 @@ struct QQmlProfilerHelper : public QQmlProfilerDefinitions {
struct QQmlBindingProfiler : public QQmlProfilerHelper {
QQmlBindingProfiler(QQmlProfiler *profiler, QQmlBinding *binding,
- QV4::FunctionObject *function) :
+ QV4::Function *function) :
QQmlProfilerHelper(profiler)
{
Q_QML_PROFILE(QQmlProfilerDefinitions::ProfileBinding, profiler,
diff --git a/src/qml/doc/src/javascript/resources.qdoc b/src/qml/doc/src/javascript/resources.qdoc
index b831e2ba70..4f9b40f1d7 100644
--- a/src/qml/doc/src/javascript/resources.qdoc
+++ b/src/qml/doc/src/javascript/resources.qdoc
@@ -78,13 +78,13 @@ Rectangle {
\code
// my_button_impl.js
-property var clickCount = 0; // this state is separate for each instance of MyButton
-function onClicked(btn) {
+var clickCount = 0; // this state is separate for each instance of MyButton
+function onClicked(button) {
clickCount += 1;
if ((clickCount % 5) == 0) {
- obj.color = Qt.rgba(1,0,0,1);
+ button.color = Qt.rgba(1,0,0,1);
} else {
- obj.color = Qt.rgba(0,1,0,1);
+ button.color = Qt.rgba(0,1,0,1);
}
}
\endcode
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 515b8aea4d..c5d612ae65 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -69,13 +69,6 @@ using namespace QV4::JIT;
namespace {
-inline bool isPregOrConst(IR::Expr *e)
-{
- if (IR::Temp *t = e->asTemp())
- return t->kind == IR::Temp::PhysicalRegister;
- return e->asConst() != 0;
-}
-
class QIODevicePrintStream: public FilePrintStream
{
Q_DISABLE_COPY(QIODevicePrintStream)
@@ -1164,11 +1157,41 @@ void InstructionSelection::convertTypeToBool(IR::Expr *source, IR::Expr *target)
_as->storeBool(false, target);
break;
case IR::StringType:
+ generateRuntimeCall(Assembler::ReturnValueRegister, toBoolean,
+ Assembler::PointerToValue(source));
+ _as->storeBool(Assembler::ReturnValueRegister, target);
case IR::VarType:
default:
+ Assembler::Pointer addr = _as->loadAddress(Assembler::ScratchRegister, source);
+ Assembler::Pointer tagAddr = addr;
+ tagAddr.offset += 4;
+ _as->load32(tagAddr, Assembler::ReturnValueRegister);
+
+ // checkif it's a bool:
+ Assembler::Jump notBool = _as->branch32(Assembler::NotEqual, Assembler::ReturnValueRegister,
+ Assembler::TrustedImm32(Value::Boolean_Type_Internal));
+ _as->load32(addr, Assembler::ReturnValueRegister);
+ Assembler::Jump boolDone = _as->jump();
+ // check if it's an int32:
+ notBool.link(_as);
+ Assembler::Jump fallback = _as->branch32(Assembler::NotEqual, Assembler::ReturnValueRegister,
+ Assembler::TrustedImm32(Value::Integer_Type_Internal));
+ _as->load32(addr, Assembler::ReturnValueRegister);
+ Assembler::Jump isZero = _as->branch32(Assembler::Equal, Assembler::ReturnValueRegister,
+ Assembler::TrustedImm32(0));
+ _as->move(Assembler::TrustedImm32(1), Assembler::ReturnValueRegister);
+ Assembler::Jump intDone = _as->jump();
+
+ // not an int:
+ fallback.link(_as);
generateRuntimeCall(Assembler::ReturnValueRegister, toBoolean,
- Assembler::PointerToValue(source));
+ Assembler::PointerToValue(source));
+
+ isZero.link(_as);
+ intDone.link(_as);
+ boolDone.link(_as);
_as->storeBool(Assembler::ReturnValueRegister, target);
+
break;
}
}
@@ -1713,9 +1736,6 @@ QT_END_NAMESPACE
bool InstructionSelection::visitCJumpDouble(IR::AluOp op, IR::Expr *left, IR::Expr *right,
IR::BasicBlock *iftrue, IR::BasicBlock *iffalse)
{
- if (!isPregOrConst(left) || !isPregOrConst(right))
- return false;
-
if (_as->nextBlock() == iftrue) {
Assembler::Jump target = _as->branchDouble(true, op, left, right);
_as->addPatch(iffalse, target);
@@ -1730,9 +1750,6 @@ bool InstructionSelection::visitCJumpDouble(IR::AluOp op, IR::Expr *left, IR::Ex
bool InstructionSelection::visitCJumpSInt32(IR::AluOp op, IR::Expr *left, IR::Expr *right,
IR::BasicBlock *iftrue, IR::BasicBlock *iffalse)
{
- if (!isPregOrConst(left) || !isPregOrConst(right))
- return false;
-
if (_as->nextBlock() == iftrue) {
Assembler::Jump target = _as->branchInt32(true, op, left, right);
_as->addPatch(iffalse, target);
@@ -1831,7 +1848,7 @@ bool InstructionSelection::visitCJumpStrictUndefined(IR::Binop *binop,
Assembler::RelationalCondition cond = binop->op == IR::OpStrictEqual ? Assembler::Equal
: Assembler::NotEqual;
- const Assembler::RegisterID tagReg = Assembler::ScratchRegister;
+ const Assembler::RegisterID tagReg = Assembler::ReturnValueRegister;
#ifdef QV4_USE_64_BIT_VALUE_ENCODING
Assembler::Pointer addr = _as->loadAddress(Assembler::ScratchRegister, varSrc);
_as->load64(addr, tagReg);
@@ -1930,7 +1947,7 @@ bool InstructionSelection::visitCJumpNullUndefined(IR::Type nullOrUndef, IR::Bin
Assembler::Pointer tagAddr = _as->loadAddress(Assembler::ScratchRegister, varSrc);
tagAddr.offset += 4;
- const Assembler::RegisterID tagReg = Assembler::ScratchRegister;
+ const Assembler::RegisterID tagReg = Assembler::ReturnValueRegister;
_as->load32(tagAddr, tagReg);
if (binop->op == IR::OpNotEqual)
diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp
index a4a96a96a7..b473e96286 100644
--- a/src/qml/jsapi/qjsvalue.cpp
+++ b/src/qml/jsapi/qjsvalue.cpp
@@ -612,8 +612,8 @@ QVariant QJSValue::toVariant() const
if (Object *o = val->as<Object>())
return o->engine()->toVariant(*val, /*typeHint*/ -1, /*createJSValueForObjects*/ false);
- if (val->isString())
- return QVariant(val->stringValue()->toQString());
+ if (String *s = val->stringValue())
+ return QVariant(s->toQString());
if (val->isBoolean())
return QVariant(val->booleanValue());
if (val->isNumber()) {
@@ -885,14 +885,14 @@ QJSValue& QJSValue::operator=(const QJSValue& other)
static bool js_equal(const QString &string, const QV4::Value &value)
{
- if (value.isString())
- return string == value.stringValue()->toQString();
+ if (String *s = value.stringValue())
+ return string == s->toQString();
if (value.isNumber())
return RuntimeHelpers::stringToNumber(string) == value.asDouble();
if (value.isBoolean())
return RuntimeHelpers::stringToNumber(string) == double(value.booleanValue());
- if (value.isObject()) {
- Scope scope(value.objectValue()->engine());
+ if (Object *o = value.objectValue()) {
+ Scope scope(o->engine());
ScopedValue p(scope, RuntimeHelpers::toPrimitive(value, PREFERREDTYPE_HINT));
return js_equal(string, p);
}
@@ -979,8 +979,8 @@ bool QJSValue::strictlyEquals(const QJSValue& other) const
return *variant == *QJSValuePrivate::getVariant(&other);
if (variant->type() == QVariant::Map || variant->type() == QVariant::List)
return false;
- if (ov->isString())
- return variant->toString() == ov->stringValue()->toQString();
+ if (String *s = ov->stringValue())
+ return variant->toString() == s->toQString();
return false;
}
if (!ov)
diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri
index 4343924436..919524d1ed 100644
--- a/src/qml/jsruntime/jsruntime.pri
+++ b/src/qml/jsruntime/jsruntime.pri
@@ -27,6 +27,7 @@ SOURCES += \
$$PWD/qv4numberobject.cpp \
$$PWD/qv4object.cpp \
$$PWD/qv4objectproto.cpp \
+ $$PWD/qv4qmlcontext.cpp \
$$PWD/qv4regexpobject.cpp \
$$PWD/qv4stringobject.cpp \
$$PWD/qv4variantobject.cpp \
@@ -48,7 +49,6 @@ HEADERS += \
$$PWD/qv4global_p.h \
$$PWD/qv4engine_p.h \
$$PWD/qv4context_p.h \
- $$PWD/qv4context_p_p.h \
$$PWD/qv4math_p.h \
$$PWD/qv4persistent_p.h \
$$PWD/qv4debugging_p.h \
@@ -73,6 +73,7 @@ HEADERS += \
$$PWD/qv4numberobject_p.h \
$$PWD/qv4object_p.h \
$$PWD/qv4objectproto_p.h \
+ $$PWD/qv4qmlcontext_p.h \
$$PWD/qv4regexpobject_p.h \
$$PWD/qv4stringobject_p.h \
$$PWD/qv4variantobject_p.h \
diff --git a/src/qml/jsruntime/qv4argumentsobject.cpp b/src/qml/jsruntime/qv4argumentsobject.cpp
index 0dfdf25158..5a190d6690 100644
--- a/src/qml/jsruntime/qv4argumentsobject.cpp
+++ b/src/qml/jsruntime/qv4argumentsobject.cpp
@@ -39,7 +39,8 @@
#include <qv4argumentsobject_p.h>
#include <qv4alloca_p.h>
#include <qv4scopedvalue_p.h>
-#include "qv4string_p.h"
+#include <qv4string_p.h>
+#include <qv4function_p.h>
using namespace QV4;
@@ -56,8 +57,6 @@ void Heap::ArgumentsObject::init(QV4::CallContext *context)
Scope scope(v4);
Scoped<QV4::ArgumentsObject> args(scope, this);
- args->setArrayType(Heap::ArrayData::Complex);
-
if (context->d()->strictMode) {
Q_ASSERT(CalleePropertyIndex == args->internalClass()->find(context->d()->engine->id_callee()));
Q_ASSERT(CallerPropertyIndex == args->internalClass()->find(context->d()->engine->id_caller()));
@@ -83,7 +82,7 @@ void ArgumentsObject::fullyCreate()
return;
uint argCount = context()->callData->argc;
- uint numAccessors = qMin(context()->function->formalParameterCount(), argCount);
+ uint numAccessors = qMin(context()->formalParameterCount(), argCount);
ArrayData::realloc(this, Heap::ArrayData::Sparse, argCount, true);
context()->engine->requireArgumentsAccessors(numAccessors);
@@ -110,7 +109,7 @@ bool ArgumentsObject::defineOwnProperty(ExecutionEngine *engine, uint index, con
ScopedProperty map(scope);
PropertyAttributes mapAttrs;
bool isMapped = false;
- uint numAccessors = qMin((int)context()->function->formalParameterCount(), context()->callData->argc);
+ uint numAccessors = qMin((int)context()->formalParameterCount(), context()->callData->argc);
if (pd && index < (uint)numAccessors)
isMapped = arrayData()->attributes(index).isAccessor() &&
pd->getter() == context()->engine->argumentsAccessors[index].getter();
@@ -193,7 +192,7 @@ PropertyAttributes ArgumentsObject::queryIndexed(const Managed *m, uint index)
if (args->fullyCreated())
return Object::queryIndexed(m, index);
- uint numAccessors = qMin((int)args->context()->function->formalParameterCount(), args->context()->callData->argc);
+ uint numAccessors = qMin((int)args->context()->formalParameterCount(), args->context()->callData->argc);
uint argCount = args->context()->callData->argc;
if (index >= argCount)
return PropertyAttributes();
@@ -245,3 +244,11 @@ void ArgumentsObject::markObjects(Heap::Base *that, ExecutionEngine *e)
Object::markObjects(that, e);
}
+
+uint ArgumentsObject::getLength(const Managed *m)
+{
+ const ArgumentsObject *a = static_cast<const ArgumentsObject *>(m);
+ if (a->propertyData(Heap::ArgumentsObject::LengthPropertyIndex)->isInteger())
+ return a->propertyData(Heap::ArgumentsObject::LengthPropertyIndex)->integerValue();
+ return Primitive::toUInt32(a->propertyData(Heap::ArgumentsObject::LengthPropertyIndex)->doubleValue());
+}
diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h
index 37a8d0a94a..0a2ea3b42a 100644
--- a/src/qml/jsruntime/qv4argumentsobject_p.h
+++ b/src/qml/jsruntime/qv4argumentsobject_p.h
@@ -132,8 +132,10 @@ struct ArgumentsObject: Object {
static bool deleteIndexedProperty(Managed *m, uint index);
static PropertyAttributes queryIndexed(const Managed *m, uint index);
static void markObjects(Heap::Base *that, ExecutionEngine *e);
+ static uint getLength(const Managed *m);
void fullyCreate();
+
};
}
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 390a5e7d7a..544d39339b 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -39,7 +39,7 @@
#include <QString>
#include "qv4debugging_p.h"
-#include <qv4context_p_p.h>
+#include <qv4context_p.h>
#include <qv4object_p.h>
#include <qv4objectproto_p.h>
#include <private/qv4mm_p.h>
@@ -47,6 +47,9 @@
#include "qv4function_p.h"
#include "qv4errorobject_p.h"
#include "qv4string_p.h"
+#include "qv4qmlcontext_p.h"
+#include "qv4profiling_p.h"
+#include <private/qqmljavascriptexpression_p.h>
using namespace QV4;
@@ -55,29 +58,31 @@ DEFINE_MANAGED_VTABLE(CallContext);
DEFINE_MANAGED_VTABLE(WithContext);
DEFINE_MANAGED_VTABLE(CatchContext);
DEFINE_MANAGED_VTABLE(GlobalContext);
-DEFINE_MANAGED_VTABLE(QmlContext);
-Heap::CallContext *ExecutionContext::newCallContext(const FunctionObject *function, CallData *callData)
-{
- Q_ASSERT(function->function());
+/* Function *f, int argc */
+#define requiredMemoryForExecutionContect(f, argc) \
+ ((sizeof(CallContext::Data) + 7) & ~7) + \
+ sizeof(Value) * (f->compiledFunction->nLocals + qMax((uint)argc, f->nFormals)) + sizeof(CallData)
+Heap::CallContext *ExecutionContext::newCallContext(Function *function, CallData *callData)
+{
Heap::CallContext *c = d()->engine->memoryManager->allocManaged<CallContext>(
requiredMemoryForExecutionContect(function, callData->argc));
c->init(d()->engine, Heap::ExecutionContext::Type_CallContext);
- c->function = function->d();
+ c->v4Function = function;
- c->strictMode = function->strictMode();
- c->outer = function->scope();
+ c->strictMode = function->isStrict();
+ c->outer = this->d();
c->activation = 0;
- c->compilationUnit = function->function()->compilationUnit;
+ c->compilationUnit = function->compilationUnit;
c->lookups = c->compilationUnit->runtimeLookups;
c->constantTable = c->compilationUnit->constants;
c->locals = (Value *)((quintptr(c + 1) + 7) & ~7);
- const CompiledData::Function *compiledFunction = function->function()->compiledFunction;
+ const CompiledData::Function *compiledFunction = function->compiledFunction;
int nLocals = compiledFunction->nLocals;
if (nLocals)
std::fill(c->locals, c->locals + nLocals, Primitive::undefinedValue());
@@ -102,20 +107,6 @@ Heap::CatchContext *ExecutionContext::newCatchContext(Heap::String *exceptionVar
return d()->engine->memoryManager->alloc<CatchContext>(d(), exceptionVarName, e);
}
-Heap::QmlContext *ExecutionContext::newQmlContext(QmlContextWrapper *qml)
-{
- Heap::QmlContext *c = d()->engine->memoryManager->alloc<QmlContext>(this, qml);
- return c;
-}
-
-Heap::QmlContext *ExecutionContext::newQmlContext(QQmlContextData *context, QObject *scopeObject)
-{
- Scope scope(this);
- Scoped<QmlContextWrapper> qml(scope, QmlContextWrapper::qmlScope(scope.engine, context, scopeObject));
- Heap::QmlContext *c = d()->engine->memoryManager->alloc<QmlContext>(this, qml);
- return c;
-}
-
void ExecutionContext::createMutableBinding(String *name, bool deletable)
{
Scope scope(this);
@@ -182,38 +173,25 @@ void Heap::CatchContext::init(ExecutionContext *outerContext, String *exceptionV
this->exceptionValue = exceptionValue;
}
-void Heap::QmlContext::init(QV4::ExecutionContext *outerContext, QV4::QmlContextWrapper *qml)
-{
- Heap::ExecutionContext::init(outerContext->engine(), Heap::ExecutionContext::Type_QmlContext);
- outer = outerContext->d();
- strictMode = false;
- callData = outer->callData;
- lookups = outer->lookups;
- constantTable = outer->constantTable;
- compilationUnit = outer->compilationUnit;
-
- this->qml = qml->d();
-}
-
Identifier * const *CallContext::formals() const
{
- return (d()->function && d()->function->function) ? d()->function->function->internalClass->nameMap.constData() : 0;
+ return d()->v4Function ? d()->v4Function->internalClass->nameMap.constData() : 0;
}
unsigned int CallContext::formalCount() const
{
- return d()->function ? d()->function->formalParameterCount() : 0;
+ return d()->v4Function ? d()->v4Function->nFormals : 0;
}
Identifier * const *CallContext::variables() const
{
- return (d()->function && d()->function->function) ? d()->function->function->internalClass->nameMap.constData() + d()->function->formalParameterCount() : 0;
+ return d()->v4Function ? d()->v4Function->internalClass->nameMap.constData() + d()->v4Function->nFormals : 0;
}
unsigned int CallContext::variableCount() const
{
- return d()->function ? d()->function->varCount() : 0;
+ return d()->v4Function ? d()->v4Function->compiledFunction->nLocals : 0;
}
@@ -247,9 +225,8 @@ bool ExecutionContext::deleteProperty(String *name)
case Heap::ExecutionContext::Type_CallContext:
case Heap::ExecutionContext::Type_SimpleCallContext: {
Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx->d());
- ScopedFunctionObject f(scope, c->function);
- if (f->needsActivation() || hasWith) {
- uint index = f->function()->internalClass->find(name);
+ if (c->v4Function && (c->v4Function->needsActivation() || hasWith)) {
+ uint index = c->v4Function->internalClass->find(name);
if (index < UINT_MAX)
// ### throw in strict mode?
return false;
@@ -272,7 +249,8 @@ bool ExecutionContext::deleteProperty(String *name)
bool CallContext::needsOwnArguments() const
{
- return d()->function->needsActivation() || argc() < static_cast<int>(d()->function->formalParameterCount());
+ QV4::Function *f = d()->v4Function;
+ return (f && f->needsActivation()) || (argc() < (f ? static_cast<int>(f->nFormals) : 0));
}
void ExecutionContext::markObjects(Heap::Base *m, ExecutionEngine *engine)
@@ -304,14 +282,16 @@ void ExecutionContext::markObjects(Heap::Base *m, ExecutionEngine *engine)
break;
case Heap::ExecutionContext::Type_CallContext: {
QV4::Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx);
+ Q_ASSERT(c->v4Function);
ctx->callData->thisObject.mark(engine);
- for (int arg = 0; arg < qMax(ctx->callData->argc, (int)c->function->formalParameterCount()); ++arg)
+ for (int arg = 0; arg < qMax(ctx->callData->argc, (int)c->v4Function->nFormals); ++arg)
ctx->callData->args[arg].mark(engine);
- for (unsigned local = 0, lastLocal = c->function->varCount(); local < lastLocal; ++local)
+ for (unsigned local = 0, lastLocal = c->v4Function->compiledFunction->nLocals; local < lastLocal; ++local)
c->locals[local].mark(engine);
if (c->activation)
c->activation->mark(engine);
- c->function->mark(engine);
+ if (c->function)
+ c->function->mark(engine);
break;
}
case Heap::ExecutionContext::Type_QmlContext: {
@@ -322,6 +302,51 @@ void ExecutionContext::markObjects(Heap::Base *m, ExecutionEngine *engine)
}
}
+// Do a standard call with this execution context as the outer scope
+void ExecutionContext::call(Scope &scope, CallData *callData, Function *function, const FunctionObject *f)
+{
+ ExecutionContextSaver ctxSaver(scope);
+
+ Scoped<CallContext> ctx(scope, newCallContext(function, callData));
+ if (f)
+ ctx->d()->function = f->d();
+ scope.engine->pushContext(ctx);
+
+ scope.result = Q_V4_PROFILE(scope.engine, function);
+
+ if (function->hasQmlDependencies)
+ QQmlPropertyCapture::registerQmlDependencies(function->compiledFunction, scope);
+}
+
+// Do a simple, fast call with this execution context as the outer scope
+void QV4::ExecutionContext::simpleCall(Scope &scope, CallData *callData, Function *function)
+{
+ Q_ASSERT(function->canUseSimpleFunction());
+
+ ExecutionContextSaver ctxSaver(scope);
+
+ CallContext::Data ctx = CallContext::Data::createOnStack(scope.engine);
+
+ ctx.strictMode = function->isStrict();
+ ctx.callData = callData;
+ ctx.v4Function = function;
+ ctx.compilationUnit = function->compilationUnit;
+ ctx.lookups = function->compilationUnit->runtimeLookups;
+ ctx.constantTable = function->compilationUnit->constants;
+ ctx.outer = this->d();
+ ctx.locals = scope.alloc(function->compiledFunction->nLocals);
+ for (int i = callData->argc; i < (int)function->nFormals; ++i)
+ callData->args[i] = Encode::undefined();
+
+ scope.engine->pushContext(&ctx);
+ Q_ASSERT(scope.engine->current == &ctx);
+
+ scope.result = Q_V4_PROFILE(scope.engine, function);
+
+ if (function->hasQmlDependencies)
+ QQmlPropertyCapture::registerQmlDependencies(function->compiledFunction, scope);
+}
+
void ExecutionContext::setProperty(String *name, const Value &value)
{
Scope scope(this);
@@ -354,13 +379,13 @@ void ExecutionContext::setProperty(String *name, const Value &value)
case Heap::ExecutionContext::Type_CallContext:
case Heap::ExecutionContext::Type_SimpleCallContext: {
Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx->d());
- if (c->function->function) {
- uint index = c->function->function->internalClass->find(name);
+ if (c->v4Function) {
+ uint index = c->v4Function->internalClass->find(name);
if (index < UINT_MAX) {
- if (index < c->function->formalParameterCount()) {
- c->callData->args[c->function->formalParameterCount() - index - 1] = value;
+ if (index < c->v4Function->nFormals) {
+ c->callData->args[c->v4Function->nFormals - index - 1] = value;
} else {
- index -= c->function->formalParameterCount();
+ index -= c->v4Function->nFormals;
c->locals[index] = value;
}
return;
@@ -435,13 +460,12 @@ ReturnedValue ExecutionContext::getProperty(String *name)
case Heap::ExecutionContext::Type_CallContext:
case Heap::ExecutionContext::Type_SimpleCallContext: {
Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx->d());
- ScopedFunctionObject f(scope, c->function);
- if (f->function() && (f->needsActivation() || hasWith || hasCatchScope)) {
- uint index = f->function()->internalClass->find(name);
+ if (c->v4Function && (c->v4Function->needsActivation() || hasWith || hasCatchScope)) {
+ uint index = c->v4Function->internalClass->find(name);
if (index < UINT_MAX) {
- if (index < c->function->formalParameterCount())
- return c->callData->args[c->function->formalParameterCount() - index - 1].asReturnedValue();
- return c->locals[index - c->function->formalParameterCount()].asReturnedValue();
+ if (index < c->v4Function->nFormals)
+ return c->callData->args[c->v4Function->nFormals - index - 1].asReturnedValue();
+ return c->locals[index - c->v4Function->nFormals].asReturnedValue();
}
}
ScopedObject activation(scope, c->activation);
@@ -451,9 +475,9 @@ ReturnedValue ExecutionContext::getProperty(String *name)
if (hasProperty)
return v->asReturnedValue();
}
- if (f->function() && f->function()->isNamedExpression()
- && name->equals(ScopedString(scope, f->function()->name())))
- return f.asReturnedValue();
+ if (c->function && c->v4Function->isNamedExpression()
+ && name->equals(ScopedString(scope, c->v4Function->name())))
+ return c->function->asReturnedValue();
break;
}
case Heap::ExecutionContext::Type_QmlContext: {
@@ -514,13 +538,12 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Value *base)
case Heap::ExecutionContext::Type_CallContext:
case Heap::ExecutionContext::Type_SimpleCallContext: {
Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx->d());
- ScopedFunctionObject f(scope, c->function);
- if (f->function() && (f->needsActivation() || hasWith || hasCatchScope)) {
- uint index = f->function()->internalClass->find(name);
+ if (c->v4Function && (c->v4Function->needsActivation() || hasWith || hasCatchScope)) {
+ uint index = c->v4Function->internalClass->find(name);
if (index < UINT_MAX) {
- if (index < c->function->formalParameterCount())
- return c->callData->args[c->function->formalParameterCount() - index - 1].asReturnedValue();
- return c->locals[index - c->function->formalParameterCount()].asReturnedValue();
+ if (index < c->v4Function->nFormals)
+ return c->callData->args[c->v4Function->nFormals - index - 1].asReturnedValue();
+ return c->locals[index - c->v4Function->nFormals].asReturnedValue();
}
}
ScopedObject activation(scope, c->activation);
@@ -530,9 +553,9 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Value *base)
if (hasProperty)
return v->asReturnedValue();
}
- if (f->function() && f->function()->isNamedExpression()
- && name->equals(ScopedString(scope, f->function()->name())))
- return f.asReturnedValue();
+ if (c->function && c->v4Function->isNamedExpression()
+ && name->equals(ScopedString(scope, c->v4Function->name())))
+ return c->function->asReturnedValue();
break;
}
case Heap::ExecutionContext::Type_QmlContext: {
@@ -551,13 +574,13 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Value *base)
return engine()->throwReferenceError(n);
}
-Heap::FunctionObject *ExecutionContext::getFunctionObject() const
+Function *ExecutionContext::getFunction() const
{
Scope scope(d()->engine);
ScopedContext it(scope, this->d());
for (; it; it = it->d()->outer) {
if (const CallContext *callCtx = it->asCallContext())
- return callCtx->d()->function;
+ return callCtx->d()->v4Function;
else if (it->asCatchContext() || it->asWithContext())
continue; // look in the parent context for a FunctionObject
else
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index 0b42288ccc..c985fdb24d 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -55,8 +55,8 @@
QT_BEGIN_NAMESPACE
-class QQmlContextData;
class QObject;
+class QQmlContextData;
namespace QV4 {
@@ -65,11 +65,13 @@ struct CompilationUnit;
struct Function;
}
-struct QmlContextWrapper;
+struct Function;
struct Identifier;
struct CallContext;
struct CatchContext;
struct WithContext;
+struct QmlContext;
+struct QmlContextWrapper;
struct CallData
{
@@ -91,6 +93,8 @@ struct CallData
namespace Heap {
+struct QmlContext;
+
struct ExecutionContext : Base {
enum ContextType {
Type_GlobalContext = 0x1,
@@ -137,11 +141,15 @@ struct CallContext : ExecutionContext {
{
ExecutionContext::init(engine, t);
function = 0;
+ v4Function = 0;
locals = 0;
activation = 0;
}
+ inline unsigned int formalParameterCount() const;
+
Pointer<FunctionObject> function;
+ QV4::Function *v4Function;
Value *locals;
Pointer<Object> activation;
};
@@ -177,14 +185,6 @@ struct WithContext : ExecutionContext {
};
V4_ASSERT_IS_TRIVIAL(WithContext)
-struct QmlContextWrapper;
-
-struct QmlContext : ExecutionContext {
- void init(QV4::ExecutionContext *outerContext, QV4::QmlContextWrapper *qml);
-
- Pointer<QmlContextWrapper> qml;
-};
-
}
struct Q_QML_EXPORT ExecutionContext : public Managed
@@ -198,11 +198,9 @@ struct Q_QML_EXPORT ExecutionContext : public Managed
ExecutionEngine *engine() const { return d()->engine; }
- Heap::CallContext *newCallContext(const FunctionObject *f, CallData *callData);
+ Heap::CallContext *newCallContext(Function *f, CallData *callData);
Heap::WithContext *newWithContext(Heap::Object *with);
Heap::CatchContext *newCatchContext(Heap::String *exceptionVarName, ReturnedValue exceptionValue);
- Heap::QmlContext *newQmlContext(QmlContextWrapper *qml);
- Heap::QmlContext *newQmlContext(QQmlContextData *context, QObject *scopeObject);
void createMutableBinding(String *name, bool deletable);
@@ -216,7 +214,7 @@ struct Q_QML_EXPORT ExecutionContext : public Managed
inline const CatchContext *asCatchContext() const;
inline const WithContext *asWithContext() const;
- Heap::FunctionObject *getFunctionObject() const;
+ Function *getFunction() const;
static void markObjects(Heap::Base *m, ExecutionEngine *e);
@@ -232,6 +230,9 @@ struct Q_QML_EXPORT ExecutionContext : public Managed
ReturnedValue argument(int i) const {
return d()->callData->argument(i);
}
+
+ void call(Scope &scope, CallData *callData, QV4::Function *function, const QV4::FunctionObject *f = 0);
+ void simpleCall(Scope &scope, CallData *callData, QV4::Function *function);
};
struct Q_QML_EXPORT CallContext : public ExecutionContext
@@ -244,11 +245,11 @@ struct Q_QML_EXPORT CallContext : public ExecutionContext
Identifier * const *variables() const;
unsigned int variableCount() const;
- inline ReturnedValue argument(int i);
+ inline ReturnedValue argument(int i) const;
bool needsOwnArguments() const;
};
-inline ReturnedValue CallContext::argument(int i) {
+inline ReturnedValue CallContext::argument(int i) const {
return i < argc() ? args()[i].asReturnedValue() : Primitive::undefinedValue().asReturnedValue();
}
@@ -268,16 +269,6 @@ struct WithContext : public ExecutionContext
V4_MANAGED(WithContext, ExecutionContext)
};
-struct Q_QML_EXPORT QmlContext : public ExecutionContext
-{
- V4_MANAGED(QmlContext, ExecutionContext)
-
- QObject *qmlScope() const;
- QQmlContextData *qmlContext() const;
-
- void takeContextOwnership();
-};
-
inline CallContext *ExecutionContext::asCallContext()
{
return d()->type >= Heap::ExecutionContext::Type_SimpleCallContext ? static_cast<CallContext *>(this) : 0;
@@ -308,10 +299,6 @@ inline Heap::CallContext Heap::CallContext::createOnStack(ExecutionEngine *v4)
return ctxt;
}
-/* Function *f, int argc */
-#define requiredMemoryForExecutionContect(f, argc) \
- ((sizeof(CallContext::Data) + 7) & ~7) + sizeof(Value) * (f->varCount() + qMax((uint)argc, f->formalParameterCount())) + sizeof(CallData)
-
} // namespace QV4
QT_END_NAMESPACE
diff --git a/src/qml/jsruntime/qv4context_p_p.h b/src/qml/jsruntime/qv4context_p_p.h
deleted file mode 100644
index ca8dc0b518..0000000000
--- a/src/qml/jsruntime/qv4context_p_p.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QV4CONTEXT_P_P_H
-#define QV4CONTEXT_P_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-// This header defines a couple of inlinable methods.
-// These implementation cannot be put in qv4context_p.h, because they rely on the
-// QQmlContextWrapper, which in turn is a QV4::Object subclass (so it includes qv4object_p.h),
-// which includes qv4engine_p.h, that needs to include qv4context_p.h
-
-#include "qv4context_p.h"
-#include "private/qqmlcontextwrapper_p.h"
-
-QT_BEGIN_NAMESPACE
-
-namespace QV4 {
-
-QObject *QmlContext::qmlScope() const
-{
- return d()->qml->scopeObject;
-}
-
-QQmlContextData *QmlContext::qmlContext() const
-{
- return *d()->qml->context;
-}
-
-void QmlContext::takeContextOwnership() {
- d()->qml->ownsContext = true;
-}
-
-} // QV4 namespace
-
-QT_END_NAMESPACE
-
-#endif // QV4CONTEXT_P_P_H
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 4f3138a452..8cc6a25fea 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -689,8 +689,8 @@ void DateCtor::construct(const Managed *, Scope &scope, CallData *callData)
} else {
arg = RuntimeHelpers::toPrimitive(arg, PREFERREDTYPE_HINT);
- if (arg->isString())
- t = ParseString(arg->stringValue()->toQString());
+ if (String *s = arg->stringValue())
+ t = ParseString(s->toQString());
else
t = TimeClip(arg->toNumber());
}
@@ -1319,14 +1319,17 @@ ReturnedValue DatePrototype::method_toISOString(CallContext *ctx)
ReturnedValue DatePrototype::method_toJSON(CallContext *ctx)
{
Scope scope(ctx);
- ScopedValue O(scope, RuntimeHelpers::toObject(scope.engine, ctx->thisObject()));
+ ScopedObject O(scope, ctx->thisObject().toObject(scope.engine));
+ if (scope.hasException())
+ return Encode::undefined();
+
ScopedValue tv(scope, RuntimeHelpers::toPrimitive(O, NUMBER_HINT));
if (tv->isNumber() && !std::isfinite(tv->toNumber()))
return Encode::null();
ScopedString s(scope, ctx->d()->engine->newString(QStringLiteral("toISOString")));
- ScopedValue v(scope, O->objectValue()->get(s));
+ ScopedValue v(scope, O->get(s));
FunctionObject *toIso = v->as<FunctionObject>();
if (!toIso)
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index 2d0648396e..835f6adbe0 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -101,7 +101,7 @@ struct DateObject: Object {
template<>
inline const DateObject *Value::as() const {
- return isManaged() && m() && m()->vtable()->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : 0;
+ return isManaged() && m()->vtable()->type == Managed::Type_DateObject ? static_cast<const DateObject *>(this) : 0;
}
struct DateCtor: FunctionObject
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 7265952f72..8f2c5174da 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
#include <qv4engine_p.h>
-#include <qv4context_p.h>
+#include <qv4qmlcontext_p.h>
#include <qv4value_p.h>
#include <qv4object_p.h>
#include <qv4objectproto_p.h>
@@ -71,7 +71,6 @@
#include "qv4typedarray_p.h"
#include <private/qv8engine_p.h>
#include <private/qjsvalue_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qqmltypewrapper_p.h>
#include <private/qqmlvaluetypewrapper_p.h>
#include <private/qqmlvaluetype_p.h>
@@ -282,10 +281,10 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
jsObjects[FunctionProto] = memoryManager->allocObject<FunctionPrototype>(functionProtoClass, objectPrototype());
functionClass = emptyClass->addMember(id_prototype(), Attr_NotEnumerable|Attr_NotConfigurable, &index);
Q_ASSERT(index == Heap::FunctionObject::Index_Prototype);
- simpleScriptFunctionClass = functionClass->addMember(id_name(), Attr_ReadOnly, &index);
- Q_ASSERT(index == Heap::SimpleScriptFunction::Index_Name);
- simpleScriptFunctionClass = simpleScriptFunctionClass->addMember(id_length(), Attr_ReadOnly, &index);
- Q_ASSERT(index == Heap::SimpleScriptFunction::Index_Length);
+ scriptFunctionClass = functionClass->addMember(id_name(), Attr_ReadOnly, &index);
+ Q_ASSERT(index == Heap::ScriptFunction::Index_Name);
+ scriptFunctionClass = scriptFunctionClass->addMember(id_length(), Attr_ReadOnly, &index);
+ Q_ASSERT(index == Heap::ScriptFunction::Index_Length);
protoClass = emptyClass->addMember(id_constructor(), Attr_NotEnumerable, &index);
Q_ASSERT(index == Heap::FunctionObject::Index_ProtoConstructor);
@@ -714,6 +713,27 @@ Heap::Object *ExecutionEngine::newForEachIteratorObject(Object *o)
return obj->d();
}
+Heap::QmlContext *ExecutionEngine::qmlContext() const
+{
+ Heap::ExecutionContext *ctx = current;
+
+ // get the correct context when we're within a builtin function
+ if (ctx->type == Heap::ExecutionContext::Type_SimpleCallContext && !ctx->outer)
+ ctx = parentContext(currentContext)->d();
+
+ if (ctx->type != Heap::ExecutionContext::Type_QmlContext && !ctx->outer)
+ return 0;
+
+ while (ctx->outer && ctx->outer->type != Heap::ExecutionContext::Type_GlobalContext)
+ ctx = ctx->outer;
+
+ Q_ASSERT(ctx);
+ if (ctx->type != Heap::ExecutionContext::Type_QmlContext)
+ return 0;
+
+ return static_cast<Heap::QmlContext *>(ctx);
+}
+
QObject *ExecutionEngine::qmlScopeObject() const
{
Heap::QmlContext *ctx = qmlContext();
@@ -760,21 +780,17 @@ QVector<StackFrame> ExecutionEngine::stackTrace(int frameLimit) const
QVector<StackFrame> stack;
ExecutionContext *c = currentContext;
- ScopedFunctionObject function(scope);
while (c && frameLimit) {
- function = c->getFunctionObject();
+ QV4::Function *function = c->getFunction();
if (function) {
StackFrame frame;
- if (const Function *f = function->function())
- frame.source = f->sourceFile();
+ frame.source = function->sourceFile();
name = function->name();
frame.function = name->toQString();
- frame.line = -1;
- frame.column = -1;
- if (function->function())
- // line numbers can be negative for places where you can't set a real breakpoint
- frame.line = qAbs(c->d()->lineNumber);
+ // line numbers can be negative for places where you can't set a real breakpoint
+ frame.line = qAbs(c->d()->lineNumber);
+ frame.column = -1;
stack.append(frame);
--frameLimit;
@@ -850,9 +866,8 @@ QUrl ExecutionEngine::resolvedUrl(const QString &file)
ExecutionContext *c = currentContext;
while (c) {
CallContext *callCtx = c->asCallContext();
- if (callCtx && callCtx->d()->function) {
- if (callCtx->d()->function->function)
- base.setUrl(callCtx->d()->function->function->sourceFile());
+ if (callCtx && callCtx->d()->v4Function) {
+ base.setUrl(callCtx->d()->v4Function->sourceFile());
break;
}
c = parentContext(c);
@@ -1151,8 +1166,8 @@ static QVariant toVariant(QV4::ExecutionEngine *e, const QV4::Value &value, int
return value.integerValue();
if (value.isNumber())
return value.asDouble();
- if (value.isString()) {
- const QString &str = value.toQString();
+ if (String *s = value.stringValue()) {
+ const QString &str = s->toQString();
// QChars are stored as a strings
if (typeHint == QVariant::Char && str.size() == 1)
return str.at(0);
@@ -1591,8 +1606,8 @@ bool ExecutionEngine::metaTypeFromJS(const Value *value, int type, void *data)
*reinterpret_cast<unsigned char*>(data) = (unsigned char)(value->toInt32());
return true;
case QMetaType::QChar:
- if (value->isString()) {
- QString str = value->stringValue()->toQString();
+ if (String *s = value->stringValue()) {
+ QString str = s->toQString();
*reinterpret_cast<QChar*>(data) = str.isEmpty() ? QChar() : str.at(0);
} else {
*reinterpret_cast<QChar*>(data) = QChar(ushort(value->toUInt16()));
@@ -1704,10 +1719,10 @@ bool ExecutionEngine::metaTypeFromJS(const Value *value, int type, void *data)
// We have T t, T* is requested, so return &t.
*reinterpret_cast<void* *>(data) = var.data();
return true;
- } else if (value->isObject()) {
+ } else if (Object *o = value->objectValue()) {
// Look in the prototype chain.
QV4::Scope scope(this);
- QV4::ScopedObject proto(scope, value->objectValue()->prototype());
+ QV4::ScopedObject proto(scope, o->prototype());
while (proto) {
bool canCast = false;
if (QV4::VariantObject *vo = proto->as<QV4::VariantObject>()) {
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 25d6fc1970..1c20ad30aa 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -128,7 +128,8 @@ public:
--jsStackTop;
return jsStackTop->heapObject();
}
- Value *jsAlloca(int nValues) {
+
+ QML_NEARLY_ALWAYS_INLINE Value *jsAlloca(int nValues) {
Value *ptr = jsStackTop;
jsStackTop = ptr + nValues;
for (int i = 0; i < nValues; ++i)
@@ -254,7 +255,7 @@ public:
InternalClass *stringClass;
InternalClass *functionClass;
- InternalClass *simpleScriptFunctionClass;
+ InternalClass *scriptFunctionClass;
InternalClass *protoClass;
InternalClass *regExpExecArrayClass;
@@ -547,27 +548,6 @@ inline ExecutionContext *ExecutionEngine::parentContext(ExecutionContext *contex
return o ? context - o : 0;
}
-inline Heap::QmlContext *ExecutionEngine::qmlContext() const
-{
- Heap::ExecutionContext *ctx = current;
-
- // get the correct context when we're within a builtin function
- if (ctx->type == Heap::ExecutionContext::Type_SimpleCallContext && !ctx->outer)
- ctx = parentContext(currentContext)->d();
-
- if (ctx->type != Heap::ExecutionContext::Type_QmlContext && !ctx->outer)
- return 0;
-
- while (ctx->outer && ctx->outer->type != Heap::ExecutionContext::Type_GlobalContext)
- ctx = ctx->outer;
-
- Q_ASSERT(ctx);
- if (ctx->type != Heap::ExecutionContext::Type_QmlContext)
- return 0;
-
- return static_cast<Heap::QmlContext *>(ctx);
-}
-
inline
void Heap::Base::mark(QV4::ExecutionEngine *engine)
{
@@ -583,9 +563,6 @@ void Heap::Base::mark(QV4::ExecutionEngine *engine)
inline void Value::mark(ExecutionEngine *e)
{
- if (!isManaged())
- return;
-
Heap::Base *o = heapObject();
if (o)
o->mark(e);
diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h
index 42a6e0b4b1..2b3ab25e2d 100644
--- a/src/qml/jsruntime/qv4errorobject_p.h
+++ b/src/qml/jsruntime/qv4errorobject_p.h
@@ -178,7 +178,7 @@ struct ErrorObject: Object {
template<>
inline const ErrorObject *Value::as() const {
- return isManaged() && m() && m()->vtable()->isErrorObject ? reinterpret_cast<const ErrorObject *>(this) : 0;
+ return isManaged() && m()->vtable()->isErrorObject ? reinterpret_cast<const ErrorObject *>(this) : 0;
}
struct EvalErrorObject: ErrorObject {
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index caabee322a..358c2d079c 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -55,6 +55,7 @@ Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit,
, compilationUnit(unit)
, code(codePtr)
, codeData(0)
+ , hasQmlDependencies(function->hasQmlDependencies())
{
Q_UNUSED(engine);
@@ -83,6 +84,9 @@ Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit,
internalClass = internalClass->addMember(compilationUnit->runtimeStrings[localsIndices[i]]->identifier, Attr_NotConfigurable);
activationRequired = compiledFunction->nInnerFunctions > 0 || (compiledFunction->flags & (CompiledData::Function::HasDirectEval | CompiledData::Function::UsesArgumentsObject));
+
+ canUseSimpleCall = !needsActivation() && !(compiledFunction->flags & CompiledData::Function::HasCatchOrWith) &&
+ !(compiledFunction->nFormals > QV4::Global::ReservedArgumentCount) && !isNamedExpression();
}
Function::~Function()
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index aeef9ad61b..54d0528c42 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -51,7 +51,9 @@
//
#include "qv4global_p.h"
+#include <private/qqmlglobal_p.h>
#include <private/qv4compileddata_p.h>
+#include <private/qv4context_p.h>
QT_BEGIN_NAMESPACE
@@ -68,6 +70,8 @@ struct Q_QML_EXPORT Function {
InternalClass *internalClass;
uint nFormals;
bool activationRequired;
+ bool hasQmlDependencies;
+ bool canUseSimpleCall;
Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function,
ReturnedValue (*codePtr)(ExecutionEngine *, const uchar *));
@@ -88,8 +92,22 @@ struct Q_QML_EXPORT Function {
inline bool needsActivation() const
{ return activationRequired; }
+ inline bool canUseSimpleFunction() const { return canUseSimpleCall; }
+
+ QQmlSourceLocation sourceLocation() const
+ {
+ return QQmlSourceLocation(sourceFile(), compiledFunction->location.line, compiledFunction->location.column);
+ }
+
};
+
+inline unsigned int Heap::CallContext::formalParameterCount() const
+{
+ return v4Function ? v4Function->nFormals : 0;
+}
+
+
}
QT_END_NAMESPACE
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 2cc58b74a6..64f7b98618 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -47,6 +47,7 @@
#include "qv4arrayobject_p.h"
#include "qv4scopedvalue_p.h"
+#include "qv4argumentsobject_p.h"
#include <private/qqmljsengine_p.h>
#include <private/qqmljslexer_p.h>
@@ -81,7 +82,8 @@ void Heap::FunctionObject::init(QV4::ExecutionContext *scope, QV4::String *name,
void Heap::FunctionObject::init(QV4::ExecutionContext *scope, Function *function, bool createProto)
{
Object::init();
- function = nullptr;
+ this->function = function;
+ function->compilationUnit->addref();
this->scope = scope->d();
Scope s(scope->engine());
ScopedString name(s, function->name());
@@ -91,46 +93,9 @@ void Heap::FunctionObject::init(QV4::ExecutionContext *scope, Function *function
void Heap::FunctionObject::init(QV4::ExecutionContext *scope, const QString &name, bool createProto)
{
- Object::init();
- function = nullptr;
- this->scope = scope->d();
- Scope s(scope->engine());
- ScopedFunctionObject f(s, this);
- ScopedString n(s, s.engine->newString(name));
- f->init(n, createProto);
-}
-
-void Heap::FunctionObject::init(ExecutionContext *scope, const QString &name, bool createProto)
-{
- Object::init();
- function = nullptr;
- this->scope = scope;
- Scope s(scope->engine);
- ScopedFunctionObject f(s, this);
- ScopedString n(s, s.engine->newString(name));
- f->init(n, createProto);
-}
-
-void Heap::FunctionObject::init(QV4::ExecutionContext *scope, const ReturnedValue name)
-{
- Object::init();
- function = nullptr;
- this->scope = scope->d();
- Scope s(scope);
- ScopedFunctionObject f(s, this);
- ScopedString n(s, name);
- f->init(n, false);
-}
-
-void Heap::FunctionObject::init(ExecutionContext *scope, const ReturnedValue name)
-{
- Object::init();
- function = nullptr;
- this->scope = scope;
- Scope s(scope->engine);
- ScopedFunctionObject f(s, this);
- ScopedString n(s, name);
- f->init(n, false);
+ Scope valueScope(scope);
+ ScopedString s(valueScope, valueScope.engine->newString(name));
+ init(scope, s, createProto);
}
void Heap::FunctionObject::init()
@@ -165,8 +130,8 @@ void FunctionObject::init(String *n, bool createProto)
*propertyData(Heap::FunctionObject::Index_Prototype) = Encode::undefined();
}
- ScopedValue v(s, n);
- defineReadonlyProperty(s.engine->id_name(), v);
+ if (n)
+ defineReadonlyProperty(s.engine->id_name(), *n);
}
ReturnedValue FunctionObject::name() const
@@ -193,34 +158,11 @@ void FunctionObject::markObjects(Heap::Base *that, ExecutionEngine *e)
Object::markObjects(that, e);
}
-Heap::FunctionObject *FunctionObject::createScriptFunction(ExecutionContext *scope, Function *function, bool createProto)
+Heap::FunctionObject *FunctionObject::createScriptFunction(ExecutionContext *scope, Function *function)
{
- if (function->needsActivation() ||
- function->compiledFunction->flags & CompiledData::Function::HasCatchOrWith ||
- function->compiledFunction->nFormals > QV4::Global::ReservedArgumentCount ||
- function->isNamedExpression())
- return scope->d()->engine->memoryManager->allocObject<ScriptFunction>(scope, function);
- return scope->d()->engine->memoryManager->allocObject<SimpleScriptFunction>(scope, function, createProto);
+ return scope->d()->engine->memoryManager->allocObject<ScriptFunction>(scope, function);
}
-Heap::FunctionObject *FunctionObject::createQmlFunction(QQmlContextData *qmlContext, QObject *scopeObject, Function *runtimeFunction, const QList<QByteArray> &signalParameters, QString *error)
-{
- ExecutionEngine *engine = QQmlEnginePrivate::getV4Engine(qmlContext->engine);
- QV4::Scope valueScope(engine);
- ExecutionContext *global = valueScope.engine->rootContext();
- QV4::Scoped<QmlContext> wrapperContext(valueScope, global->newQmlContext(qmlContext, scopeObject));
-
- if (!signalParameters.isEmpty()) {
- if (error)
- QQmlPropertyCache::signalParameterStringForJS(engine, signalParameters, error);
- runtimeFunction->updateInternalClass(engine, signalParameters);
- }
-
- QV4::ScopedFunctionObject function(valueScope, QV4::FunctionObject::createScriptFunction(wrapperContext, runtimeFunction));
- return function->d();
-}
-
-
bool FunctionObject::isBinding() const
{
return d()->vtable() == QQmlBindingFunction::staticVTable();
@@ -233,14 +175,7 @@ bool FunctionObject::isBoundFunction() const
QQmlSourceLocation FunctionObject::sourceLocation() const
{
- if (isBinding()) {
- Q_ASSERT(as<const QV4::QQmlBindingFunction>());
- return *static_cast<QV4::Heap::QQmlBindingFunction *>(d())->bindingLocation;
- }
- QV4::Function *function = d()->function;
- Q_ASSERT(function);
-
- return QQmlSourceLocation(function->sourceFile(), function->compiledFunction->location.line, function->compiledFunction->location.column);
+ return d()->function->sourceLocation();
}
DEFINE_OBJECT_VTABLE(FunctionCtor);
@@ -346,11 +281,11 @@ ReturnedValue FunctionPrototype::method_toString(CallContext *ctx)
ReturnedValue FunctionPrototype::method_apply(CallContext *ctx)
{
- Scope scope(ctx);
- ScopedFunctionObject o(scope, ctx->thisObject().as<FunctionObject>());
+ FunctionObject *o = ctx->thisObject().as<FunctionObject>();
if (!o)
return ctx->engine()->throwTypeError();
+ Scope scope(ctx);
ScopedValue arg(scope, ctx->argument(1));
ScopedObject arr(scope, arg);
@@ -367,17 +302,24 @@ ReturnedValue FunctionPrototype::method_apply(CallContext *ctx)
ScopedCallData callData(scope, len);
if (len) {
- if (arr->arrayType() != Heap::ArrayData::Simple || arr->protoHasArray()) {
- for (quint32 i = 0; i < len; ++i)
- callData->args[i] = arr->getIndexed(i);
- } else {
- uint alen = arr->arrayData() ? arr->arrayData()->len : 0;
+ if (ArgumentsObject::isNonStrictArgumentsObject(arr) && !arr->cast<ArgumentsObject>()->fullyCreated()) {
+ QV4::ArgumentsObject *a = arr->cast<ArgumentsObject>();
+ int l = qMin(len, (uint)a->d()->context->callData->argc);
+ memcpy(callData->args, a->d()->context->callData->args, l*sizeof(Value));
+ for (quint32 i = l; i < len; ++i)
+ callData->args[i] = Primitive::undefinedValue();
+ } else if (arr->arrayType() == Heap::ArrayData::Simple && !arr->protoHasArray()) {
+ auto sad = static_cast<Heap::SimpleArrayData *>(arr->arrayData());
+ uint alen = sad ? sad->len : 0;
if (alen > len)
alen = len;
for (uint i = 0; i < alen; ++i)
- callData->args[i] = static_cast<Heap::SimpleArrayData *>(arr->arrayData())->data(i);
+ callData->args[i] = sad->data(i);
for (quint32 i = alen; i < len; ++i)
callData->args[i] = Primitive::undefinedValue();
+ } else {
+ for (quint32 i = 0; i < len; ++i)
+ callData->args[i] = arr->getIndexed(i);
}
}
@@ -388,12 +330,11 @@ ReturnedValue FunctionPrototype::method_apply(CallContext *ctx)
ReturnedValue FunctionPrototype::method_call(CallContext *ctx)
{
- Scope scope(ctx);
-
- ScopedFunctionObject o(scope, ctx->thisObject().as<FunctionObject>());
+ FunctionObject *o = ctx->thisObject().as<FunctionObject>();
if (!o)
return ctx->engine()->throwTypeError();
+ Scope scope(ctx);
ScopedCallData callData(scope, ctx->argc() ? ctx->argc() - 1 : 0);
if (ctx->argc()) {
for (int i = 1; i < ctx->argc(); ++i)
@@ -407,11 +348,11 @@ ReturnedValue FunctionPrototype::method_call(CallContext *ctx)
ReturnedValue FunctionPrototype::method_bind(CallContext *ctx)
{
- Scope scope(ctx);
- ScopedFunctionObject target(scope, ctx->thisObject());
+ FunctionObject *target = ctx->thisObject().as<FunctionObject>();
if (!target)
return ctx->engine()->throwTypeError();
+ Scope scope(ctx);
ScopedValue boundThis(scope, ctx->argument(0));
Scoped<MemberData> boundArgs(scope, (Heap::MemberData *)0);
if (ctx->argc() > 1) {
@@ -426,15 +367,10 @@ ReturnedValue FunctionPrototype::method_bind(CallContext *ctx)
DEFINE_OBJECT_VTABLE(ScriptFunction);
-void Heap::ScriptFunction::init(QV4::ExecutionContext *scope, Function *function)
-{
- Heap::SimpleScriptFunction::init(scope, function, true);
-}
-
void ScriptFunction::construct(const Managed *that, Scope &scope, CallData *callData)
{
ExecutionEngine *v4 = scope.engine;
- if (v4->hasException) {
+ if (Q_UNLIKELY(v4->hasException)) {
scope.result = Encode::undefined();
return;
}
@@ -447,17 +383,18 @@ void ScriptFunction::construct(const Managed *that, Scope &scope, CallData *call
InternalClass *ic = v4->emptyClass;
ScopedObject proto(scope, f->protoForConstructor());
ScopedObject obj(scope, v4->newObject(ic, proto));
-
callData->thisObject = obj.asReturnedValue();
- Scoped<CallContext> ctx(scope, v4->currentContext->newCallContext(f, callData));
- v4->pushContext(ctx);
- scope.result = Q_V4_PROFILE(v4, f->function());
+ QV4::Function *v4Function = f->function();
+ Q_ASSERT(v4Function);
- if (f->function()->compiledFunction->hasQmlDependencies())
- QQmlPropertyCapture::registerQmlDependencies(f->function()->compiledFunction, scope);
+ ScopedContext c(scope, f->scope());
+ if (v4Function->canUseSimpleCall)
+ c->simpleCall(scope, callData, v4Function);
+ else
+ c->call(scope, callData, v4Function, f);
- if (v4->hasException) {
+ if (Q_UNLIKELY(v4->hasException)) {
scope.result = Encode::undefined();
} else if (!scope.result.isObject()) {
scope.result = obj.asReturnedValue();
@@ -467,27 +404,25 @@ void ScriptFunction::construct(const Managed *that, Scope &scope, CallData *call
void ScriptFunction::call(const Managed *that, Scope &scope, CallData *callData)
{
ExecutionEngine *v4 = scope.engine;
- if (v4->hasException) {
+ if (Q_UNLIKELY(v4->hasException)) {
scope.result = Encode::undefined();
return;
}
CHECK_STACK_LIMITS(v4, scope);
- ExecutionContextSaver ctxSaver(scope);
-
Scoped<ScriptFunction> f(scope, static_cast<const ScriptFunction *>(that));
- Scoped<CallContext> ctx(scope, v4->currentContext->newCallContext(f, callData));
- v4->pushContext(ctx);
- scope.result = Q_V4_PROFILE(v4, f->function());
+ QV4::Function *v4Function = f->function();
+ Q_ASSERT(v4Function);
- if (f->function()->compiledFunction->hasQmlDependencies())
- QQmlPropertyCapture::registerQmlDependencies(f->function()->compiledFunction, scope);
+ ScopedContext c(scope, f->scope());
+ if (v4Function->canUseSimpleCall)
+ c->simpleCall(scope, callData, v4Function);
+ else
+ c->call(scope, callData, v4Function, f);
}
-DEFINE_OBJECT_VTABLE(SimpleScriptFunction);
-
-void Heap::SimpleScriptFunction::init(QV4::ExecutionContext *scope, Function *function, bool createProto)
+void Heap::ScriptFunction::init(QV4::ExecutionContext *scope, Function *function)
{
FunctionObject::init();
this->scope = scope->d();
@@ -500,16 +435,10 @@ void Heap::SimpleScriptFunction::init(QV4::ExecutionContext *scope, Function *fu
Scope s(scope);
ScopedFunctionObject f(s, this);
- if (createProto) {
- ScopedString name(s, function->name());
- f->init(name, createProto);
- f->defineReadonlyProperty(scope->d()->engine->id_length(), Primitive::fromInt32(f->formalParameterCount()));
- } else {
- Q_ASSERT(internalClass && internalClass->find(s.engine->id_length()) == Index_Length);
- Q_ASSERT(internalClass && internalClass->find(s.engine->id_name()) == Index_Name);
- *propertyData(Index_Name) = function->name();
- *propertyData(Index_Length) = Primitive::fromInt32(f->formalParameterCount());
- }
+ ScopedString name(s, function->name());
+ f->init(name, true);
+ Q_ASSERT(internalClass && internalClass->find(s.engine->id_length()) == Index_Length);
+ *propertyData(Index_Length) = Primitive::fromInt32(f->formalParameterCount());
if (scope->d()->strictMode) {
ScopedProperty pd(s);
@@ -520,89 +449,12 @@ void Heap::SimpleScriptFunction::init(QV4::ExecutionContext *scope, Function *fu
}
}
-void SimpleScriptFunction::construct(const Managed *that, Scope &scope, CallData *callData)
-{
- ExecutionEngine *v4 = scope.engine;
- if (v4->hasException) {
- scope.result = Encode::undefined();
- return;
- }
- CHECK_STACK_LIMITS(v4, scope);
-
- ExecutionContextSaver ctxSaver(scope);
-
- Scoped<SimpleScriptFunction> f(scope, static_cast<const SimpleScriptFunction *>(that));
-
- InternalClass *ic = scope.engine->emptyClass;
- ScopedObject proto(scope, f->protoForConstructor());
- callData->thisObject = v4->newObject(ic, proto);
-
- CallContext::Data ctx = CallContext::Data::createOnStack(v4);
- ctx.strictMode = f->strictMode();
- ctx.callData = callData;
- ctx.function = f->d();
- ctx.compilationUnit = f->function()->compilationUnit;
- ctx.lookups = ctx.compilationUnit->runtimeLookups;
- ctx.constantTable = ctx.compilationUnit->constants;
- ctx.outer = f->scope();
- ctx.locals = scope.alloc(f->varCount());
- for (int i = callData->argc; i < (int)f->formalParameterCount(); ++i)
- callData->args[i] = Encode::undefined();
- v4->pushContext(&ctx);
- Q_ASSERT(v4->current == &ctx);
-
- scope.result = Q_V4_PROFILE(v4, f->function());
-
- if (f->function()->compiledFunction->hasQmlDependencies())
- QQmlPropertyCapture::registerQmlDependencies(f->function()->compiledFunction, scope);
-
- if (v4->hasException) {
- scope.result = Encode::undefined();
- } else if (!scope.result.isObject()) {
- scope.result = callData->thisObject;
- }
-}
-
-void SimpleScriptFunction::call(const Managed *that, Scope &scope, CallData *callData)
-{
- ExecutionEngine *v4 = scope.engine;
- if (v4->hasException) {
- scope.result = Encode::undefined();
- return;
- }
- CHECK_STACK_LIMITS(v4, scope);
-
- ExecutionContextSaver ctxSaver(scope);
-
- Scoped<SimpleScriptFunction> f(scope, static_cast<const SimpleScriptFunction *>(that));
-
- CallContext::Data ctx = CallContext::Data::createOnStack(v4);
- ctx.strictMode = f->strictMode();
- ctx.callData = callData;
- ctx.function = f->d();
- ctx.compilationUnit = f->function()->compilationUnit;
- ctx.lookups = ctx.compilationUnit->runtimeLookups;
- ctx.constantTable = ctx.compilationUnit->constants;
- ctx.outer = f->scope();
- ctx.locals = scope.alloc(f->varCount());
- for (int i = callData->argc; i < (int)f->formalParameterCount(); ++i)
- callData->args[i] = Encode::undefined();
- v4->pushContext(&ctx);
- Q_ASSERT(v4->current == &ctx);
-
- scope.result = Q_V4_PROFILE(v4, f->function());
-
- if (f->function()->compiledFunction->hasQmlDependencies())
- QQmlPropertyCapture::registerQmlDependencies(f->function()->compiledFunction, scope);
-}
-
-Heap::Object *SimpleScriptFunction::protoForConstructor()
+Heap::Object *ScriptFunction::protoForConstructor() const
{
- Scope scope(engine());
- ScopedObject p(scope, protoProperty());
- if (p)
- return p->d();
- return scope.engine->objectPrototype()->d();
+ const Object *o = d()->protoProperty();
+ if (o)
+ return o->d();
+ return engine()->objectPrototype()->d();
}
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index e58b83e2c3..a02e89e883 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -69,12 +69,9 @@ struct Q_QML_PRIVATE_EXPORT FunctionObject : Object {
Index_ProtoConstructor = 0
};
- void init(QV4::ExecutionContext *scope, QV4::String *name, bool createProto = false);
+ void init(QV4::ExecutionContext *scope, QV4::String *name = 0, bool createProto = false);
void init(QV4::ExecutionContext *scope, QV4::Function *function, bool createProto = false);
- void init(QV4::ExecutionContext *scope, const QString &name = QString(), bool createProto = false);
- void init(ExecutionContext *scope, const QString &name = QString(), bool createProto = false);
- void init(QV4::ExecutionContext *scope, const ReturnedValue name);
- void init(ExecutionContext *scope, const ReturnedValue name);
+ void init(QV4::ExecutionContext *scope, const QString &name, bool createProto = false);
void init();
void destroy();
@@ -82,6 +79,8 @@ struct Q_QML_PRIVATE_EXPORT FunctionObject : Object {
unsigned int varCount() { return function ? function->compiledFunction->nLocals : 0; }
bool needsActivation() const { return function ? function->needsActivation() : false; }
+ const QV4::Object *protoProperty() const { return propertyData(Index_Prototype)->cast<QV4::Object>(); }
+
Pointer<ExecutionContext> scope;
Function *function;
};
@@ -105,15 +104,11 @@ struct IndexedBuiltinFunction : FunctionObject {
uint index;
};
-struct SimpleScriptFunction : FunctionObject {
+struct ScriptFunction : FunctionObject {
enum {
Index_Name = FunctionObject::Index_Prototype + 1,
Index_Length
};
- void init(QV4::ExecutionContext *scope, Function *function, bool createProto);
-};
-
-struct ScriptFunction : SimpleScriptFunction {
void init(QV4::ExecutionContext *scope, Function *function);
};
@@ -150,11 +145,7 @@ struct Q_QML_EXPORT FunctionObject: Object {
static void construct(const Managed *that, Scope &scope, CallData *);
static void call(const Managed *that, Scope &scope, CallData *d);
- static Heap::FunctionObject *createScriptFunction(ExecutionContext *scope, Function *function, bool createProto = true);
- static Heap::FunctionObject *createQmlFunction(QQmlContextData *qmlContext, QObject *scopeObject, QV4::Function *runtimeFunction,
- const QList<QByteArray> &signalParameters = QList<QByteArray>(), QString *error = 0);
-
- ReturnedValue protoProperty() { return propertyData(Heap::FunctionObject::Index_Prototype)->asReturnedValue(); }
+ static Heap::FunctionObject *createScriptFunction(ExecutionContext *scope, Function *function);
bool needsActivation() const { return d()->needsActivation(); }
bool strictMode() const { return d()->function ? d()->function->isStrict() : false; }
@@ -168,7 +159,7 @@ struct Q_QML_EXPORT FunctionObject: Object {
template<>
inline const FunctionObject *Value::as() const {
- return isManaged() && m() && m()->vtable()->isFunctionObject ? reinterpret_cast<const FunctionObject *>(this) : 0;
+ return isManaged() && m()->vtable()->isFunctionObject ? reinterpret_cast<const FunctionObject *>(this) : 0;
}
@@ -225,21 +216,14 @@ void Heap::IndexedBuiltinFunction::init(QV4::ExecutionContext *scope, uint index
}
-struct SimpleScriptFunction: FunctionObject {
- V4_OBJECT2(SimpleScriptFunction, FunctionObject)
- V4_INTERNALCLASS(simpleScriptFunctionClass)
-
- static void construct(const Managed *, Scope &scope, CallData *callData);
- static void call(const Managed *that, Scope &scope, CallData *callData);
-
- Heap::Object *protoForConstructor();
-};
-
-struct ScriptFunction: SimpleScriptFunction {
+struct ScriptFunction : FunctionObject {
V4_OBJECT2(ScriptFunction, FunctionObject)
+ V4_INTERNALCLASS(scriptFunctionClass)
static void construct(const Managed *, Scope &scope, CallData *callData);
static void call(const Managed *that, Scope &scope, CallData *callData);
+
+ Heap::Object *protoForConstructor() const;
};
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 184375a9b6..c37ad1668d 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -58,6 +58,12 @@
#include <QtCore/qglobal.h>
#include <QString>
+#ifdef QT_NO_DEBUG
+#define QML_NEARLY_ALWAYS_INLINE Q_ALWAYS_INLINE
+#else
+#define QML_NEARLY_ALWAYS_INLINE inline
+#endif
+
#ifdef V4_BOOTSTRAP
#include <private/qtqmldevtoolsglobal_p.h>
#else
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index feb0d90d26..af92ce1ad8 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -357,12 +357,13 @@ void EvalFunction::evalCall(Scope &scope, CallData *callData, bool directCall) c
ctx = v4->pushGlobalContext();
}
- if (!callData->args[0].isString()) {
+ String *scode = callData->args[0].stringValue();
+ if (!scode) {
scope.result = callData->args[0].asReturnedValue();
return;
}
- const QString code = callData->args[0].stringValue()->toQString();
+ const QString code = scode->toQString();
bool inheritContext = !ctx->d()->strictMode;
Script script(ctx, code, QStringLiteral("eval code"));
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp
index be8057e9f5..1d393cf0aa 100644
--- a/src/qml/jsruntime/qv4include.cpp
+++ b/src/qml/jsruntime/qv4include.cpp
@@ -53,7 +53,6 @@
#include <private/qv4functionobject_p.h>
#include <private/qv4script_p.h>
#include <private/qv4context_p.h>
-#include <private/qqmlcontextwrapper_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 94a6e4daa1..d79e6242ba 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -727,8 +727,8 @@ QString Stringify::Str(const QString &key, const Value &v)
return QStringLiteral("null");
if (scope.result.isBoolean())
return scope.result.booleanValue() ? QStringLiteral("true") : QStringLiteral("false");
- if (scope.result.isString())
- return quote(scope.result.stringValue()->toQString());
+ if (String *s = scope.result.stringValue())
+ return quote(s->toQString());
if (scope.result.isNumber()) {
double d = scope.result.toNumber();
@@ -917,7 +917,7 @@ ReturnedValue JsonObject::method_stringify(CallContext *ctx)
Value *v = stringify.propertyList + i;
*v = o->getIndexed(i);
if (v->as<NumberObject>() || v->as<StringObject>() || v->isNumber())
- *v = RuntimeHelpers::toString(scope.engine, *v);
+ *v = v->toString(scope.engine);
if (!v->isString()) {
v->setM(0);
} else {
@@ -940,8 +940,8 @@ ReturnedValue JsonObject::method_stringify(CallContext *ctx)
if (s->isNumber()) {
stringify.gap = QString(qMin(10, (int)s->toInteger()), ' ');
- } else if (s->isString()) {
- stringify.gap = s->stringValue()->toQString().left(10);
+ } else if (String *str = s->stringValue()) {
+ stringify.gap = str->toQString().left(10);
}
@@ -982,8 +982,8 @@ QJsonValue JsonObject::toJsonValue(const Value &value, V4ObjectSet &visitedObjec
return QJsonValue(QJsonValue::Null);
else if (value.isUndefined())
return QJsonValue(QJsonValue::Undefined);
- else if (value.isString())
- return QJsonValue(value.toQString());
+ else if (String *s = value.stringValue())
+ return QJsonValue(s->toQString());
Q_ASSERT(value.isObject());
Scope scope(value.as<Object>()->engine());
diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp
index 84755a6402..52ed449664 100644
--- a/src/qml/jsruntime/qv4lookup.cpp
+++ b/src/qml/jsruntime/qv4lookup.cpp
@@ -118,7 +118,8 @@ ReturnedValue Lookup::lookup(const Object *thisObject, PropertyAttributes *attrs
ReturnedValue Lookup::indexedGetterGeneric(Lookup *l, const Value &object, const Value &index)
{
- if (object.isObject() && index.asArrayIndex() < UINT_MAX) {
+ uint idx;
+ if (object.isObject() && index.asArrayIndex(idx)) {
l->indexedGetter = indexedGetterObjectInt;
return indexedGetterObjectInt(l, object, index);
}
@@ -129,11 +130,12 @@ ReturnedValue Lookup::indexedGetterFallback(Lookup *l, const Value &object, cons
{
Q_UNUSED(l);
Scope scope(l->engine);
- uint idx = index.asArrayIndex();
+ uint idx = 0;
+ bool isInt = index.asArrayIndex(idx);
ScopedObject o(scope, object);
if (!o) {
- if (idx < UINT_MAX) {
+ if (isInt) {
if (const String *str = object.as<String>()) {
if (idx >= (uint)str->toQString().length()) {
return Encode::undefined();
@@ -153,7 +155,7 @@ ReturnedValue Lookup::indexedGetterFallback(Lookup *l, const Value &object, cons
return Encode::undefined();
}
- if (idx < UINT_MAX) {
+ if (isInt) {
if (o->d()->arrayData && !o->d()->arrayData->attrs) {
ScopedValue v(scope, Scoped<ArrayData>(scope, o->arrayData())->get(idx));
if (!v->isEmpty())
@@ -173,16 +175,19 @@ ReturnedValue Lookup::indexedGetterFallback(Lookup *l, const Value &object, cons
ReturnedValue Lookup::indexedGetterObjectInt(Lookup *l, const Value &object, const Value &index)
{
- uint idx = index.asArrayIndex();
- if (idx == UINT_MAX || !object.isObject())
- return indexedGetterFallback(l, object, index);
-
- Object *o = object.objectValue();
- if (o->d()->arrayData && o->d()->arrayData->type == Heap::ArrayData::Simple) {
- Heap::SimpleArrayData *s = o->d()->arrayData.cast<Heap::SimpleArrayData>();
- if (idx < s->len)
- if (!s->data(idx).isEmpty())
- return s->data(idx).asReturnedValue();
+ uint idx;
+ if (index.asArrayIndex(idx)) {
+ if (Heap::Base *b = object.heapObject()) {
+ if (b->vtable()->isObject) {
+ Heap::Object *o = static_cast<Heap::Object *>(b);
+ if (o->arrayData && o->arrayData->type == Heap::ArrayData::Simple) {
+ Heap::SimpleArrayData *s = o->arrayData.cast<Heap::SimpleArrayData>();
+ if (idx < s->len)
+ if (!s->data(idx).isEmpty())
+ return s->data(idx).asReturnedValue();
+ }
+ }
+ }
}
return indexedGetterFallback(l, object, index);
@@ -190,9 +195,9 @@ ReturnedValue Lookup::indexedGetterObjectInt(Lookup *l, const Value &object, con
void Lookup::indexedSetterGeneric(Lookup *l, const Value &object, const Value &index, const Value &v)
{
- if (object.isObject()) {
- Object *o = object.objectValue();
- if (o->d()->arrayData && o->d()->arrayData->type == Heap::ArrayData::Simple && index.asArrayIndex() < UINT_MAX) {
+ if (Object *o = object.objectValue()) {
+ uint idx;
+ if (o->d()->arrayData && o->d()->arrayData->type == Heap::ArrayData::Simple && index.asArrayIndex(idx)) {
l->indexedSetter = indexedSetterObjectInt;
indexedSetterObjectInt(l, object, index, v);
return;
@@ -208,8 +213,8 @@ void Lookup::indexedSetterFallback(Lookup *l, const Value &object, const Value &
if (scope.engine->hasException)
return;
- uint idx = index.asArrayIndex();
- if (idx < UINT_MAX) {
+ uint idx;
+ if (index.asArrayIndex(idx)) {
if (o->d()->arrayData && o->d()->arrayData->type == Heap::ArrayData::Simple) {
Heap::SimpleArrayData *s = o->d()->arrayData.cast<Heap::SimpleArrayData>();
if (idx < s->len) {
@@ -227,18 +232,19 @@ void Lookup::indexedSetterFallback(Lookup *l, const Value &object, const Value &
void Lookup::indexedSetterObjectInt(Lookup *l, const Value &object, const Value &index, const Value &v)
{
- uint idx = index.asArrayIndex();
- if (idx == UINT_MAX || !object.isObject()) {
- indexedSetterGeneric(l, object, index, v);
- return;
- }
-
- Object *o = object.objectValue();
- if (o->d()->arrayData && o->d()->arrayData->type == Heap::ArrayData::Simple) {
- Heap::SimpleArrayData *s = o->d()->arrayData.cast<Heap::SimpleArrayData>();
- if (idx < s->len) {
- s->data(idx) = v;
- return;
+ uint idx;
+ if (index.asArrayIndex(idx)) {
+ if (Heap::Base *b = object.heapObject()) {
+ if (b->vtable()->isObject) {
+ Heap::Object *o = static_cast<Heap::Object *>(b);
+ if (o->arrayData && o->arrayData->type == Heap::ArrayData::Simple) {
+ Heap::SimpleArrayData *s = o->arrayData.cast<Heap::SimpleArrayData>();
+ if (idx < s->len) {
+ s->data(idx) = v;
+ return;
+ }
+ }
+ }
}
}
indexedSetterFallback(l, object, index, v);
@@ -345,11 +351,11 @@ ReturnedValue Lookup::getterFallback(Lookup *l, ExecutionEngine *engine, const V
ReturnedValue Lookup::getter0(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Object *o = object.objectValue();
- if (l->classList[0] == o->internalClass())
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
+ if (l->classList[0] == o->internalClass)
return o->propertyData(l->index)->asReturnedValue();
}
return getterTwoClasses(l, engine, object);
@@ -357,25 +363,24 @@ ReturnedValue Lookup::getter0(Lookup *l, ExecutionEngine *engine, const Value &o
ReturnedValue Lookup::getter1(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Object *o = object.objectValue();
- if (l->classList[0] == o->internalClass() &&
- l->classList[1] == o->prototype()->internalClass)
- return o->prototype()->propertyData(l->index)->asReturnedValue();
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
+ if (l->classList[0] == o->internalClass && l->classList[1] == o->prototype->internalClass)
+ return o->prototype->propertyData(l->index)->asReturnedValue();
}
return getterTwoClasses(l, engine, object);
}
ReturnedValue Lookup::getter2(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Object *o = object.objectValue();
- if (l->classList[0] == o->internalClass()) {
- Heap::Object *p = o->prototype();
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
+ if (l->classList[0] == o->internalClass) {
+ Heap::Object *p = o->prototype;
if (l->classList[1] == p->internalClass) {
p = p->prototype;
if (l->classList[2] == p->internalClass)
@@ -389,13 +394,13 @@ ReturnedValue Lookup::getter2(Lookup *l, ExecutionEngine *engine, const Value &o
ReturnedValue Lookup::getter0getter0(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Object *o = object.objectValue();
- if (l->classList[0] == o->internalClass())
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
+ if (l->classList[0] == o->internalClass)
return o->propertyData(l->index)->asReturnedValue();
- if (l->classList[2] == o->internalClass())
+ if (l->classList[2] == o->internalClass)
return o->propertyData(l->index2)->asReturnedValue();
}
l->getter = getterFallback;
@@ -404,15 +409,14 @@ ReturnedValue Lookup::getter0getter0(Lookup *l, ExecutionEngine *engine, const V
ReturnedValue Lookup::getter0getter1(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Object *o = object.objectValue();
- if (l->classList[0] == o->internalClass())
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
+ if (l->classList[0] == o->internalClass)
return o->propertyData(l->index)->asReturnedValue();
- if (l->classList[2] == o->internalClass() &&
- l->classList[3] == o->prototype()->internalClass)
- return o->prototype()->propertyData(l->index2)->asReturnedValue();
+ if (l->classList[2] == o->internalClass && l->classList[3] == o->prototype->internalClass)
+ return o->prototype->propertyData(l->index2)->asReturnedValue();
}
l->getter = getterFallback;
return getterFallback(l, engine, object);
@@ -420,16 +424,16 @@ ReturnedValue Lookup::getter0getter1(Lookup *l, ExecutionEngine *engine, const V
ReturnedValue Lookup::getter1getter1(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Object *o = object.objectValue();
- if (l->classList[0] == o->internalClass() &&
- l->classList[1] == o->prototype()->internalClass)
- return o->prototype()->propertyData(l->index)->asReturnedValue();
- if (l->classList[2] == o->internalClass() &&
- l->classList[3] == o->prototype()->internalClass)
- return o->prototype()->propertyData(l->index2)->asReturnedValue();
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
+ if (l->classList[0] == o->internalClass &&
+ l->classList[1] == o->prototype->internalClass)
+ return o->prototype->propertyData(l->index)->asReturnedValue();
+ if (l->classList[2] == o->internalClass &&
+ l->classList[3] == o->prototype->internalClass)
+ return o->prototype->propertyData(l->index2)->asReturnedValue();
return getterFallback(l, engine, object);
}
l->getter = getterFallback;
@@ -439,12 +443,12 @@ ReturnedValue Lookup::getter1getter1(Lookup *l, ExecutionEngine *engine, const V
ReturnedValue Lookup::getterAccessor0(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Object *o = object.objectValue();
- if (l->classList[0] == o->internalClass()) {
- Scope scope(o->engine());
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
+ if (l->classList[0] == o->internalClass) {
+ Scope scope(o->internalClass->engine);
ScopedFunctionObject getter(scope, o->propertyData(l->index + Object::GetterOffset));
if (!getter)
return Encode::undefined();
@@ -461,10 +465,10 @@ ReturnedValue Lookup::getterAccessor0(Lookup *l, ExecutionEngine *engine, const
ReturnedValue Lookup::getterAccessor1(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Heap::Object *o = object.objectValue()->d();
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
if (l->classList[0] == o->internalClass &&
l->classList[1] == o->prototype->internalClass) {
Scope scope(o->internalClass->engine);
@@ -484,10 +488,10 @@ ReturnedValue Lookup::getterAccessor1(Lookup *l, ExecutionEngine *engine, const
ReturnedValue Lookup::getterAccessor2(Lookup *l, ExecutionEngine *engine, const Value &object)
{
- if (object.isManaged()) {
- // we can safely cast to a QV4::Object here. If object is actually a string,
- // the internal class won't match
- Heap::Object *o = object.objectValue()->d();
+ // we can safely cast to a QV4::Object here. If object is actually a string,
+ // the internal class won't match
+ Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
+ if (o) {
if (l->classList[0] == o->internalClass) {
o = o->prototype;
if (l->classList[1] == o->internalClass) {
diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h
index 28b255bd9a..5c764e7ff0 100644
--- a/src/qml/jsruntime/qv4managed_p.h
+++ b/src/qml/jsruntime/qv4managed_p.h
@@ -206,6 +206,18 @@ public:
bool markBit() const { return d()->isMarked(); }
static void destroy(Heap::Base *) {}
+
+ Q_ALWAYS_INLINE Heap::Base *heapObject() const {
+ return m();
+ }
+
+ template<typename T> inline T *cast() {
+ return static_cast<T *>(this);
+ }
+ template<typename T> inline const T *cast() const {
+ return static_cast<const T *>(this);
+ }
+
private:
friend class MemoryManager;
friend struct Identifiers;
@@ -215,14 +227,12 @@ private:
template<>
inline const Managed *Value::as() const {
- if (isManaged())
- return managed();
- return 0;
+ return managed();
}
template<>
inline const Object *Value::as() const {
- return isManaged() && m() && m()->vtable()->isObject ? objectValue() : 0;
+ return objectValue();
}
}
diff --git a/src/qml/jsruntime/qv4memberdata.cpp b/src/qml/jsruntime/qv4memberdata.cpp
index 5646a44891..d5f75415cc 100644
--- a/src/qml/jsruntime/qv4memberdata.cpp
+++ b/src/qml/jsruntime/qv4memberdata.cpp
@@ -52,30 +52,16 @@ void MemberData::markObjects(Heap::Base *that, ExecutionEngine *e)
m->data[i].mark(e);
}
-static Heap::MemberData *reallocateHelper(ExecutionEngine *e, Heap::MemberData *old, uint n)
+Heap::MemberData *MemberData::allocate(ExecutionEngine *e, uint n, Heap::MemberData *old)
{
+ Q_ASSERT(!old || old->size < n);
+
uint alloc = sizeof(Heap::MemberData) + (n)*sizeof(Value);
- Scope scope(e);
- Scoped<MemberData> newMemberData(scope, e->memoryManager->allocManaged<MemberData>(alloc));
+ Heap::MemberData *m = e->memoryManager->allocManaged<MemberData>(alloc);
if (old)
- memcpy(newMemberData->d_unchecked(), old, sizeof(Heap::MemberData) + old->size * sizeof(Value));
+ memcpy(m, old, sizeof(Heap::MemberData) + old->size * sizeof(Value));
else
- newMemberData->d_unchecked()->init();
- newMemberData->d()->size = n;
- return newMemberData->d();
-}
-
-Heap::MemberData *MemberData::allocate(ExecutionEngine *e, uint n)
-{
- return reallocateHelper(e, 0, n);
-}
-
-Heap::MemberData *MemberData::reallocate(ExecutionEngine *e, Heap::MemberData *old, uint n)
-{
- uint s = old ? old->size : 0;
- if (n < s)
- return old;
-
- // n is multiplied by two to leave room for growth
- return reallocateHelper(e, old, qMax((uint)4, 2*n));
+ m->init();
+ m->size = n;
+ return m;
}
diff --git a/src/qml/jsruntime/qv4memberdata_p.h b/src/qml/jsruntime/qv4memberdata_p.h
index 969eee3619..5c89dfe8ec 100644
--- a/src/qml/jsruntime/qv4memberdata_p.h
+++ b/src/qml/jsruntime/qv4memberdata_p.h
@@ -79,8 +79,7 @@ struct MemberData : Managed
Value *data() { return d()->data; }
inline uint size() const { return d()->size; }
- static Heap::MemberData *allocate(QV4::ExecutionEngine *e, uint n);
- static Heap::MemberData *reallocate(QV4::ExecutionEngine *e, Heap::MemberData *old, uint n);
+ static Heap::MemberData *allocate(QV4::ExecutionEngine *e, uint n, Heap::MemberData *old = 0);
static void markObjects(Heap::Base *that, ExecutionEngine *e);
};
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 9b1f72bc17..3a6b9da763 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -285,7 +285,7 @@ ReturnedValue NumberPrototype::method_toPrecision(CallContext *ctx)
return Encode::undefined();
if (!ctx->argc() || ctx->args()[0].isUndefined())
- return RuntimeHelpers::toString(scope.engine, v);
+ return Encode(v->toString(scope.engine));
int precision = ctx->args()[0].toInt32();
if (precision < 1 || precision > 21) {
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 00e6d230da..8acca16dd0 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -61,7 +61,9 @@ DEFINE_OBJECT_VTABLE(Object);
void Object::setInternalClass(InternalClass *ic)
{
d()->internalClass = ic;
- ensureMemberData();
+ if ((ic->size > d()->inlineMemberSize && !d()->memberData) ||
+ (d()->memberData && d()->memberData->size < ic->size - d()->inlineMemberSize))
+ d()->memberData = MemberData::allocate(ic->engine, ic->size - d()->inlineMemberSize, d()->memberData);
}
void Object::getProperty(uint index, Property *p, PropertyAttributes *attrs) const
@@ -225,13 +227,6 @@ void Object::markObjects(Heap::Base *that, ExecutionEngine *e)
o->prototype->mark(e);
}
-void Object::ensureMemberData()
-{
- QV4::InternalClass *ic = internalClass();
- if (ic->size > d()->inlineMemberSize)
- d()->memberData = MemberData::reallocate(ic->engine, d()->memberData, ic->size - d()->inlineMemberSize);
-}
-
void Object::insertMember(String *s, const Property *p, PropertyAttributes attributes)
{
uint idx;
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 00a004ef5f..6c679deb10 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -367,8 +367,6 @@ protected:
static void advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes);
static uint getLength(const Managed *m);
- void ensureMemberData();
-
private:
ReturnedValue internalGet(String *name, bool *hasProperty) const;
ReturnedValue internalGetIndexed(uint index, bool *hasProperty) const;
@@ -500,7 +498,7 @@ inline void Object::arraySet(uint index, const Value &value)
template<>
inline const ArrayObject *Value::as() const {
- return isManaged() && m() && m()->vtable()->type == Managed::Type_ArrayObject ? static_cast<const ArrayObject *>(this) : 0;
+ return isManaged() && m()->vtable()->type == Managed::Type_ArrayObject ? static_cast<const ArrayObject *>(this) : 0;
}
#ifndef V4_BOOTSTRAP
diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp
index 7943a13ac0..59115dfe21 100644
--- a/src/qml/jsruntime/qv4objectiterator.cpp
+++ b/src/qml/jsruntime/qv4objectiterator.cpp
@@ -70,15 +70,16 @@ void ObjectIterator::next(Value *name, uint *index, Property *pd, PropertyAttrib
ScopedString n(scope);
while (1) {
- if (!current->as<Object>())
+ Object *co = current->objectValue();
+ if (!co)
break;
while (1) {
- current->as<Object>()->advanceIterator(this, name, index, pd, attrs);
+ co->advanceIterator(this, name, index, pd, attrs);
if (attrs->isEmpty())
break;
// check the property is not already defined earlier in the proto chain
- if (current->heapObject() != object->heapObject()) {
+ if (co->heapObject() != object->heapObject()) {
o = object->as<Object>();
n = *name;
bool shadowed = false;
@@ -97,7 +98,7 @@ void ObjectIterator::next(Value *name, uint *index, Property *pd, PropertyAttrib
}
if (flags & WithProtoChain)
- current->setM(current->objectValue()->prototype());
+ current->setM(co->prototype());
else
current->setM(0);
@@ -109,7 +110,8 @@ void ObjectIterator::next(Value *name, uint *index, Property *pd, PropertyAttrib
ReturnedValue ObjectIterator::nextPropertyName(Value *value)
{
- if (!object->as<Object>())
+ Object *o = object->objectValue();
+ if (!o)
return Encode::null();
PropertyAttributes attrs;
@@ -121,7 +123,7 @@ ReturnedValue ObjectIterator::nextPropertyName(Value *value)
if (attrs.isEmpty())
return Encode::null();
- *value = object->objectValue()->getValue(p->value, attrs);
+ *value = o->getValue(p->value, attrs);
if (!!name)
return name->asReturnedValue();
@@ -131,7 +133,8 @@ ReturnedValue ObjectIterator::nextPropertyName(Value *value)
ReturnedValue ObjectIterator::nextPropertyNameAsString(Value *value)
{
- if (!object->as<Object>())
+ Object *o = object->objectValue();
+ if (!o)
return Encode::null();
PropertyAttributes attrs;
@@ -143,7 +146,7 @@ ReturnedValue ObjectIterator::nextPropertyNameAsString(Value *value)
if (attrs.isEmpty())
return Encode::null();
- *value = object->objectValue()->getValue(p->value, attrs);
+ *value = o->getValue(p->value, attrs);
if (!!name)
return name->asReturnedValue();
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 6020c48250..8191083544 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -62,26 +62,24 @@ void Heap::ObjectCtor::init(QV4::ExecutionContext *scope)
void ObjectCtor::construct(const Managed *that, Scope &scope, CallData *callData)
{
const ObjectCtor *ctor = static_cast<const ObjectCtor *>(that);
- ExecutionEngine *v4 = ctor->engine();
if (!callData->argc || callData->args[0].isUndefined() || callData->args[0].isNull()) {
- ScopedObject obj(scope, v4->newObject());
- ScopedObject proto(scope, ctor->get(v4->id_prototype()));
+ ScopedObject obj(scope, scope.engine->newObject());
+ ScopedObject proto(scope, ctor->get(scope.engine->id_prototype()));
if (!!proto)
obj->setPrototype(proto);
scope.result = obj.asReturnedValue();
} else {
- scope.result = RuntimeHelpers::toObject(scope.engine, callData->args[0]);
+ scope.result = callData->args[0].toObject(scope.engine);
}
}
-void ObjectCtor::call(const Managed *m, Scope &scope, CallData *callData)
+void ObjectCtor::call(const Managed *, Scope &scope, CallData *callData)
{
- const ObjectCtor *ctor = static_cast<const ObjectCtor *>(m);
- ExecutionEngine *v4 = ctor->engine();
+ ExecutionEngine *v4 = scope.engine;
if (!callData->argc || callData->args[0].isUndefined() || callData->args[0].isNull()) {
scope.result = v4->newObject()->asReturnedValue();
} else {
- scope.result = RuntimeHelpers::toObject(v4, callData->args[0]);
+ scope.result = callData->args[0].toObject(v4);
}
}
@@ -398,7 +396,7 @@ ReturnedValue ObjectPrototype::method_toString(CallContext *ctx)
} else if (ctx->thisObject().isNull()) {
return ctx->d()->engine->newString(QStringLiteral("[object Null]"))->asReturnedValue();
} else {
- ScopedObject obj(scope, RuntimeHelpers::toObject(scope.engine, ctx->thisObject()));
+ ScopedObject obj(scope, ctx->thisObject().toObject(scope.engine));
QString className = obj->className();
return ctx->d()->engine->newString(QStringLiteral("[object %1]").arg(className))->asReturnedValue();
}
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h
index e06cb64a61..d27e853343 100644
--- a/src/qml/jsruntime/qv4profiling_p.h
+++ b/src/qml/jsruntime/qv4profiling_p.h
@@ -86,7 +86,7 @@ QT_END_NAMESPACE
engine->profiler()->trackDealloc(size, type) : false)
#define Q_V4_PROFILE(engine, function)\
- (engine->profiler() &&\
+ (Q_UNLIKELY(engine->profiler()) &&\
(engine->profiler()->featuresEnabled & (1 << Profiling::FeatureFunctionCall)) ?\
Profiling::FunctionCallProfiler::profileCall(engine->profiler(), engine, function) :\
function->code(engine, function->codeData))
diff --git a/src/qml/jsruntime/qv4property_p.h b/src/qml/jsruntime/qv4property_p.h
index 50e8f0ae7f..5069d7690b 100644
--- a/src/qml/jsruntime/qv4property_p.h
+++ b/src/qml/jsruntime/qv4property_p.h
@@ -87,8 +87,8 @@ struct Property {
inline bool isSubset(const PropertyAttributes &attrs, const Property *other, PropertyAttributes otherAttrs) const;
inline void merge(PropertyAttributes &attrs, const Property *other, PropertyAttributes otherAttrs);
- inline Heap::FunctionObject *getter() const { return value.isManaged() ? reinterpret_cast<Heap::FunctionObject *>(value.heapObject()) : 0; }
- inline Heap::FunctionObject *setter() const { return set.isManaged() ? reinterpret_cast<Heap::FunctionObject *>(set.heapObject()) : 0; }
+ inline Heap::FunctionObject *getter() const { return reinterpret_cast<Heap::FunctionObject *>(value.heapObject()); }
+ inline Heap::FunctionObject *setter() const { return reinterpret_cast<Heap::FunctionObject *>(set.heapObject()); }
inline void setGetter(FunctionObject *g) { value = reinterpret_cast<Managed *>(g); }
inline void setSetter(FunctionObject *s) { set = (s ? reinterpret_cast<Managed *>(s) : 0); }
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp
index 2418003519..889f4ea288 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/jsruntime/qv4qmlcontext.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "qqmlcontextwrapper_p.h"
+#include "qv4qmlcontext_p.h"
#include <private/qv8engine_p.h>
#include <private/qqmlengine_p.h>
@@ -60,6 +60,7 @@ QT_BEGIN_NAMESPACE
using namespace QV4;
DEFINE_OBJECT_VTABLE(QmlContextWrapper);
+DEFINE_MANAGED_VTABLE(QmlContext);
void Heap::QmlContextWrapper::init(QQmlContextData *context, QObject *scopeObject, bool ownsContext)
{
@@ -80,29 +81,6 @@ void Heap::QmlContextWrapper::destroy()
Object::destroy();
}
-ReturnedValue QmlContextWrapper::qmlScope(ExecutionEngine *v4, QQmlContextData *ctxt, QObject *scope)
-{
- Scope valueScope(v4);
-
- Scoped<QmlContextWrapper> w(valueScope, v4->memoryManager->allocObject<QmlContextWrapper>(ctxt, scope));
- return w.asReturnedValue();
-}
-
-ReturnedValue QmlContextWrapper::urlScope(ExecutionEngine *v4, const QUrl &url)
-{
- Scope scope(v4);
-
- QQmlContextData *context = new QQmlContextData;
- context->baseUrl = url;
- context->baseUrlString = url.toString();
- context->isInternal = true;
- context->isJSContext = true;
-
- Scoped<QmlContextWrapper> w(scope, v4->memoryManager->allocObject<QmlContextWrapper>(context, (QObject*)0, true));
- w->d()->isNullWrapper = true;
- return w.asReturnedValue();
-}
-
ReturnedValue QmlContextWrapper::get(const Managed *m, String *name, bool *hasProperty)
{
Q_ASSERT(m->as<QmlContextWrapper>());
@@ -320,4 +298,49 @@ void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
Object::put(m, name, value);
}
+void Heap::QmlContext::init(QV4::ExecutionContext *outerContext, QV4::QmlContextWrapper *qml)
+{
+ Heap::ExecutionContext::init(outerContext->engine(), Heap::ExecutionContext::Type_QmlContext);
+ outer = outerContext->d();
+ strictMode = false;
+ callData = outer->callData;
+ lookups = outer->lookups;
+ constantTable = outer->constantTable;
+ compilationUnit = outer->compilationUnit;
+
+ this->qml = qml->d();
+}
+
+Heap::QmlContext *QmlContext::createWorkerContext(ExecutionContext *parent, const QUrl &source, Value *sendFunction)
+{
+ Scope scope(parent);
+
+ QQmlContextData *context = new QQmlContextData;
+ context->baseUrl = source;
+ context->baseUrlString = source.toString();
+ context->isInternal = true;
+ context->isJSContext = true;
+
+ Scoped<QmlContextWrapper> qml(scope, scope.engine->memoryManager->allocObject<QmlContextWrapper>(context, (QObject*)0, true));
+ qml->d()->isNullWrapper = true;
+
+ qml->setReadOnly(false);
+ QV4::ScopedObject api(scope, scope.engine->newObject());
+ api->put(QV4::ScopedString(scope, scope.engine->newString(QStringLiteral("sendMessage"))), *sendFunction);
+ qml->QV4::Object::put(QV4::ScopedString(scope, scope.engine->newString(QStringLiteral("WorkerScript"))), api);
+ qml->setReadOnly(true);
+
+ Heap::QmlContext *c = parent->d()->engine->memoryManager->alloc<QmlContext>(parent, qml);
+ return c;
+}
+
+Heap::QmlContext *QmlContext::create(ExecutionContext *parent, QQmlContextData *context, QObject *scopeObject)
+{
+ Scope scope(parent);
+
+ Scoped<QmlContextWrapper> qml(scope, scope.engine->memoryManager->allocObject<QmlContextWrapper>(context, scopeObject));
+ Heap::QmlContext *c = parent->d()->engine->memoryManager->alloc<QmlContext>(parent, qml);
+ return c;
+}
+
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmlcontextwrapper_p.h b/src/qml/jsruntime/qv4qmlcontext_p.h
index 126ffecf0d..9aec7467da 100644
--- a/src/qml/qml/qqmlcontextwrapper_p.h
+++ b/src/qml/jsruntime/qv4qmlcontext_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QQMLCONTEXTWRAPPER_P_H
-#define QQMLCONTEXTWRAPPER_P_H
+#ifndef QV4QMLCONTEXT_P_H
+#define QV4QMLCONTEXT_P_H
//
// W A R N I N G
@@ -55,12 +55,15 @@
#include <private/qtqmlglobal_p.h>
#include <private/qv4object_p.h>
+#include <private/qv4context_p.h>
#include <private/qqmlcontext_p.h>
QT_BEGIN_NAMESPACE
namespace QV4 {
+struct QmlContextWrapper;
+
namespace Heap {
struct QmlContextWrapper : Object {
@@ -74,6 +77,12 @@ struct QmlContextWrapper : Object {
QQmlQPointer<QObject> scopeObject;
};
+struct QmlContext : ExecutionContext {
+ void init(QV4::ExecutionContext *outerContext, QV4::QmlContextWrapper *qml);
+
+ Pointer<QmlContextWrapper> qml;
+};
+
}
struct Q_QML_EXPORT QmlContextWrapper : Object
@@ -81,9 +90,6 @@ struct Q_QML_EXPORT QmlContextWrapper : Object
V4_OBJECT2(QmlContextWrapper, Object)
V4_NEEDS_DESTROY
- static ReturnedValue qmlScope(ExecutionEngine *e, QQmlContextData *ctxt, QObject *scope);
- static ReturnedValue urlScope(ExecutionEngine *v4, const QUrl &);
-
void takeContextOwnership() {
d()->ownsContext = true;
}
@@ -97,9 +103,28 @@ struct Q_QML_EXPORT QmlContextWrapper : Object
static void put(Managed *m, String *name, const Value &value);
};
+struct Q_QML_EXPORT QmlContext : public ExecutionContext
+{
+ V4_MANAGED(QmlContext, ExecutionContext)
+
+ static Heap::QmlContext *createWorkerContext(QV4::ExecutionContext *parent, const QUrl &source, Value *sendFunction);
+ static Heap::QmlContext *create(QV4::ExecutionContext *parent, QQmlContextData *context, QObject *scopeObject);
+
+ QObject *qmlScope() const {
+ return d()->qml->scopeObject;
+ }
+ QQmlContextData *qmlContext() const {
+ return *d()->qml->context;
+ }
+
+ void takeContextOwnership() {
+ d()->qml->ownsContext = true;
+ }
+};
+
}
QT_END_NAMESPACE
-#endif // QV8CONTEXTWRAPPER_P_H
+#endif
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 6b87f282cf..77dbb18b50 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -48,7 +48,6 @@
#include <private/qqmlglobal_p.h>
#include <private/qqmltypewrapper_p.h>
#include <private/qqmlvaluetypewrapper_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qqmllistwrapper_p.h>
#include <private/qqmlbuiltinfunctions_p.h>
#include <private/qv8engine_p.h>
@@ -392,9 +391,10 @@ void QObjectWrapper::setProperty(ExecutionEngine *engine, QObject *object, QQmlP
QQmlContextData *callingQmlContext = scope.engine->callingQmlContext();
QV4::Scoped<QQmlBindingFunction> bindingFunction(scope, (const Value &)f);
- bindingFunction->initBindingLocation();
- newBinding = QQmlBinding::create(property, value, object, callingQmlContext);
+ QV4::ScopedContext ctx(scope, bindingFunction->scope());
+ newBinding = QQmlBinding::create(property, bindingFunction->function(), object, callingQmlContext, ctx);
+ newBinding->setSourceLocation(bindingFunction->currentLocation());
newBinding->setTarget(object, *property, nullptr);
}
}
@@ -493,8 +493,7 @@ void QObjectWrapper::setProperty(ExecutionEngine *engine, QObject *object, QQmlP
ReturnedValue QObjectWrapper::wrap_slowPath(ExecutionEngine *engine, QObject *object)
{
- if (QQmlData::wasDeleted(object))
- return QV4::Encode::null();
+ Q_ASSERT(!QQmlData::wasDeleted(object));
QQmlData *ddata = QQmlData::get(object, true);
if (!ddata)
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h
index 504f6a69b8..c7c4f4dd77 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper_p.h
+++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h
@@ -206,14 +206,15 @@ private:
inline ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object)
{
- if (Q_LIKELY(!QQmlData::wasDeleted(object))) {
- QObjectPrivate *priv = QObjectPrivate::get(const_cast<QObject *>(object));
- if (Q_LIKELY(priv->declarativeData)) {
- auto ddata = static_cast<QQmlData *>(priv->declarativeData);
- if (Q_LIKELY(ddata->jsEngineId == engine->m_engineId && !ddata->jsWrapper.isUndefined())) {
- // We own the JS object
- return ddata->jsWrapper.value();
- }
+ if (Q_UNLIKELY(QQmlData::wasDeleted(object)))
+ return QV4::Encode::null();
+
+ QObjectPrivate *priv = QObjectPrivate::get(const_cast<QObject *>(object));
+ if (Q_LIKELY(priv->declarativeData)) {
+ auto ddata = static_cast<QQmlData *>(priv->declarativeData);
+ if (Q_LIKELY(ddata->jsEngineId == engine->m_engineId && !ddata->jsWrapper.isUndefined())) {
+ // We own the JS object
+ return ddata->jsWrapper.value();
}
}
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 4022d98c3f..218695624b 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -262,12 +262,12 @@ void RegExpCtor::construct(const Managed *, Scope &scope, CallData *callData)
bool ignoreCase = false;
bool multiLine = false;
if (!f->isUndefined()) {
- f = RuntimeHelpers::toString(scope.engine, f);
+ ScopedString s(scope, f->toString(scope.engine));
if (scope.hasException()) {
scope.result = Encode::undefined();
return;
}
- QString str = f->stringValue()->toQString();
+ QString str = s->toQString();
for (int i = 0; i < str.length(); ++i) {
if (str.at(i) == QLatin1Char('g') && !global) {
global = true;
@@ -356,10 +356,10 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx)
return ctx->engine()->throwTypeError();
ScopedValue arg(scope, ctx->argument(0));
- arg = RuntimeHelpers::toString(scope.engine, arg);
+ ScopedString str(scope, arg->toString(scope.engine));
if (scope.hasException())
return Encode::undefined();
- QString s = arg->stringValue()->toQString();
+ QString s = str->toQString();
int offset = r->global() ? r->lastIndexProperty()->toInt32() : 0;
if (offset < 0 || offset > s.length()) {
@@ -391,11 +391,11 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx)
}
array->setArrayLengthUnchecked(len);
*array->propertyData(Index_ArrayIndex) = Primitive::fromInt32(result);
- *array->propertyData(Index_ArrayInput) = arg;
+ *array->propertyData(Index_ArrayInput) = str;
RegExpCtor::Data *dd = regExpCtor->d();
dd->lastMatch = array;
- dd->lastInput = arg->stringValue()->d();
+ dd->lastInput = str->d();
dd->lastMatchStart = matchOffsets[0];
dd->lastMatchEnd = matchOffsets[1];
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 9c20133a26..d6c55926b1 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -53,7 +53,7 @@
#include "qv4numberobject_p.h"
#include "private/qlocale_tools_p.h"
#include "qv4scopedvalue_p.h"
-#include <private/qqmlcontextwrapper_p.h>
+#include <private/qv4qmlcontext_p.h>
#include <private/qqmltypewrapper_p.h>
#include <private/qqmlengine_p.h>
#include <private/qqmljavascriptexpression_p.h>
@@ -345,28 +345,29 @@ ReturnedValue Runtime::method_deleteName(ExecutionEngine *engine, int nameIndex)
QV4::ReturnedValue Runtime::method_instanceof(ExecutionEngine *engine, const Value &left, const Value &right)
{
- Scope scope(engine);
- ScopedFunctionObject f(scope, right.as<FunctionObject>());
- if (!f)
+ const FunctionObject *function = right.as<FunctionObject>();
+ if (!function)
return engine->throwTypeError();
- if (f->isBoundFunction())
- f = static_cast<BoundFunction *>(f.getPointer())->target();
+ Heap::FunctionObject *f = function->d();
+ if (function->isBoundFunction())
+ f = function->cast<BoundFunction>()->target();
- ScopedObject v(scope, left.as<Object>());
- if (!v)
+ const Object *o = left.as<Object>();
+ if (!o)
return Encode(false);
+ Heap::Object *v = o->d();
- ScopedObject o(scope, f->protoProperty());
+ o = f->protoProperty();
if (!o)
return engine->throwTypeError();
while (v) {
- v = v->prototype();
+ v = v->prototype;
if (!v)
break;
- else if (o->d() == v->d())
+ else if (o->d() == v)
return Encode(true);
}
@@ -375,13 +376,14 @@ QV4::ReturnedValue Runtime::method_instanceof(ExecutionEngine *engine, const Val
QV4::ReturnedValue Runtime::method_in(ExecutionEngine *engine, const Value &left, const Value &right)
{
- if (!right.isObject())
+ Object *ro = right.objectValue();
+ if (!ro)
return engine->throwTypeError();
Scope scope(engine);
ScopedString s(scope, left.toString(engine));
if (scope.hasException())
return Encode::undefined();
- bool r = right.objectValue()->hasProperty(s);
+ bool r = ro->hasProperty(s);
return Encode(r);
}
@@ -492,8 +494,8 @@ Heap::String *RuntimeHelpers::convertToString(ExecutionEngine *engine, const Val
else
return engine->id_false()->d();
case Value::Managed_Type:
- if (value.isString())
- return value.stringValue()->d();
+ if (String *s = value.stringValue())
+ return s->d();
{
Scope scope(engine);
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(value, STRING_HINT));
@@ -523,8 +525,8 @@ static Heap::String *convert_to_string_add(ExecutionEngine *engine, const Value
else
return engine->id_false()->d();
case Value::Managed_Type:
- if (value.isString())
- return value.stringValue()->d();
+ if (String *s = value.stringValue())
+ return s->d();
{
Scope scope(engine);
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(value, PREFERREDTYPE_HINT));
@@ -543,19 +545,25 @@ QV4::ReturnedValue RuntimeHelpers::addHelper(ExecutionEngine *engine, const Valu
ScopedValue pleft(scope, RuntimeHelpers::toPrimitive(left, PREFERREDTYPE_HINT));
ScopedValue pright(scope, RuntimeHelpers::toPrimitive(right, PREFERREDTYPE_HINT));
- if (pleft->isString() || pright->isString()) {
- if (!pleft->isString())
+ String *sleft = pleft->stringValue();
+ String *sright = pright->stringValue();
+ if (sleft || sright) {
+ if (!sleft) {
pleft = convert_to_string_add(engine, pleft);
- if (!pright->isString())
+ sleft = static_cast<String *>(pleft.ptr);
+ }
+ if (!sright) {
pright = convert_to_string_add(engine, pright);
+ sright = static_cast<String *>(pright.ptr);
+ }
if (scope.engine->hasException)
return Encode::undefined();
- if (!pleft->stringValue()->d()->length())
- return pright->asReturnedValue();
- if (!pright->stringValue()->d()->length())
- return pleft->asReturnedValue();
+ if (!sleft->d()->length())
+ return sright->asReturnedValue();
+ if (!sright->d()->length())
+ return sleft->asReturnedValue();
MemoryManager *mm = engine->memoryManager;
- return (mm->alloc<String>(mm, pleft->stringValue()->d(), pright->stringValue()->d()))->asReturnedValue();
+ return (mm->alloc<String>(mm, sleft->d(), sright->d()))->asReturnedValue();
}
double x = RuntimeHelpers::toNumber(pleft);
double y = RuntimeHelpers::toNumber(pright);
@@ -566,31 +574,28 @@ QV4::ReturnedValue Runtime::method_addString(ExecutionEngine *engine, const Valu
{
Q_ASSERT(left.isString() || right.isString());
- if (left.isString() && right.isString()) {
- if (!left.stringValue()->d()->length())
- return right.asReturnedValue();
- if (!right.stringValue()->d()->length())
- return left.asReturnedValue();
- MemoryManager *mm = engine->memoryManager;
- return (mm->alloc<String>(mm, left.stringValue()->d(), right.stringValue()->d()))->asReturnedValue();
- }
-
Scope scope(engine);
ScopedValue pleft(scope, left);
ScopedValue pright(scope, right);
+ String *sleft = pleft->stringValue();
+ String *sright = pright->stringValue();
- if (!pleft->isString())
- pleft = convert_to_string_add(engine, left);
- if (!pright->isString())
- pright = convert_to_string_add(engine, right);
+ if (!sleft) {
+ pleft = convert_to_string_add(engine, pleft);
+ sleft = static_cast<String *>(pleft.ptr);
+ }
+ if (!sright) {
+ pright = convert_to_string_add(engine, pright);
+ sright = static_cast<String *>(pright.ptr);
+ }
if (scope.engine->hasException)
return Encode::undefined();
- if (!pleft->stringValue()->d()->length())
+ if (!sleft->d()->length())
return pright->asReturnedValue();
- if (!pright->stringValue()->d()->length())
+ if (!sright->d()->length())
return pleft->asReturnedValue();
MemoryManager *mm = engine->memoryManager;
- return (mm->alloc<String>(mm, pleft->stringValue()->d(), pright->stringValue()->d()))->asReturnedValue();
+ return (mm->alloc<String>(mm, sleft->d(), sright->d()))->asReturnedValue();
}
void Runtime::method_setProperty(ExecutionEngine *engine, const Value &object, int nameIndex, const Value &value)
@@ -750,13 +755,15 @@ uint RuntimeHelpers::equalHelper(const Value &x, const Value &y)
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
#else
- if ((x.isNumber() || x.isString()) && y.isObject()) {
- Scope scope(y.objectValue()->engine());
- ScopedValue py(scope, RuntimeHelpers::toPrimitive(y, PREFERREDTYPE_HINT));
+ Object *xo = x.objectValue();
+ Object *yo = y.objectValue();
+ if (yo && (x.isNumber() || x.isString())) {
+ Scope scope(yo->engine());
+ ScopedValue py(scope, RuntimeHelpers::objectDefaultValue(yo, PREFERREDTYPE_HINT));
return Runtime::method_compareEqual(x, py);
- } else if (x.isObject() && (y.isNumber() || y.isString())) {
- Scope scope(x.objectValue()->engine());
- ScopedValue px(scope, RuntimeHelpers::toPrimitive(x, PREFERREDTYPE_HINT));
+ } else if (xo && (y.isNumber() || y.isString())) {
+ Scope scope(xo->engine());
+ ScopedValue px(scope, RuntimeHelpers::objectDefaultValue(xo, PREFERREDTYPE_HINT));
return Runtime::method_compareEqual(px, y);
}
#endif
@@ -787,23 +794,27 @@ QV4::Bool Runtime::method_compareGreaterThan(const Value &l, const Value &r)
return l.integerValue() > r.integerValue();
if (l.isNumber() && r.isNumber())
return l.asDouble() > r.asDouble();
- if (l.isString() && r.isString()) {
+ String *sl = l.stringValue();
+ String *sr = r.stringValue();
+ if (sl && sr) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
return false;
#else
- return r.stringValue()->compare(l.stringValue());
+ return sr->compare(sl);
#endif
}
- if (l.isObject() || r.isObject()) {
+ Object *ro = r.objectValue();
+ Object *lo = l.objectValue();
+ if (ro || lo) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
#else
- QV4::ExecutionEngine *e = (l.isObject() ? l.objectValue() : r.objectValue())->engine();
+ QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
QV4::Scope scope(e);
- QV4::ScopedValue pl(scope, RuntimeHelpers::toPrimitive(l, QV4::NUMBER_HINT));
- QV4::ScopedValue pr(scope, RuntimeHelpers::toPrimitive(r, QV4::NUMBER_HINT));
+ QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());
+ QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());
return Runtime::method_compareGreaterThan(pl, pr);
#endif
}
@@ -820,23 +831,27 @@ QV4::Bool Runtime::method_compareLessThan(const Value &l, const Value &r)
return l.integerValue() < r.integerValue();
if (l.isNumber() && r.isNumber())
return l.asDouble() < r.asDouble();
- if (l.isString() && r.isString()) {
+ String *sl = l.stringValue();
+ String *sr = r.stringValue();
+ if (sl && sr) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
return false;
#else
- return l.stringValue()->compare(r.stringValue());
+ return sl->compare(sr);
#endif
}
- if (l.isObject() || r.isObject()) {
+ Object *ro = r.objectValue();
+ Object *lo = l.objectValue();
+ if (ro || lo) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
#else
- QV4::ExecutionEngine *e = (l.isObject() ? l.objectValue() : r.objectValue())->engine();
+ QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
QV4::Scope scope(e);
- QV4::ScopedValue pl(scope, RuntimeHelpers::toPrimitive(l, QV4::NUMBER_HINT));
- QV4::ScopedValue pr(scope, RuntimeHelpers::toPrimitive(r, QV4::NUMBER_HINT));
+ QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());
+ QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());
return Runtime::method_compareLessThan(pl, pr);
#endif
}
@@ -853,23 +868,27 @@ QV4::Bool Runtime::method_compareGreaterEqual(const Value &l, const Value &r)
return l.integerValue() >= r.integerValue();
if (l.isNumber() && r.isNumber())
return l.asDouble() >= r.asDouble();
- if (l.isString() && r.isString()) {
+ String *sl = l.stringValue();
+ String *sr = r.stringValue();
+ if (sl && sr) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
return false;
#else
- return !l.stringValue()->compare(r.stringValue());
+ return !sl->compare(sr);
#endif
}
- if (l.isObject() || r.isObject()) {
+ Object *ro = r.objectValue();
+ Object *lo = l.objectValue();
+ if (ro || lo) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
#else
- QV4::ExecutionEngine *e = (l.isObject() ? l.objectValue() : r.objectValue())->engine();
+ QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
QV4::Scope scope(e);
- QV4::ScopedValue pl(scope, RuntimeHelpers::toPrimitive(l, QV4::NUMBER_HINT));
- QV4::ScopedValue pr(scope, RuntimeHelpers::toPrimitive(r, QV4::NUMBER_HINT));
+ QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());
+ QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());
return Runtime::method_compareGreaterEqual(pl, pr);
#endif
}
@@ -886,23 +905,27 @@ QV4::Bool Runtime::method_compareLessEqual(const Value &l, const Value &r)
return l.integerValue() <= r.integerValue();
if (l.isNumber() && r.isNumber())
return l.asDouble() <= r.asDouble();
- if (l.isString() && r.isString()) {
+ String *sl = l.stringValue();
+ String *sr = r.stringValue();
+ if (sl && sr) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
return false;
#else
- return !r.stringValue()->compare(l.stringValue());
+ return !sr->compare(sl);
#endif
}
- if (l.isObject() || r.isObject()) {
+ Object *ro = r.objectValue();
+ Object *lo = l.objectValue();
+ if (ro || lo) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
#else
- QV4::ExecutionEngine *e = (l.isObject() ? l.objectValue() : r.objectValue())->engine();
+ QV4::ExecutionEngine *e = (lo ? lo : ro)->engine();
QV4::Scope scope(e);
- QV4::ScopedValue pl(scope, RuntimeHelpers::toPrimitive(l, QV4::NUMBER_HINT));
- QV4::ScopedValue pr(scope, RuntimeHelpers::toPrimitive(r, QV4::NUMBER_HINT));
+ QV4::ScopedValue pl(scope, lo ? RuntimeHelpers::objectDefaultValue(lo, QV4::NUMBER_HINT) : l.asReturnedValue());
+ QV4::ScopedValue pr(scope, ro ? RuntimeHelpers::objectDefaultValue(ro, QV4::NUMBER_HINT) : r.asReturnedValue());
return Runtime::method_compareLessEqual(pl, pr);
#endif
}
@@ -1045,13 +1068,13 @@ ReturnedValue Runtime::method_callPropertyLookup(ExecutionEngine *engine, uint i
Lookup *l = engine->current->lookups + index;
Value v;
v = l->getter(l, engine, callData->thisObject);
- if (v.isObject()) {
+ Object *o = v.objectValue();
+ if (Q_LIKELY(o)) {
Scope scope(engine);
- v.objectValue()->call(scope, callData);
+ o->call(scope, callData);
return scope.result.asReturnedValue();
- } else {
- return engine->throwTypeError();
}
+ return engine->throwTypeError();
}
ReturnedValue Runtime::method_callElement(ExecutionEngine *engine, const Value &index, CallData *callData)
@@ -1074,12 +1097,12 @@ ReturnedValue Runtime::method_callElement(ExecutionEngine *engine, const Value &
ReturnedValue Runtime::method_callValue(ExecutionEngine *engine, const Value &func, CallData *callData)
{
- if (!func.isObject())
- return engine->throwTypeError(QStringLiteral("%1 is not a function").arg(func.toQStringNoThrow()));
-
- Scope scope(engine);
- func.objectValue()->call(scope, callData);
- return scope.result.asReturnedValue();
+ if (Object *o = func.objectValue()) {
+ Scope scope(engine);
+ o->call(scope, callData);
+ return scope.result.asReturnedValue();
+ }
+ return engine->throwTypeError(QStringLiteral("%1 is not a function").arg(func.toQStringNoThrow()));
}
@@ -1149,14 +1172,13 @@ ReturnedValue Runtime::method_constructPropertyLookup(ExecutionEngine *engine, u
Lookup *l = engine->current->lookups + index;
Value v;
v = l->getter(l, engine, callData->thisObject);
- if (v.isObject()) {
+ Object *o = v.objectValue();
+ if (Q_LIKELY(o)) {
Scope scope(engine);
- ScopedValue result(scope);
- v.objectValue()->construct(scope, callData);
+ o->construct(scope, callData);
return scope.result.asReturnedValue();
- } else {
- return engine->throwTypeError();
}
+ return engine->throwTypeError();
}
@@ -1367,29 +1389,6 @@ QV4::ReturnedValue Runtime::method_decrement(const Value &value)
}
}
-#ifndef V4_BOOTSTRAP
-
-QV4::ReturnedValue RuntimeHelpers::toString(ExecutionEngine *engine, const Value &value)
-{
- if (value.isString())
- return value.asReturnedValue();
- return RuntimeHelpers::convertToString(engine, value)->asReturnedValue();
-}
-
-QV4::ReturnedValue RuntimeHelpers::toObject(ExecutionEngine *engine, const Value &value)
-{
- if (value.isObject())
- return value.asReturnedValue();
-
- Heap::Object *o = RuntimeHelpers::convertToObject(engine, value);
- if (!o) // type error
- return Encode::undefined();
-
- return Encode(o);
-}
-
-#endif // V4_BOOTSTRAP
-
ReturnedValue Runtime::method_toDouble(const Value &value)
{
TRACE1(value);
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index a32b3f1663..0d787714cf 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -106,10 +106,7 @@ struct Q_QML_PRIVATE_EXPORT RuntimeHelpers {
static double toNumber(const Value &value);
static void numberToString(QString *result, double num, int radix = 10);
- static ReturnedValue toString(ExecutionEngine *engine, const Value &value);
static Heap::String *convertToString(ExecutionEngine *engine, const Value &value);
-
- static ReturnedValue toObject(ExecutionEngine *engine, const Value &value);
static Heap::Object *convertToObject(ExecutionEngine *engine, const Value &value);
static Bool equalHelper(const Value &x, const Value &y);
diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h
index e06a3f5ec2..355b7890b6 100644
--- a/src/qml/jsruntime/qv4runtimeapi_p.h
+++ b/src/qml/jsruntime/qv4runtimeapi_p.h
@@ -63,6 +63,11 @@ template <typename T>
struct ExceptionCheck {
enum { NeedsCheck = 1 };
};
+// push_catch and pop context methods shouldn't check for exceptions
+template <>
+struct ExceptionCheck<void (*)(QV4::NoThrowEngine *)> {
+ enum { NeedsCheck = 0 };
+};
template <typename A>
struct ExceptionCheck<void (*)(A, QV4::NoThrowEngine)> {
enum { NeedsCheck = 0 };
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 5022d7c3bc..4e627e003f 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -97,7 +97,7 @@ struct Scope {
engine->jsStackTop = mark;
}
- Value *alloc(int nValues) const {
+ QML_NEARLY_ALWAYS_INLINE Value *alloc(int nValues) const {
return engine->jsAlloca(nValues);
}
@@ -189,63 +189,70 @@ struct Scoped
{
enum ConvertType { Convert };
- inline void setPointer(const Managed *p) {
+ QML_NEARLY_ALWAYS_INLINE void setPointer(const Managed *p) {
ptr->setM(p ? p->m() : 0);
}
- Scoped(const Scope &scope)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope)
{
ptr = scope.engine->jsAlloca(1);
}
- Scoped(const Scope &scope, const Value &v)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const Value &v)
{
ptr = scope.engine->jsAlloca(1);
setPointer(v.as<T>());
}
- Scoped(const Scope &scope, Heap::Base *o)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, Heap::Base *o)
{
Value v;
v = o;
ptr = scope.engine->jsAlloca(1);
setPointer(v.as<T>());
}
- Scoped(const Scope &scope, const ScopedValue &v)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const ScopedValue &v)
{
ptr = scope.engine->jsAlloca(1);
setPointer(v.ptr->as<T>());
}
- Scoped(const Scope &scope, const Value &v, ConvertType)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const Value &v, ConvertType)
{
ptr = scope.engine->jsAlloca(1);
ptr->setRawValue(value_convert<T>(scope.engine, v));
}
- Scoped(const Scope &scope, const Value *v)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const Value *v)
{
ptr = scope.engine->jsAlloca(1);
setPointer(v ? v->as<T>() : 0);
}
- Scoped(const Scope &scope, T *t)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, T *t)
{
ptr = scope.engine->jsAlloca(1);
setPointer(t);
}
- Scoped(const Scope &scope, typename T::Data *t)
+
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const T *t)
+ {
+ ptr = scope.engine->jsAlloca(1);
+ setPointer(t);
+ }
+
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, typename T::Data *t)
{
ptr = scope.engine->jsAlloca(1);
*ptr = t;
}
- Scoped(const Scope &scope, const ReturnedValue &v)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const ReturnedValue &v)
{
ptr = scope.engine->jsAlloca(1);
setPointer(QV4::Value::fromReturnedValue(v).as<T>());
}
- Scoped(const Scope &scope, const ReturnedValue &v, ConvertType)
+ QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const ReturnedValue &v, ConvertType)
{
ptr = scope.engine->jsAlloca(1);
ptr->setRawValue(value_convert<T>(scope.engine, QV4::Value::fromReturnedValue(v)));
@@ -291,11 +298,11 @@ struct Scoped
}
T *operator->() {
- return ptr->cast<T>();
+ return getPointer();
}
const T *operator->() const {
- return ptr->cast<T>();
+ return getPointer();
}
bool operator!() const {
@@ -306,14 +313,19 @@ struct Scoped
}
T *getPointer() {
- return ptr->cast<T>();
+ return reinterpret_cast<T *>(ptr);
+ }
+
+ const T *getPointer() const {
+ return reinterpret_cast<T *>(ptr);
}
+
Value *getRef() {
return ptr;
}
- ReturnedValue asReturnedValue() const {
- return ptr->m() ? ptr->rawValue() : Encode::undefined();
+ QML_NEARLY_ALWAYS_INLINE ReturnedValue asReturnedValue() const {
+ return ptr->rawValue();
}
Value *ptr;
@@ -358,8 +370,6 @@ struct ScopedProperty
ScopedProperty(Scope &scope)
{
property = reinterpret_cast<Property*>(scope.alloc(sizeof(Property) / sizeof(Value)));
- property->value = Encode::undefined();
- property->set = Encode::undefined();
}
Property *operator->() { return property; }
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 552171256f..b54177bee9 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -54,71 +54,12 @@
#include <private/qv4profiling_p.h>
#include <qv4jsir_p.h>
#include <qv4codegen_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <QtCore/QDebug>
#include <QtCore/QString>
-QT_BEGIN_NAMESPACE
-
-namespace QV4 {
-namespace Heap {
-
-struct QmlBindingWrapper : FunctionObject {
- void init(QV4::QmlContext *scope, Function *f);
-};
-
-}
-
-struct QmlBindingWrapper : FunctionObject {
- V4_OBJECT2(QmlBindingWrapper, FunctionObject)
-
- static void call(const Managed *that, Scope &scope, CallData *callData);
-};
-
-}
-
-QT_END_NAMESPACE
-
using namespace QV4;
-DEFINE_OBJECT_VTABLE(QmlBindingWrapper);
-
-void Heap::QmlBindingWrapper::init(QV4::QmlContext *scope, Function *f)
-{
- Heap::FunctionObject::init(scope, scope->d()->engine->id_eval(), /*createProto = */ false);
-
- Q_ASSERT(scope->inUse());
-
- function = f;
- if (function)
- function->compilationUnit->addref();
-}
-
-void QmlBindingWrapper::call(const Managed *that, Scope &scope, CallData *callData)
-{
- const QmlBindingWrapper *This = static_cast<const QmlBindingWrapper *>(that);
- ExecutionEngine *v4 = static_cast<const Object *>(that)->engine();
- if (v4->hasException) {
- scope.result = Encode::undefined();
- return;
- }
- CHECK_STACK_LIMITS(v4, scope);
-
- ExecutionContextSaver ctxSaver(scope);
-
- QV4::Function *f = This->function();
- if (!f) {
- scope.result = QV4::Encode::undefined();
- return;
- }
-
- Scoped<CallContext> ctx(scope, v4->currentContext->newCallContext(This, callData));
- v4->pushContext(ctx);
-
- scope.result = Q_V4_PROFILE(v4, f);
-}
-
Script::Script(ExecutionEngine *v4, QmlContext *qml, CompiledData::CompilationUnit *compilationUnit)
: line(0), column(0), scope(v4->rootContext()), strictMode(false), inheritContext(true), parsed(false)
, compilationUnit(compilationUnit), vmFunction(0), parseAsBinding(true)
@@ -230,10 +171,12 @@ ReturnedValue Script::run()
return Q_V4_PROFILE(engine, vmFunction);
} else {
Scoped<QmlContext> qml(valueScope, qmlContext.value());
- ScopedFunctionObject f(valueScope, engine->memoryManager->allocObject<QmlBindingWrapper>(qml, vmFunction));
ScopedCallData callData(valueScope);
callData->thisObject = Primitive::undefinedValue();
- f->call(valueScope, callData);
+ if (vmFunction->canUseSimpleFunction())
+ qml->simpleCall(valueScope, callData, vmFunction);
+ else
+ qml->call(valueScope, callData, vmFunction);
return valueScope.result.asReturnedValue();
}
}
@@ -303,17 +246,6 @@ QQmlRefPointer<QV4::CompiledData::CompilationUnit> Script::precompile(IR::Module
return isel->compile(/*generate unit data*/false);
}
-ReturnedValue Script::qmlBinding()
-{
- if (!parsed)
- parse();
- ExecutionEngine *v4 = scope->engine();
- Scope valueScope(v4);
- Scoped<QmlContext> qml(valueScope, qmlContext.value());
- ScopedObject v(valueScope, v4->memoryManager->allocObject<QmlBindingWrapper>(qml, vmFunction));
- return v.asReturnedValue();
-}
-
QV4::ReturnedValue Script::evaluate(ExecutionEngine *engine, const QString &script, QmlContext *qmlContext)
{
QV4::Scope scope(engine);
diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h
index 2e87a7692b..f96f0254a5 100644
--- a/src/qml/jsruntime/qv4script_p.h
+++ b/src/qml/jsruntime/qv4script_p.h
@@ -53,7 +53,7 @@
#include "qv4global_p.h"
#include "qv4engine_p.h"
#include "qv4functionobject_p.h"
-#include "qv4context_p.h"
+#include "qv4qmlcontext_p.h"
#include <QQmlError>
@@ -136,7 +136,6 @@ struct Q_QML_EXPORT Script {
void parse();
ReturnedValue run();
- ReturnedValue qmlBinding();
Function *function();
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index 23ec3349b9..4890a85724 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -267,7 +267,7 @@ public:
template<>
inline const String *Value::as() const {
- return isManaged() && m() && m()->vtable()->isString ? static_cast<const String *>(this) : 0;
+ return isManaged() && m()->vtable()->isString ? static_cast<const String *>(this) : 0;
}
#ifndef V4_BOOTSTRAP
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 829ada0c1a..6fbf1c3c85 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -218,8 +218,8 @@ static QString getThisString(ExecutionContext *ctx)
{
Scope scope(ctx);
ScopedValue t(scope, ctx->thisObject());
- if (t->isString())
- return t->stringValue()->toQString();
+ if (String *s = t->stringValue())
+ return s->toQString();
if (StringObject *thisString = t->as<StringObject>())
return thisString->d()->string->toQString();
if (t->isUndefined() || t->isNull()) {
@@ -282,13 +282,13 @@ ReturnedValue StringPrototype::method_concat(CallContext *context)
if (scope.engine->hasException)
return Encode::undefined();
- ScopedValue v(scope);
+ ScopedString s(scope);
for (int i = 0; i < context->argc(); ++i) {
- v = RuntimeHelpers::toString(scope.engine, context->args()[i]);
+ s = context->args()[i].toString(scope.engine);
if (scope.hasException())
return Encode::undefined();
- Q_ASSERT(v->isString());
- value += v->stringValue()->toQString();
+ Q_ASSERT(s->isString());
+ value += s->toQString();
}
return context->d()->engine->newString(value)->asReturnedValue();
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index 95c95b1974..e34ac9c764 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -77,24 +77,24 @@ int Value::toUInt16() const
bool Value::toBoolean() const
{
- switch (type()) {
- case Value::Undefined_Type:
- case Value::Null_Type:
+ if (isInteger() || isBoolean())
+ return static_cast<bool>(int_32());
+
+ if (isUndefined() || isNull())
return false;
- case Value::Boolean_Type:
- case Value::Integer_Type:
- return (bool)int_32();
- case Value::Managed_Type:
+
+ if (isManaged()) {
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
#else
- if (isString())
- return stringValue()->toQString().length() > 0;
+ if (String *s = stringValue())
+ return s->toQString().length() > 0;
#endif
return true;
- default: // double
- return doubleValue() && !std::isnan(doubleValue());
}
+
+ // double
+ return doubleValue() && !std::isnan(doubleValue());
}
double Value::toInteger() const
@@ -114,8 +114,8 @@ double Value::toNumberImpl() const
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
#else
- if (isString())
- return RuntimeHelpers::stringToNumber(stringValue()->toQString());
+ if (String *s = stringValue())
+ return RuntimeHelpers::stringToNumber(s->toQString());
{
Q_ASSERT(isObject());
Scope scope(objectValue()->engine());
@@ -150,8 +150,8 @@ QString Value::toQStringNoThrow() const
else
return QStringLiteral("false");
case Value::Managed_Type:
- if (isString())
- return stringValue()->toQString();
+ if (String *s = stringValue())
+ return s->toQString();
{
Q_ASSERT(isObject());
Scope scope(objectValue()->engine());
@@ -203,8 +203,8 @@ QString Value::toQString() const
else
return QStringLiteral("false");
case Value::Managed_Type:
- if (isString())
- return stringValue()->toQString();
+ if (String *s = stringValue())
+ return s->toQString();
{
Q_ASSERT(isObject());
Scope scope(objectValue()->engine());
@@ -228,8 +228,10 @@ QString Value::toQString() const
bool Value::sameValue(Value other) const {
if (_val == other._val)
return true;
- if (isString() && other.isString())
- return stringValue()->isEqualTo(other.stringValue());
+ String *s = stringValue();
+ String *os = other.stringValue();
+ if (s && os)
+ return s->isEqualTo(os);
if (isInteger() && other.isDouble())
return int_32() ? (double(int_32()) == other.doubleValue()) : (other._val == 0);
if (isDouble() && other.isInteger())
@@ -298,15 +300,15 @@ double Primitive::toInteger(double number)
#ifndef V4_BOOTSTRAP
Heap::String *Value::toString(ExecutionEngine *e) const
{
- if (isString())
- return stringValue()->d();
+ if (String *s = stringValue())
+ return s->d();
return RuntimeHelpers::convertToString(e, *this);
}
Heap::Object *Value::toObject(ExecutionEngine *e) const
{
- if (isObject())
- return objectValue()->d();
+ if (Object *o = objectValue())
+ return o->d();
return RuntimeHelpers::convertToObject(e, *this);
}
@@ -330,8 +332,8 @@ uint Value::asArrayLength(bool *ok) const
}
return idx;
}
- if (isString())
- return stringValue()->toUInt(ok);
+ if (String *s = stringValue())
+ return s->toUInt(ok);
uint idx = toUInt32();
double d = toNumber();
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 6d5cff4ecc..816b8fb11b 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -160,9 +160,9 @@ private:
quint64 _val;
public:
- Q_ALWAYS_INLINE quint64 &rawValueRef() { return _val; }
- Q_ALWAYS_INLINE quint64 rawValue() const { return _val; }
- Q_ALWAYS_INLINE void setRawValue(quint64 raw) { _val = raw; }
+ QML_NEARLY_ALWAYS_INLINE quint64 &rawValueRef() { return _val; }
+ QML_NEARLY_ALWAYS_INLINE quint64 rawValue() const { return _val; }
+ QML_NEARLY_ALWAYS_INLINE void setRawValue(quint64 raw) { _val = raw; }
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
static inline int valueOffset() { return 0; }
@@ -171,23 +171,23 @@ public:
static inline int valueOffset() { return 4; }
static inline int tagOffset() { return 0; }
#endif
- Q_ALWAYS_INLINE void setTagValue(quint32 tag, quint32 value) { _val = quint64(tag) << 32 | value; }
- Q_ALWAYS_INLINE quint32 value() const { return _val & quint64(~quint32(0)); }
- Q_ALWAYS_INLINE quint32 tag() const { return _val >> 32; }
+ QML_NEARLY_ALWAYS_INLINE void setTagValue(quint32 tag, quint32 value) { _val = quint64(tag) << 32 | value; }
+ QML_NEARLY_ALWAYS_INLINE quint32 value() const { return _val & quint64(~quint32(0)); }
+ QML_NEARLY_ALWAYS_INLINE quint32 tag() const { return _val >> 32; }
#if defined(QV4_USE_64_BIT_VALUE_ENCODING)
- Q_ALWAYS_INLINE Heap::Base *m() const
+ QML_NEARLY_ALWAYS_INLINE Heap::Base *m() const
{
Heap::Base *b;
memcpy(&b, &_val, 8);
return b;
}
- Q_ALWAYS_INLINE void setM(Heap::Base *b)
+ QML_NEARLY_ALWAYS_INLINE void setM(Heap::Base *b)
{
memcpy(&_val, &b, 8);
}
#else // !QV4_USE_64_BIT_VALUE_ENCODING
- Q_ALWAYS_INLINE Heap::Base *m() const
+ QML_NEARLY_ALWAYS_INLINE Heap::Base *m() const
{
Q_STATIC_ASSERT(sizeof(Heap::Base*) == sizeof(quint32));
Heap::Base *b;
@@ -195,7 +195,7 @@ public:
memcpy(&b, &v, 4);
return b;
}
- Q_ALWAYS_INLINE void setM(Heap::Base *b)
+ QML_NEARLY_ALWAYS_INLINE void setM(Heap::Base *b)
{
quint32 v;
memcpy(&v, &b, 4);
@@ -203,32 +203,32 @@ public:
}
#endif
- Q_ALWAYS_INLINE int int_32() const
+ QML_NEARLY_ALWAYS_INLINE int int_32() const
{
return int(value());
}
- Q_ALWAYS_INLINE void setInt_32(int i)
+ QML_NEARLY_ALWAYS_INLINE void setInt_32(int i)
{
setTagValue(Integer_Type_Internal, quint32(i));
}
- Q_ALWAYS_INLINE uint uint_32() const { return value(); }
+ QML_NEARLY_ALWAYS_INLINE uint uint_32() const { return value(); }
- Q_ALWAYS_INLINE void setEmpty()
+ QML_NEARLY_ALWAYS_INLINE void setEmpty()
{
setTagValue(Empty_Type_Internal, value());
}
- Q_ALWAYS_INLINE void setEmpty(int i)
+ QML_NEARLY_ALWAYS_INLINE void setEmpty(int i)
{
setTagValue(Empty_Type_Internal, quint32(i));
}
- Q_ALWAYS_INLINE void setEmpty(quint32 i)
+ QML_NEARLY_ALWAYS_INLINE void setEmpty(quint32 i)
{
setTagValue(Empty_Type_Internal, i);
}
- Q_ALWAYS_INLINE quint32 emptyValue()
+ QML_NEARLY_ALWAYS_INLINE quint32 emptyValue()
{
Q_ASSERT(isEmpty());
return quint32(value());
@@ -302,6 +302,7 @@ public:
inline bool isUndefined() const { return _val == 0; }
inline bool isDouble() const { return (_val >> IsDouble_Shift); }
inline bool isManaged() const { return !isUndefined() && ((_val >> IsManagedOrUndefined_Shift) == 0); }
+ inline bool isManagedOrUndefined() const { return ((_val >> IsManagedOrUndefined_Shift) == 0); }
inline bool integerCompatible() const {
return (_val >> IsIntegerConvertible_Shift) == 3;
@@ -317,6 +318,7 @@ public:
inline bool isUndefined() const { return tag() == Managed_Type_Internal && value() == 0; }
inline bool isDouble() const { return (tag() & NotDouble_Mask) != NotDouble_Mask; }
inline bool isManaged() const { return tag() == Managed_Type_Internal && !isUndefined(); }
+ inline bool isManagedOrUndefined() const { return tag() == Managed_Type_Internal; }
inline bool integerCompatible() const { return (tag() & ConvertibleToInt) == ConvertibleToInt; }
static inline bool integerCompatible(Value a, Value b) {
return ((a.tag() & b.tag()) & ConvertibleToInt) == ConvertibleToInt;
@@ -326,7 +328,7 @@ public:
}
inline bool isNaN() const { return (tag() & QV4::Value::NotDouble_Mask) == QV4::Value::NaN_Mask; }
#endif
- Q_ALWAYS_INLINE double doubleValue() const {
+ QML_NEARLY_ALWAYS_INLINE double doubleValue() const {
Q_ASSERT(isDouble());
double d;
quint64 v = _val;
@@ -336,7 +338,7 @@ public:
memcpy(&d, &v, 8);
return d;
}
- Q_ALWAYS_INLINE void setDouble(double d) {
+ QML_NEARLY_ALWAYS_INLINE void setDouble(double d) {
memcpy(&_val, &d, 8);
#ifdef QV4_USE_64_BIT_VALUE_ENCODING
_val ^= NaNEncodeMask;
@@ -371,23 +373,23 @@ public:
return int_32();
}
- Q_ALWAYS_INLINE String *stringValue() const {
+ QML_NEARLY_ALWAYS_INLINE String *stringValue() const {
if (!isString())
return nullptr;
- return m() ? reinterpret_cast<String*>(const_cast<Value *>(this)) : 0;
+ return reinterpret_cast<String*>(const_cast<Value *>(this));
}
- Q_ALWAYS_INLINE Object *objectValue() const {
+ QML_NEARLY_ALWAYS_INLINE Object *objectValue() const {
if (!isObject())
return nullptr;
- return m() ? reinterpret_cast<Object*>(const_cast<Value *>(this)) : 0;
+ return reinterpret_cast<Object*>(const_cast<Value *>(this));
}
- Q_ALWAYS_INLINE Managed *managed() const {
+ QML_NEARLY_ALWAYS_INLINE Managed *managed() const {
if (!isManaged())
return nullptr;
- return m() ? reinterpret_cast<Managed*>(const_cast<Value *>(this)) : 0;
+ return reinterpret_cast<Managed*>(const_cast<Value *>(this));
}
- Q_ALWAYS_INLINE Heap::Base *heapObject() const {
- return isManaged() ? m() : nullptr;
+ QML_NEARLY_ALWAYS_INLINE Heap::Base *heapObject() const {
+ return isManagedOrUndefined() ? m() : nullptr;
}
static inline Value fromHeapObject(Heap::Base *m)
@@ -420,7 +422,7 @@ public:
template <typename T>
const T *as() const {
- if (!m() || !isManaged())
+ if (!isManaged())
return 0;
Q_ASSERT(m()->vtable());
@@ -451,6 +453,7 @@ public:
}
inline uint asArrayIndex() const;
+ inline bool asArrayIndex(uint &idx) const;
#ifndef V4_BOOTSTRAP
uint asArrayLength(bool *ok) const;
#endif
@@ -485,15 +488,13 @@ V4_ASSERT_IS_TRIVIAL(Value)
inline bool Value::isString() const
{
- if (!isManaged())
- return false;
- return m() && m()->vtable()->isString;
+ Heap::Base *b = heapObject();
+ return b && b->vtable()->isString;
}
inline bool Value::isObject() const
{
- if (!isManaged())
- return false;
- return m() && m()->vtable()->isObject;
+ Heap::Base *b = heapObject();
+ return b && b->vtable()->isObject;
}
inline bool Value::isPrimitive() const
@@ -531,6 +532,20 @@ inline uint Value::asArrayIndex() const
return UINT_MAX;
return idx;
}
+
+inline bool Value::asArrayIndex(uint &idx) const
+{
+ if (!isDouble()) {
+ if (isInteger() && int_32() >= 0) {
+ idx = (uint)int_32();
+ return true;
+ }
+ return false;
+ }
+ double d = doubleValue();
+ idx = (uint)d;
+ return (idx == d);
+}
#endif
inline
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index b19c36a5bd..622359a7d9 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -169,10 +169,8 @@ static Breakpoint qt_v4LastStop;
static QV4::Function *qt_v4ExtractFunction(QV4::ExecutionContext *context)
{
- QV4::Scope scope(context->engine());
- QV4::ScopedFunctionObject function(scope, context->getFunctionObject());
- if (function)
- return function->function();
+ if (QV4::Function *function = context->getFunction())
+ return function;
else
return context->d()->engine->globalCode;
}
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 6ef2380561..606d3ec162 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -421,11 +421,9 @@ void MemoryManager::mark()
// managed objects in the loop down there doesn't make then end up as leftovers
// on the stack and thus always get collected.
for (PersistentValueStorage::Iterator it = m_weakValues->begin(); it != m_weakValues->end(); ++it) {
- if (!(*it).isManaged())
+ QObjectWrapper *qobjectWrapper = (*it).as<QObjectWrapper>();
+ if (!qobjectWrapper)
continue;
- if (!(*it).as<QObjectWrapper>())
- continue;
- QObjectWrapper *qobjectWrapper = static_cast<QObjectWrapper*>((*it).managed());
QObject *qobject = qobjectWrapper->object();
if (!qobject)
continue;
@@ -453,10 +451,8 @@ void MemoryManager::mark()
void MemoryManager::sweep(bool lastSweep)
{
for (PersistentValueStorage::Iterator it = m_weakValues->begin(); it != m_weakValues->end(); ++it) {
- if (!(*it).isManaged())
- continue;
Managed *m = (*it).managed();
- if (m->markBit())
+ if (!m || m->markBit())
continue;
// we need to call destroyObject on qobjectwrappers now, so that they can emit the destroyed
// signal before we start sweeping the heap
@@ -469,10 +465,8 @@ void MemoryManager::sweep(bool lastSweep)
// onDestruction handlers may have accessed other QObject wrappers and reset their value, so ensure
// that they are all set to undefined.
for (PersistentValueStorage::Iterator it = m_weakValues->begin(); it != m_weakValues->end(); ++it) {
- if (!(*it).isManaged())
- continue;
- Managed *m = (*it).as<Managed>();
- if (m->markBit())
+ Managed *m = (*it).managed();
+ if (!m || m->markBit())
continue;
(*it) = Primitive::undefinedValue();
}
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g
index a3ca9c44d0..9cd212015e 100644
--- a/src/qml/parser/qqmljs.g
+++ b/src/qml/parser/qqmljs.g
@@ -916,8 +916,40 @@ case $rule_number:
./
UiPropertyType: T_VAR ;
+/.
+case $rule_number: {
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(stringRef(1));
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
UiPropertyType: T_RESERVED_WORD ;
+/.
+case $rule_number: {
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(stringRef(1));
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
UiPropertyType: T_IDENTIFIER ;
+/.
+case $rule_number: {
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(stringRef(1));
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UiPropertyType: UiPropertyType T_DOT T_IDENTIFIER ;
+/.
+case $rule_number: {
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(sym(1).UiQualifiedId, stringRef(3));
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
UiParameterListOpt: ;
/.
@@ -936,7 +968,7 @@ case $rule_number: {
UiParameterList: UiPropertyType JsIdentifier ;
/.
case $rule_number: {
- AST::UiParameterList *node = new (pool) AST::UiParameterList(stringRef(1), stringRef(2));
+ AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiQualifiedId->finish(), stringRef(2));
node->propertyTypeToken = loc(1);
node->identifierToken = loc(2);
sym(1).Node = node;
@@ -946,7 +978,7 @@ case $rule_number: {
UiParameterList: UiParameterList T_COMMA UiPropertyType JsIdentifier ;
/.
case $rule_number: {
- AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, stringRef(3), stringRef(4));
+ AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, sym(3).UiQualifiedId->finish(), stringRef(4));
node->propertyTypeToken = loc(3);
node->commaToken = loc(2);
node->identifierToken = loc(4);
@@ -958,7 +990,7 @@ UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_AUT
UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_SEMICOLON ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(QStringRef(), stringRef(2));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(nullptr, stringRef(2));
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -973,7 +1005,7 @@ UiObjectMember: T_SIGNAL T_IDENTIFIER T_AUTOMATIC_SEMICOLON ;
UiObjectMember: T_SIGNAL T_IDENTIFIER T_SEMICOLON ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(QStringRef(), stringRef(2));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(nullptr, stringRef(2));
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -987,7 +1019,7 @@ UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_
UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_SEMICOLON ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(4), stringRef(6));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(4).UiQualifiedId->finish(), stringRef(6));
node->typeModifier = stringRef(2);
node->propertyToken = loc(1);
node->typeModifierToken = loc(2);
@@ -1002,7 +1034,7 @@ UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_AUTOMATIC_SEMICOLON ;
UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_SEMICOLON ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3));
node->propertyToken = loc(1);
node->typeToken = loc(2);
node->identifierToken = loc(3);
@@ -1015,7 +1047,7 @@ UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_AUTOMATIC_SEM
UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_SEMICOLON ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4));
node->isDefaultMember = true;
node->defaultToken = loc(1);
node->propertyToken = loc(2);
@@ -1030,7 +1062,7 @@ UiObjectMember: T_DEFAULT T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIde
UiObjectMember: T_DEFAULT T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_SEMICOLON ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(5), stringRef(7));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(5).UiQualifiedId->finish(), stringRef(7));
node->isDefaultMember = true;
node->defaultToken = loc(1);
node->typeModifier = stringRef(3);
@@ -1046,7 +1078,7 @@ case $rule_number: {
UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_COLON UiScriptStatement ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3),
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3),
sym(5).Statement);
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -1059,7 +1091,7 @@ case $rule_number: {
UiObjectMember: T_READONLY T_PROPERTY UiPropertyType JsIdentifier T_COLON UiScriptStatement ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4),
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4),
sym(6).Statement);
node->isReadonlyMember = true;
node->readonlyToken = loc(1);
@@ -1074,7 +1106,7 @@ case $rule_number: {
UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_COLON UiScriptStatement ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4),
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4),
sym(6).Statement);
node->isDefaultMember = true;
node->defaultToken = loc(1);
@@ -1089,7 +1121,7 @@ case $rule_number: {
UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(4), stringRef(6));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(4).UiQualifiedId->finish(), stringRef(6));
node->typeModifier = stringRef(2);
node->propertyToken = loc(1);
node->typeModifierToken = loc(2);
@@ -1116,7 +1148,7 @@ case $rule_number: {
UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_COLON UiQualifiedId UiObjectInitializer ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3));
node->propertyToken = loc(1);
node->typeToken = loc(2);
node->identifierToken = loc(3);
@@ -1139,7 +1171,7 @@ case $rule_number: {
UiObjectMember: T_READONLY T_PROPERTY UiPropertyType JsIdentifier T_COLON UiQualifiedId UiObjectInitializer ;
/.
case $rule_number: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4));
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4));
node->isReadonlyMember = true;
node->readonlyToken = loc(1);
node->propertyToken = loc(2);
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h
index d31e464e99..9b06bf3d31 100644
--- a/src/qml/parser/qqmljsast_p.h
+++ b/src/qml/parser/qqmljsast_p.h
@@ -2537,11 +2537,11 @@ class QML_PARSER_EXPORT UiParameterList: public Node
public:
QQMLJS_DECLARE_AST_NODE(UiParameterList)
- UiParameterList(const QStringRef &t, const QStringRef &n):
+ UiParameterList(UiQualifiedId *t, const QStringRef &n):
type (t), name (n), next (this)
{ kind = K; }
- UiParameterList(UiParameterList *previous, const QStringRef &t, const QStringRef &n):
+ UiParameterList(UiParameterList *previous, UiQualifiedId *t, const QStringRef &n):
type (t), name (n)
{
kind = K;
@@ -2565,7 +2565,7 @@ public:
}
// attributes
- QStringRef type;
+ UiQualifiedId *type;
QStringRef name;
UiParameterList *next;
SourceLocation commaToken;
@@ -2578,12 +2578,12 @@ class QML_PARSER_EXPORT UiPublicMember: public UiObjectMember
public:
QQMLJS_DECLARE_AST_NODE(UiPublicMember)
- UiPublicMember(const QStringRef &memberType,
+ UiPublicMember(UiQualifiedId *memberType,
const QStringRef &name)
: type(Property), memberType(memberType), name(name), statement(0), binding(0), isDefaultMember(false), isReadonlyMember(false), parameters(0)
{ kind = K; }
- UiPublicMember(const QStringRef &memberType,
+ UiPublicMember(UiQualifiedId *memberType,
const QStringRef &name,
Statement *statement)
: type(Property), memberType(memberType), name(name), statement(statement), binding(0), isDefaultMember(false), isReadonlyMember(false), parameters(0)
@@ -2614,7 +2614,7 @@ public:
// attributes
enum { Signal, Property } type;
QStringRef typeModifier;
- QStringRef memberType;
+ UiQualifiedId *memberType;
QStringRef name;
Statement *statement; // initialized with a JS expression
UiObjectMember *binding; // initialized with a QML object or array.
diff --git a/src/qml/parser/qqmljsgrammar.cpp b/src/qml/parser/qqmljsgrammar.cpp
index fdcd94b472..b27f4af080 100644
--- a/src/qml/parser/qqmljsgrammar.cpp
+++ b/src/qml/parser/qqmljsgrammar.cpp
@@ -61,37 +61,38 @@ const short QQmlJSGrammar::lhs [] = {
118, 118, 118, 118, 118, 122, 123, 115, 114, 126,
126, 127, 127, 128, 128, 125, 111, 111, 111, 111,
130, 130, 130, 130, 130, 130, 130, 111, 138, 138,
- 138, 139, 139, 140, 140, 111, 111, 111, 111, 111,
+ 138, 138, 139, 139, 140, 140, 111, 111, 111, 111,
111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 124, 124, 124, 124, 124,
- 124, 124, 143, 143, 143, 143, 143, 143, 143, 143,
+ 111, 111, 111, 111, 111, 111, 124, 124, 124, 124,
+ 124, 124, 124, 143, 143, 143, 143, 143, 143, 143,
143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 129, 145, 145, 145, 145, 144, 144, 149, 149, 149,
- 147, 147, 150, 150, 150, 150, 153, 153, 153, 153,
+ 143, 129, 145, 145, 145, 145, 144, 144, 149, 149,
+ 149, 147, 147, 150, 150, 150, 150, 153, 153, 153,
153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 154, 154, 120,
- 120, 120, 120, 120, 157, 157, 158, 158, 158, 158,
- 156, 156, 159, 159, 160, 160, 161, 161, 161, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 163,
- 163, 163, 163, 164, 164, 164, 165, 165, 165, 165,
- 166, 166, 166, 166, 166, 166, 166, 167, 167, 167,
- 167, 167, 167, 168, 168, 168, 168, 168, 169, 169,
- 169, 169, 169, 170, 170, 171, 171, 172, 172, 173,
- 173, 174, 174, 175, 175, 176, 176, 177, 177, 178,
- 178, 179, 179, 180, 180, 181, 181, 148, 148, 182,
- 182, 183, 183, 183, 183, 183, 183, 183, 183, 183,
- 183, 183, 183, 109, 109, 184, 184, 185, 185, 186,
- 186, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- 108, 108, 108, 108, 108, 108, 131, 195, 195, 194,
- 194, 142, 142, 196, 196, 197, 197, 199, 199, 198,
- 200, 203, 201, 201, 204, 202, 202, 132, 133, 133,
- 134, 134, 187, 187, 187, 187, 187, 187, 187, 187,
- 188, 188, 188, 188, 189, 189, 189, 189, 190, 190,
- 135, 136, 205, 205, 208, 208, 206, 206, 209, 207,
- 191, 192, 192, 137, 137, 137, 210, 211, 193, 193,
- 212, 141, 155, 155, 213, 213, 152, 152, 151, 151,
- 214, 112, 112, 215, 215, 110, 110, 146, 146, 216};
+ 153, 153, 153, 153, 153, 153, 153, 153, 154, 154,
+ 120, 120, 120, 120, 120, 157, 157, 158, 158, 158,
+ 158, 156, 156, 159, 159, 160, 160, 161, 161, 161,
+ 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
+ 163, 163, 163, 163, 164, 164, 164, 165, 165, 165,
+ 165, 166, 166, 166, 166, 166, 166, 166, 167, 167,
+ 167, 167, 167, 167, 168, 168, 168, 168, 168, 169,
+ 169, 169, 169, 169, 170, 170, 171, 171, 172, 172,
+ 173, 173, 174, 174, 175, 175, 176, 176, 177, 177,
+ 178, 178, 179, 179, 180, 180, 181, 181, 148, 148,
+ 182, 182, 183, 183, 183, 183, 183, 183, 183, 183,
+ 183, 183, 183, 183, 109, 109, 184, 184, 185, 185,
+ 186, 186, 108, 108, 108, 108, 108, 108, 108, 108,
+ 108, 108, 108, 108, 108, 108, 108, 131, 195, 195,
+ 194, 194, 142, 142, 196, 196, 197, 197, 199, 199,
+ 198, 200, 203, 201, 201, 204, 202, 202, 132, 133,
+ 133, 134, 134, 187, 187, 187, 187, 187, 187, 187,
+ 187, 188, 188, 188, 188, 189, 189, 189, 189, 190,
+ 190, 135, 136, 205, 205, 208, 208, 206, 206, 209,
+ 207, 191, 192, 192, 137, 137, 137, 210, 211, 193,
+ 193, 212, 141, 155, 155, 213, 213, 152, 152, 151,
+ 151, 214, 112, 112, 215, 215, 110, 110, 146, 146,
+ 216};
const short QQmlJSGrammar::rhs [] = {
2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
@@ -99,113 +100,114 @@ const short QQmlJSGrammar::rhs [] = {
3, 5, 5, 4, 4, 2, 2, 0, 1, 1,
2, 1, 3, 2, 3, 2, 1, 5, 4, 4,
1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
- 1, 0, 1, 2, 4, 6, 6, 3, 3, 7,
- 7, 4, 4, 5, 5, 8, 8, 5, 6, 6,
- 10, 6, 7, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 3, 3, 4, 5, 3, 4, 3,
- 1, 1, 2, 3, 4, 1, 2, 3, 7, 8,
- 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 0, 1, 2, 4, 6, 6, 3, 3,
+ 7, 7, 4, 4, 5, 5, 8, 8, 5, 6,
+ 6, 10, 6, 7, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 3, 3, 4, 5, 3, 4,
+ 3, 1, 1, 2, 3, 4, 1, 2, 3, 7,
+ 8, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 3, 5, 1, 2, 4, 4, 4, 3,
- 0, 1, 1, 3, 1, 1, 1, 2, 2, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
- 3, 3, 3, 1, 3, 3, 1, 3, 3, 3,
- 1, 3, 3, 3, 3, 3, 3, 1, 3, 3,
- 3, 3, 3, 1, 3, 3, 3, 3, 1, 3,
- 3, 3, 3, 1, 3, 1, 3, 1, 3, 1,
- 3, 1, 3, 1, 3, 1, 3, 1, 3, 1,
- 3, 1, 3, 1, 5, 1, 5, 1, 3, 1,
- 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 3, 0, 1, 1, 3, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 3, 1, 2, 0,
- 1, 3, 3, 1, 1, 1, 3, 1, 3, 2,
- 2, 2, 0, 1, 2, 0, 1, 1, 2, 2,
- 7, 5, 7, 7, 7, 5, 9, 10, 7, 8,
- 2, 2, 3, 3, 2, 2, 3, 3, 3, 3,
- 5, 5, 3, 5, 1, 2, 0, 1, 4, 3,
- 3, 3, 3, 3, 3, 4, 5, 2, 2, 2,
- 1, 8, 8, 7, 1, 3, 0, 1, 0, 1,
- 1, 1, 1, 1, 2, 1, 1, 0, 1, 2};
+ 1, 1, 4, 3, 5, 1, 2, 4, 4, 4,
+ 3, 0, 1, 1, 3, 1, 1, 1, 2, 2,
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 3, 3, 3, 1, 3, 3, 1, 3, 3,
+ 3, 1, 3, 3, 3, 3, 3, 3, 1, 3,
+ 3, 3, 3, 3, 1, 3, 3, 3, 3, 1,
+ 3, 3, 3, 3, 1, 3, 1, 3, 1, 3,
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
+ 1, 3, 1, 3, 1, 5, 1, 5, 1, 3,
+ 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 0, 1, 1, 3,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2,
+ 0, 1, 3, 3, 1, 1, 1, 3, 1, 3,
+ 2, 2, 2, 0, 1, 2, 0, 1, 1, 2,
+ 2, 7, 5, 7, 7, 7, 5, 9, 10, 7,
+ 8, 2, 2, 3, 3, 2, 2, 3, 3, 3,
+ 3, 5, 5, 3, 5, 1, 2, 0, 1, 4,
+ 3, 3, 3, 3, 3, 3, 4, 5, 2, 2,
+ 2, 1, 8, 8, 7, 1, 3, 0, 1, 0,
+ 1, 1, 1, 1, 1, 2, 1, 1, 0, 1,
+ 2};
const short QQmlJSGrammar::action_default [] = {
- 0, 0, 28, 0, 0, 0, 28, 0, 187, 254,
- 218, 226, 222, 166, 238, 214, 3, 151, 84, 167,
- 230, 234, 155, 184, 165, 170, 150, 204, 191, 0,
- 91, 92, 87, 0, 81, 76, 358, 0, 0, 0,
- 0, 89, 0, 0, 85, 88, 80, 0, 0, 77,
- 79, 82, 78, 90, 83, 0, 86, 0, 0, 180,
- 0, 0, 167, 186, 169, 168, 0, 0, 0, 182,
- 183, 181, 185, 0, 215, 0, 0, 0, 0, 205,
- 0, 0, 0, 0, 0, 0, 195, 0, 0, 0,
- 189, 190, 188, 193, 197, 196, 194, 192, 207, 206,
- 208, 0, 223, 0, 219, 0, 0, 161, 148, 160,
- 149, 117, 118, 119, 144, 120, 145, 121, 122, 123,
- 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 146, 134, 135, 136, 137, 138, 139, 140, 141, 142,
- 143, 147, 0, 0, 159, 255, 162, 0, 163, 0,
- 164, 158, 0, 251, 244, 242, 249, 250, 248, 247,
- 253, 246, 245, 243, 252, 239, 0, 227, 0, 0,
- 231, 0, 0, 235, 0, 0, 161, 153, 0, 152,
- 0, 157, 171, 0, 347, 347, 348, 0, 345, 0,
- 346, 0, 349, 262, 269, 268, 276, 264, 0, 265,
- 0, 350, 0, 357, 266, 267, 84, 272, 270, 354,
- 351, 356, 273, 0, 284, 0, 0, 0, 0, 341,
- 0, 358, 256, 298, 0, 0, 0, 285, 0, 0,
- 274, 275, 0, 263, 271, 299, 300, 0, 347, 0,
- 0, 349, 0, 342, 343, 0, 331, 355, 0, 315,
- 316, 317, 318, 0, 311, 312, 313, 314, 339, 340,
- 0, 0, 0, 0, 0, 303, 304, 305, 260, 258,
- 220, 228, 224, 240, 216, 261, 0, 167, 232, 236,
- 209, 198, 0, 0, 217, 0, 0, 0, 0, 210,
- 0, 0, 0, 0, 0, 202, 200, 203, 201, 199,
- 212, 211, 213, 0, 225, 0, 221, 0, 259, 167,
- 0, 241, 256, 257, 0, 256, 0, 0, 307, 0,
- 0, 0, 309, 0, 229, 0, 0, 233, 0, 0,
- 237, 296, 0, 288, 297, 291, 0, 295, 0, 256,
- 289, 0, 256, 0, 0, 308, 0, 0, 0, 310,
- 0, 0, 0, 302, 0, 301, 84, 111, 359, 0,
- 0, 116, 278, 281, 0, 117, 284, 120, 145, 122,
- 123, 87, 127, 128, 81, 129, 132, 85, 88, 256,
- 82, 90, 135, 83, 137, 86, 139, 140, 285, 142,
- 143, 147, 0, 113, 112, 115, 99, 114, 98, 0,
- 108, 279, 277, 0, 0, 0, 349, 0, 109, 155,
- 156, 161, 0, 154, 0, 319, 320, 0, 347, 0,
- 0, 349, 0, 110, 0, 0, 0, 322, 327, 325,
- 328, 0, 0, 326, 327, 0, 323, 0, 324, 280,
- 330, 0, 280, 329, 0, 332, 333, 0, 280, 334,
- 335, 0, 0, 336, 0, 0, 0, 337, 338, 173,
- 172, 0, 0, 0, 306, 0, 0, 0, 321, 293,
- 286, 0, 294, 290, 0, 292, 282, 0, 283, 287,
- 0, 0, 349, 0, 344, 102, 0, 0, 106, 93,
- 0, 95, 104, 0, 96, 105, 107, 97, 103, 94,
- 0, 100, 177, 175, 179, 176, 174, 178, 352, 6,
- 353, 4, 2, 74, 101, 0, 0, 77, 79, 78,
- 37, 5, 0, 75, 0, 51, 50, 49, 0, 0,
- 51, 0, 0, 0, 66, 67, 0, 64, 0, 65,
- 41, 42, 43, 44, 46, 47, 70, 45, 0, 51,
- 0, 0, 0, 0, 0, 60, 0, 61, 0, 0,
- 32, 0, 0, 71, 33, 0, 36, 34, 30, 0,
- 35, 31, 0, 62, 0, 63, 155, 0, 68, 72,
- 0, 0, 0, 0, 155, 280, 0, 69, 84, 117,
- 284, 120, 145, 122, 123, 87, 127, 128, 129, 132,
- 85, 88, 256, 90, 135, 83, 137, 86, 139, 140,
- 285, 142, 143, 147, 73, 0, 58, 52, 59, 53,
- 0, 0, 0, 0, 55, 0, 56, 57, 54, 0,
- 0, 0, 0, 48, 0, 38, 39, 0, 40, 8,
- 0, 0, 9, 0, 11, 0, 10, 0, 1, 27,
- 15, 14, 26, 13, 12, 29, 7, 0, 18, 0,
- 19, 0, 24, 25, 0, 20, 21, 0, 22, 23,
- 16, 17, 360};
+ 0, 0, 28, 0, 0, 0, 28, 0, 188, 255,
+ 219, 227, 223, 167, 239, 215, 3, 152, 85, 168,
+ 231, 235, 156, 185, 166, 171, 151, 205, 192, 0,
+ 92, 93, 88, 0, 82, 77, 359, 0, 0, 0,
+ 0, 90, 0, 0, 86, 89, 81, 0, 0, 78,
+ 80, 83, 79, 91, 84, 0, 87, 0, 0, 181,
+ 0, 0, 168, 187, 170, 169, 0, 0, 0, 183,
+ 184, 182, 186, 0, 216, 0, 0, 0, 0, 206,
+ 0, 0, 0, 0, 0, 0, 196, 0, 0, 0,
+ 190, 191, 189, 194, 198, 197, 195, 193, 208, 207,
+ 209, 0, 224, 0, 220, 0, 0, 162, 149, 161,
+ 150, 118, 119, 120, 145, 121, 146, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 147, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 148, 0, 0, 160, 256, 163, 0, 164, 0,
+ 165, 159, 0, 252, 245, 243, 250, 251, 249, 248,
+ 254, 247, 246, 244, 253, 240, 0, 228, 0, 0,
+ 232, 0, 0, 236, 0, 0, 162, 154, 0, 153,
+ 0, 158, 172, 0, 348, 348, 349, 0, 346, 0,
+ 347, 0, 350, 263, 270, 269, 277, 265, 0, 266,
+ 0, 351, 0, 358, 267, 268, 85, 273, 271, 355,
+ 352, 357, 274, 0, 285, 0, 0, 0, 0, 342,
+ 0, 359, 257, 299, 0, 0, 0, 286, 0, 0,
+ 275, 276, 0, 264, 272, 300, 301, 0, 348, 0,
+ 0, 350, 0, 343, 344, 0, 332, 356, 0, 316,
+ 317, 318, 319, 0, 312, 313, 314, 315, 340, 341,
+ 0, 0, 0, 0, 0, 304, 305, 306, 261, 259,
+ 221, 229, 225, 241, 217, 262, 0, 168, 233, 237,
+ 210, 199, 0, 0, 218, 0, 0, 0, 0, 211,
+ 0, 0, 0, 0, 0, 203, 201, 204, 202, 200,
+ 213, 212, 214, 0, 226, 0, 222, 0, 260, 168,
+ 0, 242, 257, 258, 0, 257, 0, 0, 308, 0,
+ 0, 0, 310, 0, 230, 0, 0, 234, 0, 0,
+ 238, 297, 0, 289, 298, 292, 0, 296, 0, 257,
+ 290, 0, 257, 0, 0, 309, 0, 0, 0, 311,
+ 0, 0, 0, 303, 0, 302, 85, 112, 360, 0,
+ 0, 117, 279, 282, 0, 118, 285, 121, 146, 123,
+ 124, 88, 128, 129, 82, 130, 133, 86, 89, 257,
+ 83, 91, 136, 84, 138, 87, 140, 141, 286, 143,
+ 144, 148, 0, 114, 113, 116, 100, 115, 99, 0,
+ 109, 280, 278, 0, 0, 0, 350, 0, 110, 156,
+ 157, 162, 0, 155, 0, 320, 321, 0, 348, 0,
+ 0, 350, 0, 111, 0, 0, 0, 323, 328, 326,
+ 329, 0, 0, 327, 328, 0, 324, 0, 325, 281,
+ 331, 0, 281, 330, 0, 333, 334, 0, 281, 335,
+ 336, 0, 0, 337, 0, 0, 0, 338, 339, 174,
+ 173, 0, 0, 0, 307, 0, 0, 0, 322, 294,
+ 287, 0, 295, 291, 0, 293, 283, 0, 284, 288,
+ 0, 0, 350, 0, 345, 103, 0, 0, 107, 94,
+ 0, 96, 105, 0, 97, 106, 108, 98, 104, 95,
+ 0, 101, 178, 176, 180, 177, 175, 179, 353, 6,
+ 354, 4, 2, 75, 102, 0, 0, 78, 80, 79,
+ 37, 5, 0, 76, 0, 51, 50, 49, 0, 0,
+ 51, 0, 0, 0, 52, 0, 67, 68, 0, 65,
+ 0, 66, 41, 42, 43, 44, 46, 47, 71, 45,
+ 0, 51, 0, 0, 0, 0, 0, 61, 0, 62,
+ 0, 0, 32, 0, 0, 72, 33, 0, 36, 34,
+ 30, 0, 35, 31, 0, 63, 0, 64, 156, 0,
+ 69, 73, 0, 0, 0, 0, 156, 281, 0, 70,
+ 85, 118, 285, 121, 146, 123, 124, 88, 128, 129,
+ 130, 133, 86, 89, 257, 91, 136, 84, 138, 87,
+ 140, 141, 286, 143, 144, 148, 74, 0, 59, 53,
+ 60, 54, 0, 0, 0, 0, 56, 0, 57, 58,
+ 55, 0, 0, 0, 0, 48, 0, 38, 39, 0,
+ 40, 8, 0, 0, 9, 0, 11, 0, 10, 0,
+ 1, 27, 15, 14, 26, 13, 12, 29, 7, 0,
+ 18, 0, 19, 0, 24, 25, 0, 20, 21, 0,
+ 22, 23, 16, 17, 361};
const short QQmlJSGrammar::goto_default [] = {
- 7, 648, 211, 198, 209, 521, 509, 643, 656, 508,
- 642, 646, 644, 652, 22, 649, 647, 645, 18, 520,
- 569, 559, 566, 561, 546, 193, 197, 199, 204, 234,
- 212, 231, 550, 620, 619, 203, 233, 26, 487, 486,
+ 7, 650, 211, 198, 209, 521, 509, 645, 658, 508,
+ 644, 648, 646, 654, 22, 651, 649, 647, 18, 520,
+ 571, 561, 568, 563, 548, 193, 197, 199, 204, 234,
+ 212, 231, 552, 622, 621, 203, 233, 26, 487, 486,
359, 358, 9, 357, 360, 202, 480, 361, 109, 17,
147, 24, 13, 146, 19, 25, 59, 23, 8, 28,
27, 280, 15, 274, 10, 270, 12, 272, 11, 271,
@@ -216,896 +218,874 @@ const short QQmlJSGrammar::goto_default [] = {
0};
const short QQmlJSGrammar::action_index [] = {
- 282, 1392, 2773, 2773, 2875, 1105, 102, 105, 129, -106,
- -1, 23, -23, 224, -106, 378, 26, -106, -106, 718,
- 39, 87, 207, 222, -106, -106, -106, 342, 290, 1392,
- -106, -106, -106, 502, -106, -106, 2569, 1880, 1392, 1392,
- 1392, -106, 1009, 1392, -106, -106, -106, 1392, 1392, -106,
- -106, -106, -106, -106, -106, 1392, -106, 1392, 1392, -106,
- 1392, 1392, 97, 236, -106, -106, 1392, 1392, 1392, -106,
- -106, -106, 233, 1392, 378, 1392, 1392, 1392, 1392, 461,
- 1392, 1392, 1392, 1392, 1392, 1392, 290, 1392, 1392, 1392,
- 144, 124, 115, 290, 290, 290, 290, 290, 461, 461,
- 363, 1392, -78, 1392, 81, 2365, 1392, 1392, -106, -106,
+ 246, 1285, 2768, 2768, 2666, 998, 98, 198, 86, -106,
+ 26, -15, -39, 234, -106, 314, 54, -106, -106, 714,
+ 89, 151, 212, 219, -106, -106, -106, 412, 279, 1285,
+ -106, -106, -106, 525, -106, -106, 2360, 1675, 1285, 1285,
+ 1285, -106, 902, 1285, -106, -106, -106, 1285, 1285, -106,
+ -106, -106, -106, -106, -106, 1285, -106, 1285, 1285, -106,
+ 1285, 1285, 103, 197, -106, -106, 1285, 1285, 1285, -106,
+ -106, -106, 214, 1285, 297, 1285, 1285, 1285, 1285, 392,
+ 1285, 1285, 1285, 1285, 1285, 1285, 213, 1285, 1285, 1285,
+ 96, 100, 101, 279, 279, 195, 190, 181, 402, 372,
+ 382, 1285, -10, 1285, 106, 2258, 1285, 1285, -106, -106,
-106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
-106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
-106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
- -106, -106, 143, 1392, -106, -106, 78, 60, -106, 1392,
- -106, -106, 1392, -106, -106, -106, -106, -106, -106, -106,
- -106, -106, -106, -106, -106, -106, 1392, -25, 1392, 1392,
- 92, 85, 1392, -106, 2365, 1392, 1392, -106, 146, -106,
- 46, -106, -106, 52, 359, 362, 104, 86, -106, 438,
- -106, 56, 2773, -106, -106, -106, -106, -106, 164, -106,
- 393, -106, 41, -106, -106, -106, 53, -106, -106, -106,
- 2773, -106, -106, 600, -106, 597, 147, 2875, 64, 82,
- 48, 3079, 1392, -106, 90, 1392, 66, -106, 33, 68,
- -106, -106, 538, -106, -106, -106, -106, 88, 538, 35,
- 40, 2773, 47, -106, -106, 2875, -106, -106, 151, -106,
- -106, -106, -106, 145, -106, -106, -106, -106, -106, -106,
- 72, 65, 1392, 107, 155, -106, -106, -106, 1586, -106,
- 58, 59, 50, -106, 279, 75, 62, 821, 89, 93,
- 295, 234, 447, 1392, 291, 1392, 1392, 1392, 1392, 316,
- 1392, 1392, 1392, 1392, 1392, 290, 290, 290, 290, 290,
- 322, 326, 332, 1392, 50, 1392, 74, 1392, -106, 718,
- 1392, -106, 1392, 55, 42, 1392, 38, 2875, -106, 1392,
- 132, 2875, -106, 1392, 84, 1392, 1392, 209, 106, 1392,
- -106, 80, 130, 77, -106, -106, 1392, -106, 407, 1392,
- -106, -48, 1392, -43, 2875, -106, 1392, 126, 2875, -106,
- 1392, 128, 2875, 3, 2875, -106, 8, -106, 6, -34,
- 15, -106, -106, 2875, -31, 615, 18, 546, 100, 1392,
- 2875, 19, -8, 493, 2467, -16, 707, 5, 4, 1491,
- 2467, 2, -28, 0, 1392, -2, -30, 1392, -5, 1392,
- -32, -26, 2671, -106, -106, -106, -106, -106, -106, 1392,
- -106, -106, -106, 21, -17, 22, 2773, -6, -106, 206,
- -106, 1392, -10, -106, 91, -106, -106, 17, 538, 30,
- 31, 2773, -3, -106, 1392, 111, 34, -106, 24, -106,
- 25, 101, 1392, -106, 27, 28, -106, -22, -106, 2875,
- -106, 120, 2875, -106, 227, -106, -106, 125, 2875, 16,
- -106, 12, 13, -106, 453, -20, 14, -106, -106, -106,
- -106, 1392, 160, 2875, -106, 1392, 113, 2875, -106, 37,
- -106, 171, -106, -106, 1392, -106, -106, 441, -106, -106,
- -33, -27, 2773, -4, -106, -106, 109, 1684, -106, -106,
- 1978, -106, -106, 1782, -106, -106, -106, -106, -106, -106,
- 127, -106, -106, -106, -106, -106, -106, -106, -106, -106,
- 2773, -106, -106, -106, 148, -24, 915, 176, -29, 10,
- -106, -106, 240, -106, 208, 1, -106, -106, 349, 195,
- -106, 20, 339, 135, -106, -106, 191, -106, 2073, -106,
- -106, -106, -106, -106, -106, -106, -106, -106, 221, 29,
- 538, 152, 7, 538, 167, -106, 11, -106, 915, 114,
- -106, 32, 915, -106, -106, 1201, -106, -106, -106, 1297,
- -106, -106, 169, -106, 2073, -106, 280, -15, -106, -106,
- 181, 457, 9, 2263, 271, 2977, 83, -106, 103, 615,
- 67, 557, 116, 1392, 2875, 61, 43, 526, 45, 1009,
- 51, 73, 1491, 71, 49, 69, 1392, 63, 44, 1392,
- 54, 1392, 36, 57, -106, 213, -106, 217, -106, 79,
- 70, 343, 194, 346, -106, 96, -106, -106, -106, 2168,
- 799, 1880, 76, -106, 134, -106, -106, -15, -106, -106,
- 915, 915, 112, 915, -106, 259, -106, 153, -106, -106,
- 110, 99, -106, -106, -106, -106, -106, 450, -106, 157,
- -106, 98, -106, -106, 538, -106, -106, 139, -106, -106,
- -106, -106, -106,
+ -106, -106, 136, 1285, -106, -106, 65, 29, -106, 1285,
+ -106, -106, 1285, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, 1285, -46, 1285, 1285,
+ 30, 27, 1285, -106, 2258, 1285, 1285, -106, 130, -106,
+ -31, -106, -106, -16, 520, 520, 71, 21, -106, 421,
+ -106, 38, 2768, -106, -106, -106, -106, -106, 237, -106,
+ 520, -106, -52, -106, -106, -106, 23, -106, -106, -106,
+ 2768, -106, -106, 596, -106, 588, 141, 2666, 2, 1,
+ -1, 2972, 1285, -106, 13, 1285, 28, -106, -28, -30,
+ -106, -106, 435, -106, -106, -106, -106, 60, 520, 52,
+ 67, 2768, 64, -106, -106, 2666, -106, -106, 126, -106,
+ -106, -106, -106, 73, -106, -106, -106, -106, -106, -106,
+ -18, 34, 1285, 156, 168, -106, -106, -106, 1479, -106,
+ 79, 40, 48, -106, 312, 75, 42, 672, 80, 143,
+ 331, 279, 442, 1285, 316, 1285, 1285, 1285, 1285, 341,
+ 1285, 1285, 1285, 1285, 1285, 279, 360, 360, 196, 225,
+ 443, 357, 351, 1285, -4, 1285, 63, 1285, -106, 714,
+ 1285, -106, 1285, 102, 68, 1285, 62, 2666, -106, 1285,
+ 147, 2666, -106, 1285, 56, 1285, 1285, 91, 87, 1285,
+ -106, 81, 149, 74, -106, -106, 1285, -106, 439, 1285,
+ -106, -44, 1285, -42, 2666, -106, 1285, 153, 2666, -106,
+ 1285, 154, 2666, 10, 2666, -106, 0, -106, 15, -54,
+ 92, -106, -106, 2666, -50, 539, -7, 536, 121, 1285,
+ 2666, 5, -8, 445, 2462, 24, 902, 51, 50, 1384,
+ 2462, 47, 20, 46, 1285, 44, 19, 1285, 41, 1285,
+ 3, -5, 2564, -106, -106, -106, -106, -106, -106, 1285,
+ -106, -106, -106, 6, -17, 11, 2768, -9, -106, 249,
+ -106, 1285, -13, -106, 105, -106, -106, -12, 520, -41,
+ -20, 2768, -45, -106, 1285, 115, 12, -106, 36, -106,
+ 31, 122, 1285, -106, 58, 4, -106, -51, -106, 2666,
+ -106, 146, 2666, -106, 235, -106, -106, 140, 2666, 93,
+ -106, 84, 76, -106, 520, 17, 33, -106, -106, -106,
+ -106, 1285, 134, 2666, -106, 1285, 125, 2666, -106, 55,
+ -106, 163, -106, -106, 1285, -106, -106, 520, -106, -106,
+ 7, 45, 2768, 32, -106, -106, 120, 1773, -106, -106,
+ 1577, -106, -106, 1871, -106, -106, -106, -106, -106, -106,
+ 113, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ 2768, -106, -106, -106, 109, 35, 808, 206, 49, 61,
+ -106, -106, 229, -106, 203, 37, -106, -106, 611, 183,
+ -106, 124, 39, 389, -106, 97, -106, -106, 252, -106,
+ 2061, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ 269, -23, 611, 243, 180, 424, 232, -106, 16, -106,
+ 808, 162, -106, 22, 808, -106, -106, 1190, -106, -106,
+ -106, 1094, -106, -106, 248, -106, 2061, -106, 305, -24,
+ -106, -106, 215, 457, 18, 2156, 292, 2870, -11, -106,
+ 14, 599, 9, 528, 119, 1285, 2666, 8, 70, 514,
+ 72, 902, 95, 90, 1384, 85, 59, 77, 1285, 110,
+ 83, 1285, 104, 1285, 82, 78, -106, 205, -106, 236,
+ -106, 57, 25, 611, 167, 517, -106, 107, -106, -106,
+ -106, 1966, 808, 1675, 43, -106, 155, -106, -106, 53,
+ -106, -106, 808, 808, 108, 808, -106, 289, -106, 117,
+ -106, -106, 150, 157, -106, -106, -106, -106, -106, 364,
+ -106, 226, -106, 69, -106, -106, 432, -106, -106, 88,
+ -106, -106, -106, -106, -106,
- -111, 6, 66, 84, 80, 306, 43, -111, -111, -111,
- -111, -111, -111, -111, -111, -111, -111, -111, -111, -23,
+ -111, 8, 65, 83, 84, 317, 1, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -77,
-111, -111, -111, -111, -111, -111, -111, -111, -111, 96,
- -111, -111, -111, 51, -111, -111, 60, 35, 61, 95,
- 92, -111, 93, 72, -111, -111, -111, 86, 85, -111,
- -111, -111, -111, -111, -111, 82, -111, 81, 136, -111,
- 77, 76, -111, -111, -111, -111, 73, 89, 127, -111,
- -111, -111, -111, 125, -111, 124, 54, 120, 99, -111,
- 113, 111, 110, 109, 107, 103, -111, 102, 100, 119,
- -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- -111, 52, -111, 49, -111, 62, 44, 28, -111, -111,
+ -111, -111, -111, 2, -111, -111, -5, -28, 12, 106,
+ 95, -111, 61, 55, -111, -111, -111, 63, 70, -111,
+ -111, -111, -111, -111, -111, 54, -111, 172, 177, -111,
+ 180, 191, -111, -111, -111, -111, 197, 202, 203, -111,
+ -111, -111, -111, 210, -111, 209, 195, 109, 116, -111,
+ 146, 125, 126, 127, 135, 138, -111, 141, 144, 110,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, 150, -111, 155, -111, 192, 4, -33, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- -111, -111, -111, 25, -111, -111, -111, -111, -111, 18,
- -111, -111, 16, -111, -111, -111, -111, -111, -111, -111,
- -111, -111, -111, -111, -111, -111, 57, -111, 40, 13,
- -111, -111, 4, -111, 269, 42, 70, -111, -111, -111,
- -111, -111, -111, -111, 26, 69, -111, -111, -111, 22,
- -111, -111, 15, -111, -111, -111, -111, -111, -111, -111,
- 14, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- 75, -111, -111, 10, -111, 32, -111, 74, -111, 24,
- -111, 225, 46, -111, -111, 50, 41, -111, -111, -111,
- -111, -111, 47, -111, -111, -111, -111, -111, 214, -111,
- -111, 224, -111, -111, -111, 246, -111, -111, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- -111, -111, 27, -111, -111, -111, -111, -111, 117, -111,
+ -111, -111, -111, -9, -111, -111, -111, -111, -111, 7,
+ -111, -111, 40, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, 99, -111, 52, 31,
+ -111, -111, 30, -111, 253, 44, 87, -111, -111, -111,
+ -111, -111, -111, -111, 45, 86, -111, -111, -111, 41,
+ -111, -111, 5, -111, -111, -111, -111, -111, -111, -111,
+ 50, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ 154, -111, -111, 26, -111, 49, -111, 330, -111, 28,
+ -111, 248, 27, -111, -111, 124, 51, -111, -111, -111,
+ -111, -111, 46, -111, -111, -111, -111, -111, 196, -111,
+ -111, 185, -111, -111, -111, 194, -111, -111, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- -111, -111, 17, 236, -111, 239, 242, 250, 254, -111,
- 199, 171, 200, 202, 203, -111, -111, -111, -111, -111,
- -111, -111, -111, 264, -111, 265, -111, 213, -111, -111,
- 267, -111, 260, -111, -111, 262, -111, 253, -111, 45,
- -111, 83, -111, 222, -111, 223, 226, -111, -111, 229,
- -111, -111, -111, -111, -111, -111, 238, -111, 105, 118,
- -111, -111, 129, -111, 87, -111, 36, -111, 183, -111,
- 34, -111, 187, -111, 192, -111, -111, -111, -111, -111,
- -111, -111, -111, 193, -111, 9, -111, 23, -111, 144,
- 195, -111, -111, 20, 184, -111, 189, -111, -111, 31,
- 164, -111, -111, -111, 21, -111, 11, 158, -111, 161,
- -111, -111, 188, -111, -111, -111, -111, -111, -111, 33,
- -111, -111, -111, -111, -111, -111, 191, -111, -111, -111,
- -111, 176, -111, -111, -111, -111, -111, -111, 198, -111,
- -111, 201, -111, -111, 65, -111, -111, -111, -111, -111,
- -29, -111, 58, -111, -27, -111, -111, -111, -111, 268,
- -111, -111, 266, -111, -111, -111, -111, -111, 219, -46,
- -111, -111, 38, -111, 39, -111, 37, -111, -111, -111,
- -111, 53, -111, 220, -111, 48, -111, 221, -111, -111,
- -111, -111, -111, -111, 30, -111, -111, 137, -111, -111,
- -111, -111, 206, -111, -111, -111, -111, 29, -111, -111,
- 207, -111, -111, 1, -111, -111, -111, -111, -111, -111,
+ -111, -111, 15, -111, -111, -111, -111, -111, 74, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- 216, -111, -111, -111, -111, -111, 0, -111, -111, -111,
- -111, -111, -111, -111, -30, -111, -111, -111, -11, -13,
- -111, -111, 5, -111, -111, -111, -111, -111, 336, -111,
+ -111, -111, -16, 230, -111, 233, 269, 251, 265, -111,
+ 80, 81, 82, 88, 89, -111, -111, -111, -111, -111,
+ -111, -111, -111, 216, -111, 255, -111, 259, -111, -111,
+ 223, -111, 68, -111, -111, 217, -111, 236, -111, 24,
+ -111, 244, -111, 227, -111, 226, 257, -111, -111, 263,
+ -111, -111, -111, -111, -111, -111, 249, -111, 113, 163,
+ -111, -111, 212, -111, 173, -111, 48, -111, 211, -111,
+ 53, -111, 206, -111, 204, -111, -111, -111, -111, -111,
+ -111, -111, -111, 199, -111, 23, -111, 25, -111, 134,
+ 175, -111, -111, 37, 200, -111, 222, -111, -111, 57,
+ 56, -111, -111, -111, 124, -111, 32, 43, -111, 105,
+ -111, -111, 139, -111, -111, -111, -111, -111, -111, 38,
+ -111, -111, -111, -111, -111, -111, 75, -111, -111, -111,
+ -111, 71, -111, -111, -111, -111, -111, -111, 72, -111,
+ -111, 85, -111, -111, 59, -111, -111, -111, -111, -111,
+ -37, -111, 62, -111, -58, -111, -111, -111, -111, 286,
+ -111, -111, 250, -111, -111, -111, -111, -111, 153, -57,
+ -111, -111, 33, -111, 34, -111, 36, -111, -111, -111,
+ -111, 47, -111, 77, -111, 29, -111, 67, -111, -111,
+ -111, -111, -111, -111, 42, -111, -111, 214, -111, -111,
+ -111, -111, 229, -111, -111, -111, -111, 35, -111, -111,
+ 145, -111, -111, 3, -111, -111, -111, -111, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- 7, -3, -111, -8, -111, -111, -111, -111, 174, -111,
- -111, -111, 172, -111, -111, 323, -111, -111, -111, 334,
- -111, -111, -111, -111, 372, -111, -111, -5, -111, -111,
- -24, -7, -111, 439, -111, 248, -9, -111, -111, 8,
- -111, -17, -111, 179, 342, -111, -111, 2, -111, 190,
- -111, -111, 19, -111, -111, -111, 12, -111, -20, 68,
- -111, 63, -111, -111, -111, -111, -111, -26, -111, -111,
- -111, 3, -1, 79, -111, -111, -111, -111, -111, 354,
- 67, 313, -4, -111, -111, -111, -111, -19, -111, -111,
- -14, -10, 88, 233, -111, -111, -111, -111, -111, -111,
- -111, -111, -111, -111, -111, -111, -111, -6, -111, -111,
- -111, -111, -111, -111, -2, -111, -111, -111, -111, -111,
- -111, -111, -111};
+ 207, -111, -111, -111, -111, -111, 39, -111, -111, -111,
+ -111, -111, -111, -111, -24, -111, -111, -111, -12, -27,
+ -111, -111, -111, -14, -111, -111, -111, -111, -111, -111,
+ 333, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, 6, 22, -111, 20, -111, -111, -111, -111,
+ 159, -111, -111, -111, 246, -111, -111, 332, -111, -111,
+ -111, 436, -111, -111, -111, -111, 388, -111, -111, 18,
+ -111, -111, -6, 19, -111, 352, -111, 225, 14, -111,
+ -111, 13, -111, 11, -111, 167, 136, -111, -111, 10,
+ -111, 64, -111, -111, 9, -111, -111, -111, 124, -111,
+ 0, 69, -111, 60, -111, -111, -111, -111, -111, -10,
+ -111, -111, -111, -1, -11, -2, -111, -111, -111, -111,
+ -111, 370, 142, 315, -3, -111, -111, -111, -111, 17,
+ -111, -111, -13, 21, 133, 221, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, 16,
+ -111, -111, -111, -111, -111, -111, -15, -111, -111, -111,
+ -111, -111, -111, -111, -111};
const short QQmlJSGrammar::action_info [] = {
- 73, 103, -141, 448, 461, -138, 482, -136, 424, -114,
- 465, -115, -133, 342, 392, 245, 583, 344, 565, 354,
- 350, 398, 399, 101, 402, -144, -125, 481, 268, 432,
- 432, 553, 432, 438, 143, 439, 452, 580, 529, 615,
- 456, 166, 524, 405, 532, 558, 448, 448, 454, 408,
- 413, 484, 423, 418, 474, 406, 103, 404, -133, 283,
- 245, -141, 0, 143, 421, 565, 551, 428, -125, 461,
- -138, 101, 461, 241, -144, 283, -136, 448, -114, 268,
- -115, 350, 73, 307, 350, 424, 149, 622, 185, 192,
- 420, 323, 172, 465, 166, 240, 244, 336, 317, 448,
- 268, 262, 243, 315, 465, 672, 181, 303, 346, 565,
- 245, 435, 189, 329, 174, 143, 565, 490, 184, 143,
- 151, 143, 562, 312, 238, 174, 424, 442, 143, 305,
- 625, 451, 303, 175, 143, 143, 143, 168, 338, 64,
- 143, 169, 562, 325, 175, 452, 191, 326, 0, 261,
- 65, 143, 416, 415, 143, 60, 436, 627, 626, 663,
- 662, 259, 258, 174, 60, 491, 61, 264, 143, 60,
- 563, 426, 143, 467, 556, 61, 574, 259, 258, 477,
- 61, 530, 175, 0, 60, 0, 348, 501, 352, 0,
- 635, 339, 321, 640, 641, 61, 535, 534, 538, 144,
- 669, 668, 179, 640, 641, 549, 257, 256, 259, 258,
- 530, 323, 252, 251, 671, 670, 267, 265, 666, 665,
- 463, 174, 174, 530, 530, 236, 235, 527, 557, 555,
- 575, 573, 478, 476, 66, 143, 174, 525, 526, 105,
- 175, 175, 411, 176, 266, 66, 530, 629, 66, 617,
- 664, 527, 539, 537, 0, 175, 527, 411, 106, 87,
- 107, 88, 526, 0, 0, 0, 0, 526, 0, 527,
- 527, 0, 89, 565, 618, 616, 0, 0, 0, 67,
- 526, 526, 0, 527, 0, 68, 174, 0, 446, 445,
- 67, 0, 527, 67, 526, 174, 68, 285, 286, 68,
- 0, 0, 0, 526, -101, 175, 659, 176, 0, 285,
- 286, 0, 0, -101, 175, 87, 176, 88, 290, 291,
- 660, 658, 0, 0, 287, 288, 0, 292, 89, 0,
- 293, 0, 294, 0, 630, 0, 287, 288, 0, 290,
- 291, 0, 0, 0, 0, 290, 291, 0, 292, 290,
- 291, 293, 657, 294, 292, 290, 291, 293, 292, 294,
- 0, 293, 0, 294, 292, 80, 81, 293, 35, 294,
- 0, 0, 35, 82, 83, 35, 0, 84, 35, 85,
- 6, 5, 4, 1, 3, 2, 80, 81, 35, 0,
- 0, 35, 0, 0, 82, 83, 75, 76, 84, 0,
- 85, 0, 0, 0, 0, 49, 52, 50, 0, 49,
- 52, 50, 49, 52, 50, 49, 52, 50, 0, 0,
- 0, 0, 35, 77, 78, 49, 52, 50, 49, 52,
- 50, 0, 0, 46, 34, 51, 35, 46, 34, 51,
+ -145, 398, 101, 244, 438, 402, 465, 245, 461, 567,
+ 423, 439, -126, 421, 553, -126, -145, 342, 344, 420,
+ 185, 245, 567, 392, 418, 585, 354, 73, 268, 181,
+ 245, 465, 166, 101, 172, 350, 432, 184, 268, 461,
+ 103, 432, 404, 405, 406, 428, 408, 413, -142, 424,
+ 560, -139, 448, -137, -115, 567, 424, -116, -134, 261,
+ 350, 448, 143, 432, 283, 624, 448, 481, 534, 103,
+ 262, 192, 474, 149, 529, 305, 567, 456, 482, 189,
+ 283, 191, 323, 307, -137, 627, 567, 484, 303, 151,
+ 617, 166, -115, 323, 329, 424, 238, -116, 336, 399,
+ 241, 524, -134, 312, 303, 346, 268, 73, 350, 448,
+ 143, -142, 240, 452, 465, 582, 448, -139, 461, 243,
+ 454, 143, 317, 143, 174, 0, 60, 305, 490, 315,
+ 665, 664, 435, 143, 257, 256, 60, 61, 143, 532,
+ 60, 60, 143, 175, 143, 64, 451, 61, 533, 671,
+ 670, 61, 61, 442, 143, 143, 65, 338, 537, 536,
+ 452, 143, 143, 564, 143, 174, 416, 415, 629, 628,
+ 564, 477, 174, 501, 0, 426, 491, 436, 673, 672,
+ 259, 258, 259, 258, 175, 467, 179, 252, 251, 642,
+ 643, 175, 144, 325, 463, 532, 530, 326, 674, 642,
+ 643, 168, 259, 258, 555, 169, 87, 321, 88, 66,
+ 339, 637, 530, 348, 352, 87, 264, 88, 565, 89,
+ 87, 87, 88, 88, 478, 476, 66, 174, 89, 267,
+ 265, 66, 525, 89, 89, 551, 631, 0, 87, 558,
+ 88, 619, 527, 143, 530, 143, 175, 0, 176, 105,
+ 87, 89, 88, 526, 67, 576, 0, 266, 527, 540,
+ 68, 0, 567, 89, 174, 530, 620, 618, 106, 526,
+ 107, 67, 530, 0, 0, 0, 67, 68, 527, 0,
+ 0, 527, 68, 175, 174, 411, 0, 668, 667, 526,
+ 527, 0, 526, 559, 557, 0, 446, 445, 236, 235,
+ 0, 526, 0, 175, 87, 411, 88, 174, 0, 577,
+ 575, 527, 0, 541, 539, 75, 76, 89, 527, 666,
+ 174, 0, 526, 632, 0, -102, 175, 0, 176, 526,
+ 285, 286, 75, 76, 285, 286, 661, 0, -102, 175,
+ 0, 176, 77, 78, 6, 5, 4, 1, 3, 2,
+ 662, 660, 0, 0, 290, 291, 0, 287, 288, 77,
+ 78, 287, 288, 292, 290, 291, 293, 0, 294, 0,
+ 0, 0, 0, 292, 290, 291, 293, 0, 294, 0,
+ 290, 291, 659, 292, 0, 87, 293, 88, 294, 292,
+ 0, 0, 293, 35, 294, 80, 81, 0, 89, 0,
+ 0, 0, 0, 82, 83, 80, 81, 84, 0, 85,
+ 0, 0, 0, 82, 83, 80, 81, 84, 35, 85,
+ 0, 0, 0, 82, 83, 80, 81, 84, 0, 85,
+ 49, 52, 50, 82, 83, 80, 81, 84, 0, 85,
+ 0, 0, 0, 82, 83, 0, 0, 84, 0, 85,
+ 35, 0, 0, 35, 0, 49, 52, 50, 46, 34,
+ 51, 35, 0, 0, 35, 0, 290, 291, 35, 0,
+ 0, 35, 532, 0, 35, 292, 0, 0, 293, 0,
+ 294, 184, 0, 46, 34, 51, 35, 49, 52, 50,
+ 49, 52, 50, 0, 0, 0, 0, 0, 49, 52,
+ 50, 49, 52, 50, 0, 49, 52, 50, 49, 52,
+ 50, 49, 52, 50, 0, 46, 34, 51, 46, 34,
+ 51, 0, 0, 49, 52, 50, 46, 34, 51, 46,
+ 34, 51, 532, 46, 34, 51, 46, 34, 51, 46,
+ 34, 51, 0, 35, 0, 0, 35, 0, 0, 35,
+ 184, 46, 34, 51, 35, 0, 0, 35, 0, 0,
+ 0, 184, 0, 0, 0, 35, 0, 0, 35, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 49, 52, 50, 49, 52, 50, 49, 52, 50, 255,
+ 254, 49, 52, 50, 49, 52, 50, 255, 254, 0,
+ 250, 249, 49, 52, 50, 49, 52, 50, 46, 34,
+ 51, 46, 34, 51, 46, 34, 51, 35, 0, 46,
+ 34, 51, 46, 34, 51, 35, 532, 0, 35, 0,
46, 34, 51, 46, 34, 51, 0, 0, 0, 0,
- 0, 0, 0, 46, 34, 51, 46, 34, 51, 49,
- 52, 50, 0, 0, 0, 0, 0, 35, 0, 0,
- 35, 0, 0, 49, 52, 50, 35, 0, 0, 35,
- 0, 0, 35, 0, 80, 81, 35, 46, 34, 51,
- 0, 0, 82, 83, 0, 0, 84, 0, 85, 0,
- 0, 46, 34, 51, 49, 52, 50, 49, 52, 50,
- 0, 0, 0, 49, 52, 50, 49, 52, 50, 49,
- 52, 50, 35, 49, 52, 50, 0, 0, 0, 184,
- 0, 35, 46, 34, 51, 46, 34, 51, 184, 0,
- 0, 46, 34, 51, 46, 34, 51, 46, 34, 51,
- 0, 46, 34, 51, 0, 35, 0, 0, 0, 49,
- 52, 50, 184, 0, 0, 0, 0, 35, 49, 52,
- 50, 0, 0, 0, 0, 35, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 35, 46, 34, 51,
- 0, 0, 49, 52, 50, 0, 46, 34, 51, 0,
- 0, 0, 0, 0, 49, 52, 50, 255, 254, 0,
- 0, 0, 49, 52, 50, 0, 0, 0, 255, 254,
- 46, 34, 51, 49, 52, 50, 35, 0, 0, 35,
+ 35, 0, 0, 0, 0, 0, 0, 0, 0, 255,
+ 254, 0, 0, 0, 49, 52, 50, 250, 249, 0,
+ 250, 249, 49, 52, 50, 49, 52, 50, 0, 0,
+ 0, 0, 0, 0, 0, 153, 0, 49, 52, 50,
+ 0, 0, 46, 34, 51, 154, 0, 0, 0, 155,
+ 46, 34, 51, 46, 34, 51, 0, 0, 156, 0,
+ 157, 0, 0, 319, 0, 46, 34, 51, 0, 0,
+ 0, 158, 0, 159, 64, 0, 0, 153, 0, 0,
+ 0, 160, 0, 0, 161, 65, 0, 154, 0, 0,
+ 162, 155, 0, 0, 0, 0, 163, 0, 0, 0,
+ 156, 0, 157, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 164, 158, 0, 159, 64, 0, 0, 0,
+ 0, 0, 0, 160, 0, 0, 161, 65, 0, 0,
+ 0, 0, 162, 0, 0, 0, 0, 0, 163, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 164, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 33, 0, 0, 0, 0, 0, 0, 35, 0, 0,
+ 0, 36, 37, 0, 38, 0, 0, 0, 0, 0,
+ 0, 516, 0, 0, 0, 45, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 53, 49, 52, 50, 0, 54, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 44,
+ 56, 32, 0, 0, 0, 41, 0, 0, 0, 0,
0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
- 46, 34, 51, 0, 35, 0, 0, 0, 0, 0,
- 0, 46, 34, 51, 0, 0, 0, 0, 255, 254,
- 0, 250, 249, 49, 52, 50, 49, 52, 50, 0,
- 0, 0, 0, 0, 0, 0, 250, 249, 0, 0,
- 0, 49, 52, 50, 0, 0, 0, 0, 0, 0,
- 0, 46, 34, 51, 46, 34, 51, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 46,
- 34, 51, 0, 0, 0, 0, 0, 0, 0, 30,
- 31, 153, 0, 0, 0, 0, 0, 0, 0, 33,
- 0, 154, 0, 0, 0, 155, 35, 0, 0, 0,
- 36, 37, 0, 38, 156, 0, 157, 0, 0, 0,
- 42, 0, 0, 0, 45, 0, 0, 158, 0, 159,
- 64, 0, 0, 0, 0, 0, 0, 160, 0, 0,
- 161, 65, 53, 49, 52, 50, 162, 54, 0, 0,
- 0, 0, 163, 0, 0, 0, 0, 0, 44, 56,
- 32, 0, 0, 0, 41, 0, 0, 0, 164, 0,
- 0, 46, 34, 51, 0, 0, 0, 0, 0, 0,
- 0, 30, 31, 0, 0, 0, 0, 0, 0, 0,
- 0, 33, 0, 0, 153, 0, 0, 0, 35, 0,
- 0, 0, 36, 37, 154, 38, 0, 0, 155, 0,
- 0, 0, 516, 0, 0, 0, 45, 156, 0, 157,
- 0, 0, 319, 0, 0, 0, 0, 0, 0, 0,
- 158, 0, 159, 64, 53, 49, 52, 50, 0, 54,
- 160, 0, 0, 161, 65, 0, 0, 0, 0, 162,
- 44, 56, 32, 0, 0, 163, 41, 0, 0, 0,
- 0, 0, 0, 46, 34, 51, 0, 0, 0, 0,
- 0, 164, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 30, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33, 0, 0, 0, 0, 0,
+ 0, 35, 0, 0, 0, 36, 37, 0, 38, 0,
+ 0, 0, 0, 0, 0, 42, 0, 0, 0, 45,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 53, 49, 52,
+ 50, 0, 54, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 44, 56, 32, 0, 0, 0, 41,
+ 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 515, 0,
+ 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 219, 0, 0, 0, 0, 0, 0, 35, 0, 0,
+ 0, 36, 37, 0, 38, 0, 0, 0, 0, 0,
+ 0, 516, 0, 0, 0, 45, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 30, 31, 0,
+ 0, 0, 0, 53, 517, 519, 518, 0, 54, 0,
+ 0, 0, 0, 227, 0, 0, 0, 0, 0, 44,
+ 56, 32, 214, 0, 0, 41, 0, 0, 0, 0,
+ 0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 515, 0, 30, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 219, 0, 0, 0,
+ 0, 0, 0, 35, 0, 0, 0, 36, 37, 0,
+ 38, 0, 0, 0, 0, 0, 0, 516, 0, 0,
+ 0, 45, 0, 0, 0, 0, 0, 0, 0, 572,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 53,
+ 517, 519, 518, 0, 54, 0, 0, 0, 0, 227,
+ 0, 0, 0, 0, 0, 44, 56, 32, 214, 0,
+ 0, 41, 0, 0, 0, 0, 0, 0, 46, 34,
+ 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 515, 0, 30, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 219, 0, 0, 0, 0, 0, 0, 35,
+ 0, 0, 0, 36, 37, 0, 38, 0, 0, 0,
+ 0, 0, 0, 516, 0, 0, 0, 45, 0, 0,
+ 0, 0, 0, 0, 0, 569, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 53, 517, 519, 518, 0,
+ 54, 0, 0, 0, 0, 227, 0, 0, 0, 0,
+ 0, 44, 56, 32, 214, 0, 0, 41, 0, 0,
+ 0, 0, 0, 0, 46, 34, 51, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 29, 30, 31, 0,
0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
0, 0, 0, 0, 35, 0, 0, 0, 36, 37,
- 0, 38, 0, 0, 0, 0, 0, 0, 516, 0,
- 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
+ 0, 38, 0, 0, 0, 39, 0, 40, 42, 43,
+ 0, 0, 45, 0, 0, 0, 47, 0, 48, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 53, 49, 52, 50, 0, 54, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 44, 56, 32, 0,
+ 53, 49, 52, 50, 0, 54, 0, 55, 0, 57,
+ 0, 58, 0, 0, 0, 0, 44, 56, 32, 0,
0, 0, 41, 0, 0, 0, 0, 0, 0, 46,
34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 30, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, -135, 0, 0, 0, 29, 30, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 33, 0, 0, 0,
+ 0, 0, 0, 35, 0, 0, 0, 36, 37, 0,
+ 38, 0, 0, 0, 39, 0, 40, 42, 43, 0,
+ 0, 45, 0, 0, 0, 47, 0, 48, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 53,
+ 49, 52, 50, 0, 54, 0, 55, 0, 57, 0,
+ 58, 0, 0, 0, 0, 44, 56, 32, 0, 0,
+ 0, 41, 0, 0, 0, 0, 0, 0, 46, 34,
+ 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 29, 30, 31, 0, 0, 0, 0, 0, 0, 0,
0, 33, 0, 0, 0, 0, 0, 0, 35, 0,
- 0, 0, 36, 37, 0, 38, 0, 0, 0, 0,
- 0, 0, 42, 0, 0, 0, 45, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 36, 37, 0, 38, 0, 0, 0, 39,
+ 0, 40, 42, 43, 0, 0, 45, 0, 0, 0,
+ 47, 0, 48, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 53, 49, 52, 50, 0, 54,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 55, 0, 57, 282, 58, 0, 0, 0, 0,
44, 56, 32, 0, 0, 0, 41, 0, 0, 0,
0, 0, 0, 46, 34, 51, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 515, 0, 30, 31, 0,
- 0, 0, 0, 0, 0, 0, 0, 219, 0, 0,
+ 0, 0, 0, 0, 0, 488, 0, 0, 29, 30,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 33,
+ 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
+ 36, 37, 0, 38, 0, 0, 0, 39, 0, 40,
+ 42, 43, 0, 0, 45, 0, 0, 0, 47, 0,
+ 48, 0, 0, 494, 0, 0, 0, 0, 0, 0,
+ 0, 0, 53, 49, 52, 50, 0, 54, 0, 55,
+ 0, 57, 0, 58, 0, 0, 0, 0, 44, 56,
+ 32, 0, 0, 0, 41, 0, 0, 0, 0, 0,
+ 0, 46, 34, 51, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 488, 0, 0, 29, 30, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
0, 0, 0, 0, 35, 0, 0, 0, 36, 37,
- 0, 38, 0, 0, 0, 0, 0, 0, 516, 0,
- 0, 0, 45, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 53, 517, 519, 518, 0, 54, 0, 0, 0, 0,
- 227, 0, 0, 0, 0, 0, 44, 56, 32, 214,
+ 0, 38, 0, 0, 0, 39, 0, 40, 42, 43,
+ 0, 0, 45, 0, 0, 0, 47, 0, 48, 0,
+ 0, 489, 0, 0, 0, 0, 0, 0, 0, 0,
+ 53, 49, 52, 50, 0, 54, 0, 55, 0, 57,
+ 0, 58, 0, 0, 0, 0, 44, 56, 32, 0,
0, 0, 41, 0, 0, 0, 0, 0, 0, 46,
34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 515, 0, 30, 31, 0, 0, 0, 0, 0,
- 0, 0, 0, 219, 0, 0, 0, 0, 0, 0,
- 35, 0, 0, 0, 36, 37, 0, 38, 0, 0,
- 0, 0, 0, 0, 516, 0, 0, 0, 45, 0,
- 0, 0, 0, 0, 0, 0, 567, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 53, 517, 519, 518,
- 0, 54, 0, 0, 0, 0, 227, 0, 0, 0,
- 0, 0, 44, 56, 32, 214, 0, 0, 41, 0,
- 0, 0, 0, 0, 0, 46, 34, 51, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 515, 0, 30,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 219,
- 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
- 36, 37, 0, 38, 0, 0, 0, 0, 0, 0,
- 516, 0, 0, 0, 45, 0, 0, 0, 0, 0,
- 0, 0, 570, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 53, 517, 519, 518, 0, 54, 0, 0,
- 0, 0, 227, 0, 0, 0, 0, 0, 44, 56,
- 32, 214, 0, 0, 41, 0, 0, 0, 0, 0,
- 0, 46, 34, 51, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 29, 30, 31, 0, 0, 0, 0,
- 0, 0, 0, 0, 33, 0, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 36, 37, 0, 38, 0,
- 0, 0, 39, 0, 40, 42, 43, 0, 0, 45,
- 0, 0, 0, 47, 0, 48, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 53, 49, 52,
- 50, 0, 54, 0, 55, 0, 57, 0, 58, 0,
- 0, 0, 0, 44, 56, 32, 0, 0, 0, 41,
- 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, -134, 0,
+ 0, 496, 0, 0, 29, 30, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
+ 0, 0, 35, 0, 0, 0, 36, 37, 0, 38,
+ 0, 0, 0, 39, 0, 40, 42, 43, 0, 0,
+ 45, 0, 0, 0, 47, 0, 48, 0, 0, 499,
+ 0, 0, 0, 0, 0, 0, 0, 0, 53, 49,
+ 52, 50, 0, 54, 0, 55, 0, 57, 0, 58,
+ 0, 0, 0, 0, 44, 56, 32, 0, 0, 0,
+ 41, 0, 0, 0, 0, 0, 0, 46, 34, 51,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 496,
0, 0, 29, 30, 31, 0, 0, 0, 0, 0,
0, 0, 0, 33, 0, 0, 0, 0, 0, 0,
35, 0, 0, 0, 36, 37, 0, 38, 0, 0,
0, 39, 0, 40, 42, 43, 0, 0, 45, 0,
- 0, 0, 47, 0, 48, 0, 0, 0, 0, 0,
+ 0, 0, 47, 0, 48, 0, 0, 497, 0, 0,
0, 0, 0, 0, 0, 0, 53, 49, 52, 50,
0, 54, 0, 55, 0, 57, 0, 58, 0, 0,
0, 0, 44, 56, 32, 0, 0, 0, 41, 0,
0, 0, 0, 0, 0, 46, 34, 51, 0, 0,
0, 0, 0, 0, 0, 0, 0, 29, 30, 31,
0, 0, 0, 0, 0, 0, 0, 0, 33, 0,
- 0, 0, 0, 0, 0, 35, 0, 0, 0, 36,
+ 0, 0, 0, 0, 0, 35, 220, 0, 0, 587,
+ 633, 0, 38, 0, 0, 0, 39, 0, 40, 42,
+ 43, 0, 0, 45, 0, 0, 0, 47, 0, 48,
+ 0, 0, 0, 0, 0, 0, 0, 223, 0, 0,
+ 0, 53, 49, 52, 50, 224, 54, 0, 55, 226,
+ 57, 0, 58, 0, 229, 0, 0, 44, 56, 32,
+ 0, 0, 0, 41, 0, 0, 0, 0, 0, 0,
+ 46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 29, 30, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 33, 0, 0, 0, 0, 0, 0,
+ 35, 220, 0, 0, 221, 37, 0, 38, 0, 0,
+ 0, 39, 0, 40, 42, 43, 0, 0, 45, 0,
+ 0, 0, 47, 0, 48, 0, 0, 0, 0, 0,
+ 0, 0, 223, 0, 0, 0, 53, 49, 52, 50,
+ 224, 54, 0, 55, 226, 57, 0, 58, 0, 229,
+ 0, 0, 44, 56, 32, 0, 0, 0, 41, 0,
+ 0, 0, 0, 0, 0, 46, 34, 51, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 29, 30, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 33, 0,
+ 0, 0, 0, 0, 0, 35, 220, 0, 0, 587,
37, 0, 38, 0, 0, 0, 39, 0, 40, 42,
43, 0, 0, 45, 0, 0, 0, 47, 0, 48,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 53, 49, 52, 50, 0, 54, 0, 55, 0,
- 57, 282, 58, 0, 0, 0, 0, 44, 56, 32,
+ 0, 0, 0, 0, 0, 0, 0, 223, 0, 0,
+ 0, 53, 49, 52, 50, 224, 54, 0, 55, 226,
+ 57, 0, 58, 0, 229, 0, 0, 44, 56, 32,
0, 0, 0, 41, 0, 0, 0, 0, 0, 0,
46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 496, 0, 0, 29, 30, 31, 0, 0,
- 0, 0, 0, 0, 0, 0, 33, 0, 0, 0,
- 0, 0, 0, 35, 0, 0, 0, 36, 37, 0,
- 38, 0, 0, 0, 39, 0, 40, 42, 43, 0,
- 0, 45, 0, 0, 0, 47, 0, 48, 0, 0,
- 499, 0, 0, 0, 0, 0, 0, 0, 0, 53,
- 49, 52, 50, 0, 54, 0, 55, 0, 57, 0,
- 58, 0, 0, 0, 0, 44, 56, 32, 0, 0,
- 0, 41, 0, 0, 0, 0, 0, 0, 46, 34,
- 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 496, 0, 0, 29, 30, 31, 0, 0, 0, 0,
- 0, 0, 0, 0, 33, 0, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 36, 37, 0, 38, 0,
- 0, 0, 39, 0, 40, 42, 43, 0, 0, 45,
- 0, 0, 0, 47, 0, 48, 0, 0, 497, 0,
- 0, 0, 0, 0, 0, 0, 0, 53, 49, 52,
- 50, 0, 54, 0, 55, 0, 57, 0, 58, 0,
- 0, 0, 0, 44, 56, 32, 0, 0, 0, 41,
- 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 488, 0,
- 0, 29, 30, 31, 0, 0, 0, 0, 0, 0,
- 0, 0, 33, 0, 0, 0, 0, 0, 0, 35,
- 0, 0, 0, 36, 37, 0, 38, 0, 0, 0,
- 39, 0, 40, 42, 43, 0, 0, 45, 0, 0,
- 0, 47, 0, 48, 0, 0, 489, 0, 0, 0,
- 0, 0, 0, 0, 0, 53, 49, 52, 50, 0,
- 54, 0, 55, 0, 57, 0, 58, 0, 0, 0,
- 0, 44, 56, 32, 0, 0, 0, 41, 0, 0,
- 0, 0, 0, 0, 46, 34, 51, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 488, 0, 0, 29,
- 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 35, 0, 0,
- 0, 36, 37, 0, 38, 0, 0, 0, 39, 0,
- 40, 42, 43, 0, 0, 45, 0, 0, 0, 47,
- 0, 48, 0, 0, 494, 0, 0, 0, 0, 0,
- 0, 0, 0, 53, 49, 52, 50, 0, 54, 0,
- 55, 0, 57, 0, 58, 0, 0, 0, 0, 44,
- 56, 32, 0, 0, 0, 41, 0, 0, 0, 0,
+ 0, 0, 111, 112, 113, 0, 0, 115, 117, 118,
+ 0, 0, 119, 0, 120, 0, 0, 0, 122, 123,
+ 124, 0, 0, 0, 0, 0, 0, 35, 125, 126,
+ 127, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 131, 0, 0,
+ 0, 0, 0, 0, 49, 52, 50, 132, 133, 134,
+ 0, 136, 137, 138, 139, 140, 141, 0, 0, 129,
+ 135, 121, 114, 116, 130, 0, 0, 0, 0, 0,
0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,
- 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
- 0, 0, 35, 220, 0, 0, 221, 37, 0, 38,
- 0, 0, 0, 39, 0, 40, 42, 43, 0, 0,
- 45, 0, 0, 0, 47, 0, 48, 0, 0, 0,
- 0, 0, 0, 0, 223, 0, 0, 0, 53, 49,
- 52, 50, 224, 54, 0, 55, 226, 57, 0, 58,
- 0, 229, 0, 0, 44, 56, 32, 0, 0, 0,
- 41, 0, 0, 0, 0, 0, 0, 46, 34, 51,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
- 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
- 33, 0, 0, 0, 0, 0, 0, 35, 220, 0,
- 0, 585, 631, 0, 38, 0, 0, 0, 39, 0,
+ 0, 0, 0, 0, 111, 112, 113, 0, 0, 115,
+ 117, 118, 0, 0, 119, 0, 120, 0, 0, 0,
+ 122, 123, 124, 0, 0, 0, 0, 0, 0, 35,
+ 125, 126, 127, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 128, 0, 0, 0, 395, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 131,
+ 0, 0, 0, 0, 0, 397, 49, 52, 50, 132,
+ 133, 134, 0, 136, 137, 138, 139, 140, 141, 0,
+ 0, 129, 135, 121, 114, 116, 130, 0, 0, 0,
+ 0, 0, 0, 0, 46, 374, 380, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 111, 112, 113, 0,
+ 0, 115, 117, 118, 0, 0, 119, 0, 120, 0,
+ 0, 0, 122, 123, 124, 0, 0, 0, 0, 0,
+ 0, 35, 125, 126, 127, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 128, 0, 0, 0, 395,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 131, 0, 0, 0, 0, 0, 397, 49, 52,
+ 50, 132, 133, 134, 0, 136, 137, 138, 139, 140,
+ 141, 0, 0, 129, 135, 121, 114, 116, 130, 0,
+ 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 111, 112,
+ 113, 0, 0, 115, 117, 118, 0, 0, 119, 0,
+ 120, 0, 0, 0, 122, 123, 124, 0, 0, 0,
+ 0, 0, 0, 35, 125, 126, 127, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 128, 0, 0,
+ 0, 395, 0, 0, 0, 0, 0, 0, 0, 396,
+ 0, 0, 0, 131, 0, 0, 0, 0, 0, 397,
+ 49, 52, 50, 132, 133, 134, 0, 136, 137, 138,
+ 139, 140, 141, 0, 0, 129, 135, 121, 114, 116,
+ 130, 0, 0, 0, 0, 0, 0, 0, 46, 374,
+ 380, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 213, 0, 0, 0, 0, 215, 0, 29, 30, 31,
+ 217, 0, 0, 0, 0, 0, 0, 218, 33, 0,
+ 0, 0, 0, 0, 0, 35, 220, 0, 0, 221,
+ 37, 0, 38, 0, 0, 0, 39, 0, 40, 42,
+ 43, 0, 0, 45, 0, 0, 0, 47, 0, 48,
+ 0, 0, 0, 0, 0, 222, 0, 223, 0, 0,
+ 0, 53, 49, 52, 50, 224, 54, 225, 55, 226,
+ 57, 227, 58, 228, 229, 0, 0, 44, 56, 32,
+ 214, 216, 0, 41, 0, 0, 0, 0, 0, 0,
+ 46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 213, 0, 0, 0, 0, 215, 0, 29,
+ 30, 31, 217, 0, 0, 0, 0, 0, 0, 218,
+ 219, 0, 0, 0, 0, 0, 0, 35, 220, 0,
+ 0, 221, 37, 0, 38, 0, 0, 0, 39, 0,
40, 42, 43, 0, 0, 45, 0, 0, 0, 47,
- 0, 48, 0, 0, 0, 0, 0, 0, 0, 223,
- 0, 0, 0, 53, 49, 52, 50, 224, 54, 0,
- 55, 226, 57, 0, 58, 0, 229, 0, 0, 44,
- 56, 32, 0, 0, 0, 41, 0, 0, 0, 0,
+ 0, 48, 0, 0, 0, 0, 0, 222, 0, 223,
+ 0, 0, 0, 53, 49, 52, 50, 224, 54, 225,
+ 55, 226, 57, 227, 58, 228, 229, 0, 0, 44,
+ 56, 32, 214, 216, 0, 41, 0, 0, 0, 0,
0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,
- 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
- 0, 0, 35, 220, 0, 0, 585, 37, 0, 38,
- 0, 0, 0, 39, 0, 40, 42, 43, 0, 0,
- 45, 0, 0, 0, 47, 0, 48, 0, 0, 0,
- 0, 0, 0, 0, 223, 0, 0, 0, 53, 49,
- 52, 50, 224, 54, 0, 55, 226, 57, 0, 58,
- 0, 229, 0, 0, 44, 56, 32, 0, 0, 0,
- 41, 0, 0, 0, 0, 0, 0, 46, 34, 51,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 111,
- 112, 113, 0, 0, 115, 117, 118, 0, 0, 119,
- 0, 120, 0, 0, 0, 122, 123, 124, 0, 0,
- 0, 0, 0, 0, 35, 125, 126, 127, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 128, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 131, 0, 0, 0, 0, 0,
- 0, 49, 52, 50, 132, 133, 134, 0, 136, 137,
- 138, 139, 140, 141, 0, 0, 129, 135, 121, 114,
- 116, 130, 0, 0, 0, 0, 0, 0, 0, 46,
- 34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 111, 112, 113, 0, 0, 115, 117, 118, 0,
- 0, 119, 0, 120, 0, 0, 0, 122, 123, 124,
- 0, 0, 0, 0, 0, 0, 35, 125, 126, 127,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 128, 0, 0, 0, 395, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 131, 0, 0, 0,
- 0, 0, 397, 49, 52, 50, 132, 133, 134, 0,
- 136, 137, 138, 139, 140, 141, 0, 0, 129, 135,
- 121, 114, 116, 130, 0, 0, 0, 0, 0, 0,
- 0, 46, 34, 51, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 111, 112, 113, 0, 0, 115, 117,
- 118, 0, 0, 119, 0, 120, 0, 0, 0, 122,
- 123, 124, 0, 0, 0, 0, 0, 0, 35, 125,
- 126, 127, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 128, 0, 0, 0, 395, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 131, 0,
- 0, 0, 0, 0, 397, 49, 52, 50, 132, 133,
- 134, 0, 136, 137, 138, 139, 140, 141, 0, 0,
- 129, 135, 121, 114, 116, 130, 0, 0, 0, 0,
- 0, 0, 0, 46, 374, 380, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 111, 112, 113, 0, 0,
- 115, 117, 118, 0, 0, 119, 0, 120, 0, 0,
- 0, 122, 123, 124, 0, 0, 0, 0, 0, 0,
- 35, 125, 126, 127, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 128, 0, 0, 0, 395, 0,
- 0, 0, 0, 0, 0, 0, 396, 0, 0, 0,
- 131, 0, 0, 0, 0, 0, 397, 49, 52, 50,
- 132, 133, 134, 0, 136, 137, 138, 139, 140, 141,
- 0, 0, 129, 135, 121, 114, 116, 130, 0, 0,
- 0, 0, 0, 0, 0, 46, 374, 380, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 213, 0, 0,
- 0, 0, 215, 0, 29, 30, 31, 217, 0, 0,
- 0, 0, 0, 0, 218, 219, 0, 0, 0, 0,
- 0, 0, 35, 220, 0, 0, 221, 37, 0, 38,
- 0, 0, 0, 39, 0, 40, 42, 43, 0, 0,
- 45, 0, 0, 0, 47, 0, 48, 0, 0, 0,
- 0, 0, 222, 0, 223, 0, 0, 0, 53, 49,
- 52, 50, 224, 54, 225, 55, 226, 57, 227, 58,
- 228, 229, 0, 0, 44, 56, 32, 214, 216, 0,
- 41, 0, 0, 0, 0, 0, 0, 46, 34, 51,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 213,
- 0, 0, 0, 0, 215, 0, 29, 30, 31, 217,
- 0, 0, 0, 0, 0, 0, 218, 33, 0, 0,
- 0, 0, 0, 0, 35, 220, 0, 0, 221, 37,
- 0, 38, 0, 0, 0, 39, 0, 40, 42, 43,
- 0, 0, 45, 0, 0, 0, 47, 0, 48, 0,
- 0, 0, 0, 0, 222, 0, 223, 0, 0, 0,
- 53, 49, 52, 50, 224, 54, 225, 55, 226, 57,
- 227, 58, 228, 229, 0, 0, 44, 56, 32, 214,
- 216, 0, 41, 0, 0, 0, 0, 0, 0, 46,
- 34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 589, 112, 113, 0, 0, 591, 117, 593, 30,
- 31, 594, 0, 120, 0, 0, 0, 122, 596, 597,
- 0, 0, 0, 0, 0, 0, 35, 598, 126, 127,
- 221, 37, 0, 38, 0, 0, 0, 39, 0, 40,
- 599, 43, 0, 0, 601, 0, 0, 0, 47, 0,
- 48, 0, 0, 0, 0, 0, 602, 0, 223, 0,
- 0, 0, 603, 49, 52, 50, 604, 605, 606, 55,
- 608, 609, 610, 611, 612, 613, 0, 0, 600, 607,
- 595, 590, 592, 130, 41, 0, 0, 0, 0, 0,
- 0, 46, 374, 380, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 365, 112, 113, 0, 0, 367, 117,
- 369, 30, 31, 370, 0, 120, 0, 0, 0, 122,
- 372, 373, 0, 0, 0, 0, 0, 0, 35, 375,
- 126, 127, 221, 37, 0, 38, 0, 0, 0, 39,
- 0, 40, 376, 43, 0, 0, 378, 0, 0, 0,
- 47, 0, 48, 0, -280, 0, 0, 0, 379, 0,
- 223, 0, 0, 0, 381, 49, 52, 50, 382, 383,
- 384, 55, 386, 387, 388, 389, 390, 391, 0, 0,
- 377, 385, 371, 366, 368, 130, 41, 0, 0, 0,
- 0, 0, 0, 46, 374, 380, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 591, 112, 113, 0, 0, 593,
+ 117, 595, 30, 31, 596, 0, 120, 0, 0, 0,
+ 122, 598, 599, 0, 0, 0, 0, 0, 0, 35,
+ 600, 126, 127, 221, 37, 0, 38, 0, 0, 0,
+ 39, 0, 40, 601, 43, 0, 0, 603, 0, 0,
+ 0, 47, 0, 48, 0, 0, 0, 0, 0, 604,
+ 0, 223, 0, 0, 0, 605, 49, 52, 50, 606,
+ 607, 608, 55, 610, 611, 612, 613, 614, 615, 0,
+ 0, 602, 609, 597, 592, 594, 130, 41, 0, 0,
+ 0, 0, 0, 0, 46, 374, 380, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 365, 112, 113, 0,
+ 0, 367, 117, 369, 30, 31, 370, 0, 120, 0,
+ 0, 0, 122, 372, 373, 0, 0, 0, 0, 0,
+ 0, 35, 375, 126, 127, 221, 37, 0, 38, 0,
+ 0, 0, 39, 0, 40, 376, 43, 0, 0, 378,
+ 0, 0, 0, 47, 0, 48, 0, -281, 0, 0,
+ 0, 379, 0, 223, 0, 0, 0, 381, 49, 52,
+ 50, 382, 383, 384, 55, 386, 387, 388, 389, 390,
+ 391, 0, 0, 377, 385, 371, 366, 368, 130, 41,
+ 0, 0, 0, 0, 0, 0, 46, 374, 380, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
- 650, 253, 528, 638, 651, 447, 621, 536, 581, 16,
- 554, 582, 661, 614, 548, 444, 667, 579, 636, 531,
- 183, 628, 313, 533, 444, 572, 248, 248, 248, 552,
- 263, 623, 237, 206, 313, 331, 447, 351, 183, 347,
- 190, 253, 183, 495, 188, 178, 173, 142, 320, 313,
- 253, 466, 639, 444, 152, 171, 462, 455, 165, 453,
- 150, 441, 457, 458, 500, 469, 447, 145, 425, 183,
- 148, 498, 475, 437, 433, 400, 260, 485, 393, 247,
- 108, 514, 512, 0, 206, 322, 0, 188, 511, 345,
- 637, 0, 206, 206, 62, 0, 0, 624, 206, 654,
- 653, 206, 206, 62, 0, 206, 62, 409, 62, 110,
- 170, 62, 148, 104, 98, 187, 0, 62, 102, 460,
- 180, 313, 62, 331, 459, 167, 62, 62, 504, 69,
- 62, 62, 313, 72, 63, 62, 62, 459, 507, 62,
- 62, 506, 505, 62, 410, 70, 62, 0, 503, 62,
- 62, 502, 182, 62, 62, 469, 62, 62, 91, 100,
- 90, 62, 97, 62, 62, 62, 96, 62, 95, 94,
- 93, 277, 86, 62, 62, 510, 281, 92, 62, 62,
- 99, 62, 393, 71, 79, 349, 514, 74, 514, 353,
- 62, 564, 460, 560, 355, 401, 341, 260, 62, 340,
- 182, 206, 393, 409, 409, 206, 393, 343, 417, 206,
- 206, 206, 62, 206, 459, 62, 188, 460, 148, 206,
- 247, 362, 464, 468, 206, 62, 412, 362, 403, 479,
- 296, 394, 188, 62, 206, 182, 407, 206, 206, 206,
- 410, 410, 206, 356, 419, 493, 422, 514, 246, 492,
- 362, 483, 655, 62, 62, 318, 62, 62, 295, 297,
- 239, 298, 299, 313, 206, 313, 588, 309, 362, 242,
- 362, 206, 281, 0, 0, 0, 62, 62, 0, 0,
- 309, 281, 281, 309, 206, 281, 206, 108, 281, 308,
- 62, 324, 309, 62, 327, 281, 62, 281, 281, 284,
- 289, 281, 328, 300, 62, 330, 0, 0, 62, 281,
- 0, 301, 0, 281, 337, 302, 110, 177, 62, 62,
- 514, 309, 0, 281, 281, 0, 281, 576, 568, 522,
- 306, 304, 560, 0, 634, 0, 0, 514, 314, 571,
- 316, 513, 523, 311, 260, 0, 522, 0, 514, 0,
- 0, 0, 0, 0, 443, 485, 440, 522, 513, 523,
- 206, 540, 541, 542, 543, 547, 544, 545, 584, 513,
- 523, 0, 0, 0, 0, 0, 0, 632, 633, 540,
- 541, 542, 543, 547, 544, 545, 576, 0, 0, 0,
- 0, 0, 0, 0, 0, 577, 578, 540, 541, 542,
- 543, 547, 544, 545, 0, 0, 0, 0, 0, 0,
+ 152, 652, 331, 669, 535, 531, 538, 142, 528, 148,
+ 641, 16, 313, 393, 485, 500, 626, 630, 263, 638,
+ 183, 625, 623, 206, 574, 447, 583, 320, 183, 253,
+ 313, 248, 466, 145, 663, 653, 616, 584, 556, 640,
+ 581, 248, 437, 253, 248, 495, 183, 178, 453, 150,
+ 462, 347, 455, 550, 554, 183, 351, 447, 458, 190,
+ 313, 457, 425, 188, 469, 441, 433, 253, 237, 468,
+ 0, 313, 173, 171, 393, 409, 447, 498, 409, 464,
+ 400, 0, 165, 206, 475, 206, 512, 511, 0, 0,
+ 188, 0, 0, 206, 0, 206, 0, 62, 0, 459,
+ 417, 206, 206, 206, 188, 0, 62, 0, 62, 62,
+ 507, 504, 410, 148, 62, 410, 460, 62, 419, 505,
+ 407, 412, 170, 62, 62, 459, 506, 444, 277, 148,
+ 422, 331, 187, 281, 62, 62, 62, 180, 260, 295,
+ 296, 297, 62, 62, 656, 655, 314, 298, 299, 62,
+ 62, 503, 182, 62, 206, 362, 514, 393, 247, 62,
+ 62, 460, 502, 62, 62, 639, 313, 167, 92, 99,
+ 62, 206, 206, 514, 510, 345, 100, 260, 562, 62,
+ 62, 62, 394, 493, 93, 94, 95, 492, 62, 62,
+ 182, 206, 62, 206, 96, 62, 246, 97, 62, 90,
+ 62, 401, 91, 206, 62, 86, 355, 340, 353, 62,
+ 108, 247, 206, 349, 188, 313, 102, 206, 393, 104,
+ 313, 62, 206, 182, 206, 206, 62, 362, 459, 206,
+ 242, 62, 469, 460, 62, 514, 409, 63, 318, 110,
+ 657, 341, 239, 590, 403, 62, 322, 206, 72, 62,
+ 362, 62, 362, 69, 206, 98, 62, 62, 70, 71,
+ 514, 0, 206, 62, 62, 566, 356, 0, 206, 79,
+ 62, 108, 74, 410, 483, 281, 0, 309, 0, 0,
+ 62, 62, 281, 304, 62, 281, 281, 62, 362, 281,
+ 343, 0, 281, 284, 289, 316, 324, 327, 0, 311,
+ 110, 177, 0, 309, 206, 62, 479, 0, 281, 62,
+ 281, 309, 301, 309, 281, 0, 281, 309, 281, 62,
+ 306, 0, 281, 62, 281, 337, 302, 0, 281, 578,
+ 300, 514, 260, 328, 562, 308, 636, 570, 443, 330,
+ 522, 0, 0, 0, 0, 0, 514, 0, 206, 0,
+ 0, 0, 513, 523, 0, 522, 0, 485, 542, 543,
+ 544, 545, 549, 546, 547, 0, 586, 513, 523, 0,
+ 0, 0, 0, 0, 440, 588, 589, 542, 543, 544,
+ 545, 549, 546, 547, 586, 0, 0, 0, 0, 0,
+ 0, 0, 0, 634, 635, 542, 543, 544, 545, 549,
+ 546, 547, 578, 0, 0, 0, 0, 0, 0, 0,
+ 0, 579, 580, 542, 543, 544, 545, 549, 546, 547,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 573, 0, 0, 0, 0, 0, 0, 0, 0,
+ 514, 0, 0, 0, 0, 0, 0, 0, 0, 522,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 513, 523, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 584, 0, 0, 0, 0, 0, 0,
- 0, 0, 586, 587, 540, 541, 542, 543, 547, 544,
- 545, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ 0, 0, 0, 0, 0, 0, 0};
const short QQmlJSGrammar::action_check [] = {
- 1, 79, 7, 33, 36, 7, 33, 7, 36, 7,
- 36, 7, 7, 61, 8, 7, 7, 60, 33, 16,
- 36, 55, 7, 48, 55, 7, 7, 60, 36, 5,
- 5, 24, 5, 55, 8, 7, 20, 66, 37, 29,
- 60, 2, 66, 60, 24, 34, 33, 33, 36, 55,
- 60, 55, 55, 36, 17, 33, 79, 36, 7, 1,
- 7, 7, -1, 8, 33, 33, 37, 33, 7, 36,
- 7, 48, 36, 33, 7, 1, 7, 33, 7, 36,
- 7, 36, 1, 8, 36, 36, 8, 8, 36, 33,
- 60, 2, 7, 36, 2, 60, 55, 17, 60, 33,
- 36, 36, 55, 61, 36, 0, 60, 48, 31, 33,
- 7, 10, 8, 7, 15, 8, 33, 8, 36, 8,
- 60, 8, 8, 61, 36, 15, 36, 7, 8, 79,
- 60, 6, 48, 34, 8, 8, 8, 50, 8, 42,
- 8, 54, 8, 50, 34, 20, 60, 54, -1, 77,
- 53, 8, 61, 62, 8, 40, 55, 61, 62, 61,
- 62, 61, 62, 15, 40, 56, 51, 60, 8, 40,
- 56, 60, 8, 60, 7, 51, 7, 61, 62, 8,
- 51, 29, 34, -1, 40, -1, 60, 60, 60, -1,
- 56, 61, 60, 91, 92, 51, 61, 62, 7, 56,
- 61, 62, 56, 91, 92, 29, 61, 62, 61, 62,
- 29, 2, 61, 62, 61, 62, 61, 62, 61, 62,
- 60, 15, 15, 29, 29, 61, 62, 75, 61, 62,
- 61, 62, 61, 62, 12, 8, 15, 29, 86, 15,
- 34, 34, 36, 36, 89, 12, 29, 7, 12, 36,
- 93, 75, 61, 62, -1, 34, 75, 36, 34, 25,
- 36, 27, 86, -1, -1, -1, -1, 86, -1, 75,
- 75, -1, 38, 33, 61, 62, -1, -1, -1, 57,
- 86, 86, -1, 75, -1, 63, 15, -1, 61, 62,
- 57, -1, 75, 57, 86, 15, 63, 18, 19, 63,
- -1, -1, -1, 86, 33, 34, 47, 36, -1, 18,
- 19, -1, -1, 33, 34, 25, 36, 27, 23, 24,
- 61, 62, -1, -1, 45, 46, -1, 32, 38, -1,
- 35, -1, 37, -1, 94, -1, 45, 46, -1, 23,
- 24, -1, -1, -1, -1, 23, 24, -1, 32, 23,
- 24, 35, 93, 37, 32, 23, 24, 35, 32, 37,
- -1, 35, -1, 37, 32, 23, 24, 35, 29, 37,
- -1, -1, 29, 31, 32, 29, -1, 35, 29, 37,
- 98, 99, 100, 101, 102, 103, 23, 24, 29, -1,
- -1, 29, -1, -1, 31, 32, 18, 19, 35, -1,
- 37, -1, -1, -1, -1, 66, 67, 68, -1, 66,
- 67, 68, 66, 67, 68, 66, 67, 68, -1, -1,
- -1, -1, 29, 45, 46, 66, 67, 68, 66, 67,
- 68, -1, -1, 94, 95, 96, 29, 94, 95, 96,
+ 7, 55, 48, 55, 55, 55, 36, 7, 36, 33,
+ 55, 7, 7, 33, 37, 7, 7, 61, 60, 60,
+ 36, 7, 33, 8, 36, 7, 16, 1, 36, 60,
+ 7, 36, 2, 48, 7, 36, 5, 36, 36, 36,
+ 79, 5, 36, 60, 33, 33, 55, 60, 7, 36,
+ 34, 7, 33, 7, 7, 33, 36, 7, 7, 77,
+ 36, 33, 8, 5, 1, 8, 33, 60, 29, 79,
+ 36, 33, 17, 8, 37, 79, 33, 60, 33, 8,
+ 1, 60, 2, 8, 7, 60, 33, 55, 48, 60,
+ 29, 2, 7, 2, 7, 36, 36, 7, 17, 7,
+ 33, 66, 7, 61, 48, 31, 36, 1, 36, 33,
+ 8, 7, 60, 20, 36, 66, 33, 7, 36, 55,
+ 36, 8, 60, 8, 15, -1, 40, 79, 8, 61,
+ 61, 62, 10, 8, 61, 62, 40, 51, 8, 15,
+ 40, 40, 8, 34, 8, 42, 6, 51, 24, 61,
+ 62, 51, 51, 7, 8, 8, 53, 8, 61, 62,
+ 20, 8, 8, 8, 8, 15, 61, 62, 61, 62,
+ 8, 8, 15, 60, -1, 60, 56, 55, 61, 62,
+ 61, 62, 61, 62, 34, 60, 56, 61, 62, 91,
+ 92, 34, 56, 50, 60, 15, 29, 54, 0, 91,
+ 92, 50, 61, 62, 24, 54, 25, 60, 27, 12,
+ 61, 56, 29, 60, 60, 25, 60, 27, 56, 38,
+ 25, 25, 27, 27, 61, 62, 12, 15, 38, 61,
+ 62, 12, 29, 38, 38, 29, 7, -1, 25, 7,
+ 27, 36, 75, 8, 29, 8, 34, -1, 36, 15,
+ 25, 38, 27, 86, 57, 7, -1, 89, 75, 7,
+ 63, -1, 33, 38, 15, 29, 61, 62, 34, 86,
+ 36, 57, 29, -1, -1, -1, 57, 63, 75, -1,
+ -1, 75, 63, 34, 15, 36, -1, 61, 62, 86,
+ 75, -1, 86, 61, 62, -1, 61, 62, 61, 62,
+ -1, 86, -1, 34, 25, 36, 27, 15, -1, 61,
+ 62, 75, -1, 61, 62, 18, 19, 38, 75, 93,
+ 15, -1, 86, 94, -1, 33, 34, -1, 36, 86,
+ 18, 19, 18, 19, 18, 19, 47, -1, 33, 34,
+ -1, 36, 45, 46, 98, 99, 100, 101, 102, 103,
+ 61, 62, -1, -1, 23, 24, -1, 45, 46, 45,
+ 46, 45, 46, 32, 23, 24, 35, -1, 37, -1,
+ -1, -1, -1, 32, 23, 24, 35, -1, 37, -1,
+ 23, 24, 93, 32, -1, 25, 35, 27, 37, 32,
+ -1, -1, 35, 29, 37, 23, 24, -1, 38, -1,
+ -1, -1, -1, 31, 32, 23, 24, 35, -1, 37,
+ -1, -1, -1, 31, 32, 23, 24, 35, 29, 37,
+ -1, -1, -1, 31, 32, 23, 24, 35, -1, 37,
+ 66, 67, 68, 31, 32, 23, 24, 35, -1, 37,
+ -1, -1, -1, 31, 32, -1, -1, 35, -1, 37,
+ 29, -1, -1, 29, -1, 66, 67, 68, 94, 95,
+ 96, 29, -1, -1, 29, -1, 23, 24, 29, -1,
+ -1, 29, 15, -1, 29, 32, -1, -1, 35, -1,
+ 37, 36, -1, 94, 95, 96, 29, 66, 67, 68,
+ 66, 67, 68, -1, -1, -1, -1, -1, 66, 67,
+ 68, 66, 67, 68, -1, 66, 67, 68, 66, 67,
+ 68, 66, 67, 68, -1, 94, 95, 96, 94, 95,
+ 96, -1, -1, 66, 67, 68, 94, 95, 96, 94,
+ 95, 96, 15, 94, 95, 96, 94, 95, 96, 94,
+ 95, 96, -1, 29, -1, -1, 29, -1, -1, 29,
+ 36, 94, 95, 96, 29, -1, -1, 29, -1, -1,
+ -1, 36, -1, -1, -1, 29, -1, -1, 29, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 66, 67, 68, 66, 67, 68, 66, 67, 68, 61,
+ 62, 66, 67, 68, 66, 67, 68, 61, 62, -1,
+ 61, 62, 66, 67, 68, 66, 67, 68, 94, 95,
+ 96, 94, 95, 96, 94, 95, 96, 29, -1, 94,
+ 95, 96, 94, 95, 96, 29, 15, -1, 29, -1,
94, 95, 96, 94, 95, 96, -1, -1, -1, -1,
- -1, -1, -1, 94, 95, 96, 94, 95, 96, 66,
- 67, 68, -1, -1, -1, -1, -1, 29, -1, -1,
- 29, -1, -1, 66, 67, 68, 29, -1, -1, 29,
- -1, -1, 29, -1, 23, 24, 29, 94, 95, 96,
- -1, -1, 31, 32, -1, -1, 35, -1, 37, -1,
- -1, 94, 95, 96, 66, 67, 68, 66, 67, 68,
- -1, -1, -1, 66, 67, 68, 66, 67, 68, 66,
- 67, 68, 29, 66, 67, 68, -1, -1, -1, 36,
- -1, 29, 94, 95, 96, 94, 95, 96, 36, -1,
- -1, 94, 95, 96, 94, 95, 96, 94, 95, 96,
- -1, 94, 95, 96, -1, 29, -1, -1, -1, 66,
- 67, 68, 36, -1, -1, -1, -1, 29, 66, 67,
- 68, -1, -1, -1, -1, 29, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 29, 94, 95, 96,
- -1, -1, 66, 67, 68, -1, 94, 95, 96, -1,
- -1, -1, -1, -1, 66, 67, 68, 61, 62, -1,
- -1, -1, 66, 67, 68, -1, -1, -1, 61, 62,
- 94, 95, 96, 66, 67, 68, 29, -1, -1, 29,
+ 29, -1, -1, -1, -1, -1, -1, -1, -1, 61,
+ 62, -1, -1, -1, 66, 67, 68, 61, 62, -1,
+ 61, 62, 66, 67, 68, 66, 67, 68, -1, -1,
+ -1, -1, -1, -1, -1, 3, -1, 66, 67, 68,
+ -1, -1, 94, 95, 96, 13, -1, -1, -1, 17,
+ 94, 95, 96, 94, 95, 96, -1, -1, 26, -1,
+ 28, -1, -1, 31, -1, 94, 95, 96, -1, -1,
+ -1, 39, -1, 41, 42, -1, -1, 3, -1, -1,
+ -1, 49, -1, -1, 52, 53, -1, 13, -1, -1,
+ 58, 17, -1, -1, -1, -1, 64, -1, -1, -1,
+ 26, -1, 28, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 80, 39, -1, 41, 42, -1, -1, -1,
+ -1, -1, -1, 49, -1, -1, 52, 53, -1, -1,
+ -1, -1, 58, -1, -1, -1, -1, -1, 64, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 80, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
+ 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
+ -1, 33, 34, -1, 36, -1, -1, -1, -1, -1,
+ -1, 43, -1, -1, -1, 47, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 81,
+ 82, 83, -1, -1, -1, 87, -1, -1, -1, -1,
-1, -1, 94, 95, 96, -1, -1, -1, -1, -1,
- 94, 95, 96, -1, 29, -1, -1, -1, -1, -1,
- -1, 94, 95, 96, -1, -1, -1, -1, 61, 62,
- -1, 61, 62, 66, 67, 68, 66, 67, 68, -1,
- -1, -1, -1, -1, -1, -1, 61, 62, -1, -1,
- -1, 66, 67, 68, -1, -1, -1, -1, -1, -1,
- -1, 94, 95, 96, 94, 95, 96, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 94,
- 95, 96, -1, -1, -1, -1, -1, -1, -1, 12,
- 13, 3, -1, -1, -1, -1, -1, -1, -1, 22,
- -1, 13, -1, -1, -1, 17, 29, -1, -1, -1,
- 33, 34, -1, 36, 26, -1, 28, -1, -1, -1,
- 43, -1, -1, -1, 47, -1, -1, 39, -1, 41,
- 42, -1, -1, -1, -1, -1, -1, 49, -1, -1,
- 52, 53, 65, 66, 67, 68, 58, 70, -1, -1,
- -1, -1, 64, -1, -1, -1, -1, -1, 81, 82,
- 83, -1, -1, -1, 87, -1, -1, -1, 80, -1,
- -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
- -1, 12, 13, -1, -1, -1, -1, -1, -1, -1,
- -1, 22, -1, -1, 3, -1, -1, -1, 29, -1,
- -1, -1, 33, 34, 13, 36, -1, -1, 17, -1,
- -1, -1, 43, -1, -1, -1, 47, 26, -1, 28,
- -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
- 39, -1, 41, 42, 65, 66, 67, 68, -1, 70,
- 49, -1, -1, 52, 53, -1, -1, -1, -1, 58,
- 81, 82, 83, -1, -1, 64, 87, -1, -1, -1,
- -1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
- -1, 80, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 12, 13, -1, -1, -1, -1,
+ -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
+ -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
+ -1, -1, -1, -1, -1, 43, -1, -1, -1, 47,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
+ 68, -1, 70, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 81, 82, 83, -1, -1, -1, 87,
+ -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 10, -1,
+ 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
+ 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
+ -1, 33, 34, -1, 36, -1, -1, -1, -1, -1,
+ -1, 43, -1, -1, -1, 47, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 12, 13, -1,
+ -1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
+ -1, -1, -1, 75, -1, -1, -1, -1, -1, 81,
+ 82, 83, 84, -1, -1, 87, -1, -1, -1, -1,
+ -1, -1, 94, 95, 96, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 10, -1, 12, 13, -1, -1,
+ -1, -1, -1, -1, -1, -1, 22, -1, -1, -1,
+ -1, -1, -1, 29, -1, -1, -1, 33, 34, -1,
+ 36, -1, -1, -1, -1, -1, -1, 43, -1, -1,
+ -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 65,
+ 66, 67, 68, -1, 70, -1, -1, -1, -1, 75,
+ -1, -1, -1, -1, -1, 81, 82, 83, 84, -1,
+ -1, 87, -1, -1, -1, -1, -1, -1, 94, 95,
+ 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 10, -1, 12, 13, -1, -1, -1, -1, -1, -1,
+ -1, -1, 22, -1, -1, -1, -1, -1, -1, 29,
+ -1, -1, -1, 33, 34, -1, 36, -1, -1, -1,
+ -1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 65, 66, 67, 68, -1,
+ 70, -1, -1, -1, -1, 75, -1, -1, -1, -1,
+ -1, 81, 82, 83, 84, -1, -1, 87, -1, -1,
+ -1, -1, -1, -1, 94, 95, 96, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 11, 12, 13, -1,
-1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
-1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
- -1, 36, -1, -1, -1, -1, -1, -1, 43, -1,
- -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
+ -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
+ -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 65, 66, 67, 68, -1, 70, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 81, 82, 83, -1,
+ 65, 66, 67, 68, -1, 70, -1, 72, -1, 74,
+ -1, 76, -1, -1, -1, -1, 81, 82, 83, -1,
-1, -1, 87, -1, -1, -1, -1, -1, -1, 94,
95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 12, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, 7, -1, -1, -1, 11, 12, 13, -1, -1,
+ -1, -1, -1, -1, -1, -1, 22, -1, -1, -1,
+ -1, -1, -1, 29, -1, -1, -1, 33, 34, -1,
+ 36, -1, -1, -1, 40, -1, 42, 43, 44, -1,
+ -1, 47, -1, -1, -1, 51, -1, 53, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 65,
+ 66, 67, 68, -1, 70, -1, 72, -1, 74, -1,
+ 76, -1, -1, -1, -1, 81, 82, 83, -1, -1,
+ -1, 87, -1, -1, -1, -1, -1, -1, 94, 95,
+ 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
-1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
- -1, -1, 33, 34, -1, 36, -1, -1, -1, -1,
- -1, -1, 43, -1, -1, -1, 47, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
+ -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
+ 51, -1, 53, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 65, 66, 67, 68, -1, 70,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 72, -1, 74, 75, 76, -1, -1, -1, -1,
81, 82, 83, -1, -1, -1, 87, -1, -1, -1,
-1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 10, -1, 12, 13, -1,
+ -1, -1, -1, -1, -1, 8, -1, -1, 11, 12,
+ 13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
+ -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
+ 33, 34, -1, 36, -1, -1, -1, 40, -1, 42,
+ 43, 44, -1, -1, 47, -1, -1, -1, 51, -1,
+ 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
+ -1, -1, 65, 66, 67, 68, -1, 70, -1, 72,
+ -1, 74, -1, 76, -1, -1, -1, -1, 81, 82,
+ 83, -1, -1, -1, 87, -1, -1, -1, -1, -1,
+ -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 8, -1, -1, 11, 12, 13, -1,
-1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
-1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
- -1, 36, -1, -1, -1, -1, -1, -1, 43, -1,
- -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 65, 66, 67, 68, -1, 70, -1, -1, -1, -1,
- 75, -1, -1, -1, -1, -1, 81, 82, 83, 84,
+ -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
+ -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
+ -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
+ 65, 66, 67, 68, -1, 70, -1, 72, -1, 74,
+ -1, 76, -1, -1, -1, -1, 81, 82, 83, -1,
-1, -1, 87, -1, -1, -1, -1, -1, -1, 94,
95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 10, -1, 12, 13, -1, -1, -1, -1, -1,
+ -1, 8, -1, -1, 11, 12, 13, -1, -1, -1,
+ -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
+ -1, -1, 29, -1, -1, -1, 33, 34, -1, 36,
+ -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
+ 47, -1, -1, -1, 51, -1, 53, -1, -1, 56,
+ -1, -1, -1, -1, -1, -1, -1, -1, 65, 66,
+ 67, 68, -1, 70, -1, 72, -1, 74, -1, 76,
+ -1, -1, -1, -1, 81, 82, 83, -1, -1, -1,
+ 87, -1, -1, -1, -1, -1, -1, 94, 95, 96,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 8,
+ -1, -1, 11, 12, 13, -1, -1, -1, -1, -1,
-1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
29, -1, -1, -1, 33, 34, -1, 36, -1, -1,
- -1, -1, -1, -1, 43, -1, -1, -1, 47, -1,
- -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
+ -1, 40, -1, 42, 43, 44, -1, -1, 47, -1,
+ -1, -1, 51, -1, 53, -1, -1, 56, -1, -1,
-1, -1, -1, -1, -1, -1, 65, 66, 67, 68,
- -1, 70, -1, -1, -1, -1, 75, -1, -1, -1,
- -1, -1, 81, 82, 83, 84, -1, -1, 87, -1,
+ -1, 70, -1, 72, -1, 74, -1, 76, -1, -1,
+ -1, -1, 81, 82, 83, -1, -1, -1, 87, -1,
-1, -1, -1, -1, -1, 94, 95, 96, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 10, -1, 12,
- 13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
- -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
- 33, 34, -1, 36, -1, -1, -1, -1, -1, -1,
- 43, -1, -1, -1, 47, -1, -1, -1, -1, -1,
- -1, -1, 55, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 65, 66, 67, 68, -1, 70, -1, -1,
- -1, -1, 75, -1, -1, -1, -1, -1, 81, 82,
- 83, 84, -1, -1, 87, -1, -1, -1, -1, -1,
- -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
- -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
- -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
- -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
- -1, -1, -1, 51, -1, 53, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
- 68, -1, 70, -1, 72, -1, 74, -1, 76, -1,
- -1, -1, -1, 81, 82, 83, -1, -1, -1, 87,
- -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 7, -1,
+ -1, -1, -1, -1, -1, -1, -1, 11, 12, 13,
+ -1, -1, -1, -1, -1, -1, -1, -1, 22, -1,
+ -1, -1, -1, -1, -1, 29, 30, -1, -1, 33,
+ 34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
+ 44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
+ -1, -1, -1, -1, -1, -1, -1, 61, -1, -1,
+ -1, 65, 66, 67, 68, 69, 70, -1, 72, 73,
+ 74, -1, 76, -1, 78, -1, -1, 81, 82, 83,
+ -1, -1, -1, 87, -1, -1, -1, -1, -1, -1,
+ 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 11, 12, 13, -1, -1, -1, -1, -1,
-1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
- 29, -1, -1, -1, 33, 34, -1, 36, -1, -1,
+ 29, 30, -1, -1, 33, 34, -1, 36, -1, -1,
-1, 40, -1, 42, 43, 44, -1, -1, 47, -1,
-1, -1, 51, -1, 53, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 65, 66, 67, 68,
- -1, 70, -1, 72, -1, 74, -1, 76, -1, -1,
+ -1, -1, 61, -1, -1, -1, 65, 66, 67, 68,
+ 69, 70, -1, 72, 73, 74, -1, 76, -1, 78,
-1, -1, 81, 82, 83, -1, -1, -1, 87, -1,
-1, -1, -1, -1, -1, 94, 95, 96, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 11, 12, 13,
-1, -1, -1, -1, -1, -1, -1, -1, 22, -1,
- -1, -1, -1, -1, -1, 29, -1, -1, -1, 33,
+ -1, -1, -1, -1, -1, 29, 30, -1, -1, 33,
34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 65, 66, 67, 68, -1, 70, -1, 72, -1,
- 74, 75, 76, -1, -1, -1, -1, 81, 82, 83,
+ -1, -1, -1, -1, -1, -1, -1, 61, -1, -1,
+ -1, 65, 66, 67, 68, 69, 70, -1, 72, 73,
+ 74, -1, 76, -1, 78, -1, -1, 81, 82, 83,
-1, -1, -1, 87, -1, -1, -1, -1, -1, -1,
94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 8, -1, -1, 11, 12, 13, -1, -1,
- -1, -1, -1, -1, -1, -1, 22, -1, -1, -1,
- -1, -1, -1, 29, -1, -1, -1, 33, 34, -1,
- 36, -1, -1, -1, 40, -1, 42, 43, 44, -1,
- -1, 47, -1, -1, -1, 51, -1, 53, -1, -1,
- 56, -1, -1, -1, -1, -1, -1, -1, -1, 65,
- 66, 67, 68, -1, 70, -1, 72, -1, 74, -1,
- 76, -1, -1, -1, -1, 81, 82, 83, -1, -1,
- -1, 87, -1, -1, -1, -1, -1, -1, 94, 95,
- 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 8, -1, -1, 11, 12, 13, -1, -1, -1, -1,
- -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
- -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
- -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
- -1, -1, -1, 51, -1, 53, -1, -1, 56, -1,
- -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
- 68, -1, 70, -1, 72, -1, 74, -1, 76, -1,
- -1, -1, -1, 81, 82, 83, -1, -1, -1, 87,
- -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 8, -1,
- -1, 11, 12, 13, -1, -1, -1, -1, -1, -1,
- -1, -1, 22, -1, -1, -1, -1, -1, -1, 29,
- -1, -1, -1, 33, 34, -1, 36, -1, -1, -1,
- 40, -1, 42, 43, 44, -1, -1, 47, -1, -1,
- -1, 51, -1, 53, -1, -1, 56, -1, -1, -1,
- -1, -1, -1, -1, -1, 65, 66, 67, 68, -1,
- 70, -1, 72, -1, 74, -1, 76, -1, -1, -1,
- -1, 81, 82, 83, -1, -1, -1, 87, -1, -1,
- -1, -1, -1, -1, 94, 95, 96, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 8, -1, -1, 11,
- 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
- 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
- -1, 33, 34, -1, 36, -1, -1, -1, 40, -1,
- 42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
- -1, 53, -1, -1, 56, -1, -1, -1, -1, -1,
- -1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
- 72, -1, 74, -1, 76, -1, -1, -1, -1, 81,
- 82, 83, -1, -1, -1, 87, -1, -1, -1, -1,
+ -1, -1, 4, 5, 6, -1, -1, 9, 10, 11,
+ -1, -1, 14, -1, 16, -1, -1, -1, 20, 21,
+ 22, -1, -1, -1, -1, -1, -1, 29, 30, 31,
+ 32, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 43, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 59, -1, -1,
+ -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
+ -1, 73, 74, 75, 76, 77, 78, -1, -1, 81,
+ 82, 83, 84, 85, 86, -1, -1, -1, -1, -1,
-1, -1, 94, 95, 96, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 11, 12, 13, -1, -1, -1,
- -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
- -1, -1, 29, 30, -1, -1, 33, 34, -1, 36,
- -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
- 47, -1, -1, -1, 51, -1, 53, -1, -1, -1,
- -1, -1, -1, -1, 61, -1, -1, -1, 65, 66,
- 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
- -1, 78, -1, -1, 81, 82, 83, -1, -1, -1,
- 87, -1, -1, -1, -1, -1, -1, 94, 95, 96,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 11,
- 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4, 5, 6, -1, -1, 9,
+ 10, 11, -1, -1, 14, -1, 16, -1, -1, -1,
+ 20, 21, 22, -1, -1, -1, -1, -1, -1, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 59,
+ -1, -1, -1, -1, -1, 65, 66, 67, 68, 69,
+ 70, 71, -1, 73, 74, 75, 76, 77, 78, -1,
+ -1, 81, 82, 83, 84, 85, 86, -1, -1, -1,
+ -1, -1, -1, -1, 94, 95, 96, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4, 5, 6, -1,
+ -1, 9, 10, 11, -1, -1, 14, -1, 16, -1,
+ -1, -1, 20, 21, 22, -1, -1, -1, -1, -1,
+ -1, 29, 30, 31, 32, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 43, -1, -1, -1, 47,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 59, -1, -1, -1, -1, -1, 65, 66, 67,
+ 68, 69, 70, 71, -1, 73, 74, 75, 76, 77,
+ 78, -1, -1, 81, 82, 83, 84, 85, 86, -1,
+ -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4, 5,
+ 6, -1, -1, 9, 10, 11, -1, -1, 14, -1,
+ 16, -1, -1, -1, 20, 21, 22, -1, -1, -1,
+ -1, -1, -1, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 43, -1, -1,
+ -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
+ -1, -1, -1, 59, -1, -1, -1, -1, -1, 65,
+ 66, 67, 68, 69, 70, 71, -1, 73, 74, 75,
+ 76, 77, 78, -1, -1, 81, 82, 83, 84, 85,
+ 86, -1, -1, -1, -1, -1, -1, -1, 94, 95,
+ 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4, -1, -1, -1, -1, 9, -1, 11, 12, 13,
+ 14, -1, -1, -1, -1, -1, -1, 21, 22, -1,
+ -1, -1, -1, -1, -1, 29, 30, -1, -1, 33,
+ 34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
+ 44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
+ -1, -1, -1, -1, -1, 59, -1, 61, -1, -1,
+ -1, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, -1, -1, 81, 82, 83,
+ 84, 85, -1, 87, -1, -1, -1, -1, -1, -1,
+ 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4, -1, -1, -1, -1, 9, -1, 11,
+ 12, 13, 14, -1, -1, -1, -1, -1, -1, 21,
22, -1, -1, -1, -1, -1, -1, 29, 30, -1,
-1, 33, 34, -1, 36, -1, -1, -1, 40, -1,
42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
- -1, 53, -1, -1, -1, -1, -1, -1, -1, 61,
- -1, -1, -1, 65, 66, 67, 68, 69, 70, -1,
- 72, 73, 74, -1, 76, -1, 78, -1, -1, 81,
- 82, 83, -1, -1, -1, 87, -1, -1, -1, -1,
+ -1, 53, -1, -1, -1, -1, -1, 59, -1, 61,
+ -1, -1, -1, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, -1, -1, 81,
+ 82, 83, 84, 85, -1, 87, -1, -1, -1, -1,
-1, -1, 94, 95, 96, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 11, 12, 13, -1, -1, -1,
- -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
- -1, -1, 29, 30, -1, -1, 33, 34, -1, 36,
- -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
- 47, -1, -1, -1, 51, -1, 53, -1, -1, -1,
- -1, -1, -1, -1, 61, -1, -1, -1, 65, 66,
- 67, 68, 69, 70, -1, 72, 73, 74, -1, 76,
- -1, 78, -1, -1, 81, 82, 83, -1, -1, -1,
- 87, -1, -1, -1, -1, -1, -1, 94, 95, 96,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
- 5, 6, -1, -1, 9, 10, 11, -1, -1, 14,
- -1, 16, -1, -1, -1, 20, 21, 22, -1, -1,
- -1, -1, -1, -1, 29, 30, 31, 32, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 43, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 59, -1, -1, -1, -1, -1,
- -1, 66, 67, 68, 69, 70, 71, -1, 73, 74,
- 75, 76, 77, 78, -1, -1, 81, 82, 83, 84,
- 85, 86, -1, -1, -1, -1, -1, -1, -1, 94,
- 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 4, 5, 6, -1, -1, 9, 10, 11, -1,
- -1, 14, -1, 16, -1, -1, -1, 20, 21, 22,
- -1, -1, -1, -1, -1, -1, 29, 30, 31, 32,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 43, -1, -1, -1, 47, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 59, -1, -1, -1,
- -1, -1, 65, 66, 67, 68, 69, 70, 71, -1,
- 73, 74, 75, 76, 77, 78, -1, -1, 81, 82,
- 83, 84, 85, 86, -1, -1, -1, -1, -1, -1,
- -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 4, 5, 6, -1, -1, 9, 10,
- 11, -1, -1, 14, -1, 16, -1, -1, -1, 20,
- 21, 22, -1, -1, -1, -1, -1, -1, 29, 30,
- 31, 32, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 43, -1, -1, -1, 47, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 59, -1,
- -1, -1, -1, -1, 65, 66, 67, 68, 69, 70,
- 71, -1, 73, 74, 75, 76, 77, 78, -1, -1,
- 81, 82, 83, 84, 85, 86, -1, -1, -1, -1,
- -1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 4, 5, 6, -1, -1,
- 9, 10, 11, -1, -1, 14, -1, 16, -1, -1,
- -1, 20, 21, 22, -1, -1, -1, -1, -1, -1,
- 29, 30, 31, 32, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 43, -1, -1, -1, 47, -1,
- -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
- 59, -1, -1, -1, -1, -1, 65, 66, 67, 68,
- 69, 70, 71, -1, 73, 74, 75, 76, 77, 78,
- -1, -1, 81, 82, 83, 84, 85, 86, -1, -1,
- -1, -1, -1, -1, -1, 94, 95, 96, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 4, -1, -1,
- -1, -1, 9, -1, 11, 12, 13, 14, -1, -1,
- -1, -1, -1, -1, 21, 22, -1, -1, -1, -1,
- -1, -1, 29, 30, -1, -1, 33, 34, -1, 36,
- -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
- 47, -1, -1, -1, 51, -1, 53, -1, -1, -1,
- -1, -1, 59, -1, 61, -1, -1, -1, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, -1, -1, 81, 82, 83, 84, 85, -1,
- 87, -1, -1, -1, -1, -1, -1, 94, 95, 96,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
- -1, -1, -1, -1, 9, -1, 11, 12, 13, 14,
- -1, -1, -1, -1, -1, -1, 21, 22, -1, -1,
- -1, -1, -1, -1, 29, 30, -1, -1, 33, 34,
- -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
- -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
- -1, -1, -1, -1, 59, -1, 61, -1, -1, -1,
- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, -1, -1, 81, 82, 83, 84,
- 85, -1, 87, -1, -1, -1, -1, -1, -1, 94,
- 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 4, 5, 6, -1, -1, 9, 10, 11, 12,
- 13, 14, -1, 16, -1, -1, -1, 20, 21, 22,
- -1, -1, -1, -1, -1, -1, 29, 30, 31, 32,
- 33, 34, -1, 36, -1, -1, -1, 40, -1, 42,
- 43, 44, -1, -1, 47, -1, -1, -1, 51, -1,
- 53, -1, -1, -1, -1, -1, 59, -1, 61, -1,
- -1, -1, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 75, 76, 77, 78, -1, -1, 81, 82,
- 83, 84, 85, 86, 87, -1, -1, -1, -1, -1,
- -1, 94, 95, 96, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 4, 5, 6, -1, -1, 9, 10,
- 11, 12, 13, 14, -1, 16, -1, -1, -1, 20,
- 21, 22, -1, -1, -1, -1, -1, -1, 29, 30,
- 31, 32, 33, 34, -1, 36, -1, -1, -1, 40,
- -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
- 51, -1, 53, -1, 55, -1, -1, -1, 59, -1,
- 61, -1, -1, -1, 65, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 76, 77, 78, -1, -1,
- 81, 82, 83, 84, 85, 86, 87, -1, -1, -1,
- -1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4, 5, 6, -1, -1, 9,
+ 10, 11, 12, 13, 14, -1, 16, -1, -1, -1,
+ 20, 21, 22, -1, -1, -1, -1, -1, -1, 29,
+ 30, 31, 32, 33, 34, -1, 36, -1, -1, -1,
+ 40, -1, 42, 43, 44, -1, -1, 47, -1, -1,
+ -1, 51, -1, 53, -1, -1, -1, -1, -1, 59,
+ -1, 61, -1, -1, -1, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, -1,
+ -1, 81, 82, 83, 84, 85, 86, 87, -1, -1,
+ -1, -1, -1, -1, 94, 95, 96, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4, 5, 6, -1,
+ -1, 9, 10, 11, 12, 13, 14, -1, 16, -1,
+ -1, -1, 20, 21, 22, -1, -1, -1, -1, -1,
+ -1, 29, 30, 31, 32, 33, 34, -1, 36, -1,
+ -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
+ -1, -1, -1, 51, -1, 53, -1, 55, -1, -1,
+ -1, 59, -1, 61, -1, -1, -1, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, -1, -1, 81, 82, 83, 84, 85, 86, 87,
+ -1, -1, -1, -1, -1, -1, 94, 95, 96, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
- 14, 18, 32, 22, 14, 25, 32, 18, 32, 3,
- 18, 18, 18, 22, 14, 3, 18, 22, 22, 32,
- 18, 18, 3, 18, 3, 18, 18, 18, 18, 32,
- 3, 32, 18, 18, 3, 18, 25, 3, 18, 3,
- 18, 18, 18, 42, 18, 3, 42, 3, 3, 3,
- 18, 3, 9, 3, 77, 42, 3, 18, 42, 105,
- 42, 3, 25, 25, 3, 18, 25, 42, 3, 18,
- 42, 42, 42, 100, 103, 42, 2, 42, 18, 4,
- 18, 14, 2, -1, 18, 2, -1, 18, 4, 2,
- 23, -1, 18, 18, 54, -1, -1, 18, 18, 11,
- 12, 18, 18, 54, -1, 18, 54, 14, 54, 47,
- 70, 54, 42, 64, 60, 46, -1, 54, 66, 56,
- 50, 3, 54, 18, 56, 68, 54, 54, 56, 56,
- 54, 54, 3, 57, 57, 54, 54, 56, 56, 54,
- 54, 56, 56, 54, 51, 56, 54, -1, 56, 54,
- 54, 56, 56, 54, 54, 18, 54, 54, 58, 60,
- 58, 54, 59, 54, 54, 54, 59, 54, 59, 59,
- 59, 54, 59, 54, 54, 109, 59, 58, 54, 54,
- 60, 54, 18, 56, 60, 2, 14, 62, 14, 2,
- 54, 19, 56, 19, 2, 2, 78, 2, 54, 94,
- 56, 18, 18, 14, 14, 18, 18, 78, 44, 18,
- 18, 18, 54, 18, 56, 54, 18, 56, 42, 18,
- 4, 2, 2, 2, 18, 54, 50, 2, 44, 92,
- 59, 43, 18, 54, 18, 56, 45, 18, 18, 18,
- 51, 51, 18, 18, 46, 38, 45, 14, 2, 42,
- 2, 45, 19, 54, 54, 2, 54, 54, 59, 59,
- 46, 59, 59, 3, 18, 3, 18, 54, 2, 45,
- 2, 18, 59, -1, -1, -1, 54, 54, -1, -1,
- 54, 59, 59, 54, 18, 59, 18, 18, 59, 76,
- 54, 69, 54, 54, 71, 59, 54, 59, 59, 63,
- 61, 59, 76, 61, 54, 76, -1, -1, 54, 59,
- -1, 61, -1, 59, 76, 61, 47, 48, 54, 54,
- 14, 54, -1, 59, 59, -1, 59, 14, 5, 23,
- 65, 67, 19, -1, 21, -1, -1, 14, 78, 5,
- 78, 35, 36, 76, 2, -1, 23, -1, 14, -1,
- -1, -1, -1, -1, 88, 42, 88, 23, 35, 36,
- 18, 25, 26, 27, 28, 29, 30, 31, 14, 35,
- 36, -1, -1, -1, -1, -1, -1, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 14, -1, -1, -1,
- -1, -1, -1, -1, -1, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 77, 14, 18, 18, 18, 32, 18, 3, 32, 42,
+ 9, 3, 3, 18, 42, 3, 18, 18, 3, 22,
+ 18, 32, 32, 18, 18, 25, 32, 3, 18, 18,
+ 3, 18, 3, 42, 18, 14, 22, 18, 18, 22,
+ 22, 18, 100, 18, 18, 42, 18, 3, 105, 42,
+ 3, 3, 18, 14, 32, 18, 3, 25, 25, 18,
+ 3, 25, 3, 18, 18, 3, 103, 18, 18, 2,
+ -1, 3, 42, 42, 18, 14, 25, 42, 14, 2,
+ 42, -1, 42, 18, 42, 18, 2, 4, -1, -1,
+ 18, -1, -1, 18, -1, 18, -1, 54, -1, 56,
+ 44, 18, 18, 18, 18, -1, 54, -1, 54, 54,
+ 56, 56, 51, 42, 54, 51, 56, 54, 46, 56,
+ 45, 50, 70, 54, 54, 56, 56, 3, 54, 42,
+ 45, 18, 46, 59, 54, 54, 54, 50, 2, 59,
+ 59, 59, 54, 54, 11, 12, 78, 59, 59, 54,
+ 54, 56, 56, 54, 18, 2, 14, 18, 4, 54,
+ 54, 56, 56, 54, 54, 23, 3, 68, 58, 60,
+ 54, 18, 18, 14, 109, 2, 60, 2, 19, 54,
+ 54, 54, 43, 38, 59, 59, 59, 42, 54, 54,
+ 56, 18, 54, 18, 59, 54, 2, 59, 54, 58,
+ 54, 2, 58, 18, 54, 59, 2, 94, 2, 54,
+ 18, 4, 18, 2, 18, 3, 66, 18, 18, 64,
+ 3, 54, 18, 56, 18, 18, 54, 2, 56, 18,
+ 45, 54, 18, 56, 54, 14, 14, 57, 2, 47,
+ 19, 78, 46, 18, 44, 54, 2, 18, 57, 54,
+ 2, 54, 2, 56, 18, 60, 54, 54, 56, 56,
+ 14, -1, 18, 54, 54, 19, 18, -1, 18, 60,
+ 54, 18, 62, 51, 45, 59, -1, 54, -1, -1,
+ 54, 54, 59, 67, 54, 59, 59, 54, 2, 59,
+ 78, -1, 59, 63, 61, 78, 69, 71, -1, 76,
+ 47, 48, -1, 54, 18, 54, 92, -1, 59, 54,
+ 59, 54, 61, 54, 59, -1, 59, 54, 59, 54,
+ 65, -1, 59, 54, 59, 76, 61, -1, 59, 14,
+ 61, 14, 2, 76, 19, 76, 21, 5, 88, 76,
+ 23, -1, -1, -1, -1, -1, 14, -1, 18, -1,
+ -1, -1, 35, 36, -1, 23, -1, 42, 25, 26,
+ 27, 28, 29, 30, 31, -1, 14, 35, 36, -1,
+ -1, -1, -1, -1, 88, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 14, -1, -1, -1, -1, -1,
+ -1, -1, -1, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 14, -1, -1, -1, -1, -1, -1, -1,
+ -1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5, -1, -1, -1, -1, -1, -1, -1, -1,
+ 14, -1, -1, -1, -1, -1, -1, -1, -1, 23,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 14, -1, -1, -1, -1, -1, -1,
- -1, -1, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 35, 36, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
+ -1, -1, -1, -1, -1, -1, -1};
QT_END_NAMESPACE
diff --git a/src/qml/parser/qqmljsgrammar_p.h b/src/qml/parser/qqmljsgrammar_p.h
index 244a807f24..050ef6c288 100644
--- a/src/qml/parser/qqmljsgrammar_p.h
+++ b/src/qml/parser/qqmljsgrammar_p.h
@@ -167,15 +167,15 @@ public:
T_XOR = 79,
T_XOR_EQ = 80,
- ACCEPT_STATE = 672,
- RULE_COUNT = 360,
- STATE_COUNT = 673,
+ ACCEPT_STATE = 674,
+ RULE_COUNT = 361,
+ STATE_COUNT = 675,
TERMINAL_COUNT = 106,
NON_TERMINAL_COUNT = 111,
- GOTO_INDEX_OFFSET = 673,
- GOTO_INFO_OFFSET = 3185,
- GOTO_CHECK_OFFSET = 3185
+ GOTO_INDEX_OFFSET = 675,
+ GOTO_INFO_OFFSET = 3078,
+ GOTO_CHECK_OFFSET = 3078
};
static const char *const spell [];
diff --git a/src/qml/parser/qqmljsmemorypool_p.h b/src/qml/parser/qqmljsmemorypool_p.h
index 08609e2961..536f5d4239 100644
--- a/src/qml/parser/qqmljsmemorypool_p.h
+++ b/src/qml/parser/qqmljsmemorypool_p.h
@@ -122,6 +122,7 @@ private:
_allocatedBlocks *= 2;
_blocks = (char **) realloc(_blocks, sizeof(char *) * _allocatedBlocks);
+ Q_CHECK_PTR(_blocks);
for (int index = _blockCount; index < _allocatedBlocks; ++index)
_blocks[index] = 0;
@@ -129,8 +130,10 @@ private:
char *&block = _blocks[_blockCount];
- if (! block)
+ if (! block) {
block = (char *) malloc(BLOCK_SIZE);
+ Q_CHECK_PTR(block);
+ }
_ptr = block;
_end = _ptr + BLOCK_SIZE;
diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp
index ca5a09d22d..50518a92ee 100644
--- a/src/qml/parser/qqmljsparser.cpp
+++ b/src/qml/parser/qqmljsparser.cpp
@@ -436,31 +436,55 @@ case 47:
sym(1).Node = node;
} break;
+case 48: {
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(stringRef(1));
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 49: {
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(stringRef(1));
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 50: {
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(stringRef(1));
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
case 51: {
- sym(1).Node = 0;
+ AST::UiQualifiedId *node = new (pool) AST::UiQualifiedId(sym(1).UiQualifiedId, stringRef(3));
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
} break;
case 52: {
- sym(1).Node = sym(1).UiParameterList->finish ();
+ sym(1).Node = 0;
} break;
case 53: {
- AST::UiParameterList *node = new (pool) AST::UiParameterList(stringRef(1), stringRef(2));
+ sym(1).Node = sym(1).UiParameterList->finish ();
+} break;
+
+case 54: {
+ AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiQualifiedId->finish(), stringRef(2));
node->propertyTypeToken = loc(1);
node->identifierToken = loc(2);
sym(1).Node = node;
} break;
-case 54: {
- AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, stringRef(3), stringRef(4));
+case 55: {
+ AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, sym(3).UiQualifiedId->finish(), stringRef(4));
node->propertyTypeToken = loc(3);
node->commaToken = loc(2);
node->identifierToken = loc(4);
sym(1).Node = node;
} break;
-case 56: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(QStringRef(), stringRef(2));
+case 57: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(nullptr, stringRef(2));
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -470,8 +494,8 @@ case 56: {
sym(1).Node = node;
} break;
-case 58: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(QStringRef(), stringRef(2));
+case 59: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(nullptr, stringRef(2));
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -480,8 +504,8 @@ case 58: {
sym(1).Node = node;
} break;
-case 60: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(4), stringRef(6));
+case 61: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(4).UiQualifiedId->finish(), stringRef(6));
node->typeModifier = stringRef(2);
node->propertyToken = loc(1);
node->typeModifierToken = loc(2);
@@ -491,8 +515,8 @@ case 60: {
sym(1).Node = node;
} break;
-case 62: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3));
+case 63: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3));
node->propertyToken = loc(1);
node->typeToken = loc(2);
node->identifierToken = loc(3);
@@ -500,8 +524,8 @@ case 62: {
sym(1).Node = node;
} break;
-case 64: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4));
+case 65: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4));
node->isDefaultMember = true;
node->defaultToken = loc(1);
node->propertyToken = loc(2);
@@ -511,8 +535,8 @@ case 64: {
sym(1).Node = node;
} break;
-case 66: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(5), stringRef(7));
+case 67: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(5).UiQualifiedId->finish(), stringRef(7));
node->isDefaultMember = true;
node->defaultToken = loc(1);
node->typeModifier = stringRef(3);
@@ -524,8 +548,8 @@ case 66: {
sym(1).Node = node;
} break;
-case 67: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3),
+case 68: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3),
sym(5).Statement);
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -534,8 +558,8 @@ case 67: {
sym(1).Node = node;
} break;
-case 68: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4),
+case 69: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4),
sym(6).Statement);
node->isReadonlyMember = true;
node->readonlyToken = loc(1);
@@ -546,8 +570,8 @@ case 68: {
sym(1).Node = node;
} break;
-case 69: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4),
+case 70: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4),
sym(6).Statement);
node->isDefaultMember = true;
node->defaultToken = loc(1);
@@ -558,8 +582,8 @@ case 69: {
sym(1).Node = node;
} break;
-case 70: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(4), stringRef(6));
+case 71: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(4).UiQualifiedId->finish(), stringRef(6));
node->typeModifier = stringRef(2);
node->propertyToken = loc(1);
node->typeModifierToken = loc(2);
@@ -582,8 +606,8 @@ case 70: {
sym(1).Node = node;
} break;
-case 71: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(2), stringRef(3));
+case 72: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3));
node->propertyToken = loc(1);
node->typeToken = loc(2);
node->identifierToken = loc(3);
@@ -602,8 +626,8 @@ case 71: {
sym(1).Node = node;
} break;
-case 72: {
- AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4));
+case 73: {
+ AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(3).UiQualifiedId->finish(), stringRef(4));
node->isReadonlyMember = true;
node->readonlyToken = loc(1);
node->propertyToken = loc(2);
@@ -624,57 +648,57 @@ case 72: {
sym(1).Node = node;
} break;
-case 73: {
+case 74: {
sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node);
} break;
-case 74: {
+case 75: {
sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node);
} break;
-case 82: {
+case 83: {
AST::ThisExpression *node = new (pool) AST::ThisExpression();
node->thisToken = loc(1);
sym(1).Node = node;
} break;
-case 83: {
+case 84: {
AST::IdentifierExpression *node = new (pool) AST::IdentifierExpression(stringRef(1));
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 84: {
+case 85: {
AST::NullExpression *node = new (pool) AST::NullExpression();
node->nullToken = loc(1);
sym(1).Node = node;
} break;
-case 85: {
+case 86: {
AST::TrueLiteral *node = new (pool) AST::TrueLiteral();
node->trueToken = loc(1);
sym(1).Node = node;
} break;
-case 86: {
+case 87: {
AST::FalseLiteral *node = new (pool) AST::FalseLiteral();
node->falseToken = loc(1);
sym(1).Node = node;
} break;
-case 87: {
+case 88: {
AST::NumericLiteral *node = new (pool) AST::NumericLiteral(sym(1).dval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 88:
-case 89: {
+case 89:
+case 90: {
AST::StringLiteral *node = new (pool) AST::StringLiteral(stringRef(1));
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 90: {
+case 91: {
bool rx = lexer->scanRegExp(Lexer::NoPrefix);
if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
@@ -690,7 +714,7 @@ case 90: {
sym(1).Node = node;
} break;
-case 91: {
+case 92: {
bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
@@ -706,28 +730,28 @@ case 91: {
sym(1).Node = node;
} break;
-case 92: {
+case 93: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral((AST::Elision *) 0);
node->lbracketToken = loc(1);
node->rbracketToken = loc(2);
sym(1).Node = node;
} break;
-case 93: {
+case 94: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).Elision->finish());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 94: {
+case 95: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish ());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 95: {
+case 96: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish (),
(AST::Elision *) 0);
node->lbracketToken = loc(1);
@@ -736,7 +760,7 @@ case 95: {
sym(1).Node = node;
} break;
-case 96: {
+case 97: {
AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish (),
sym(4).Elision->finish());
node->lbracketToken = loc(1);
@@ -745,7 +769,7 @@ case 96: {
sym(1).Node = node;
} break;
-case 97: {
+case 98: {
AST::ObjectLiteral *node = 0;
if (sym(2).Node)
node = new (pool) AST::ObjectLiteral(
@@ -757,7 +781,7 @@ case 97: {
sym(1).Node = node;
} break;
-case 98: {
+case 99: {
AST::ObjectLiteral *node = new (pool) AST::ObjectLiteral(
sym(2).PropertyAssignmentList->finish ());
node->lbraceToken = loc(1);
@@ -765,14 +789,14 @@ case 98: {
sym(1).Node = node;
} break;
-case 99: {
+case 100: {
AST::NestedExpression *node = new (pool) AST::NestedExpression(sym(2).Expression);
node->lparenToken = loc(1);
node->rparenToken = loc(3);
sym(1).Node = node;
} break;
-case 100: {
+case 101: {
if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken,
QLatin1String("Ignored annotation")));
@@ -792,48 +816,48 @@ case 100: {
}
} break;
-case 101: {
+case 102: {
sym(1).Node = new (pool) AST::ElementList((AST::Elision *) 0, sym(1).Expression);
} break;
-case 102: {
+case 103: {
sym(1).Node = new (pool) AST::ElementList(sym(1).Elision->finish(), sym(2).Expression);
} break;
-case 103: {
+case 104: {
AST::ElementList *node = new (pool) AST::ElementList(sym(1).ElementList,
(AST::Elision *) 0, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 104: {
+case 105: {
AST::ElementList *node = new (pool) AST::ElementList(sym(1).ElementList, sym(3).Elision->finish(),
sym(4).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 105: {
+case 106: {
AST::Elision *node = new (pool) AST::Elision();
node->commaToken = loc(1);
sym(1).Node = node;
} break;
-case 106: {
+case 107: {
AST::Elision *node = new (pool) AST::Elision(sym(1).Elision);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 107: {
+case 108: {
AST::PropertyNameAndValue *node = new (pool) AST::PropertyNameAndValue(
sym(1).PropertyName, sym(3).Expression);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 108: {
+case 109: {
AST::PropertyGetterSetter *node = new (pool) AST::PropertyGetterSetter(
sym(2).PropertyName, sym(6).FunctionBody);
node->getSetToken = loc(1);
@@ -844,7 +868,7 @@ case 108: {
sym(1).Node = node;
} break;
-case 109: {
+case 110: {
AST::PropertyGetterSetter *node = new (pool) AST::PropertyGetterSetter(
sym(2).PropertyName, sym(4).FormalParameterList, sym(7).FunctionBody);
node->getSetToken = loc(1);
@@ -855,56 +879,56 @@ case 109: {
sym(1).Node = node;
} break;
-case 110: {
+case 111: {
sym(1).Node = new (pool) AST::PropertyAssignmentList(sym(1).PropertyAssignment);
} break;
-case 111: {
+case 112: {
AST::PropertyAssignmentList *node = new (pool) AST::PropertyAssignmentList(
sym(1).PropertyAssignmentList, sym(3).PropertyAssignment);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 112: {
+case 113: {
AST::IdentifierPropertyName *node = new (pool) AST::IdentifierPropertyName(stringRef(1));
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 113: {
+case 114: {
AST::StringLiteralPropertyName *node = new (pool) AST::StringLiteralPropertyName(stringRef(1));
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 114: {
+case 115: {
AST::NumericLiteralPropertyName *node = new (pool) AST::NumericLiteralPropertyName(sym(1).dval);
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 115: {
+case 116: {
AST::IdentifierPropertyName *node = new (pool) AST::IdentifierPropertyName(stringRef(1));
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 151: {
+case 152: {
AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 152: {
+case 153: {
AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3));
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 153: {
+case 154: {
AST::NewMemberExpression *node = new (pool) AST::NewMemberExpression(sym(2).Expression, sym(4).ArgumentList);
node->newToken = loc(1);
node->lparenToken = loc(3);
@@ -912,384 +936,384 @@ case 153: {
sym(1).Node = node;
} break;
-case 155: {
+case 156: {
AST::NewExpression *node = new (pool) AST::NewExpression(sym(2).Expression);
node->newToken = loc(1);
sym(1).Node = node;
} break;
-case 156: {
+case 157: {
AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 157: {
+case 158: {
AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 158: {
+case 159: {
AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 159: {
+case 160: {
AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3));
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 160: {
+case 161: {
sym(1).Node = 0;
} break;
-case 161: {
+case 162: {
sym(1).Node = sym(1).ArgumentList->finish();
} break;
-case 162: {
+case 163: {
sym(1).Node = new (pool) AST::ArgumentList(sym(1).Expression);
} break;
-case 163: {
+case 164: {
AST::ArgumentList *node = new (pool) AST::ArgumentList(sym(1).ArgumentList, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 167: {
+case 168: {
AST::PostIncrementExpression *node = new (pool) AST::PostIncrementExpression(sym(1).Expression);
node->incrementToken = loc(2);
sym(1).Node = node;
} break;
-case 168: {
+case 169: {
AST::PostDecrementExpression *node = new (pool) AST::PostDecrementExpression(sym(1).Expression);
node->decrementToken = loc(2);
sym(1).Node = node;
} break;
-case 170: {
+case 171: {
AST::DeleteExpression *node = new (pool) AST::DeleteExpression(sym(2).Expression);
node->deleteToken = loc(1);
sym(1).Node = node;
} break;
-case 171: {
+case 172: {
AST::VoidExpression *node = new (pool) AST::VoidExpression(sym(2).Expression);
node->voidToken = loc(1);
sym(1).Node = node;
} break;
-case 172: {
+case 173: {
AST::TypeOfExpression *node = new (pool) AST::TypeOfExpression(sym(2).Expression);
node->typeofToken = loc(1);
sym(1).Node = node;
} break;
-case 173: {
+case 174: {
AST::PreIncrementExpression *node = new (pool) AST::PreIncrementExpression(sym(2).Expression);
node->incrementToken = loc(1);
sym(1).Node = node;
} break;
-case 174: {
+case 175: {
AST::PreDecrementExpression *node = new (pool) AST::PreDecrementExpression(sym(2).Expression);
node->decrementToken = loc(1);
sym(1).Node = node;
} break;
-case 175: {
+case 176: {
AST::UnaryPlusExpression *node = new (pool) AST::UnaryPlusExpression(sym(2).Expression);
node->plusToken = loc(1);
sym(1).Node = node;
} break;
-case 176: {
+case 177: {
AST::UnaryMinusExpression *node = new (pool) AST::UnaryMinusExpression(sym(2).Expression);
node->minusToken = loc(1);
sym(1).Node = node;
} break;
-case 177: {
+case 178: {
AST::TildeExpression *node = new (pool) AST::TildeExpression(sym(2).Expression);
node->tildeToken = loc(1);
sym(1).Node = node;
} break;
-case 178: {
+case 179: {
AST::NotExpression *node = new (pool) AST::NotExpression(sym(2).Expression);
node->notToken = loc(1);
sym(1).Node = node;
} break;
-case 180: {
+case 181: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Mul, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 181: {
+case 182: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Div, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 182: {
+case 183: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Mod, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 184: {
+case 185: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Add, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 185: {
+case 186: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Sub, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 187: {
+case 188: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::LShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 188: {
+case 189: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::RShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 189: {
+case 190: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::URShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 191: {
+case 192: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 192: {
+case 193: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 193: {
+case 194: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 194: {
+case 195: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 195: {
+case 196: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 196: {
+case 197: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::In, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 198: {
+case 199: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 199: {
+case 200: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 200: {
+case 201: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 201: {
+case 202: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 202: {
+case 203: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 204: {
+case 205: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 205: {
+case 206: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 206: {
+case 207: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 207: {
+case 208: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 209: {
+case 210: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 210: {
+case 211: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 211: {
+case 212: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 212: {
+case 213: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 214: {
+case 215: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitAnd, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 216: {
+case 217: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitAnd, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 218: {
+case 219: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitXor, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 220: {
+case 221: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitXor, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 222: {
+case 223: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitOr, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 224: {
+case 225: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::BitOr, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 226: {
+case 227: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::And, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 228: {
+case 229: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::And, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 230: {
+case 231: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Or, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 232: {
+case 233: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
QSOperator::Or, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 234: {
+case 235: {
AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1297,7 +1321,7 @@ case 234: {
sym(1).Node = node;
} break;
-case 236: {
+case 237: {
AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1305,112 +1329,112 @@ case 236: {
sym(1).Node = node;
} break;
-case 238: {
+case 239: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 240: {
+case 241: {
AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 241: {
+case 242: {
sym(1).ival = QSOperator::Assign;
} break;
-case 242: {
+case 243: {
sym(1).ival = QSOperator::InplaceMul;
} break;
-case 243: {
+case 244: {
sym(1).ival = QSOperator::InplaceDiv;
} break;
-case 244: {
+case 245: {
sym(1).ival = QSOperator::InplaceMod;
} break;
-case 245: {
+case 246: {
sym(1).ival = QSOperator::InplaceAdd;
} break;
-case 246: {
+case 247: {
sym(1).ival = QSOperator::InplaceSub;
} break;
-case 247: {
+case 248: {
sym(1).ival = QSOperator::InplaceLeftShift;
} break;
-case 248: {
+case 249: {
sym(1).ival = QSOperator::InplaceRightShift;
} break;
-case 249: {
+case 250: {
sym(1).ival = QSOperator::InplaceURightShift;
} break;
-case 250: {
+case 251: {
sym(1).ival = QSOperator::InplaceAnd;
} break;
-case 251: {
+case 252: {
sym(1).ival = QSOperator::InplaceXor;
} break;
-case 252: {
+case 253: {
sym(1).ival = QSOperator::InplaceOr;
} break;
-case 254: {
+case 255: {
AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 255: {
+case 256: {
sym(1).Node = 0;
} break;
-case 258: {
+case 259: {
AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 259: {
+case 260: {
sym(1).Node = 0;
} break;
-case 276: {
+case 277: {
AST::Block *node = new (pool) AST::Block(sym(2).StatementList);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 277: {
+case 278: {
sym(1).Node = new (pool) AST::StatementList(sym(1).Statement);
} break;
-case 278: {
+case 279: {
sym(1).Node = new (pool) AST::StatementList(sym(1).StatementList, sym(2).Statement);
} break;
-case 279: {
+case 280: {
sym(1).Node = 0;
} break;
-case 280: {
+case 281: {
sym(1).Node = sym(1).StatementList->finish ();
} break;
-case 282: {
+case 283: {
AST::VariableStatement *node = new (pool) AST::VariableStatement(
sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
node->declarationKindToken = loc(1);
@@ -1418,76 +1442,76 @@ case 282: {
sym(1).Node = node;
} break;
-case 283: {
+case 284: {
sym(1).ival = T_CONST;
} break;
-case 284: {
+case 285: {
sym(1).ival = T_VAR;
} break;
-case 285: {
+case 286: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration);
} break;
-case 286: {
+case 287: {
AST::VariableDeclarationList *node = new (pool) AST::VariableDeclarationList(
sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 287: {
+case 288: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration);
} break;
-case 288: {
+case 289: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
} break;
-case 289: {
+case 290: {
AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 290: {
+case 291: {
AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 291: {
+case 292: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 292: {
+case 293: {
sym(1).Node = 0;
} break;
-case 294: {
+case 295: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 295: {
+case 296: {
sym(1).Node = 0;
} break;
-case 297: {
+case 298: {
AST::EmptyStatement *node = new (pool) AST::EmptyStatement();
node->semicolonToken = loc(1);
sym(1).Node = node;
} break;
-case 299: {
+case 300: {
AST::ExpressionStatement *node = new (pool) AST::ExpressionStatement(sym(1).Expression);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 300: {
+case 301: {
AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement, sym(7).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1496,7 +1520,7 @@ case 300: {
sym(1).Node = node;
} break;
-case 301: {
+case 302: {
AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1504,7 +1528,7 @@ case 301: {
sym(1).Node = node;
} break;
-case 304: {
+case 305: {
AST::DoWhileStatement *node = new (pool) AST::DoWhileStatement(sym(2).Statement, sym(5).Expression);
node->doToken = loc(1);
node->whileToken = loc(3);
@@ -1514,7 +1538,7 @@ case 304: {
sym(1).Node = node;
} break;
-case 305: {
+case 306: {
AST::WhileStatement *node = new (pool) AST::WhileStatement(sym(3).Expression, sym(5).Statement);
node->whileToken = loc(1);
node->lparenToken = loc(2);
@@ -1522,7 +1546,7 @@ case 305: {
sym(1).Node = node;
} break;
-case 306: {
+case 307: {
AST::ForStatement *node = new (pool) AST::ForStatement(sym(3).Expression,
sym(5).Expression, sym(7).Expression, sym(9).Statement);
node->forToken = loc(1);
@@ -1533,7 +1557,7 @@ case 306: {
sym(1).Node = node;
} break;
-case 307: {
+case 308: {
AST::LocalForStatement *node = new (pool) AST::LocalForStatement(
sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
sym(8).Expression, sym(10).Statement);
@@ -1546,7 +1570,7 @@ case 307: {
sym(1).Node = node;
} break;
-case 308: {
+case 309: {
AST:: ForEachStatement *node = new (pool) AST::ForEachStatement(sym(3).Expression,
sym(5).Expression, sym(7).Statement);
node->forToken = loc(1);
@@ -1556,7 +1580,7 @@ case 308: {
sym(1).Node = node;
} break;
-case 309: {
+case 310: {
AST::LocalForEachStatement *node = new (pool) AST::LocalForEachStatement(
sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
node->forToken = loc(1);
@@ -1567,14 +1591,14 @@ case 309: {
sym(1).Node = node;
} break;
-case 311: {
+case 312: {
AST::ContinueStatement *node = new (pool) AST::ContinueStatement();
node->continueToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 313: {
+case 314: {
AST::ContinueStatement *node = new (pool) AST::ContinueStatement(stringRef(2));
node->continueToken = loc(1);
node->identifierToken = loc(2);
@@ -1582,14 +1606,14 @@ case 313: {
sym(1).Node = node;
} break;
-case 315: {
+case 316: {
AST::BreakStatement *node = new (pool) AST::BreakStatement(QStringRef());
node->breakToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 317: {
+case 318: {
AST::BreakStatement *node = new (pool) AST::BreakStatement(stringRef(2));
node->breakToken = loc(1);
node->identifierToken = loc(2);
@@ -1597,14 +1621,14 @@ case 317: {
sym(1).Node = node;
} break;
-case 319: {
+case 320: {
AST::ReturnStatement *node = new (pool) AST::ReturnStatement(sym(2).Expression);
node->returnToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 320: {
+case 321: {
AST::WithStatement *node = new (pool) AST::WithStatement(sym(3).Expression, sym(5).Statement);
node->withToken = loc(1);
node->lparenToken = loc(2);
@@ -1612,7 +1636,7 @@ case 320: {
sym(1).Node = node;
} break;
-case 321: {
+case 322: {
AST::SwitchStatement *node = new (pool) AST::SwitchStatement(sym(3).Expression, sym(5).CaseBlock);
node->switchToken = loc(1);
node->lparenToken = loc(2);
@@ -1620,83 +1644,83 @@ case 321: {
sym(1).Node = node;
} break;
-case 322: {
+case 323: {
AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 323: {
+case 324: {
AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(5);
sym(1).Node = node;
} break;
-case 324: {
+case 325: {
sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClause);
} break;
-case 325: {
+case 326: {
sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClauses, sym(2).CaseClause);
} break;
-case 326: {
+case 327: {
sym(1).Node = 0;
} break;
-case 327: {
+case 328: {
sym(1).Node = sym(1).CaseClauses->finish ();
} break;
-case 328: {
+case 329: {
AST::CaseClause *node = new (pool) AST::CaseClause(sym(2).Expression, sym(4).StatementList);
node->caseToken = loc(1);
node->colonToken = loc(3);
sym(1).Node = node;
} break;
-case 329: {
+case 330: {
AST::DefaultClause *node = new (pool) AST::DefaultClause(sym(3).StatementList);
node->defaultToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 330: {
+case 331: {
AST::LabelledStatement *node = new (pool) AST::LabelledStatement(stringRef(1), sym(3).Statement);
node->identifierToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 332: {
+case 333: {
AST::ThrowStatement *node = new (pool) AST::ThrowStatement(sym(2).Expression);
node->throwToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 333: {
+case 334: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 334: {
+case 335: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 335: {
+case 336: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch, sym(4).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 336: {
+case 337: {
AST::Catch *node = new (pool) AST::Catch(stringRef(3), sym(5).Block);
node->catchToken = loc(1);
node->lparenToken = loc(2);
@@ -1705,20 +1729,20 @@ case 336: {
sym(1).Node = node;
} break;
-case 337: {
+case 338: {
AST::Finally *node = new (pool) AST::Finally(sym(2).Block);
node->finallyToken = loc(1);
sym(1).Node = node;
} break;
-case 339: {
+case 340: {
AST::DebuggerStatement *node = new (pool) AST::DebuggerStatement();
node->debuggerToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 341: {
+case 342: {
AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
node->identifierToken = loc(2);
@@ -1729,7 +1753,7 @@ case 341: {
sym(1).Node = node;
} break;
-case 342: {
+case 343: {
AST::FunctionExpression *node = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
if (! stringRef(2).isNull())
@@ -1741,7 +1765,7 @@ case 342: {
sym(1).Node = node;
} break;
-case 343: {
+case 344: {
AST::FunctionExpression *node = new (pool) AST::FunctionExpression(QStringRef(), sym(3).FormalParameterList, sym(6).FunctionBody);
node->functionToken = loc(1);
node->lparenToken = loc(2);
@@ -1751,56 +1775,56 @@ case 343: {
sym(1).Node = node;
} break;
-case 344: {
+case 345: {
AST::FormalParameterList *node = new (pool) AST::FormalParameterList(stringRef(1));
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 345: {
+case 346: {
AST::FormalParameterList *node = new (pool) AST::FormalParameterList(sym(1).FormalParameterList, stringRef(3));
node->commaToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 346: {
+case 347: {
sym(1).Node = 0;
} break;
-case 347: {
+case 348: {
sym(1).Node = sym(1).FormalParameterList->finish ();
} break;
-case 348: {
+case 349: {
sym(1).Node = 0;
} break;
-case 350: {
+case 351: {
sym(1).Node = new (pool) AST::FunctionBody(sym(1).SourceElements->finish ());
} break;
-case 352: {
+case 353: {
sym(1).Node = new (pool) AST::Program(sym(1).SourceElements->finish ());
} break;
-case 353: {
+case 354: {
sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElement);
} break;
-case 354: {
+case 355: {
sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElements, sym(2).SourceElement);
} break;
-case 355: {
+case 356: {
sym(1).Node = new (pool) AST::StatementSourceElement(sym(1).Statement);
} break;
-case 356: {
+case 357: {
sym(1).Node = new (pool) AST::FunctionSourceElement(sym(1).FunctionDeclaration);
} break;
-case 357: {
+case 358: {
sym(1).Node = 0;
} break;
diff --git a/src/qml/parser/qqmljsparser_p.h b/src/qml/parser/qqmljsparser_p.h
index 7533750a53..f382cd7563 100644
--- a/src/qml/parser/qqmljsparser_p.h
+++ b/src/qml/parser/qqmljsparser_p.h
@@ -246,9 +246,9 @@ protected:
-#define J_SCRIPT_REGEXPLITERAL_RULE1 90
+#define J_SCRIPT_REGEXPLITERAL_RULE1 91
-#define J_SCRIPT_REGEXPLITERAL_RULE2 91
+#define J_SCRIPT_REGEXPLITERAL_RULE2 92
QT_QML_END_NAMESPACE
diff --git a/src/qml/qml/qml.pri b/src/qml/qml/qml.pri
index 8d8da3742d..412dc6cba2 100644
--- a/src/qml/qml/qml.pri
+++ b/src/qml/qml/qml.pri
@@ -42,7 +42,6 @@ SOURCES += \
$$PWD/qqmlabstracturlinterceptor.cpp \
$$PWD/qqmlapplicationengine.cpp \
$$PWD/qqmllistwrapper.cpp \
- $$PWD/qqmlcontextwrapper.cpp \
$$PWD/qqmlvaluetypewrapper.cpp \
$$PWD/qqmltypewrapper.cpp \
$$PWD/qqmlfileselector.cpp \
@@ -113,8 +112,6 @@ HEADERS += \
$$PWD/qqmlapplicationengine_p.h \
$$PWD/qqmlapplicationengine.h \
$$PWD/qqmllistwrapper_p.h \
- $$PWD/qqmlcontextwrapper_p.h \
- $$PWD/qqmlvaluetypewrapper_p.h \
$$PWD/qqmltypewrapper_p.h \
$$PWD/qqmlfileselector_p.h \
$$PWD/qqmlfileselector.h \
diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp
index 1a912d53e6..8a97b7eba7 100644
--- a/src/qml/qml/qqmlapplicationengine.cpp
+++ b/src/qml/qml/qqmlapplicationengine.cpp
@@ -58,7 +58,7 @@ QQmlApplicationEnginePrivate::~QQmlApplicationEnginePrivate()
void QQmlApplicationEnginePrivate::cleanUp()
{
qDeleteAll(objects);
-#ifndef QT_NO_TRANSLATION
+#if QT_CONFIG(translation)
qDeleteAll(translators);
#endif
}
@@ -70,7 +70,7 @@ void QQmlApplicationEnginePrivate::init()
q, SLOT(_q_finishLoad(QObject*)));
q->connect(q, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));
q->connect(q, &QQmlApplicationEngine::exit, QCoreApplication::instance(), &QCoreApplication::exit);
-#ifndef QT_NO_TRANSLATION
+#if QT_CONFIG(translation)
QTranslator* qtTranslator = new QTranslator;
if (qtTranslator->load(QLatin1String("qt_") + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
QCoreApplication::installTranslator(qtTranslator);
@@ -82,7 +82,7 @@ void QQmlApplicationEnginePrivate::init()
void QQmlApplicationEnginePrivate::loadTranslations(const QUrl &rootFile)
{
-#ifndef QT_NO_TRANSLATION
+#if QT_CONFIG(translation)
if (rootFile.scheme() != QLatin1String("file") && rootFile.scheme() != QLatin1String("qrc"))
return;
diff --git a/src/qml/qml/qqmlapplicationengine_p.h b/src/qml/qml/qqmlapplicationengine_p.h
index e1d1b4a7bb..8c342a43a9 100644
--- a/src/qml/qml/qqmlapplicationengine_p.h
+++ b/src/qml/qml/qqmlapplicationengine_p.h
@@ -78,7 +78,7 @@ public:
QSignalMapper statusMapper;
QObject *appObj;
-#ifndef QT_NO_TRANSLATIONS
+#if QT_CONFIG(translation)
QList<QTranslator *> translators;
#endif
};
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index 4fe76ddf29..284ae1f36f 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -46,7 +46,6 @@
#include <private/qqmlprofiler_p.h>
#include <private/qqmlexpression_p.h>
#include <private/qqmlscriptstring_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qqmlbuiltinfunctions_p.h>
#include <private/qqmlvmemetaobject_p.h>
#include <private/qqmlvaluetypewrapper_p.h>
@@ -58,18 +57,6 @@
QT_BEGIN_NAMESPACE
-QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QString &str, QObject *obj, QQmlContext *ctxt)
-{
- QQmlBinding *b = newBinding(QQmlEnginePrivate::get(ctxt), property);
- b->setNotifyOnValueChanged(true);
- b->QQmlJavaScriptExpression::setContext(QQmlContextData::get(ctxt));
- b->setScopeObject(obj);
-
- b->createQmlBinding(b->context(), obj, str, QString(), 0);
-
- return b;
-}
-
QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QQmlScriptString &script, QObject *obj, QQmlContext *ctxt)
{
QQmlBinding *b = newBinding(QQmlEnginePrivate::get(ctxt), property);
@@ -98,7 +85,9 @@ QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QQmlScr
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(b->context()->engine)->v4engine();
if (runtimeFunction) {
- b->m_function.set(v4, QV4::FunctionObject::createQmlFunction(ctxtdata, b->scopeObject(), runtimeFunction));
+ QV4::Scope scope(v4);
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(v4->rootContext(), ctxtdata, b->scopeObject()));
+ b->setupFunction(qmlContext, runtimeFunction);
} else {
QString code = scriptPrivate->script;
b->createQmlBinding(b->context(), b->scopeObject(), code, url, scriptPrivate->lineNumber);
@@ -107,26 +96,11 @@ QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QQmlScr
return b;
}
-QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QString &str, QObject *obj, QQmlContextData *ctxt)
-{
- QQmlBinding *b = newBinding(QQmlEnginePrivate::get(ctxt), property);
-
- b->setNotifyOnValueChanged(true);
- b->QQmlJavaScriptExpression::setContext(ctxt);
- b->setScopeObject(obj);
-
- b->createQmlBinding(ctxt, obj, str, QString(), 0);
-
- return b;
-}
-
QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QString &str, QObject *obj,
- QQmlContextData *ctxt, const QString &url, quint16 lineNumber,
- quint16 columnNumber)
+ QQmlContextData *ctxt, const QString &url, quint16 lineNumber)
{
QQmlBinding *b = newBinding(QQmlEnginePrivate::get(ctxt), property);
- Q_UNUSED(columnNumber);
b->setNotifyOnValueChanged(true);
b->QQmlJavaScriptExpression::setContext(ctxt);
b->setScopeObject(obj);
@@ -136,7 +110,8 @@ QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QString
return b;
}
-QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QV4::Value &functionPtr, QObject *obj, QQmlContextData *ctxt)
+QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, QV4::Function *function,
+ QObject *obj, QQmlContextData *ctxt, QV4::ExecutionContext *scope)
{
QQmlBinding *b = newBinding(QQmlEnginePrivate::get(ctxt), property);
@@ -144,7 +119,8 @@ QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QV4::Va
b->QQmlJavaScriptExpression::setContext(ctxt);
b->setScopeObject(obj);
- b->m_function.set(functionPtr.as<QV4::Object>()->engine(), functionPtr);
+ Q_ASSERT(scope);
+ b->setupFunction(scope, function);
return b;
}
@@ -183,14 +159,12 @@ void QQmlBinding::update(QQmlPropertyData::WriteFlags flags)
QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine);
QV4::Scope scope(ep->v4engine());
- QV4::ScopedFunctionObject f(scope, m_function.value());
- Q_ASSERT(f);
if (canUseAccessor())
flags.setFlag(QQmlPropertyData::BypassInterceptor);
- QQmlBindingProfiler prof(ep->profiler, this, f);
- doUpdate(watcher, flags, scope, f);
+ QQmlBindingProfiler prof(ep->profiler, this, function());
+ doUpdate(watcher, flags, scope);
if (!watcher.wasDeleted())
setUpdatingFlag(false);
@@ -205,8 +179,7 @@ class QQmlBindingBinding: public QQmlBinding
{
protected:
void doUpdate(const DeleteWatcher &,
- QQmlPropertyData::WriteFlags flags, QV4::Scope &,
- const QV4::ScopedFunctionObject &) Q_DECL_OVERRIDE Q_DECL_FINAL
+ QQmlPropertyData::WriteFlags flags, QV4::Scope &) Q_DECL_OVERRIDE Q_DECL_FINAL
{
Q_ASSERT(!m_targetIndex.hasValueTypeIndex());
QQmlPropertyData *pd = nullptr;
@@ -222,8 +195,7 @@ class QQmlNonbindingBinding: public QQmlBinding
{
protected:
void doUpdate(const DeleteWatcher &watcher,
- QQmlPropertyData::WriteFlags flags, QV4::Scope &scope,
- const QV4::ScopedFunctionObject &f) Q_DECL_OVERRIDE Q_DECL_FINAL
+ QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) Q_DECL_OVERRIDE Q_DECL_FINAL
{
auto ep = QQmlEnginePrivate::get(scope.engine);
ep->referenceScarceResources();
@@ -240,7 +212,7 @@ protected:
if (!watcher.wasDeleted()) {
if (error) {
- delayedError()->setErrorLocation(f->sourceLocation());
+ delayedError()->setErrorLocation(sourceLocation());
delayedError()->setErrorObject(m_target.data());
}
@@ -250,10 +222,9 @@ protected:
clearError();
}
+ cancelPermanentGuards();
}
- cancelPermanentGuards();
-
ep->dereferenceScarceResources();
}
@@ -451,14 +422,10 @@ QVariant QQmlBinding::evaluate()
QString QQmlBinding::expressionIdentifier() const
{
- QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine);
- QV4::Scope scope(ep->v4engine());
- QV4::ScopedValue f(scope, m_function.value());
- QV4::Function *function = f->as<QV4::FunctionObject>()->function();
-
- QString url = function->sourceFile();
- quint16 lineNumber = function->compiledFunction->location.line;
- quint16 columnNumber = function->compiledFunction->location.column;
+ auto f = function();
+ QString url = f->sourceFile();
+ quint16 lineNumber = f->compiledFunction->location.line;
+ quint16 columnNumber = f->compiledFunction->location.column;
return url + QString::asprintf(":%u:%u", uint(lineNumber), uint(columnNumber));
}
@@ -489,9 +456,7 @@ void QQmlBinding::setEnabled(bool e, QQmlPropertyData::WriteFlags flags)
QString QQmlBinding::expression() const
{
- QV4::Scope scope(QQmlEnginePrivate::get(context()->engine)->v4engine());
- QV4::ScopedValue v(scope, m_function.value());
- return v->toQStringNoThrow();
+ return QStringLiteral("function() { [code] }");
}
void QQmlBinding::setTarget(const QQmlProperty &prop)
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h
index be23a96d01..0f2fb329f5 100644
--- a/src/qml/qml/qqmlbinding_p.h
+++ b/src/qml/qml/qqmlbinding_p.h
@@ -72,12 +72,11 @@ class Q_QML_PRIVATE_EXPORT QQmlBinding : public QQmlJavaScriptExpression,
{
friend class QQmlAbstractBinding;
public:
- static QQmlBinding *create(const QQmlPropertyData *, const QString &, QObject *, QQmlContext *);
static QQmlBinding *create(const QQmlPropertyData *, const QQmlScriptString &, QObject *, QQmlContext *);
- static QQmlBinding *create(const QQmlPropertyData *, const QString &, QObject *, QQmlContextData *);
static QQmlBinding *create(const QQmlPropertyData *, const QString &, QObject *, QQmlContextData *,
- const QString &url, quint16 lineNumber, quint16 columnNumber);
- static QQmlBinding *create(const QQmlPropertyData *, const QV4::Value &, QObject *, QQmlContextData *);
+ const QString &url = QString(), quint16 lineNumber = 0);
+ static QQmlBinding *create(const QQmlPropertyData *property, QV4::Function *function,
+ QObject *obj, QQmlContextData *ctxt, QV4::ExecutionContext *scope);
~QQmlBinding();
void setTarget(const QQmlProperty &);
@@ -103,8 +102,7 @@ public:
protected:
virtual void doUpdate(const DeleteWatcher &watcher,
- QQmlPropertyData::WriteFlags flags, QV4::Scope &scope,
- const QV4::ScopedFunctionObject &f) = 0;
+ QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) = 0;
void getPropertyData(QQmlPropertyData **propertyData, QQmlPropertyData *valueTypeData) const;
int getPropertyType() const;
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index dfb1b98ca0..254d5e1907 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -98,20 +98,20 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index,
function += parameterString;
function += QLatin1String(") { ") + expression + QLatin1String(" })");
- m_function.set(v4, evalFunction(context(), scopeObject(), function, fileName, line));
-
- if (m_function.isNullOrUndefined())
- return; // could not evaluate function. Not valid.
-
+ QV4::Scope valueScope(v4);
+ QV4::ScopedFunctionObject f(valueScope, evalFunction(context(), scopeObject(), function, fileName, line));
+ QV4::ScopedContext context(valueScope, f->scope());
+ setupFunction(context, f->function());
}
-QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index, QQmlContextData *ctxt, QObject *scope, const QV4::Value &function)
+QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index, QQmlContextData *ctxt, QObject *scopeObject,
+ QV4::Function *function, QV4::ExecutionContext *scope)
: QQmlJavaScriptExpression(),
m_index(index),
m_target(target)
{
- m_function.set(function.as<QV4::Object>()->engine(), function);
- init(ctxt, scope);
+ setupFunction(scope, function);
+ init(ctxt, scopeObject);
}
QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index, QQmlContextData *ctxt, QObject *scope, QV4::Function *runtimeFunction)
@@ -122,14 +122,22 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index,
// It's important to call init first, because m_index gets remapped in case of cloned signals.
init(ctxt, scope);
- QMetaMethod signal = QMetaObjectPrivate::signal(m_target->metaObject(), m_index);
- QString error;
QV4::ExecutionEngine *engine = QQmlEnginePrivate::getV4Engine(ctxt->engine);
- m_function.set(engine, QV4::FunctionObject::createQmlFunction(ctxt, scope, runtimeFunction, signal.parameterNames(), &error));
- if (!error.isEmpty()) {
- qmlInfo(scopeObject()) << error;
- m_function.clear();
+
+ QList<QByteArray> signalParameters = QMetaObjectPrivate::signal(m_target->metaObject(), m_index).parameterNames();
+ if (!signalParameters.isEmpty()) {
+ QString error;
+ QQmlPropertyCache::signalParameterStringForJS(engine, signalParameters, &error);
+ if (!error.isEmpty()) {
+ qmlInfo(scopeObject()) << error;
+ return;
+ }
+ runtimeFunction->updateInternalClass(engine, signalParameters);
}
+
+ QV4::Scope valueScope(engine);
+ QV4::Scoped<QV4::QmlContext> qmlContext(valueScope, QV4::QmlContext::create(engine->rootContext(), ctxt, scope));
+ setupFunction(qmlContext, runtimeFunction);
}
void QQmlBoundSignalExpression::init(QQmlContextData *ctxt, QObject *scope)
@@ -157,41 +165,13 @@ void QQmlBoundSignalExpression::expressionChanged()
// bound signals do not notify on change.
}
-QQmlSourceLocation QQmlBoundSignalExpression::sourceLocation() const
-{
- QV4::Function *f = function();
- if (f) {
- QQmlSourceLocation loc;
- loc.sourceFile = f->sourceFile();
- loc.line = f->compiledFunction->location.line;
- loc.column = f->compiledFunction->location.column;
- return loc;
- }
- return QQmlSourceLocation();
-}
-
QString QQmlBoundSignalExpression::expression() const
{
- if (expressionFunctionValid()) {
- Q_ASSERT (context() && engine());
- QV4::Scope scope(QQmlEnginePrivate::get(engine())->v4engine());
- QV4::ScopedValue v(scope, m_function.value());
- return v->toQStringNoThrow();
- }
+ if (expressionFunctionValid())
+ return QStringLiteral("function() { [code] }");
return QString();
}
-QV4::Function *QQmlBoundSignalExpression::function() const
-{
- if (expressionFunctionValid()) {
- Q_ASSERT (context() && engine());
- QV4::Scope scope(QQmlEnginePrivate::get(engine())->v4engine());
- QV4::ScopedFunctionObject v(scope, m_function.value());
- return v ? v->function() : 0;
- }
- return 0;
-}
-
// Parts of this function mirror code in QQmlExpressionPrivate::value() and v8value().
// Changes made here may need to be made there and vice versa.
void QQmlBoundSignalExpression::evaluate(void **a)
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h
index 4356c6cbfa..3a0b8aed59 100644
--- a/src/qml/qml/qqmlboundsignal_p.h
+++ b/src/qml/qml/qqmlboundsignal_p.h
@@ -73,7 +73,7 @@ public:
const QString &parameterString = QString());
QQmlBoundSignalExpression(QObject *target, int index,
- QQmlContextData *ctxt, QObject *scope, const QV4::Value &function);
+ QQmlContextData *ctxt, QObject *scopeObject, QV4::Function *function, QV4::ExecutionContext *scope);
QQmlBoundSignalExpression(QObject *target, int index,
QQmlContextData *ctxt, QObject *scope, QV4::Function *runtimeFunction);
@@ -86,9 +86,7 @@ public:
void evaluate(void **a);
void evaluate(const QList<QVariant> &args);
- QQmlSourceLocation sourceLocation() const;
QString expression() const;
- QV4::Function *function() const;
QObject *target() const { return m_target; }
QQmlEngine *engine() const { return context() ? context()->engine : 0; }
@@ -98,7 +96,7 @@ private:
void init(QQmlContextData *ctxt, QObject *scope);
- bool expressionFunctionValid() const { return !m_function.isNullOrUndefined(); }
+ bool expressionFunctionValid() const { return function() != 0; }
int m_index;
QObject *m_target;
diff --git a/src/qml/qml/qqmldelayedcallqueue.cpp b/src/qml/qml/qqmldelayedcallqueue.cpp
index d10a8c7718..7552e1e82b 100644
--- a/src/qml/qml/qqmldelayedcallqueue.cpp
+++ b/src/qml/qml/qqmldelayedcallqueue.cpp
@@ -43,7 +43,6 @@
#include <private/qqmljavascriptexpression_p.h>
#include <private/qv4value_p.h>
#include <private/qv4qobjectwrapper_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <QQmlError>
diff --git a/src/qml/qml/qqmlerror.cpp b/src/qml/qml/qqmlerror.cpp
index b309550ca8..0a6c7b4960 100644
--- a/src/qml/qml/qqmlerror.cpp
+++ b/src/qml/qml/qqmlerror.cpp
@@ -285,7 +285,7 @@ QDebug operator<<(QDebug debug, const QQmlError &error)
if (f.open(QIODevice::ReadOnly)) {
QByteArray data = f.readAll();
QTextStream stream(data, QIODevice::ReadOnly);
-#ifndef QT_NO_TEXTCODEC
+#if QT_CONFIG(textcodec)
stream.setCodec("UTF-8");
#endif
const QString code = stream.readAll();
diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp
index 01d4722ca6..1e1fbcf448 100644
--- a/src/qml/qml/qqmlexpression.cpp
+++ b/src/qml/qml/qqmlexpression.cpp
@@ -75,7 +75,9 @@ void QQmlExpressionPrivate::init(QQmlContextData *ctxt, QV4::Function *runtimeFu
{
expressionFunctionValid = true;
QV4::ExecutionEngine *engine = QQmlEnginePrivate::getV4Engine(ctxt->engine);
- m_function.set(engine, QV4::FunctionObject::createQmlFunction(ctxt, me, runtimeFunction));
+ QV4::Scope scope(engine);
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(engine->rootContext(), ctxt, me));
+ setupFunction(qmlContext, runtimeFunction);
QQmlJavaScriptExpression::setContext(ctxt);
setScopeObject(me);
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp
index 722527a546..f967dacd34 100644
--- a/src/qml/qml/qqmlglobal.cpp
+++ b/src/qml/qml/qqmlglobal.cpp
@@ -326,7 +326,6 @@ QObject *QQmlGuiProvider::application(QObject *) { return new QQmlApplication();
QStringList QQmlGuiProvider::fontFamilies() { return QStringList(); }
bool QQmlGuiProvider::openUrlExternally(QUrl &) { return false; }
-#ifndef QT_NO_IM
QObject *QQmlGuiProvider::inputMethod()
{
// We don't have any input method code by default
@@ -335,7 +334,6 @@ QObject *QQmlGuiProvider::inputMethod()
QQmlEngine::setObjectOwnership(o, QQmlEngine::JavaScriptOwnership);
return o;
}
-#endif
QObject *QQmlGuiProvider::styleHints()
{
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h
index 0f5cf3a392..707814e781 100644
--- a/src/qml/qml/qqmlglobal_p.h
+++ b/src/qml/qml/qqmlglobal_p.h
@@ -307,9 +307,7 @@ class Q_QML_PRIVATE_EXPORT QQmlGuiProvider
public:
virtual ~QQmlGuiProvider();
virtual QObject *application(QObject *parent);
-#ifndef QT_NO_IM
virtual QObject *inputMethod();
-#endif
virtual QObject *styleHints();
virtual QStringList fontFamilies();
virtual bool openUrlExternally(QUrl &);
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index 4ded0f93bb..8712b638c5 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -177,7 +177,7 @@ QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeNa
} // namespace
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
struct RegisteredPlugin {
QString uri;
QPluginLoader* loader;
@@ -302,7 +302,7 @@ public:
const QString &uri, const QString &url,
int vmaj, int vmin, QV4::CompiledData::Import::ImportType type,
QList<QQmlError> *errors, bool lowPrecedence = false);
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
bool populatePluginPairVector(QVector<StaticPluginPair> &result, const QString &uri, const QStringList &versionUris,
const QString &qmldirPath, QList<QQmlError> *errors);
#endif
@@ -897,7 +897,7 @@ static QStringList versionUriList(const QString &uri, int vmaj, int vmin)
return result;
}
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
static QVector<QStaticPlugin> makePlugins()
{
QVector<QStaticPlugin> plugins;
@@ -966,7 +966,7 @@ bool QQmlImportsPrivate::importExtension(const QString &qmldirFilePath,
const QQmlTypeLoader::QmldirContent *qmldir,
QList<QQmlError> *errors)
{
-#if !defined(QT_NO_LIBRARY)
+#if QT_CONFIG(library)
Q_ASSERT(qmldir);
if (qmlImportTrace())
@@ -1094,7 +1094,7 @@ bool QQmlImportsPrivate::importExtension(const QString &qmldirFilePath,
}
return false;
-#endif // QT_NO_LIBRARY
+#endif // library
return true;
}
@@ -1950,7 +1950,7 @@ bool QQmlImportDatabase::registerPluginTypes(QObject *instance, const QString &b
bool QQmlImportDatabase::importStaticPlugin(QObject *instance, const QString &basePath,
const QString &uri, const QString &typeNamespace, int vmaj, QList<QQmlError> *errors)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
// Dynamic plugins are differentiated by their filepath. For static plugins we
// don't have that information so we use their address as key instead.
const QString uniquePluginID = QString::asprintf("%p", instance);
@@ -2003,7 +2003,7 @@ bool QQmlImportDatabase::importStaticPlugin(QObject *instance, const QString &ba
bool QQmlImportDatabase::importDynamicPlugin(const QString &filePath, const QString &uri,
const QString &typeNamespace, int vmaj, QList<QQmlError> *errors)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
QFileInfo fileInfo(filePath);
const QString absoluteFilePath = fileInfo.absoluteFilePath();
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 8020bdb2be..17cccc0bbd 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -48,6 +48,7 @@
#include <private/qv4scopedvalue_p.h>
#include <private/qqmlglobal_p.h>
#include <private/qv4qobjectwrapper_p.h>
+#include <private/qqmlbuiltinfunctions_p.h>
QT_BEGIN_NAMESPACE
@@ -94,7 +95,9 @@ QQmlJavaScriptExpression::QQmlJavaScriptExpression()
: m_error(0),
m_context(0),
m_prevExpression(0),
- m_nextExpression(0)
+ m_nextExpression(0),
+ m_v4Function(0),
+ m_sourceLocation(0)
{
}
@@ -110,6 +113,8 @@ QQmlJavaScriptExpression::~QQmlJavaScriptExpression()
clearPermanentGuards();
if (m_scopeObject.isT2()) // notify DeleteWatcher of our deletion.
m_scopeObject.asT2()->_s = 0;
+
+ delete m_sourceLocation;
}
void QQmlJavaScriptExpression::setNotifyOnValueChanged(bool v)
@@ -128,6 +133,22 @@ void QQmlJavaScriptExpression::resetNotifyOnValueChanged()
setNotifyOnValueChanged(false);
}
+QQmlSourceLocation QQmlJavaScriptExpression::sourceLocation() const
+{
+ if (m_sourceLocation)
+ return *m_sourceLocation;
+ if (m_v4Function)
+ return m_v4Function->sourceLocation();
+ return QQmlSourceLocation();
+}
+
+void QQmlJavaScriptExpression::setSourceLocation(const QQmlSourceLocation &location)
+{
+ if (m_sourceLocation)
+ delete m_sourceLocation;
+ m_sourceLocation = new QQmlSourceLocation(location);
+}
+
void QQmlJavaScriptExpression::setContext(QQmlContextData *context)
{
if (m_prevExpression) {
@@ -149,6 +170,11 @@ void QQmlJavaScriptExpression::setContext(QQmlContextData *context)
}
}
+QV4::Function *QQmlJavaScriptExpression::function() const
+{
+ return m_v4Function;
+}
+
void QQmlJavaScriptExpression::refresh()
{
}
@@ -159,8 +185,8 @@ void QQmlJavaScriptExpression::evaluate(QV4::CallData *callData, bool *isUndefin
{
Q_ASSERT(m_context && m_context->engine);
- QV4::Value *f = m_function.valueRef();
- if (!f || f->isUndefined()) {
+ QV4::Function *v4Function = function();
+ if (!v4Function) {
if (isUndefined)
*isUndefined = true;
return;
@@ -191,7 +217,13 @@ void QQmlJavaScriptExpression::evaluate(QV4::CallData *callData, bool *isUndefin
callData->thisObject = value;
}
- f->as<QV4::FunctionObject>()->call(scope, callData);
+ QV4::ExecutionContext *outer = static_cast<QV4::ExecutionContext *>(m_qmlScope.valueRef());
+ if (v4Function->canUseSimpleFunction()) {
+ outer->simpleCall(scope, callData, v4Function);
+ } else {
+ outer->call(scope, callData, v4Function);
+ }
+
if (scope.hasException()) {
if (watcher.wasDeleted())
scope.engine->catchException(); // ignore exception
@@ -374,7 +406,7 @@ QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scopeObje
QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine());
QV4::Scope scope(v4);
- QV4::Scoped<QV4::QmlContext> qmlContext(scope, v4->rootContext()->newQmlContext(ctxt, scopeObject));
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(v4->rootContext(), ctxt, scopeObject));
QV4::Script script(v4, qmlContext, code, filename, line);
QV4::ScopedValue result(scope);
script.parse();
@@ -404,12 +436,9 @@ void QQmlJavaScriptExpression::createQmlBinding(QQmlContextData *ctxt, QObject *
QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine());
QV4::Scope scope(v4);
- QV4::Scoped<QV4::QmlContext> qmlContext(scope, v4->rootContext()->newQmlContext(ctxt, qmlScope));
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(v4->rootContext(), ctxt, qmlScope));
QV4::Script script(v4, qmlContext, code, filename, line);
- QV4::ScopedValue result(scope);
script.parse();
- if (!v4->hasException)
- result = script.qmlBinding();
if (v4->hasException) {
QQmlError error = v4->catchExceptionAsQmlError();
if (error.description().isEmpty())
@@ -420,11 +449,19 @@ void QQmlJavaScriptExpression::createQmlBinding(QQmlContextData *ctxt, QObject *
error.setUrl(QUrl::fromLocalFile(filename));
error.setObject(qmlScope);
ep->warning(error);
- result = QV4::Encode::undefined();
+ return;
}
- m_function.set(v4, result);
+ setupFunction(qmlContext, script.vmFunction);
}
+void QQmlJavaScriptExpression::setupFunction(QV4::ExecutionContext *qmlContext, QV4::Function *f)
+{
+ if (!qmlContext || !f)
+ return;
+ m_qmlScope.set(qmlContext->engine(), *qmlContext);
+ m_v4Function = f;
+ m_compilationUnit = m_v4Function->compilationUnit;
+}
void QQmlJavaScriptExpression::clearActiveGuards()
{
diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h
index a0735d91de..646cc5ab3d 100644
--- a/src/qml/qml/qqmljavascriptexpression_p.h
+++ b/src/qml/qml/qqmljavascriptexpression_p.h
@@ -113,11 +113,16 @@ public:
inline QObject *scopeObject() const;
inline void setScopeObject(QObject *v);
+ QQmlSourceLocation sourceLocation() const;
+ void setSourceLocation(const QQmlSourceLocation &location);
+
bool isValid() const { return context() != 0; }
QQmlContextData *context() const { return m_context; }
void setContext(QQmlContextData *context);
+ QV4::Function *function() const;
+
virtual void refresh();
class DeleteWatcher {
@@ -154,6 +159,8 @@ protected:
}
}
+ void setupFunction(QV4::ExecutionContext *qmlContext, QV4::Function *f);
+
private:
friend class QQmlContextData;
friend class QQmlPropertyCapture;
@@ -173,8 +180,10 @@ private:
QQmlJavaScriptExpression *m_nextExpression;
bool m_permanentDependenciesRegistered = false;
-protected:
- QV4::PersistentValue m_function;
+ QV4::PersistentValue m_qmlScope;
+ QQmlRefPointer<QV4::CompiledData::CompilationUnit> m_compilationUnit;
+ QV4::Function *m_v4Function;
+ QQmlSourceLocation *m_sourceLocation; // used for Qt.binding() created functions
};
class QQmlPropertyCapture
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp
index 6f66475aa5..3876e774c3 100644
--- a/src/qml/qml/qqmllocale.cpp
+++ b/src/qml/qml/qqmllocale.cpp
@@ -107,8 +107,8 @@ QV4::ReturnedValue QQmlDateExtension::method_toLocaleString(QV4::CallContext *ct
QLocale::FormatType enumFormat = QLocale::LongFormat;
QString formattedDt;
if (ctx->argc() == 2) {
- if (ctx->args()[1].isString()) {
- QString format = ctx->args()[1].stringValue()->toQString();
+ if (String *s = ctx->args()[1].stringValue()) {
+ QString format = s->toQString();
formattedDt = r->d()->locale->toString(dt, format);
} else if (ctx->args()[1].isNumber()) {
quint32 intFormat = ctx->args()[1].toNumber();
@@ -152,8 +152,8 @@ QV4::ReturnedValue QQmlDateExtension::method_toLocaleTimeString(QV4::CallContext
QLocale::FormatType enumFormat = QLocale::LongFormat;
QString formattedTime;
if (ctx->argc() == 2) {
- if (ctx->args()[1].isString()) {
- QString format = ctx->args()[1].stringValue()->toQString();
+ if (String *s = ctx->args()[1].stringValue()) {
+ QString format = s->toQString();
formattedTime = r->d()->locale->toString(time, format);
} else if (ctx->args()[1].isNumber()) {
quint32 intFormat = ctx->args()[1].toNumber();
@@ -197,8 +197,8 @@ QV4::ReturnedValue QQmlDateExtension::method_toLocaleDateString(QV4::CallContext
QLocale::FormatType enumFormat = QLocale::LongFormat;
QString formattedDate;
if (ctx->argc() == 2) {
- if (ctx->args()[1].isString()) {
- QString format = ctx->args()[1].stringValue()->toQString();
+ if (String *s = ctx->args()[1].stringValue()) {
+ QString format = s->toQString();
formattedDate = r->d()->locale->toString(date, format);
} else if (ctx->args()[1].isNumber()) {
quint32 intFormat = ctx->args()[1].toNumber();
@@ -217,11 +217,13 @@ QV4::ReturnedValue QQmlDateExtension::method_toLocaleDateString(QV4::CallContext
QV4::ReturnedValue QQmlDateExtension::method_fromLocaleString(QV4::CallContext *ctx)
{
QV4::ExecutionEngine * const engine = ctx->d()->engine;
- if (ctx->argc() == 1 && ctx->args()[0].isString()) {
- QLocale locale;
- QString dateString = ctx->args()[0].stringValue()->toQString();
- QDateTime dt = locale.toDateTime(dateString);
- return QV4::Encode(engine->newDateObject(dt));
+ if (ctx->argc() == 1) {
+ if (String *s = ctx->args()[0].stringValue()) {
+ QLocale locale;
+ QString dateString = s->toQString();
+ QDateTime dt = locale.toDateTime(dateString);
+ return QV4::Encode(engine->newDateObject(dt));
+ }
}
QV4::Scope scope(ctx);
@@ -235,8 +237,8 @@ QV4::ReturnedValue QQmlDateExtension::method_fromLocaleString(QV4::CallContext *
QDateTime dt;
QString dateString = ctx->args()[1].toQStringNoThrow();
if (ctx->argc() == 3) {
- if (ctx->args()[2].isString()) {
- QString format = ctx->args()[2].stringValue()->toQString();
+ if (String *s = ctx->args()[2].stringValue()) {
+ QString format = s->toQString();
dt = r->d()->locale->toDateTime(dateString, format);
} else if (ctx->args()[2].isNumber()) {
quint32 intFormat = ctx->args()[2].toNumber();
@@ -256,13 +258,15 @@ QV4::ReturnedValue QQmlDateExtension::method_fromLocaleTimeString(QV4::CallConte
{
QV4::ExecutionEngine * const engine = ctx->d()->engine;
- if (ctx->argc() == 1 && ctx->args()[0].isString()) {
- QLocale locale;
- QString timeString = ctx->args()[0].stringValue()->toQString();
- QTime time = locale.toTime(timeString);
- QDateTime dt = QDateTime::currentDateTime();
- dt.setTime(time);
- return QV4::Encode(engine->newDateObject(dt));
+ if (ctx->argc() == 1) {
+ if (String *s = ctx->args()[0].stringValue()) {
+ QLocale locale;
+ QString timeString = s->toQString();
+ QTime time = locale.toTime(timeString);
+ QDateTime dt = QDateTime::currentDateTime();
+ dt.setTime(time);
+ return QV4::Encode(engine->newDateObject(dt));
+ }
}
if (ctx->argc() < 1 || ctx->argc() > 3 || !isLocaleObject(ctx->args()[0]))
@@ -276,8 +280,8 @@ QV4::ReturnedValue QQmlDateExtension::method_fromLocaleTimeString(QV4::CallConte
QTime tm;
QString dateString = ctx->args()[1].toQStringNoThrow();
if (ctx->argc() == 3) {
- if (ctx->args()[2].isString()) {
- QString format = ctx->args()[2].stringValue()->toQString();
+ if (String *s = ctx->args()[2].stringValue()) {
+ QString format = s->toQString();
tm = r->d()->locale->toTime(dateString, format);
} else if (ctx->args()[2].isNumber()) {
quint32 intFormat = ctx->args()[2].toNumber();
@@ -303,11 +307,13 @@ QV4::ReturnedValue QQmlDateExtension::method_fromLocaleDateString(QV4::CallConte
{
QV4::ExecutionEngine * const engine = ctx->d()->engine;
- if (ctx->argc() == 1 && ctx->args()[0].isString()) {
- QLocale locale;
- QString dateString = ctx->args()[0].stringValue()->toQString();
- QDate date = locale.toDate(dateString);
- return QV4::Encode(engine->newDateObject(QDateTime(date)));
+ if (ctx->argc() == 1) {
+ if (String *s = ctx->args()[0].stringValue()) {
+ QLocale locale;
+ QString dateString = s->toQString();
+ QDate date = locale.toDate(dateString);
+ return QV4::Encode(engine->newDateObject(QDateTime(date)));
+ }
}
if (ctx->argc() < 1 || ctx->argc() > 3 || !isLocaleObject(ctx->args()[0]))
@@ -321,8 +327,8 @@ QV4::ReturnedValue QQmlDateExtension::method_fromLocaleDateString(QV4::CallConte
QDate dt;
QString dateString = ctx->args()[1].toQStringNoThrow();
if (ctx->argc() == 3) {
- if (ctx->args()[2].isString()) {
- QString format = ctx->args()[2].stringValue()->toQString();
+ if (String *s = ctx->args()[2].stringValue()) {
+ QString format = s->toQString();
dt = r->d()->locale->toDate(dateString, format);
} else if (ctx->args()[2].isNumber()) {
quint32 intFormat = ctx->args()[2].toNumber();
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 6a1a90f031..520c44f4da 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -1158,7 +1158,7 @@ void qmlClearTypeRegistrations() // Declared in qqml.h
data->uriToModule.clear();
QQmlEnginePrivate::baseModulesUninitialized = true; //So the engine re-registers its types
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
qmlClearEnginePlugins();
#endif
}
diff --git a/src/qml/qml/qqmlnotifier.cpp b/src/qml/qml/qqmlnotifier.cpp
index 19f03eae80..185f9687fb 100644
--- a/src/qml/qml/qqmlnotifier.cpp
+++ b/src/qml/qml/qqmlnotifier.cpp
@@ -71,6 +71,12 @@ namespace {
};
}
+void QQmlNotifier::notify(QQmlData *ddata, int notifierIndex)
+{
+ if (QQmlNotifierEndpoint *ep = ddata->notify(notifierIndex))
+ emitNotify(ep, Q_NULLPTR);
+}
+
void QQmlNotifier::emitNotify(QQmlNotifierEndpoint *endpoint, void **a)
{
QVarLengthArray<NotifyListTraversalData> stack;
diff --git a/src/qml/qml/qqmlnotifier_p.h b/src/qml/qml/qqmlnotifier_p.h
index 4db0dd038a..dad79e0e55 100644
--- a/src/qml/qml/qqmlnotifier_p.h
+++ b/src/qml/qml/qqmlnotifier_p.h
@@ -65,6 +65,8 @@ public:
inline ~QQmlNotifier();
inline void notify();
+ static void notify(QQmlData *ddata, int notifierIndex);
+
private:
friend class QQmlData;
friend class QQmlNotifierEndpoint;
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 2218f277d6..2e2a3fb303 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -44,7 +44,6 @@
#include <private/qv4function_p.h>
#include <private/qv4functionobject_p.h>
#include <private/qv4qobjectwrapper_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qqmlbinding_p.h>
#include <private/qqmlstringconverters_p.h>
#include <private/qqmlboundsignal_p.h>
@@ -402,7 +401,7 @@ void QQmlObjectCreator::setPropertyValue(const QQmlPropertyData *property, const
}
}
break;
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
case QVariant::Date: {
bool ok = false;
QDate value = QQmlStringConverters::dateFromString(binding->valueAsString(qmlUnit), &ok);
@@ -430,7 +429,7 @@ void QQmlObjectCreator::setPropertyValue(const QQmlPropertyData *property, const
property->writeProperty(_qobject, &value, propertyWriteFlags);
}
break;
-#endif // QT_NO_DATESTRING
+#endif // datestring
case QVariant::Point: {
bool ok = false;
QPoint value = QQmlStringConverters::pointFFromString(binding->valueAsString(qmlUnit), &ok).toPoint();
@@ -793,14 +792,13 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *property, con
QV4::Function *runtimeFunction = compilationUnit->runtimeFunctions[binding->value.compiledScriptIndex];
QV4::Scope scope(v4);
- QV4::ScopedContext qmlContext(scope, currentQmlContext());
- QV4::ScopedFunctionObject function(scope, QV4::FunctionObject::createScriptFunction(qmlContext, runtimeFunction, /*createProto*/ false));
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, currentQmlContext());
if (binding->flags & QV4::CompiledData::Binding::IsSignalHandlerExpression) {
int signalIndex = _propertyCache->methodIndexToSignalIndex(property->coreIndex());
QQmlBoundSignal *bs = new QQmlBoundSignal(_bindingTarget, signalIndex, _scopeObject, engine);
QQmlBoundSignalExpression *expr = new QQmlBoundSignalExpression(_bindingTarget, signalIndex,
- context, _scopeObject, function);
+ context, _scopeObject, runtimeFunction, qmlContext);
bs->takeExpression(expr);
} else {
@@ -810,13 +808,14 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *property, con
// the result is written to a value type virtual property, that contains the sub-index
// of the "x" property.
QQmlBinding *qmlBinding;
+ const QQmlPropertyData *prop = property;
+ const QQmlPropertyData *subprop = nullptr;
if (_valueTypeProperty) {
- qmlBinding = QQmlBinding::create(_valueTypeProperty, function, _scopeObject, context);
- qmlBinding->setTarget(_bindingTarget, *_valueTypeProperty, property);
- } else {
- qmlBinding = QQmlBinding::create(property, function, _scopeObject, context);
- qmlBinding->setTarget(_bindingTarget, *property, nullptr);
+ prop = _valueTypeProperty;
+ subprop = property;
}
+ qmlBinding = QQmlBinding::create(prop, runtimeFunction, _scopeObject, context, qmlContext);
+ qmlBinding->setTarget(_bindingTarget, *prop, subprop);
sharedState->allCreatedBindings.push(QQmlAbstractBinding::Ptr(qmlBinding));
@@ -1016,8 +1015,8 @@ void QQmlObjectCreator::registerObjectWithContextById(const QV4::CompiledData::O
QV4::Heap::QmlContext *QQmlObjectCreator::currentQmlContext()
{
- if (!_qmlContext->objectValue())
- _qmlContext->setM(v4->rootContext()->newQmlContext(context, _scopeObject));
+ if (!_qmlContext->isManaged())
+ _qmlContext->setM(QV4::QmlContext::create(v4->rootContext(), context, _scopeObject));
return _qmlContext->d();
}
diff --git a/src/qml/qml/qqmlproperty_p.h b/src/qml/qml/qqmlproperty_p.h
index 2565ec0ce6..53062a2f13 100644
--- a/src/qml/qml/qqmlproperty_p.h
+++ b/src/qml/qml/qqmlproperty_p.h
@@ -115,30 +115,26 @@ public:
};
Q_DECLARE_FLAGS(BindingFlags, BindingFlag)
- static void setBinding(QQmlAbstractBinding *binding, BindingFlags flags = None, QQmlPropertyData::WriteFlags writeFlags = QQmlPropertyData::DontRemoveBinding);
+ static void setBinding(QQmlAbstractBinding *binding, BindingFlags flags = None,
+ QQmlPropertyData::WriteFlags writeFlags = QQmlPropertyData::DontRemoveBinding);
static void removeBinding(const QQmlProperty &that);
static void removeBinding(QObject *o, QQmlPropertyIndex index);
static void removeBinding(QQmlAbstractBinding *b);
static QQmlAbstractBinding *binding(QObject *, QQmlPropertyIndex index);
- static QQmlProperty restore(QObject *, const QQmlPropertyData &, const QQmlPropertyData *,
- QQmlContextData *);
+ static QQmlProperty restore(QObject *, const QQmlPropertyData &, const QQmlPropertyData *, QQmlContextData *);
int signalIndex() const;
- static inline QQmlPropertyPrivate *get(const QQmlProperty &p) {
- return p.d;
- }
+ static inline QQmlPropertyPrivate *get(const QQmlProperty &p) { return p.d; }
// "Public" (to QML) methods
static QQmlAbstractBinding *binding(const QQmlProperty &that);
static void setBinding(const QQmlProperty &that, QQmlAbstractBinding *);
static QQmlBoundSignalExpression *signalExpression(const QQmlProperty &that);
- static void setSignalExpression(const QQmlProperty &that,
- QQmlBoundSignalExpression *);
- static void takeSignalExpression(const QQmlProperty &that,
- QQmlBoundSignalExpression *);
+ static void setSignalExpression(const QQmlProperty &that, QQmlBoundSignalExpression *);
+ static void takeSignalExpression(const QQmlProperty &that, QQmlBoundSignalExpression *);
static bool write(const QQmlProperty &that, const QVariant &, QQmlPropertyData::WriteFlags);
static QQmlPropertyIndex propertyIndex(const QQmlProperty &that);
static QMetaMethod findSignalByName(const QMetaObject *mo, const QByteArray &);
diff --git a/src/qml/qml/qqmlstringconverters.cpp b/src/qml/qml/qqmlstringconverters.cpp
index d2b3577a1f..e53f90b45b 100644
--- a/src/qml/qml/qqmlstringconverters.cpp
+++ b/src/qml/qml/qqmlstringconverters.cpp
@@ -71,14 +71,14 @@ QVariant QQmlStringConverters::variantFromString(const QString &s, int preferred
return QVariant(int(qRound(s.toDouble(ok))));
case QMetaType::UInt:
return QVariant(uint(qRound(s.toDouble(ok))));
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
case QMetaType::QDate:
return QVariant::fromValue(dateFromString(s, ok));
case QMetaType::QTime:
return QVariant::fromValue(timeFromString(s, ok));
case QMetaType::QDateTime:
return QVariant::fromValue(dateTimeFromString(s, ok));
-#endif // QT_NO_DATESTRING
+#endif // datestring
case QMetaType::QPointF:
return QVariant::fromValue(pointFFromString(s, ok));
case QMetaType::QPoint:
@@ -106,7 +106,7 @@ unsigned QQmlStringConverters::rgbaFromString(const QString &s, bool *ok)
return QQml_colorProvider()->rgbaFromString(s, ok);
}
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
QDate QQmlStringConverters::dateFromString(const QString &s, bool *ok)
{
QDate d = QDate::fromString(s, Qt::ISODate);
@@ -130,7 +130,7 @@ QDateTime QQmlStringConverters::dateTimeFromString(const QString &s, bool *ok)
d.setTimeSpec(Qt::UTC);
return d;
}
-#endif // QT_NO_DATESTRING
+#endif // datestring
//expects input of "x,y"
QPointF QQmlStringConverters::pointFFromString(const QString &s, bool *ok)
@@ -229,7 +229,7 @@ bool QQmlStringConverters::createFromString(int type, const QString &s, void *da
*p = uint(qRound(s.toDouble(&ok)));
return ok;
}
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
case QMetaType::QDate:
{
Q_ASSERT(n >= sizeof(QDate));
@@ -251,7 +251,7 @@ bool QQmlStringConverters::createFromString(int type, const QString &s, void *da
*p = dateTimeFromString(s, &ok);
return ok;
}
-#endif // QT_NO_DATESTRING
+#endif // datestring
case QMetaType::QPointF:
{
Q_ASSERT(n >= sizeof(QPointF));
diff --git a/src/qml/qml/qqmlstringconverters_p.h b/src/qml/qml/qqmlstringconverters_p.h
index b67cefaf35..af344e3344 100644
--- a/src/qml/qml/qqmlstringconverters_p.h
+++ b/src/qml/qml/qqmlstringconverters_p.h
@@ -72,7 +72,7 @@ namespace QQmlStringConverters
Q_QML_PRIVATE_EXPORT QVariant colorFromString(const QString &, bool *ok = 0);
Q_QML_PRIVATE_EXPORT unsigned rgbaFromString(const QString &, bool *ok = 0);
-#ifndef QT_NO_DATESTRING
+#if QT_CONFIG(datestring)
Q_QML_PRIVATE_EXPORT QDate dateFromString(const QString &, bool *ok = 0);
Q_QML_PRIVATE_EXPORT QTime timeFromString(const QString &, bool *ok = 0);
Q_QML_PRIVATE_EXPORT QDateTime dateTimeFromString(const QString &, bool *ok = 0);
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 3885e6ea0b..76ac15e2f1 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -39,7 +39,6 @@
#include "qqmltypeloader_p.h"
#include "qqmlabstracturlinterceptor.h"
-#include "qqmlcontextwrapper_p.h"
#include "qqmlexpression_p.h"
#include <private/qqmlengine_p.h>
@@ -2836,7 +2835,7 @@ QV4::ReturnedValue QQmlScriptData::scriptValueForContext(QQmlContextData *parent
return QV4::Encode::undefined();
}
- QV4::Scoped<QV4::QmlContext> qmlContext(scope, v4->rootContext()->newQmlContext(ctxt, 0));
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(v4->rootContext(), ctxt, 0));
qmlContext->takeContextOwnership();
m_program->qmlContext.set(scope.engine, qmlContext);
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp
index 5c3ad6b2a6..fd1e9cc2be 100644
--- a/src/qml/qml/qqmltypewrapper.cpp
+++ b/src/qml/qml/qqmltypewrapper.cpp
@@ -38,7 +38,6 @@
****************************************************************************/
#include "qqmltypewrapper_p.h"
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qv8engine_p.h>
#include <private/qqmlengine_p.h>
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index 43b9e4bd3b..6ce52bb9e5 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -43,7 +43,6 @@
#include <private/qqmlvaluetype_p.h>
#include <private/qqmlbinding_p.h>
#include <private/qqmlglobal_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qqmlbuiltinfunctions_p.h>
#include <private/qv4engine_p.h>
@@ -390,6 +389,7 @@ ReturnedValue QQmlValueTypeWrapper::get(const Managed *m, String *name, bool *ha
// These four types are the most common used by the value type wrappers
VALUE_TYPE_LOAD(QMetaType::QReal, qreal, qreal);
+ VALUE_TYPE_LOAD(QMetaType::Int || result->isEnum(), int, int);
VALUE_TYPE_LOAD(QMetaType::Int, int, int);
VALUE_TYPE_LOAD(QMetaType::QString, QString, v4->newString);
VALUE_TYPE_LOAD(QMetaType::Bool, bool, bool);
@@ -453,9 +453,10 @@ void QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
cacheData.setCoreIndex(reference->d()->property);
QV4::Scoped<QQmlBindingFunction> bindingFunction(scope, (const Value &)f);
- bindingFunction->initBindingLocation();
- QQmlBinding *newBinding = QQmlBinding::create(&cacheData, value, reference->d()->object, context);
+ QV4::ScopedContext ctx(scope, bindingFunction->scope());
+ QQmlBinding *newBinding = QQmlBinding::create(&cacheData, bindingFunction->function(), reference->d()->object, context, ctx);
+ newBinding->setSourceLocation(bindingFunction->currentLocation());
newBinding->setTarget(reference->d()->object, cacheData, pd);
QQmlPropertyPrivate::setBinding(newBinding);
return;
diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp
index 01c4f476d6..72d4ab7e8f 100644
--- a/src/qml/qml/qqmlvme.cpp
+++ b/src/qml/qml/qqmlvme.cpp
@@ -62,7 +62,6 @@
#include "qqmlpropertyvalueinterceptor_p.h"
#include "qqmlvaluetypeproxybinding_p.h"
#include "qqmlexpression_p.h"
-#include "qqmlcontextwrapper_p.h"
#include <QStack>
#include <QPointF>
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 791870b831..545daa96f8 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -489,9 +489,9 @@ QString QQmlVMEMetaObject::readPropertyAsString(int id) const
QV4::Scope scope(cache->engine);
QV4::ScopedValue sv(scope, *(md->data() + id));
- if (!sv->isString())
- return QString();
- return sv->stringValue()->toQString();
+ if (QV4::String *s = sv->stringValue())
+ return s->toQString();
+ return QString();
}
QUrl QQmlVMEMetaObject::readPropertyAsUrl(int id) const
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index b4be709b37..22c3c49c58 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -50,7 +50,6 @@
#include <private/qv4domerrors_p.h>
#include <private/qv4engine_p.h>
#include <private/qv4functionobject_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qv4scopedvalue_p.h>
#include <QtCore/qobject.h>
@@ -70,7 +69,7 @@
using namespace QV4;
-#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network)
+#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network)
#define V4THROW_REFERENCE(string) { \
ScopedObject error(scope, ctx->engine()->newReferenceErrorObject(QStringLiteral(string))); \
@@ -1069,7 +1068,7 @@ private:
QByteArray m_mime;
QByteArray m_charset;
QTextCodec *m_textCodec;
-#ifndef QT_NO_TEXTCODEC
+#if QT_CONFIG(textcodec)
QTextCodec* findTextCodec() const;
#endif
void readEncoding();
@@ -1511,7 +1510,7 @@ QV4::ReturnedValue QQmlXMLHttpRequest::xmlResponseBody(QV4::ExecutionEngine* eng
return m_parsedDocument.value();
}
-#ifndef QT_NO_TEXTCODEC
+#if QT_CONFIG(textcodec)
QTextCodec* QQmlXMLHttpRequest::findTextCodec() const
{
QTextCodec *codec = 0;
@@ -1540,7 +1539,7 @@ QTextCodec* QQmlXMLHttpRequest::findTextCodec() const
QString QQmlXMLHttpRequest::responseBody()
{
-#ifndef QT_NO_TEXTCODEC
+#if QT_CONFIG(textcodec)
if (!m_textCodec)
m_textCodec = findTextCodec();
if (m_textCodec)
@@ -2057,6 +2056,6 @@ void *qt_add_qmlxmlhttprequest(ExecutionEngine *v4)
QT_END_NAMESPACE
-#endif // QT_NO_XMLSTREAMREADER && qml_network
+#endif // xmlstreamreader && qml_network
#include <qqmlxmlhttprequest.moc>
diff --git a/src/qml/qml/qqmlxmlhttprequest_p.h b/src/qml/qml/qqmlxmlhttprequest_p.h
index fdb6194537..f2836d8301 100644
--- a/src/qml/qml/qqmlxmlhttprequest_p.h
+++ b/src/qml/qml/qqmlxmlhttprequest_p.h
@@ -55,7 +55,7 @@
#include <QtCore/qglobal.h>
#include <private/qqmlglobal_p.h>
-#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network)
+#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network)
QT_BEGIN_NAMESPACE
@@ -64,7 +64,7 @@ void qt_rem_qmlxmlhttprequest(QV4::ExecutionEngine *engine, void *);
QT_END_NAMESPACE
-#endif // QT_NO_XMLSTREAMREADER && qml_network
+#endif // xmlstreamreader && qml_network
#endif // QQMLXMLHTTPREQUEST_P_H
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index cf0fd57773..19dc100f40 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -148,9 +148,7 @@ void Heap::QtObject::init(QQmlEngine *qmlEngine)
o->defineAccessorProperty(QStringLiteral("platform"), QV4::QtObject::method_get_platform, 0);
o->defineAccessorProperty(QStringLiteral("application"), QV4::QtObject::method_get_application, 0);
-#ifndef QT_NO_IM
o->defineAccessorProperty(QStringLiteral("inputMethod"), QV4::QtObject::method_get_inputMethod, 0);
-#endif
o->defineAccessorProperty(QStringLiteral("styleHints"), QV4::QtObject::method_get_styleHints, 0);
o->defineDefaultProperty(QStringLiteral("callLater"), QV4::QtObject::method_callLater);
@@ -1031,7 +1029,7 @@ ReturnedValue QtObject::method_exit(CallContext *ctx)
/*!
\qmlmethod object Qt::createQmlObject(string qml, object parent, string filepath)
-Returns a new object created from the given \a string of QML which will have the specified \a parent,
+Returns a new object created from the given \a qml string which will have the specified \a parent,
or \c null if there was an error in creating the object.
If \a filepath is specified, it will be used for error reporting for the created object.
@@ -1305,30 +1303,15 @@ ReturnedValue QtObject::method_locale(CallContext *ctx)
void Heap::QQmlBindingFunction::init(const QV4::FunctionObject *originalFunction)
{
- QV4::Heap::FunctionObject::init(originalFunction->scope(), originalFunction->name());
- bindingLocation = new QQmlSourceLocation;
- this->originalFunction = originalFunction->d();
+ Scope scope(originalFunction->engine());
+ ScopedContext context(scope, originalFunction->scope());
+ FunctionObject::init(context, originalFunction->function());
}
-void QQmlBindingFunction::initBindingLocation()
+QQmlSourceLocation QQmlBindingFunction::currentLocation() const
{
QV4::StackFrame frame = engine()->currentStackFrame();
- d()->bindingLocation->sourceFile = frame.source;
- d()->bindingLocation->line = frame.line;
-}
-
-void QQmlBindingFunction::call(const Managed *that, Scope &scope, CallData *callData)
-{
- ScopedFunctionObject function(scope, static_cast<const QQmlBindingFunction*>(that)->d()->originalFunction);
- function->call(scope, callData);
-}
-
-void QQmlBindingFunction::markObjects(Heap::Base *that, ExecutionEngine *e)
-{
- QQmlBindingFunction::Data *This = static_cast<QQmlBindingFunction::Data *>(that);
- if (This->originalFunction)
- This->originalFunction->mark(e);
- QV4::FunctionObject::markObjects(that, e);
+ return QQmlSourceLocation(frame.source, frame.line, 0);
}
DEFINE_OBJECT_VTABLE(QQmlBindingFunction);
@@ -1423,13 +1406,11 @@ ReturnedValue QtObject::method_get_application(CallContext *ctx)
return QV4::QObjectWrapper::wrap(ctx->d()->engine, qt->d()->application);
}
-#ifndef QT_NO_IM
ReturnedValue QtObject::method_get_inputMethod(CallContext *ctx)
{
QObject *o = QQml_guiProvider()->inputMethod();
return QV4::QObjectWrapper::wrap(ctx->d()->engine, o);
}
-#endif
ReturnedValue QtObject::method_get_styleHints(CallContext *ctx)
{
@@ -1740,7 +1721,7 @@ void QV4::GlobalExtensions::init(Object *globalObject, QJSEngine::Extensions ext
Scope scope(v4);
if (extensions.testFlag(QJSEngine::TranslationExtension)) {
- #ifndef QT_NO_TRANSLATION
+ #if QT_CONFIG(translation)
globalObject->defineDefaultProperty(QStringLiteral("qsTranslate"), QV4::GlobalExtensions::method_qsTranslate);
globalObject->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), QV4::GlobalExtensions::method_qsTranslateNoOp);
globalObject->defineDefaultProperty(QStringLiteral("qsTr"), QV4::GlobalExtensions::method_qsTr);
@@ -1767,7 +1748,7 @@ void QV4::GlobalExtensions::init(Object *globalObject, QJSEngine::Extensions ext
}
-#ifndef QT_NO_TRANSLATION
+#if QT_CONFIG(translation)
/*!
\qmlmethod string Qt::qsTranslate(string context, string sourceText, string disambiguation, int n)
@@ -2015,7 +1996,7 @@ ReturnedValue GlobalExtensions::method_qsTrIdNoOp(CallContext *ctx)
return QV4::Encode::undefined();
return ctx->args()[0].asReturnedValue();
}
-#endif // QT_NO_TRANSLATION
+#endif // translation
QV4::ReturnedValue GlobalExtensions::method_gc(CallContext *ctx)
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
index f428e377d7..fe43532647 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
@@ -82,13 +82,6 @@ struct ConsoleObject : Object {
struct QQmlBindingFunction : FunctionObject {
void init(const QV4::FunctionObject *originalFunction);
- void destroy() {
- delete bindingLocation;
- Object::destroy();
- }
- Pointer<FunctionObject> originalFunction;
- // Set when the binding is created later
- QQmlSourceLocation *bindingLocation;
};
}
@@ -135,9 +128,7 @@ struct QtObject : Object
static ReturnedValue method_get_platform(CallContext *ctx);
static ReturnedValue method_get_application(CallContext *ctx);
-#ifndef QT_NO_IM
static ReturnedValue method_get_inputMethod(CallContext *ctx);
-#endif
static ReturnedValue method_get_styleHints(CallContext *ctx);
static ReturnedValue method_callLater(CallContext *ctx);
@@ -169,7 +160,7 @@ struct ConsoleObject : Object
struct Q_QML_PRIVATE_EXPORT GlobalExtensions {
static void init(Object *globalObject, QJSEngine::Extensions extensions);
-#ifndef QT_NO_TRANSLATION
+#if QT_CONFIG(translation)
static ReturnedValue method_qsTranslate(CallContext *ctx);
static ReturnedValue method_qsTranslateNoOp(CallContext *ctx);
static ReturnedValue method_qsTr(CallContext *ctx);
@@ -187,13 +178,8 @@ struct Q_QML_PRIVATE_EXPORT GlobalExtensions {
struct QQmlBindingFunction : public QV4::FunctionObject
{
V4_OBJECT2(QQmlBindingFunction, FunctionObject)
- V4_NEEDS_DESTROY
-
- void initBindingLocation(); // from caller stack trace
-
- static void call(const Managed *that, Scope &scope, CallData *callData);
- static void markObjects(Heap::Base *that, ExecutionEngine *e);
+ QQmlSourceLocation currentLocation() const; // from caller stack trace
};
}
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index b0599dd0a2..dadff819cf 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -52,7 +52,6 @@
#include <private/qqmlplatform_p.h>
#include <private/qjsvalue_p.h>
#include <private/qqmltypewrapper_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <private/qqmlvaluetypewrapper_p.h>
#include <private/qqmllistwrapper_p.h>
#include <private/qv4scopedvalue_p.h>
@@ -160,7 +159,7 @@ QV8Engine::~QV8Engine()
qDeleteAll(m_extensionData);
m_extensionData.clear();
-#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network)
+#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network)
qt_rem_qmlxmlhttprequest(m_v4Engine, m_xmlHttpRequestData);
m_xmlHttpRequestData = 0;
#endif
@@ -195,7 +194,7 @@ void QV8Engine::initializeGlobal()
QQmlDateExtension::registerExtension(m_v4Engine);
QQmlNumberExtension::registerExtension(m_v4Engine);
-#if !defined(QT_NO_XMLSTREAMREADER) && QT_CONFIG(qml_network)
+#if QT_CONFIG(xmlstreamreader) && QT_CONFIG(qml_network)
qt_add_domexceptions(m_v4Engine);
m_xmlHttpRequestData = qt_add_qmlxmlhttprequest(m_v4Engine);
#endif
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index c4fabbedcc..be10b270ae 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -213,6 +213,7 @@ QQmlDelegateModelPrivate::QQmlDelegateModelPrivate(QQmlContext *ctxt)
, m_reset(false)
, m_transaction(false)
, m_incubatorCleanupScheduled(false)
+ , m_waitingToFetchMore(false)
, m_cacheItems(0)
, m_items(0)
, m_persistedItems(0)
@@ -227,6 +228,15 @@ QQmlDelegateModelPrivate::~QQmlDelegateModelPrivate()
m_cacheMetaType->release();
}
+void QQmlDelegateModelPrivate::requestMoreIfNecessary()
+{
+ Q_Q(QQmlDelegateModel);
+ if (!m_waitingToFetchMore && m_adaptorModel.canFetchMore()) {
+ m_waitingToFetchMore = true;
+ QCoreApplication::postEvent(q, new QEvent(QEvent::UpdateRequest));
+ }
+}
+
void QQmlDelegateModelPrivate::init()
{
Q_Q(QQmlDelegateModel);
@@ -334,9 +344,7 @@ void QQmlDelegateModel::componentComplete()
&inserts);
d->itemsInserted(inserts);
d->emitChanges();
-
- if (d->m_adaptorModel.canFetchMore())
- QCoreApplication::postEvent(this, new QEvent(QEvent::UpdateRequest));
+ d->requestMoreIfNecessary();
}
/*!
@@ -375,8 +383,7 @@ void QQmlDelegateModel::setModel(const QVariant &model)
if (d->m_complete) {
_q_itemsInserted(0, d->m_adaptorModel.count());
- if (d->m_adaptorModel.canFetchMore())
- QCoreApplication::postEvent(this, new QEvent(QEvent::UpdateRequest));
+ d->requestMoreIfNecessary();
}
}
@@ -922,7 +929,6 @@ void QQmlDelegateModelPrivate::setInitialState(QQDMIncubationTask *incubationTas
QObject *QQmlDelegateModelPrivate::object(Compositor::Group group, int index, bool asynchronous)
{
- Q_Q(QQmlDelegateModel);
if (!m_delegate || index < 0 || index >= m_compositor.count(group)) {
qWarning() << "DelegateModel::item: index out range" << index << m_compositor.count(group);
return 0;
@@ -989,8 +995,8 @@ QObject *QQmlDelegateModelPrivate::object(Compositor::Group group, int index, bo
QQmlContextData::get(m_context));
}
- if (index == m_compositor.count(group) - 1 && m_adaptorModel.canFetchMore())
- QCoreApplication::postEvent(q, new QEvent(QEvent::UpdateRequest));
+ if (index == m_compositor.count(group) - 1)
+ requestMoreIfNecessary();
// Remove the temporary reference count.
cacheItem->scriptRef -= 1;
@@ -1110,6 +1116,7 @@ bool QQmlDelegateModel::event(QEvent *e)
{
Q_D(QQmlDelegateModel);
if (e->type() == QEvent::UpdateRequest) {
+ d->m_waitingToFetchMore = false;
d->m_adaptorModel.fetchMore();
} else if (e->type() == QEvent::User) {
d->m_incubatorCleanupScheduled = false;
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h
index 07e35d3fd7..4c2841b8ba 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qml/types/qqmldelegatemodel_p_p.h
@@ -149,7 +149,6 @@ public:
int groups;
int index;
-
Q_SIGNALS:
void modelIndexChanged();
@@ -261,6 +260,7 @@ public:
void init();
void connectModel(QQmlAdaptorModel *model);
+ void requestMoreIfNecessary();
QObject *object(Compositor::Group group, int index, bool asynchronous);
QQmlDelegateModel::ReleaseFlags release(QObject *object);
QString stringValue(Compositor::Group group, int index, const QString &name);
@@ -329,6 +329,7 @@ public:
bool m_reset : 1;
bool m_transaction : 1;
bool m_incubatorCleanupScheduled : 1;
+ bool m_waitingToFetchMore : 1;
union {
struct {
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index 062f7a2a74..1a2e4c7f6f 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -45,10 +45,12 @@
#include <private/qqmlcustomparser_p.h>
#include <private/qqmlengine_p.h>
+#include <private/qqmlnotifier_p.h>
#include <private/qv4object_p.h>
#include <private/qv4dateobject_p.h>
#include <private/qv4objectiterator_p.h>
+#include <private/qv4alloca_p.h>
#include <qqmlcontext.h>
#include <qqmlinfo.h>
@@ -57,6 +59,7 @@
#include <QtCore/qstack.h>
#include <QXmlStreamReader>
#include <QtCore/qdatetime.h>
+#include <QScopedValueRollback>
QT_BEGIN_NAMESPACE
@@ -502,10 +505,10 @@ void ListModel::set(int elementIndex, QV4::Object *object)
break;
// Add the value now
- if (propertyValue->isString()) {
+ if (QV4::String *s = propertyValue->stringValue()) {
const ListLayout::Role &r = m_layout->getRoleOrCreate(propertyName, ListLayout::Role::String);
if (r.type == ListLayout::Role::String)
- e->setStringPropertyFast(r, propertyValue->stringValue()->toQString());
+ e->setStringPropertyFast(r, s->toQString());
} else if (propertyValue->isNumber()) {
const ListLayout::Role &r = m_layout->getRoleOrCreate(propertyName, ListLayout::Role::Number);
if (r.type == ListLayout::Role::Number) {
@@ -1262,9 +1265,14 @@ ModelNodeMetaObject *ModelNodeMetaObject::get(QObject *obj)
void ModelNodeMetaObject::updateValues()
{
- if (!m_initialized)
+ const int roleCount = m_model->m_listModel->roleCount();
+ if (!m_initialized) {
+ int *changedRoles = reinterpret_cast<int *>(alloca(roleCount * sizeof(int)));
+ for (int i = 0; i < roleCount; ++i)
+ changedRoles[i] = i;
+ emitDirectNotifies(changedRoles, roleCount);
return;
- int roleCount = m_model->m_listModel->roleCount();
+ }
for (int i=0 ; i < roleCount ; ++i) {
const ListLayout::Role &role = m_model->m_listModel->getExistingRole(i);
QByteArray name = role.name.toUtf8();
@@ -1275,8 +1283,10 @@ void ModelNodeMetaObject::updateValues()
void ModelNodeMetaObject::updateValues(const QVector<int> &roles)
{
- if (!m_initialized)
+ if (!m_initialized) {
+ emitDirectNotifies(roles.constData(), roles.count());
return;
+ }
int roleCount = roles.count();
for (int i=0 ; i < roleCount ; ++i) {
int roleIndex = roles.at(i);
@@ -1303,6 +1313,22 @@ void ModelNodeMetaObject::propertyWritten(int index)
m_model->emitItemsChanged(m_elementIndex, 1, QVector<int>(1, roleIndex));
}
+// Does the emission of the notifiers when we haven't created the meta-object yet
+void ModelNodeMetaObject::emitDirectNotifies(const int *changedRoles, int roleCount)
+{
+ Q_ASSERT(!m_initialized);
+ QQmlData *ddata = QQmlData::get(object(), /*create*/false);
+ if (!ddata)
+ return;
+ QQmlEnginePrivate *ep = QQmlEnginePrivate::get(qmlEngine(m_model));
+ if (!ep)
+ return;
+ for (int i = 0; i < roleCount; ++i) {
+ const int changedRole = changedRoles[i];
+ QQmlNotifier::notify(ddata, changedRole);
+ }
+}
+
namespace QV4 {
void ModelObject::put(Managed *m, String *name, const Value &value)
@@ -1329,6 +1355,18 @@ ReturnedValue ModelObject::get(const Managed *m, String *name, bool *hasProperty
return QObjectWrapper::get(m, name, hasProperty);
if (hasProperty)
*hasProperty = true;
+
+ if (QQmlEngine *qmlEngine = that->engine()->qmlEngine()) {
+ QQmlEnginePrivate *ep = QQmlEnginePrivate::get(qmlEngine);
+ if (ep && ep->propertyCapture) {
+ QObjectPrivate *op = QObjectPrivate::get(that->object());
+ // Temporarily hide the dynamic meta-object, to prevent it from being created when the capture
+ // triggers a QObject::connectNotify() by calling obj->metaObject().
+ QScopedValueRollback<QDynamicMetaObjectData*> metaObjectBlocker(op->metaObject, 0);
+ ep->propertyCapture->captureProperty(that->object(), -1, role->index);
+ }
+ }
+
const int elementIndex = that->d()->m_elementIndex;
QVariant value = that->d()->m_model->data(elementIndex, role->index);
return that->engine()->fromVariant(value);
diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h
index ddf77e52c0..cdce78e542 100644
--- a/src/qml/types/qqmllistmodel_p_p.h
+++ b/src/qml/types/qqmllistmodel_p_p.h
@@ -153,6 +153,8 @@ private:
setValue(name, val);
}
+ void emitDirectNotifies(const int *changedRoles, int roleCount);
+
void initialize();
bool m_initialized;
};
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index cdcc894da9..5f716da17a 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -42,7 +42,6 @@
#include "qqmllistmodelworkeragent_p.h"
#include <private/qqmlengine_p.h>
#include <private/qqmlexpression_p.h>
-#include <private/qqmlcontextwrapper_p.h>
#include <QtCore/qcoreevent.h>
#include <QtCore/qcoreapplication.h>
@@ -318,19 +317,8 @@ QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::getWorker(WorkerScript *scri
QV4::ExecutionEngine *v4 = QV8Engine::getV4(workerEngine);
QV4::Scope scope(v4);
-
- QV4::Scoped<QV4::QmlContextWrapper> w(scope, QV4::QmlContextWrapper::urlScope(v4, script->source));
- Q_ASSERT(!!w);
- w->setReadOnly(false);
-
- QV4::ScopedObject api(scope, v4->newObject());
- api->put(QV4::ScopedString(scope, v4->newString(QStringLiteral("sendMessage"))), QV4::ScopedValue(scope, workerEngine->sendFunction(script->id)));
-
- w->QV4::Object::put(QV4::ScopedString(scope, v4->newString(QStringLiteral("WorkerScript"))), api);
-
- w->setReadOnly(true);
-
- script->qmlContext.set(v4, v4->rootContext()->newQmlContext(w));
+ QV4::ScopedValue v(scope, workerEngine->sendFunction(script->id));
+ script->qmlContext.set(v4, QV4::QmlContext::createWorkerContext(v4->rootContext(), script->source, v));
}
return script->qmlContext.value();