aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp2
-rw-r--r--src/qml/compiler/qqmlirbuilder_p.h2
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp3
-rw-r--r--src/qml/compiler/qv4codegen.cpp186
-rw-r--r--src/qml/compiler/qv4codegen_p.h24
-rw-r--r--src/qml/compiler/qv4compileddata.cpp5
-rw-r--r--src/qml/compiler/qv4compiler.cpp2
-rw-r--r--src/qml/compiler/qv4jsir_p.h10
-rw-r--r--src/qml/compiler/qv4ssa.cpp195
-rw-r--r--src/qml/compiler/qv4ssa_p.h13
-rw-r--r--src/qml/debugger/qqmldebugserviceinterfaces_p.h18
-rw-r--r--src/qml/debugger/qqmlprofiler_p.h2
-rw-r--r--src/qml/doc/src/cppintegration/data.qdoc11
-rw-r--r--src/qml/doc/src/cppintegration/definetypes.qdoc3
-rw-r--r--src/qml/doc/src/cppintegration/exposecppattributes.qdoc4
-rw-r--r--src/qml/doc/src/cppintegration/topic.qdoc2
-rw-r--r--src/qml/doc/src/javascript/functionlist.qdoc1
-rw-r--r--src/qml/doc/src/javascript/imports.qdoc8
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc14
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc2
-rw-r--r--src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc3
-rw-r--r--src/qml/jit/qv4assembler.cpp24
-rw-r--r--src/qml/jit/qv4assembler_p.h73
-rw-r--r--src/qml/jit/qv4binop.cpp201
-rw-r--r--src/qml/jit/qv4isel_masm.cpp54
-rw-r--r--src/qml/jit/qv4isel_masm_p.h2
-rw-r--r--src/qml/jit/qv4regalloc.cpp10
-rw-r--r--src/qml/jit/qv4targetplatform_p.h139
-rw-r--r--src/qml/jit/qv4unop.cpp7
-rw-r--r--src/qml/jsapi/qjsengine.cpp2
-rw-r--r--src/qml/jsruntime/qv4argumentsobject.cpp9
-rw-r--r--src/qml/jsruntime/qv4argumentsobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4context.cpp2
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp51
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4debugging_p.h3
-rw-r--r--src/qml/jsruntime/qv4engine.cpp27
-rw-r--r--src/qml/jsruntime/qv4engine_p.h2
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp8
-rw-r--r--src/qml/jsruntime/qv4global_p.h1
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp56
-rw-r--r--src/qml/jsruntime/qv4numberobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4object.cpp74
-rw-r--r--src/qml/jsruntime/qv4object_p.h65
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp120
-rw-r--r--src/qml/jsruntime/qv4objectproto_p.h1
-rw-r--r--src/qml/jsruntime/qv4profiling_p.h2
-rw-r--r--src/qml/jsruntime/qv4qmlcontext.cpp27
-rw-r--r--src/qml/jsruntime/qv4qmlcontext_p.h2
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp35
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper_p.h2
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp8
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp13
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp20
-rw-r--r--src/qml/jsruntime/qv4stringobject_p.h1
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp7
-rw-r--r--src/qml/jsruntime/qv4typedarray_p.h2
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp4
-rw-r--r--src/qml/memory/qv4mm.cpp200
-rw-r--r--src/qml/parser/qqmljs.g28
-rw-r--r--src/qml/parser/qqmljsast_p.h23
-rw-r--r--src/qml/parser/qqmljsgrammar.cpp1786
-rw-r--r--src/qml/parser/qqmljsgrammar_p.h57
-rw-r--r--src/qml/parser/qqmljskeywords_p.h7
-rw-r--r--src/qml/parser/qqmljsparser.cpp314
-rw-r--r--src/qml/qml/qqml.h38
-rw-r--r--src/qml/qml/qqmlapplicationengine.cpp13
-rw-r--r--src/qml/qml/qqmlapplicationengine.h1
-rw-r--r--src/qml/qml/qqmlapplicationengine_p.h4
-rw-r--r--src/qml/qml/qqmlengine.cpp30
-rw-r--r--src/qml/qml/qqmlengine.h1
-rw-r--r--src/qml/qml/qqmlengine_p.h1
-rw-r--r--src/qml/qml/qqmlexpression.cpp1
-rw-r--r--src/qml/qml/qqmllist.cpp10
-rw-r--r--src/qml/qml/qqmllistwrapper.cpp28
-rw-r--r--src/qml/qml/qqmllistwrapper_p.h10
-rw-r--r--src/qml/qml/qqmlproperty.cpp16
-rw-r--r--src/qml/qml/qqmltypewrapper.cpp30
-rw-r--r--src/qml/qml/qqmltypewrapper_p.h2
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp18
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper_p.h2
-rw-r--r--src/qml/qtqmlglobal_p.h40
-rw-r--r--src/qml/types/qqmllistmodel.cpp5
-rw-r--r--src/qml/types/qqmllistmodel_p_p.h2
-rw-r--r--src/qml/types/qqmlobjectmodel.cpp4
-rw-r--r--src/qml/types/qquickpackage.cpp2
-rw-r--r--src/qml/util/qqmladaptormodel.cpp60
89 files changed, 2560 insertions, 1747 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index 8a7507c92e..030f485504 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -1605,7 +1605,7 @@ QVector<int> JSCodeGen::generateJSCodeForFunctionsAndBindings(const QList<Compil
scan.leaveEnvironment();
scan.leaveEnvironment();
- _env = 0;
+ _variableEnvironment = 0;
_function = _module->functions.at(defineFunction(QStringLiteral("context scope"), qmlRoot, 0, 0));
for (int i = 0; i < functions.count(); ++i) {
diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h
index 2022112e07..b579a963a1 100644
--- a/src/qml/compiler/qqmlirbuilder_p.h
+++ b/src/qml/compiler/qqmlirbuilder_p.h
@@ -622,7 +622,7 @@ private:
int _importedScriptsTemp;
};
-struct IRLoader {
+struct Q_QML_PRIVATE_EXPORT IRLoader {
IRLoader(const QV4::CompiledData::Unit *unit, QmlIR::Document *output);
void load();
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index 85267225be..109eb86c2e 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -1108,10 +1108,9 @@ QQmlComponentAndAliasResolver::AliasResolutionResult QQmlComponentAndAliasResolv
continue;
}
- // Try again later and resolve the target alias first.
- _objectsWithAliases.append(objectIndex);
// restore
alias->idIndex = idIndex;
+ // Try again later and resolve the target alias first.
break;
}
}
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index b5b70dbf45..0afc97e4bf 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -73,10 +73,29 @@ static inline void setLocation(IR::Stmt *s, const SourceLocation &loc)
s->location = loc;
}
+static bool cjumpCanHandle(IR::AluOp op)
+{
+ switch (op) {
+ case IR::OpIn:
+ case IR::OpInstanceof:
+ case IR::OpEqual:
+ case IR::OpNotEqual:
+ case IR::OpGe:
+ case IR::OpGt:
+ case IR::OpLe:
+ case IR::OpLt:
+ case IR::OpStrictEqual:
+ case IR::OpStrictNotEqual:
+ return true;
+ default:
+ return false;
+ }
+}
+
Codegen::ScanFunctions::ScanFunctions(Codegen *cg, const QString &sourceCode, CompilationMode defaultProgramMode)
: _cg(cg)
, _sourceCode(sourceCode)
- , _env(0)
+ , _variableEnvironment(0)
, _allowFuncDecls(true)
, defaultProgramMode(defaultProgramMode)
{
@@ -90,17 +109,17 @@ void Codegen::ScanFunctions::operator()(Node *node)
void Codegen::ScanFunctions::enterEnvironment(Node *node, CompilationMode compilationMode)
{
- Environment *e = _cg->newEnvironment(node, _env, compilationMode);
+ Environment *e = _cg->newEnvironment(node, _variableEnvironment, compilationMode);
if (!e->isStrict)
e->isStrict = _cg->_strictMode;
_envStack.append(e);
- _env = e;
+ _variableEnvironment = e;
}
void Codegen::ScanFunctions::leaveEnvironment()
{
_envStack.pop();
- _env = _envStack.isEmpty() ? 0 : _envStack.top();
+ _variableEnvironment = _envStack.isEmpty() ? 0 : _envStack.top();
}
void Codegen::ScanFunctions::checkDirectivePrologue(SourceElements *ast)
@@ -116,7 +135,7 @@ void Codegen::ScanFunctions::checkDirectivePrologue(SourceElements *ast)
continue;
QStringRef str = _sourceCode.midRef(strLit->literalToken.offset + 1, strLit->literalToken.length - 2);
if (str == QLatin1String("use strict")) {
- _env->isStrict = true;
+ _variableEnvironment->isStrict = true;
} else {
// TODO: give a warning.
}
@@ -131,7 +150,7 @@ void Codegen::ScanFunctions::checkDirectivePrologue(SourceElements *ast)
void Codegen::ScanFunctions::checkName(const QStringRef &name, const SourceLocation &loc)
{
- if (_env->isStrict) {
+ if (_variableEnvironment->isStrict) {
if (name == QLatin1String("implements")
|| name == QLatin1String("interface")
|| name == QLatin1String("let")
@@ -149,7 +168,7 @@ void Codegen::ScanFunctions::checkForArguments(AST::FormalParameterList *paramet
{
while (parameters) {
if (parameters->name == QLatin1String("arguments"))
- _env->usesArgumentsObject = Environment::ArgumentsObjectNotUsed;
+ _variableEnvironment->usesArgumentsObject = Environment::ArgumentsObjectNotUsed;
parameters = parameters->next;
}
}
@@ -168,19 +187,19 @@ void Codegen::ScanFunctions::endVisit(Program *)
bool Codegen::ScanFunctions::visit(CallExpression *ast)
{
- if (! _env->hasDirectEval) {
+ if (! _variableEnvironment->hasDirectEval) {
if (IdentifierExpression *id = cast<IdentifierExpression *>(ast->base)) {
if (id->name == QLatin1String("eval")) {
- if (_env->usesArgumentsObject == Environment::ArgumentsObjectUnknown)
- _env->usesArgumentsObject = Environment::ArgumentsObjectUsed;
- _env->hasDirectEval = true;
+ if (_variableEnvironment->usesArgumentsObject == Environment::ArgumentsObjectUnknown)
+ _variableEnvironment->usesArgumentsObject = Environment::ArgumentsObjectUsed;
+ _variableEnvironment->hasDirectEval = true;
}
}
}
int argc = 0;
for (ArgumentList *it = ast->arguments; it; it = it->next)
++argc;
- _env->maxNumberOfArguments = qMax(_env->maxNumberOfArguments, argc);
+ _variableEnvironment->maxNumberOfArguments = qMax(_variableEnvironment->maxNumberOfArguments, argc);
return true;
}
@@ -189,7 +208,7 @@ bool Codegen::ScanFunctions::visit(NewMemberExpression *ast)
int argc = 0;
for (ArgumentList *it = ast->arguments; it; it = it->next)
++argc;
- _env->maxNumberOfArguments = qMax(_env->maxNumberOfArguments, argc);
+ _variableEnvironment->maxNumberOfArguments = qMax(_variableEnvironment->maxNumberOfArguments, argc);
return true;
}
@@ -205,30 +224,38 @@ bool Codegen::ScanFunctions::visit(ArrayLiteral *ast)
for (Elision *elision = ast->elision->next; elision; elision = elision->next)
++index;
}
- _env->maxNumberOfArguments = qMax(_env->maxNumberOfArguments, index);
+ _variableEnvironment->maxNumberOfArguments = qMax(_variableEnvironment->maxNumberOfArguments, index);
return true;
}
bool Codegen::ScanFunctions::visit(VariableDeclaration *ast)
{
- if (_env->isStrict && (ast->name == QLatin1String("eval") || ast->name == QLatin1String("arguments")))
+ if (_variableEnvironment->isStrict && (ast->name == QLatin1String("eval") || ast->name == QLatin1String("arguments")))
_cg->throwSyntaxError(ast->identifierToken, QStringLiteral("Variable name may not be eval or arguments in strict mode"));
checkName(ast->name, ast->identifierToken);
if (ast->name == QLatin1String("arguments"))
- _env->usesArgumentsObject = Environment::ArgumentsObjectNotUsed;
- if (ast->readOnly && !ast->expression) {
+ _variableEnvironment->usesArgumentsObject = Environment::ArgumentsObjectNotUsed;
+ if (ast->scope == AST::VariableDeclaration::VariableScope::ReadOnlyBlockScope && !ast->expression) {
_cg->throwSyntaxError(ast->identifierToken, QStringLiteral("Missing initializer in const declaration"));
return false;
}
- _env->enter(ast->name.toString(), ast->expression ? Environment::VariableDefinition : Environment::VariableDeclaration);
+ QString name = ast->name.toString();
+ const Environment::Member *m = 0;
+ if (_variableEnvironment->memberInfo(name, &m)) {
+ if (m->isLexicallyScoped() || ast->isLexicallyScoped()) {
+ _cg->throwSyntaxError(ast->identifierToken, QStringLiteral("Identifier %1 has already been declared").arg(name));
+ return false;
+ }
+ }
+ _variableEnvironment->enter(ast->name.toString(), ast->expression ? Environment::VariableDefinition : Environment::VariableDeclaration, ast->scope);
return true;
}
bool Codegen::ScanFunctions::visit(IdentifierExpression *ast)
{
checkName(ast->name, ast->identifierToken);
- if (_env->usesArgumentsObject == Environment::ArgumentsObjectUnknown && ast->name == QLatin1String("arguments"))
- _env->usesArgumentsObject = Environment::ArgumentsObjectUsed;
+ if (_variableEnvironment->usesArgumentsObject == Environment::ArgumentsObjectUnknown && ast->name == QLatin1String("arguments"))
+ _variableEnvironment->usesArgumentsObject = Environment::ArgumentsObjectUsed;
return true;
}
@@ -260,7 +287,7 @@ bool Codegen::ScanFunctions::visit(FunctionExpression *ast)
void Codegen::ScanFunctions::enterFunction(FunctionExpression *ast, bool enterName, bool isExpression)
{
- if (_env->isStrict && (ast->name == QLatin1String("eval") || ast->name == QLatin1String("arguments")))
+ if (_variableEnvironment->isStrict && (ast->name == QLatin1String("eval") || ast->name == QLatin1String("arguments")))
_cg->throwSyntaxError(ast->identifierToken, QStringLiteral("Function name may not be eval or arguments in strict mode"));
enterFunction(ast, ast->name.toString(), ast->formals, ast->body, enterName ? ast : 0, isExpression);
}
@@ -281,7 +308,7 @@ bool Codegen::ScanFunctions::visit(ObjectLiteral *ast)
if (AST::cast<AST::PropertyGetterSetter *>(it->assignment))
++argc;
}
- _env->maxNumberOfArguments = qMax(_env->maxNumberOfArguments, argc);
+ _variableEnvironment->maxNumberOfArguments = qMax(_variableEnvironment->maxNumberOfArguments, argc);
TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, true);
Node::accept(ast->properties, this);
@@ -313,7 +340,7 @@ void Codegen::ScanFunctions::endVisit(FunctionDeclaration *)
bool Codegen::ScanFunctions::visit(WithStatement *ast)
{
- if (_env->isStrict) {
+ if (_variableEnvironment->isStrict) {
_cg->throwSyntaxError(ast->withToken, QStringLiteral("'with' statement is not allowed in strict mode"));
return false;
}
@@ -323,7 +350,7 @@ bool Codegen::ScanFunctions::visit(WithStatement *ast)
bool Codegen::ScanFunctions::visit(DoWhileStatement *ast) {
{
- TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_env->isStrict);
+ TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_variableEnvironment->isStrict);
Node::accept(ast->statement, this);
}
Node::accept(ast->expression, this);
@@ -335,7 +362,7 @@ bool Codegen::ScanFunctions::visit(ForStatement *ast) {
Node::accept(ast->condition, this);
Node::accept(ast->expression, this);
- TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_env->isStrict);
+ TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_variableEnvironment->isStrict);
Node::accept(ast->statement, this);
return false;
@@ -346,7 +373,7 @@ bool Codegen::ScanFunctions::visit(LocalForStatement *ast) {
Node::accept(ast->condition, this);
Node::accept(ast->expression, this);
- TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_env->isStrict);
+ TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_variableEnvironment->isStrict);
Node::accept(ast->statement, this);
return false;
@@ -356,7 +383,7 @@ bool Codegen::ScanFunctions::visit(ForEachStatement *ast) {
Node::accept(ast->initialiser, this);
Node::accept(ast->expression, this);
- TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_env->isStrict);
+ TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_variableEnvironment->isStrict);
Node::accept(ast->statement, this);
return false;
@@ -366,7 +393,7 @@ bool Codegen::ScanFunctions::visit(LocalForEachStatement *ast) {
Node::accept(ast->declaration, this);
Node::accept(ast->expression, this);
- TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_env->isStrict);
+ TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_variableEnvironment->isStrict);
Node::accept(ast->statement, this);
return false;
@@ -374,12 +401,12 @@ bool Codegen::ScanFunctions::visit(LocalForEachStatement *ast) {
bool Codegen::ScanFunctions::visit(ThisExpression *)
{
- _env->usesThis = true;
+ _variableEnvironment->usesThis = true;
return false;
}
bool Codegen::ScanFunctions::visit(Block *ast) {
- TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, _env->isStrict ? false : _allowFuncDecls);
+ TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, _variableEnvironment->isStrict ? false : _allowFuncDecls);
Node::accept(ast->statements, this);
return false;
}
@@ -387,26 +414,26 @@ bool Codegen::ScanFunctions::visit(Block *ast) {
void Codegen::ScanFunctions::enterFunction(Node *ast, const QString &name, FormalParameterList *formals, FunctionBody *body, FunctionExpression *expr, bool isExpression)
{
bool wasStrict = false;
- if (_env) {
- _env->hasNestedFunctions = true;
+ if (_variableEnvironment) {
+ _variableEnvironment->hasNestedFunctions = true;
// The identifier of a function expression cannot be referenced from the enclosing environment.
if (expr)
- _env->enter(name, Environment::FunctionDefinition, expr);
+ _variableEnvironment->enter(name, Environment::FunctionDefinition, AST::VariableDeclaration::FunctionScope, expr);
if (name == QLatin1String("arguments"))
- _env->usesArgumentsObject = Environment::ArgumentsObjectNotUsed;
- wasStrict = _env->isStrict;
+ _variableEnvironment->usesArgumentsObject = Environment::ArgumentsObjectNotUsed;
+ wasStrict = _variableEnvironment->isStrict;
}
enterEnvironment(ast, FunctionCode);
checkForArguments(formals);
- _env->isNamedFunctionExpression = isExpression && !name.isEmpty();
- _env->formals = formals;
+ _variableEnvironment->isNamedFunctionExpression = isExpression && !name.isEmpty();
+ _variableEnvironment->formals = formals;
if (body)
checkDirectivePrologue(body->elements);
- if (wasStrict || _env->isStrict) {
+ if (wasStrict || _variableEnvironment->isStrict) {
QStringList args;
for (FormalParameterList *it = formals; it; it = it->next) {
QString arg = it->name.toString();
@@ -430,7 +457,7 @@ Codegen::Codegen(bool strict)
, _block(0)
, _exitBlock(0)
, _returnAddress(0)
- , _env(0)
+ , _variableEnvironment(0)
, _loop(0)
, _labelledStatement(0)
, _scopeAndFinally(0)
@@ -450,7 +477,7 @@ void Codegen::generateFromProgram(const QString &fileName,
Q_ASSERT(node);
_module = module;
- _env = 0;
+ _variableEnvironment = 0;
_module->setFileName(fileName);
@@ -469,7 +496,7 @@ void Codegen::generateFromFunctionExpression(const QString &fileName,
{
_module = module;
_module->setFileName(fileName);
- _env = 0;
+ _variableEnvironment = 0;
ScanFunctions scan(this, sourceCode, GlobalCode);
// fake a global environment
@@ -486,14 +513,14 @@ void Codegen::generateFromFunctionExpression(const QString &fileName,
void Codegen::enterEnvironment(Node *node)
{
- _env = _envMap.value(node);
- Q_ASSERT(_env);
+ _variableEnvironment = _envMap.value(node);
+ Q_ASSERT(_variableEnvironment);
}
void Codegen::leaveEnvironment()
{
- Q_ASSERT(_env);
- _env = _env->parent;
+ Q_ASSERT(_variableEnvironment);
+ _variableEnvironment = _variableEnvironment->parent;
}
void Codegen::enterLoop(Statement *node, IR::BasicBlock *breakBlock, IR::BasicBlock *continueBlock)
@@ -719,7 +746,7 @@ IR::Stmt *Codegen::cjump(IR::Expr *cond, IR::BasicBlock *iftrue, IR::BasicBlock
if (hasError)
return 0;
- if (! (cond->asTemp() || cond->asBinop())) {
+ if (! (cond->asTemp() || (cond->asBinop() && cjumpCanHandle(cond->asBinop()->op)) )) {
const unsigned t = _block->newTemp();
move(_block->TEMP(t), cond);
cond = _block->TEMP(t);
@@ -1285,14 +1312,7 @@ bool Codegen::visit(BinaryExpression *ast)
if (_expr.accept(cx)) {
setLocation(cjump(binop(IR::binaryOperator(ast->op), left, *right, ast->operatorToken), _expr.iftrue, _expr.iffalse), ast->operatorToken);
} else {
- IR::Expr *e = binop(IR::binaryOperator(ast->op), left, *right, ast->operatorToken);
- if (e->asConst() || e->asString())
- _expr.code = e;
- else {
- const unsigned t = _block->newTemp();
- setLocation(move(_block->TEMP(t), e), ast->operatorToken);
- _expr.code = _block->TEMP(t);
- }
+ _expr.code = binop(IR::binaryOperator(ast->op), left, *right, ast->operatorToken);
}
break;
}
@@ -1318,14 +1338,7 @@ bool Codegen::visit(BinaryExpression *ast)
if (hasError)
return false;
- IR::Expr *e = binop(IR::binaryOperator(ast->op), left, *right, ast->operatorToken);
- if (e->asConst() || e->asString())
- _expr.code = e;
- else {
- const unsigned t = _block->newTemp();
- setLocation(move(_block->TEMP(t), e), ast->operatorToken);
- _expr.code = _block->TEMP(t);
- }
+ _expr.code = binop(IR::binaryOperator(ast->op), left, *right, ast->operatorToken);
break;
}
@@ -1400,7 +1413,7 @@ bool Codegen::visit(DeleteExpression *ast)
return false;
// Temporaries cannot be deleted
IR::ArgLocal *al = expr->asArgLocal();
- if (al && al->index < static_cast<unsigned>(_env->members.size())) {
+ if (al && al->index < static_cast<unsigned>(_variableEnvironment->members.size())) {
// Trying to delete a function argument might throw.
if (_function->isStrict) {
throwSyntaxError(ast->deleteToken, QStringLiteral("Delete of an unqualified identifier in strict mode."));
@@ -1429,7 +1442,7 @@ bool Codegen::visit(DeleteExpression *ast)
}
if (expr->asTemp() ||
(expr->asArgLocal() &&
- expr->asArgLocal()->index >= static_cast<unsigned>(_env->members.size()))) {
+ expr->asArgLocal()->index >= static_cast<unsigned>(_variableEnvironment->members.size()))) {
_expr.code = _block->CONST(IR::BoolType, 1);
return false;
}
@@ -1480,7 +1493,7 @@ IR::Expr *Codegen::identifier(const QString &name, int line, int col)
return 0;
uint scope = 0;
- Environment *e = _env;
+ Environment *e = _variableEnvironment;
IR::Function *f = _function;
while (f && e->parent) {
@@ -1511,7 +1524,7 @@ IR::Expr *Codegen::identifier(const QString &name, int line, int col)
if (IR::Expr *fallback = fallbackNameLookup(name, line, col))
return fallback;
- if (!e->parent && (!f || !f->insideWithOrCatch) && _env->compilationMode != EvalCode && e->compilationMode != QmlBinding)
+ if (!e->parent && (!f || !f->insideWithOrCatch) && _variableEnvironment->compilationMode != EvalCode && e->compilationMode != QmlBinding)
return _block->GLOBALNAME(name, line, col);
// global context or with. Lookup by name
@@ -2006,7 +2019,7 @@ bool Codegen::visit(FunctionDeclaration * ast)
if (hasError)
return false;
- if (_env->compilationMode == QmlBinding)
+ if (_variableEnvironment->compilationMode == QmlBinding)
move(_block->TEMP(_returnAddress), _block->NAME(ast->name.toString(), 0, 0));
_expr.accept(nx);
return false;
@@ -2030,26 +2043,26 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
IR::BasicBlock *entryBlock = function->newBasicBlock(0);
IR::BasicBlock *exitBlock = function->newBasicBlock(0, IR::Function::DontInsertBlock);
- function->hasDirectEval = _env->hasDirectEval || _env->compilationMode == EvalCode
+ function->hasDirectEval = _variableEnvironment->hasDirectEval || _variableEnvironment->compilationMode == EvalCode
|| _module->debugMode; // Conditional breakpoints are like eval in the function
- function->usesArgumentsObject = _env->parent && (_env->usesArgumentsObject == Environment::ArgumentsObjectUsed);
- function->usesThis = _env->usesThis;
- function->maxNumberOfArguments = qMax(_env->maxNumberOfArguments, (int)QV4::Global::ReservedArgumentCount);
- function->isStrict = _env->isStrict;
- function->isNamedExpression = _env->isNamedFunctionExpression;
- function->isQmlBinding = _env->compilationMode == QmlBinding;
+ function->usesArgumentsObject = _variableEnvironment->parent && (_variableEnvironment->usesArgumentsObject == Environment::ArgumentsObjectUsed);
+ function->usesThis = _variableEnvironment->usesThis;
+ function->maxNumberOfArguments = qMax(_variableEnvironment->maxNumberOfArguments, (int)QV4::Global::ReservedArgumentCount);
+ function->isStrict = _variableEnvironment->isStrict;
+ function->isNamedExpression = _variableEnvironment->isNamedFunctionExpression;
+ function->isQmlBinding = _variableEnvironment->compilationMode == QmlBinding;
AST::SourceLocation loc = ast->firstSourceLocation();
function->line = loc.startLine;
function->column = loc.startColumn;
if (function->usesArgumentsObject)
- _env->enter(QStringLiteral("arguments"), Environment::VariableDeclaration);
+ _variableEnvironment->enter(QStringLiteral("arguments"), Environment::VariableDeclaration, AST::VariableDeclaration::FunctionScope);
// variables in global code are properties of the global context object, not locals as with other functions.
- if (_env->compilationMode == FunctionCode || _env->compilationMode == QmlBinding) {
+ if (_variableEnvironment->compilationMode == FunctionCode || _variableEnvironment->compilationMode == QmlBinding) {
unsigned t = 0;
- for (Environment::MemberMap::iterator it = _env->members.begin(), end = _env->members.end(); it != end; ++it) {
+ for (Environment::MemberMap::iterator it = _variableEnvironment->members.begin(), end = _variableEnvironment->members.end(); it != end; ++it) {
const QString &local = it.key();
function->LOCAL(local);
(*it).index = t;
@@ -2057,18 +2070,19 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
++t;
}
} else {
- if (!_env->isStrict) {
+ if (!_variableEnvironment->isStrict) {
for (const QString &inheritedLocal : qAsConst(inheritedLocals)) {
function->LOCAL(inheritedLocal);
unsigned tempIndex = entryBlock->newTemp();
Environment::Member member = { Environment::UndefinedMember,
- static_cast<int>(tempIndex), 0 };
- _env->members.insert(inheritedLocal, member);
+ static_cast<int>(tempIndex), 0,
+ AST::VariableDeclaration::VariableScope::FunctionScope };
+ _variableEnvironment->members.insert(inheritedLocal, member);
}
}
IR::ExprList *args = 0;
- for (Environment::MemberMap::const_iterator it = _env->members.constBegin(), cend = _env->members.constEnd(); it != cend; ++it) {
+ for (Environment::MemberMap::const_iterator it = _variableEnvironment->members.constBegin(), cend = _variableEnvironment->members.constEnd(); it != cend; ++it) {
const QString &local = it.key();
IR::ExprList *next = function->New<IR::ExprList>();
next->expr = entryBlock->NAME(local, 0, 0);
@@ -2100,11 +2114,11 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
_function->RECEIVE(it->name.toString());
}
- for (const Environment::Member &member : qAsConst(_env->members)) {
+ for (const Environment::Member &member : qAsConst(_variableEnvironment->members)) {
if (member.function) {
const int function = defineFunction(member.function->name.toString(), member.function, member.function->formals,
member.function->body ? member.function->body->elements : 0);
- if (! _env->parent) {
+ if (! _variableEnvironment->parent) {
move(_block->NAME(member.function->name.toString(), member.function->identifierToken.startLine, member.function->identifierToken.startColumn),
_block->CLOSURE(function));
} else {
@@ -2280,7 +2294,7 @@ bool Codegen::visit(ExpressionStatement *ast)
if (hasError)
return true;
- if (_env->compilationMode == EvalCode || _env->compilationMode == QmlBinding) {
+ if (_variableEnvironment->compilationMode == EvalCode || _variableEnvironment->compilationMode == QmlBinding) {
Result e = expression(ast->expression);
if (*e)
move(_block->TEMP(_returnAddress), *e);
@@ -2516,7 +2530,7 @@ bool Codegen::visit(ReturnStatement *ast)
if (hasError)
return true;
- if (_env->compilationMode != FunctionCode && _env->compilationMode != QmlBinding) {
+ if (_variableEnvironment->compilationMode != FunctionCode && _variableEnvironment->compilationMode != QmlBinding) {
throwSyntaxError(ast->returnToken, QStringLiteral("Return statement outside of function"));
return false;
}
@@ -2894,7 +2908,7 @@ bool Codegen::visit(UiSourceElement *)
bool Codegen::throwSyntaxErrorOnEvalOrArgumentsInStrictMode(IR::Expr *expr, const SourceLocation& loc)
{
- if (!_env->isStrict)
+ if (!_variableEnvironment->isStrict)
return false;
if (IR::Name *n = expr->asName()) {
if (*n->id != QLatin1String("eval") && *n->id != QLatin1String("arguments"))
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index 742ee79648..239ed5c4b9 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -141,10 +141,14 @@ protected:
VariableDeclaration,
FunctionDefinition
};
+
struct Member {
MemberType type;
int index;
AST::FunctionExpression *function;
+ AST::VariableDeclaration::VariableScope scope;
+
+ bool isLexicallyScoped() const { return this->scope != AST::VariableDeclaration::FunctionScope; }
};
typedef QMap<QString, Member> MemberMap;
@@ -191,6 +195,18 @@ protected:
return (*it).index;
}
+ bool memberInfo(const QString &name, const Member **m) const
+ {
+ Q_ASSERT(m);
+ MemberMap::const_iterator it = members.find(name);
+ if (it == members.end()) {
+ *m = 0;
+ return false;
+ }
+ *m = &(*it);
+ return true;
+ }
+
bool lookupMember(const QString &name, Environment **scope, int *index, int *distance)
{
Environment *it = this;
@@ -206,7 +222,7 @@ protected:
return false;
}
- void enter(const QString &name, MemberType type, AST::FunctionExpression *function = 0)
+ void enter(const QString &name, MemberType type, AST::VariableDeclaration::VariableScope scope, AST::FunctionExpression *function = 0)
{
if (! name.isEmpty()) {
if (type != FunctionDefinition) {
@@ -220,8 +236,10 @@ protected:
m.index = -1;
m.type = type;
m.function = function;
+ m.scope = scope;
members.insert(name, m);
} else {
+ Q_ASSERT(scope == (*it).scope);
if ((*it).type <= type) {
(*it).type = type;
(*it).function = function;
@@ -448,7 +466,7 @@ protected:
QV4::IR::BasicBlock *_block;
QV4::IR::BasicBlock *_exitBlock;
unsigned _returnAddress;
- Environment *_env;
+ Environment *_variableEnvironment;
Loop *_loop;
AST::LabelledStatement *_labelledStatement;
ScopeAndFinally *_scopeAndFinally;
@@ -526,7 +544,7 @@ protected:
// fields:
Codegen *_cg;
const QString _sourceCode;
- Environment *_env;
+ Environment *_variableEnvironment;
QStack<Environment *> _envStack;
bool _allowFuncDecls;
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 8f8d374e24..a8f065210b 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -427,6 +427,7 @@ bool CompilationUnit::saveToDisk(const QUrl &unitUrl, QString *errorString)
}
#endif
+#if QT_CONFIG(temporaryfile)
// Foo.qml -> Foo.qmlc
QSaveFile cacheFile(cacheFilePath(unitUrl));
if (!cacheFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
@@ -459,6 +460,10 @@ bool CompilationUnit::saveToDisk(const QUrl &unitUrl, QString *errorString)
}
return true;
+#else
+ *errorString = QStringLiteral("features.temporaryfile is disabled.");
+ return false;
+#endif // QT_CONFIG(temporaryfile)
}
void CompilationUnit::prepareCodeOffsetsForDiskStorage(Unit *unit)
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp
index cd822a2614..9cfac4a676 100644
--- a/src/qml/compiler/qv4compiler.cpp
+++ b/src/qml/compiler/qv4compiler.cpp
@@ -220,7 +220,7 @@ QV4::CompiledData::Unit *QV4::Compiler::JSUnitGenerator::generateUnit(GeneratorO
registerString(*f->locals.at(i));
}
- CompiledData::LEUInt32 *functionOffsets = reinterpret_cast<CompiledData::LEUInt32*>(alloca(irModule->functions.size() * sizeof(CompiledData::LEUInt32)));
+ Q_ALLOCA_VAR(CompiledData::LEUInt32, functionOffsets, irModule->functions.size() * sizeof(CompiledData::LEUInt32));
uint jsClassDataOffset = 0;
char *dataPtr;
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index 04bc3d86e5..23ebe0c962 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -507,6 +507,16 @@ struct Q_AUTOTEST_EXPORT Temp: Expr {
, memberResolver(0)
{}
+ Temp(Type type, Kind kind, unsigned index)
+ : Expr(TempExpr)
+ , index(index)
+ , isReadOnly(0)
+ , kind(kind)
+ , memberResolver(0)
+ {
+ this->type = type;
+ }
+
void init(unsigned kind, unsigned index)
{
this->index = index;
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 10f0bbcf8f..cc542e94e7 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -3581,16 +3581,43 @@ public:
, _replacement(0)
{}
- void operator()(Temp *toReplace, Expr *replacement, StatementWorklist &W, QVector<Stmt *> *newUses = 0)
+ bool operator()(Temp *toReplace, Expr *replacement, StatementWorklist &W, QVector<Stmt *> *newUses = 0)
{
Q_ASSERT(replacement->asTemp() || replacement->asConst() || replacement->asName());
-// qout << "Replacing ";toReplace->dump(qout);qout<<" by ";replacement->dump(qout);qout<<endl;
-
qSwap(_toReplace, toReplace);
qSwap(_replacement, replacement);
const QVector<Stmt *> &uses = _defUses.uses(*_toReplace);
+
+ // Prevent the following:
+ // L3:
+ // %1 = phi L1: %2, L2: %3
+ // %4 = phi L1: %5, L2: %6
+ // %6 = %1
+ // From turning into:
+ // L3:
+ // %1 = phi L1: %2, L2: %3
+ // %4 = phi L1: %5, L2: %1
+ //
+ // Because both phi nodes are "executed in parallel", we cannot replace %6 by %1 in the
+ // second phi node. So, if the defining statement for a temp is a phi node, and one of the
+ // uses of the to-be-replaced statement is a phi node in the same block as the defining
+ // statement, bail out.
+ if (Temp *r = _replacement->asTemp()) {
+ if (_defUses.defStmt(*r)->asPhi()) {
+ BasicBlock *replacementDefBlock = _defUses.defStmtBlock(*r);
+ for (Stmt *use : uses) {
+ if (Phi *usePhi = use->asPhi()) {
+ if (_defUses.defStmtBlock(*usePhi->targetTemp) == replacementDefBlock)
+ return false;
+ }
+ }
+ }
+ }
+
+// qout << "Replacing ";toReplace->dump(qout);qout<<" by ";replacement->dump(qout);qout<<endl;
+
if (newUses)
newUses->reserve(uses.size());
@@ -3606,6 +3633,7 @@ public:
qSwap(_replacement, replacement);
qSwap(_toReplace, toReplace);
+ return true;
}
private:
@@ -4082,11 +4110,12 @@ void optimizeSSA(StatementWorklist &W, DefUses &defUses, DominatorTree &df)
// copy propagation:
if (Temp *sourceTemp = m->source->asTemp()) {
QVector<Stmt *> newT2Uses;
- replaceUses(targetTemp, sourceTemp, W, &newT2Uses);
- defUses.removeUse(s, *sourceTemp);
- defUses.addUses(*sourceTemp, newT2Uses);
- defUses.removeDef(*targetTemp);
- W.remove(s);
+ if (replaceUses(targetTemp, sourceTemp, W, &newT2Uses)) {
+ defUses.removeUse(s, *sourceTemp);
+ defUses.addUses(*sourceTemp, newT2Uses);
+ defUses.removeDef(*targetTemp);
+ W.remove(s);
+ }
continue;
}
@@ -5635,25 +5664,97 @@ void MoveMapping::add(Expr *from, Temp *to) {
_moves.append(m);
}
+// Order the moves that are generated when resolving edges during register allocation (see [Wimmer1]
+// section 6 for details). Now these moves form one or more graphs, so we have to output them in
+// such an order that values don't get overwritten:
+// r1 <- r0
+// r2 <- r1
+// That input has to be ordered as follows in order to prevent the value in r1 from being lost:
+// r2 <- r1
+// r1 <- r0
+//
+// So, the algorithm is to output the leaves first, and take them out of the input. This will result
+// in some moves to become leaves (in the above example: when leaf r2 <- r1 is generated and taken
+// away, the r1 <- r0 is now a leaf), so we can output those and take those out, and repeat until
+// there are no more leafs.
+//
+// The tricky part is that there might be cycles:
+// r4 <- r5
+// r5 <- r4
+// These have to be turned into a "register swap":
+// r4 <=> r5
+//
+// So after running the above algorithm where we progressively remove the leaves, we are left with
+// zero or more cycles. To resolve those, we break one of the edges of the cycle, and for all other
+// edges we generate swaps. Note that the swaps will always occur as the last couple of moves,
+// because otherwise they might clobber sources for moves:
+// r4 <=> r5
+// r6 <- r5
+// Here, the value of r5 is already overwritten with the one in r4, so the correct order is:
+// r6 <- r5
+// r4 <=> r5
void MoveMapping::order()
{
- QList<Move> todo = _moves;
- QList<Move> output, swaps;
+ QList<Move> output;
output.reserve(_moves.size());
- QList<Move> delayed;
- delayed.reserve(_moves.size());
- while (!todo.isEmpty()) {
- const Move m = todo.first();
- todo.removeFirst();
- schedule(m, todo, delayed, output, swaps);
- }
+ while (!_moves.isEmpty()) {
+ // Take out all leaf edges, because we can output them without any problems.
+ int nextLeaf = findLeaf();
+ if (nextLeaf == -1)
+ break; // No more leafs left, we're done here.
+ output.append(_moves.takeAt(nextLeaf));
+ // Now there might be new leaf edges: any move that had the input of the previously found
+ // leaf as an output, so loop around.
+ }
+
+ while (!_moves.isEmpty()) {
+ // We're now left with one or more cycles.
+ // Step one: break the/a cycle.
+ _moves.removeFirst();
+ // Step two: find the other edges of the cycle, starting with the one of that is now a leaf.
+ while (!_moves.isEmpty()) {
+ int nextLeaf = findLeaf();
+ if (nextLeaf == -1)
+ break; // We're done with this cycle.
+ Move m = _moves.takeAt(nextLeaf);
+ // Step three: get the edges from the cycle and turn it into a swap
+ m.needsSwap = true;
+ output.append(m);
+ // Because we took out a leaf, find the next one.
+ }
+ // We're done with the cycle, let's see if there are more.
+ }
+
+ _moves = output;
+}
+
+int MoveMapping::findLeaf() const
+{
+ for (int i = 0, e = _moves.size(); i != e; ++i) {
+ // Take an edge from the list...
+ const Temp *target = _moves.at(i).to;
+ // ... and see if its target is used as a source...
+ bool targetUsedAsSource = false;
+ for (int j = 0; j != e; ++j) {
+ if (i == j)
+ continue;
- output += swaps;
+ Expr *source = _moves.at(j).from;
+ if (const Temp *sourceTemp = source->asTemp()) {
+ if (overlappingStorage(*target, *sourceTemp)) {
+ targetUsedAsSource = true;
+ break;
+ }
+ }
+ }
+ // ... if not, we have a leaf edge ...
+ if (!targetUsedAsSource)
+ return i;
+ // .. otherwise we try the next one.
+ }
- Q_ASSERT(todo.isEmpty());
- Q_ASSERT(delayed.isEmpty());
- qSwap(_moves, output);
+ return -1; // No leaf found
}
QList<IR::Move *> MoveMapping::insertMoves(BasicBlock *bb, IR::Function *function, bool atEnd) const
@@ -5695,60 +5796,12 @@ void MoveMapping::dump() const
}
}
-MoveMapping::Action MoveMapping::schedule(const Move &m, QList<Move> &todo, QList<Move> &delayed,
- QList<Move> &output, QList<Move> &swaps) const
-{
- const Moves usages = sourceUsages(m.to, todo) + sourceUsages(m.to, delayed);
- for (const Move &dependency : usages) {
- if (!output.contains(dependency)) {
- if (delayed.contains(dependency)) {
- // We have a cycle! Break it by swapping instead of assigning.
- if (DebugMoveMapping) {
- delayed += m;
- QBuffer buf;
- buf.open(QIODevice::WriteOnly);
- QTextStream out(&buf);
- IRPrinter printer(&out);
- out<<"we have a cycle! temps:" << endl;
- for (const Move &m : qAsConst(delayed)) {
- out<<"\t";
- printer.print(m.to);
- out<<" <- ";
- printer.print(m.from);
- out<<endl;
- }
- qDebug("%s", buf.data().constData());
- delayed.removeOne(m);
- }
-
- return NeedsSwap;
- } else {
- delayed.append(m);
- todo.removeOne(dependency);
- Action action = schedule(dependency, todo, delayed, output, swaps);
- delayed.removeOne(m);
- Move mm(m);
- if (action == NeedsSwap) {
- mm.needsSwap = true;
- swaps.append(mm);
- } else {
- output.append(mm);
- }
- return action;
- }
- }
- }
-
- output.append(m);
- return NormalMove;
-}
-
// References:
// [Wimmer1] C. Wimmer and M. Franz. Linear Scan Register Allocation on SSA Form. In Proceedings of
-// CGO’10, ACM Press, 2010
+// CGO'10, ACM Press, 2010
// [Wimmer2] C. Wimmer and H. Mossenbock. Optimized Interval Splitting in a Linear Scan Register
// Allocator. In Proceedings of the ACM/USENIX International Conference on Virtual
-// Execution Environments, pages 132–141. ACM Press, 2005.
+// Execution Environments, pages 132-141. ACM Press, 2005.
// [Briggs] P. Briggs, K.D. Cooper, T.J. Harvey, and L.T. Simpson. Practical Improvements to the
// Construction and Destruction of Static Single Assignment Form.
// [Appel] A.W. Appel. Modern Compiler Implementation in Java. Second edition, Cambridge
diff --git a/src/qml/compiler/qv4ssa_p.h b/src/qml/compiler/qv4ssa_p.h
index c07abd04c4..24257e99e9 100644
--- a/src/qml/compiler/qv4ssa_p.h
+++ b/src/qml/compiler/qv4ssa_p.h
@@ -265,15 +265,18 @@ private:
QHash<BasicBlock *, BasicBlock *> startEndLoops;
};
-class MoveMapping
+class Q_AUTOTEST_EXPORT MoveMapping
{
+#ifdef V4_AUTOTEST
+public:
+#endif
struct Move {
Expr *from;
Temp *to;
bool needsSwap;
- Move(Expr *from, Temp *to)
- : from(from), to(to), needsSwap(false)
+ Move(Expr *from, Temp *to, bool needsSwap = false)
+ : from(from), to(to), needsSwap(needsSwap)
{}
bool operator==(const Move &other) const
@@ -293,9 +296,7 @@ public:
void dump() const;
private:
- enum Action { NormalMove, NeedsSwap };
- Action schedule(const Move &m, QList<Move> &todo, QList<Move> &delayed, QList<Move> &output,
- QList<Move> &swaps) const;
+ int findLeaf() const;
};
/*
diff --git a/src/qml/debugger/qqmldebugserviceinterfaces_p.h b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
index 2fe3a588c3..707ef1a937 100644
--- a/src/qml/debugger/qqmldebugserviceinterfaces_p.h
+++ b/src/qml/debugger/qqmldebugserviceinterfaces_p.h
@@ -67,13 +67,15 @@ class QQuickWindow;
#ifdef QT_NO_QML_DEBUGGER
-struct QV4DebugService
+class QV4DebugService
{
+public:
void signalEmitted(const QString &) {}
};
-struct QQmlProfilerService
+class QQmlProfilerService
{
+public:
void startProfiling(QJSEngine *engine, quint64 features = std::numeric_limits<quint64>::max())
{
Q_UNUSED(engine);
@@ -83,21 +85,23 @@ struct QQmlProfilerService
void stopProfiling(QJSEngine *) {}
};
-struct QQmlEngineDebugService
+class QQmlEngineDebugService
{
+public:
void objectCreated(QJSEngine *, QObject *) {}
virtual void setStatesDelegate(QQmlDebugStatesDelegate *) {}
};
-struct QQmlInspectorService {
+class QQmlInspectorService {
+public:
void addWindow(QQuickWindow *) {}
void setParentWindow(QQuickWindow *, QWindow *) {}
void removeWindow(QQuickWindow *) {}
};
-struct QDebugMessageService {};
-struct QQmlEngineControlService {};
-struct QQmlNativeDebugService {};
+class QDebugMessageService {};
+class QQmlEngineControlService {};
+class QQmlNativeDebugService {};
#else
diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h
index 41fb2c5b7b..88f8e94f25 100644
--- a/src/qml/debugger/qqmlprofiler_p.h
+++ b/src/qml/debugger/qqmlprofiler_p.h
@@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE
#define Q_QML_PROFILE(feature, profiler, Method)
#define Q_QML_OC_PROFILE(member, Code)
-struct QQmlProfiler {};
+class QQmlProfiler {};
struct QQmlBindingProfiler
{
diff --git a/src/qml/doc/src/cppintegration/data.qdoc b/src/qml/doc/src/cppintegration/data.qdoc
index ac6600f38c..4523ee39d8 100644
--- a/src/qml/doc/src/cppintegration/data.qdoc
+++ b/src/qml/doc/src/cppintegration/data.qdoc
@@ -167,9 +167,9 @@ additional features. See the \l {qtqml-javascript-hostenvironment.html}
The QML engine provides automatic type conversion between QVariantList and
JavaScript arrays, and between QVariantMap and JavaScript objects.
-For example, the function defined in QML below left expects two arguments, an
+For example, the function defined in QML below expects two arguments, an
array and an object, and prints their contents using the standard JavaScript
-syntax for array and object item access. The C++ code below right calls this
+syntax for array and object item access. The C++ code below calls this
function, passing a QVariantList and a QVariantMap, which are automatically
converted to JavaScript array and object values, repectively:
@@ -204,9 +204,9 @@ when it is passed to C++.
The QML engine provides automatic type conversion between QDateTime values and
JavaScript \c Date objects.
-For example, the function defined in QML below left expects a JavaScript
+For example, the function defined in QML below expects a JavaScript
\c Date object, and also returns a new \c Date object with the current date and
-time. The C++ code below right calls this function, passing a QDateTime value
+time. The C++ code below calls this function, passing a QDateTime value
that is automatically converted by the engine into a \c Date object when it is
passed to the \c readDate() function. In turn, the readDate() function returns
a \c Date object that is automatically converted into a QDateTime value when it
@@ -215,7 +215,7 @@ is received in C++:
\table
\header
\row
-
+\li QML
\li
\qml
// MyItem.qml
@@ -227,6 +227,7 @@ Item {
}
\endqml
\row
+\li C++
\li
\code
// C++
diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc
index e06451b2bc..7d4a543089 100644
--- a/src/qml/doc/src/cppintegration/definetypes.qdoc
+++ b/src/qml/doc/src/cppintegration/definetypes.qdoc
@@ -282,6 +282,9 @@ int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor)
template<typename T, int metaObjectRevision>
int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason)
+
+template<typename T, typename E, int metaObjectRevision>
+int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason)
\endcode
For example, if \c BaseType is changed and now has a revision 1, you can
diff --git a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
index ed0d049564..3bffd2eb6f 100644
--- a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
+++ b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
@@ -390,8 +390,8 @@ that is a public slot:
\endcode
If an instance of \c MessageBoard was set as the context data for a file \c
-MyItem.qml, as shown below left, then \c MyItem.qml could invoke the two
-methods, as shown below right:
+MyItem.qml, then \c MyItem.qml could invoke the two methods as shown in the
+examples below:
\table
\row
diff --git a/src/qml/doc/src/cppintegration/topic.qdoc b/src/qml/doc/src/cppintegration/topic.qdoc
index a349fd0713..1aa3bb6ab5 100644
--- a/src/qml/doc/src/cppintegration/topic.qdoc
+++ b/src/qml/doc/src/cppintegration/topic.qdoc
@@ -30,7 +30,7 @@
\brief Description of how to integrate QML and C++ code
QML is designed to be easily extensible through C++ code. The classes in the \l {Qt QML} module
-enables QML objects to be loaded and manipulated from C++, and the nature of QML engine's
+enable QML objects to be loaded and manipulated from C++, and the nature of QML engine's
integration with Qt's \l{Meta Object System}{meta object system} enables C++ functionality to be
invoked directly from QML. This allows the development of hybrid applications which are implemented
with a mixture of QML, JavaScript and C++ code.
diff --git a/src/qml/doc/src/javascript/functionlist.qdoc b/src/qml/doc/src/javascript/functionlist.qdoc
index f5b1ed3cf1..fd916e1e24 100644
--- a/src/qml/doc/src/javascript/functionlist.qdoc
+++ b/src/qml/doc/src/javascript/functionlist.qdoc
@@ -182,6 +182,7 @@
\li lastIndexOf(searchString, position)
\li localeCompare(that)
\li match(regexp)
+ \li repeat(count) // ECMAScript 6: Added in Qt 5.9
\li replace(searchValue, replaceValue)
\li search(regexp)
\li slice(start, end)
diff --git a/src/qml/doc/src/javascript/imports.qdoc b/src/qml/doc/src/javascript/imports.qdoc
index d4ce25c92b..489da08ada 100644
--- a/src/qml/doc/src/javascript/imports.qdoc
+++ b/src/qml/doc/src/javascript/imports.qdoc
@@ -56,10 +56,10 @@ import "jsfile.js" as Logic
\endcode
Imported JavaScript resources are always qualified using the "as" keyword. The
-qualifier for JavaScript resources must be unique, so there is always a
-one-to-one mapping between qualifiers and JavaScript files. (This also means
-qualifiers cannot be named the same as built-in JavaScript objects such as
-\c Date and \c Math).
+qualifier for JavaScript resources must start with an uppercase letter, and must
+be unique, so there is always a one-to-one mapping between qualifiers and JavaScript
+files. (This also means qualifiers cannot be named the same as built-in JavaScript
+objects such as \c Date and \c Math).
The functions defined in an imported JavaScript file are available to objects
defined in the importing QML document, via the
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index a03c382ed5..834684fe6d 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -168,8 +168,9 @@
from \a uri having version number composed from \a versionMajor and
\a versionMinor.
- While the type has a name and a type, it cannot be created, and the
- given error \a reason will result if creation is attempted.
+ While the type has a name and a type, it cannot be created. An error
+ message with the given \a reason is printed if the user attempts to
+ create an instance of this type.
This is useful where the type is only intended for providing attached
properties, enum values or an abstract base class with its extension.
@@ -189,11 +190,14 @@
from \a uri having version number composed from \a versionMajor and
\a versionMinor.
- This function is useful to register Q_NAMESPACE namespaces.
+ An instance of the meta object cannot be created. An error message with
+ the given \a reason is printed if the user attempts to create it.
+
+ This function is useful for registering Q_NAMESPACE namespaces.
Returns the QML type id.
- Example:
+ For example:
\code
namespace MyNamespace {
@@ -209,7 +213,7 @@
qmlRegisterUncreatableMetaObject(MyNamespace::staticMetaObject, "io.qt", 1, 0, "MyNamespace", "Access to enums & flags only");
\endcode
- Now on QML side you can use the registered enums:
+ On the QML side, you can now use the registered enums:
\code
Component.onCompleted: console.log(MyNamespace.Key2)
\endcode
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
index 030eb72b5f..33f58dc1b9 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
@@ -630,7 +630,7 @@ a \l {MouseArea::}{clicked} signal that is emitted when the user clicks
within the mouse area.
An object can be notified through a \l{Signal handler attributes}
-{signal handler} whenever it a particular signal is emitted. A signal handler
+{signal handler} whenever a particular signal is emitted. A signal handler
is declared with the syntax \e on<Signal> where \e <Signal> is the name of the
signal, with the first letter capitalized. The signal handler must be declared
within the definition of the object that emits the signal, and the handler
diff --git a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
index ffbf2282a6..a486b47f03 100644
--- a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
@@ -324,6 +324,9 @@ property is only invoked when the property is reassigned to a different object v
\li Values in the list are accessed using the \c [index] syntax
\endlist
+ Values can be dynamically added to the list by using the \c push method,
+ as if it were a JavaScript Array
+
A \c list can only store QML objects, and cannot contain any
\l {QML Basic Types}{basic type} values. (To store basic types within a
list, use the \l var type instead.)
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp
index 646d9a8871..e658977da1 100644
--- a/src/qml/jit/qv4assembler.cpp
+++ b/src/qml/jit/qv4assembler.cpp
@@ -356,6 +356,8 @@ void Assembler<TargetConfiguration>::enterStandardStackFrame(const RegisterInfor
slotAddr.offset -= RegisterSize;
storePtr(regularRegistersToSave.at(i).reg<RegisterID>(), slotAddr);
}
+
+ platformFinishEnteringStandardStackFrame(this);
}
template <typename TargetConfiguration>
@@ -379,16 +381,7 @@ void Assembler<TargetConfiguration>::leaveStandardStackFrame(const RegisterInfor
Q_ASSERT(slotAddr.offset == 0);
const int frameSize = _stackLayout->calculateStackFrameSize();
- // Work around bug in ARMv7Assembler.h where add32(imm, sp, sp) doesn't
- // work well for large immediates.
-#if CPU(ARM_THUMB2)
- move(TrustedImm32(frameSize), JSC::ARMRegisters::r3);
- add32(JSC::ARMRegisters::r3, StackPointerRegister);
-#else
- addPtr(TrustedImm32(frameSize), StackPointerRegister);
-#endif
-
- platformLeaveStandardStackFrame(this);
+ platformLeaveStandardStackFrame(this, frameSize);
}
@@ -555,7 +548,7 @@ public:
~QIODevicePrintStream()
{}
- void vprintf(const char* format, va_list argList) WTF_ATTRIBUTE_PRINTF(2, 0)
+ void vprintf(const char* format, va_list argList) override WTF_ATTRIBUTE_PRINTF(2, 0)
{
const int written = qvsnprintf(buf.data(), buf.size(), format, argList);
if (written > 0)
@@ -563,7 +556,7 @@ public:
memset(buf.data(), 0, qMin(written, buf.size()));
}
- void flush()
+ void flush() override
{}
private:
@@ -709,8 +702,13 @@ JSC::MacroAssemblerCodeRef Assembler<TargetConfiguration>::link(int *codeSize)
}
template class QV4::JIT::Assembler<DefaultAssemblerTargetConfiguration>;
-#if defined(V4_BOOTSTRAP) && CPU(X86_64)
+#if defined(V4_BOOTSTRAP)
+#if !CPU(ARM_THUMB2)
template class QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization>>;
#endif
+#if !CPU(ARM64)
+template class QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARM64, NoOperatingSystemSpecialization>>;
+#endif
+#endif
#endif
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h
index 6d8d773ff0..720c522e1d 100644
--- a/src/qml/jit/qv4assembler_p.h
+++ b/src/qml/jit/qv4assembler_p.h
@@ -145,11 +145,13 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
using RegisterID = typename JITAssembler::RegisterID;
using FPRegisterID = typename JITAssembler::FPRegisterID;
using RelationalCondition = typename JITAssembler::RelationalCondition;
+ using ResultCondition = typename JITAssembler::ResultCondition;
using Address = typename JITAssembler::Address;
using Pointer = typename JITAssembler::Pointer;
using TrustedImm32 = typename JITAssembler::TrustedImm32;
using TrustedImm64 = typename JITAssembler::TrustedImm64;
using Jump = typename JITAssembler::Jump;
+ using Label = typename JITAssembler::Label;
static void loadDouble(JITAssembler *as, Address addr, FPRegisterID dest)
{
@@ -352,6 +354,19 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
return as->branch32(RelationalCondition::NotEqual, tagOrValueRegister,
TrustedImm32(Value::NotDouble_Mask));
}
+
+ static void initializeLocalVariables(JITAssembler *as, int localsCount)
+ {
+ as->move(TrustedImm32(0), TargetPlatform::ReturnValueRegister);
+ as->move(TrustedImm32(localsCount), TargetPlatform::ScratchRegister);
+ Label loop = as->label();
+ as->store32(TargetPlatform::ReturnValueRegister, Address(TargetPlatform::LocalsRegister));
+ as->add32(TrustedImm32(4), TargetPlatform::LocalsRegister);
+ as->store32(TargetPlatform::ReturnValueRegister, Address(TargetPlatform::LocalsRegister));
+ as->add32(TrustedImm32(4), TargetPlatform::LocalsRegister);
+ Jump jump = as->branchSub32(ResultCondition::NonZero, TrustedImm32(1), TargetPlatform::ScratchRegister);
+ jump.linkTo(loop, as);
+ }
};
template <typename JITAssembler, typename MacroAssembler, typename TargetPlatform>
@@ -364,38 +379,36 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
using TrustedImm64 = typename JITAssembler::TrustedImm64;
using Pointer = typename JITAssembler::Pointer;
using RelationalCondition = typename JITAssembler::RelationalCondition;
+ using ResultCondition = typename JITAssembler::ResultCondition;
using BranchTruncateType = typename JITAssembler::BranchTruncateType;
using Jump = typename JITAssembler::Jump;
+ using Label = typename JITAssembler::Label;
static void loadDouble(JITAssembler *as, Address addr, FPRegisterID dest)
{
as->load64(addr, TargetPlatform::ReturnValueRegister);
- as->move(TrustedImm64(QV4::Value::NaNEncodeMask), TargetPlatform::ScratchRegister);
- as->xor64(TargetPlatform::ScratchRegister, TargetPlatform::ReturnValueRegister);
+ as->xor64(TargetPlatform::DoubleMaskRegister, TargetPlatform::ReturnValueRegister);
as->move64ToDouble(TargetPlatform::ReturnValueRegister, dest);
}
static void storeDouble(JITAssembler *as, FPRegisterID source, Address addr)
{
as->moveDoubleTo64(source, TargetPlatform::ReturnValueRegister);
- as->move(TrustedImm64(QV4::Value::NaNEncodeMask), TargetPlatform::ScratchRegister);
- as->xor64(TargetPlatform::ScratchRegister, TargetPlatform::ReturnValueRegister);
+ as->xor64(TargetPlatform::DoubleMaskRegister, TargetPlatform::ReturnValueRegister);
as->store64(TargetPlatform::ReturnValueRegister, addr);
}
static void storeDouble(JITAssembler *as, FPRegisterID source, IR::Expr* target)
{
as->moveDoubleTo64(source, TargetPlatform::ReturnValueRegister);
- as->move(TrustedImm64(QV4::Value::NaNEncodeMask), TargetPlatform::ScratchRegister);
- as->xor64(TargetPlatform::ScratchRegister, TargetPlatform::ReturnValueRegister);
+ as->xor64(TargetPlatform::DoubleMaskRegister, TargetPlatform::ReturnValueRegister);
Pointer ptr = as->loadAddress(TargetPlatform::ScratchRegister, target);
as->store64(TargetPlatform::ReturnValueRegister, ptr);
}
static void storeReturnValue(JITAssembler *as, FPRegisterID dest)
{
- as->move(TrustedImm64(QV4::Value::NaNEncodeMask), TargetPlatform::ScratchRegister);
- as->xor64(TargetPlatform::ScratchRegister, TargetPlatform::ReturnValueRegister);
+ as->xor64(TargetPlatform::DoubleMaskRegister, TargetPlatform::ReturnValueRegister);
as->move64ToDouble(TargetPlatform::ReturnValueRegister, dest);
}
@@ -410,16 +423,13 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
if (t->type == IR::DoubleType) {
as->moveDoubleTo64((FPRegisterID) t->index,
TargetPlatform::ReturnValueRegister);
- as->move(TrustedImm64(QV4::Value::NaNEncodeMask),
- TargetPlatform::ScratchRegister);
- as->xor64(TargetPlatform::ScratchRegister, TargetPlatform::ReturnValueRegister);
+ as->xor64(TargetPlatform::DoubleMaskRegister, TargetPlatform::ReturnValueRegister);
} else if (t->type == IR::UInt32Type) {
RegisterID srcReg = (RegisterID) t->index;
Jump intRange = as->branch32(RelationalCondition::GreaterThanOrEqual, srcReg, TrustedImm32(0));
as->convertUInt32ToDouble(srcReg, TargetPlatform::FPGpr0, TargetPlatform::ReturnValueRegister);
as->moveDoubleTo64(TargetPlatform::FPGpr0, TargetPlatform::ReturnValueRegister);
- as->move(TrustedImm64(QV4::Value::NaNEncodeMask), TargetPlatform::ScratchRegister);
- as->xor64(TargetPlatform::ScratchRegister, TargetPlatform::ReturnValueRegister);
+ as->xor64(TargetPlatform::DoubleMaskRegister, TargetPlatform::ReturnValueRegister);
Jump done = as->jump();
intRange.link(as);
as->zeroExtend32ToPtr(srcReg, TargetPlatform::ReturnValueRegister);
@@ -464,7 +474,7 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
{
// Use ReturnValueRegister as "scratch" register because loadArgument
// and storeArgument are functions that may need a scratch register themselves.
- as->loadArgumentInRegister(source, TargetPlatform::ReturnValueRegister, 0);
+ loadArgumentInRegister(as, source, TargetPlatform::ReturnValueRegister, 0);
as->storeReturnValue(destination);
}
@@ -477,6 +487,12 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
as->move64ToDouble(TargetPlatform::ReturnValueRegister, target);
}
+ static void loadArgumentInRegister(JITAssembler *as, Address addressOfValue, RegisterID dest, int argumentNumber)
+ {
+ Q_UNUSED(argumentNumber);
+ as->load64(addressOfValue, dest);
+ }
+
static void loadArgumentInRegister(JITAssembler *as, IR::Temp* temp, RegisterID dest, int argumentNumber)
{
Q_UNUSED(argumentNumber);
@@ -588,8 +604,7 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
Jump fallback = as->branch32(RelationalCondition::GreaterThan, TargetPlatform::ScratchRegister, TrustedImm32(0));
// it's a double
- as->move(TrustedImm64(QV4::Value::NaNEncodeMask), TargetPlatform::ScratchRegister);
- as->xor64(TargetPlatform::ScratchRegister, TargetPlatform::ReturnValueRegister);
+ as->xor64(TargetPlatform::DoubleMaskRegister, TargetPlatform::ReturnValueRegister);
as->move64ToDouble(TargetPlatform::ReturnValueRegister, TargetPlatform::FPGpr0);
Jump success =
as->branchTruncateDoubleToInt32(TargetPlatform::FPGpr0, TargetPlatform::ReturnValueRegister,
@@ -625,6 +640,17 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
return as->branch32(RelationalCondition::NotEqual, tagOrValueRegister,
TrustedImm32(0));
}
+
+ static void initializeLocalVariables(JITAssembler *as, int localsCount)
+ {
+ as->move(TrustedImm64(0), TargetPlatform::ReturnValueRegister);
+ as->move(TrustedImm32(localsCount), TargetPlatform::ScratchRegister);
+ Label loop = as->label();
+ as->store64(TargetPlatform::ReturnValueRegister, Address(TargetPlatform::LocalsRegister));
+ as->add64(TrustedImm32(8), TargetPlatform::LocalsRegister);
+ Jump jump = as->branchSub32(ResultCondition::NonZero, TrustedImm32(1), TargetPlatform::ScratchRegister);
+ jump.linkTo(loop, as);
+ }
};
template <typename TargetConfiguration>
@@ -684,6 +710,7 @@ public:
using JITTargetPlatform::registerForArgument;
using JITTargetPlatform::FPGpr0;
using JITTargetPlatform::platformEnterStandardStackFrame;
+ using JITTargetPlatform::platformFinishEnteringStandardStackFrame;
using JITTargetPlatform::platformLeaveStandardStackFrame;
using RegisterSizeDependentOps = RegisterSizeDependentAssembler<Assembler<TargetConfiguration>, MacroAssembler, JITTargetPlatform, RegisterSize>;
@@ -1338,9 +1365,8 @@ public:
if (prepareCall(function))
loadArgumentOnStackOrRegister<0>(arg1);
-#ifdef RESTORE_EBX_ON_CALL
- load32(this->ebxAddressOnStack(), JSC::X86Registers::ebx); // restore the GOT ptr
-#endif
+ if (JITTargetPlatform::gotRegister != -1)
+ load32(Address(JITTargetPlatform::FramePointerRegister, JITTargetPlatform::savedGOTRegisterSlotOnStack()), static_cast<RegisterID>(JITTargetPlatform::gotRegister)); // restore the GOT ptr
callAbsolute(functionName, function);
@@ -1585,6 +1611,15 @@ public:
void setStackLayout(int maxArgCountForBuiltins, int regularRegistersToSave, int fpRegistersToSave);
const StackLayout &stackLayout() const { return *_stackLayout.data(); }
+ void initializeLocalVariables()
+ {
+ const int locals = _stackLayout->calculateJSStackFrameSize();
+ if (locals <= 0)
+ return;
+ loadPtr(Address(JITTargetPlatform::EngineRegister, qOffsetOf(ExecutionEngine, jsStackTop)), JITTargetPlatform::LocalsRegister);
+ RegisterSizeDependentOps::initializeLocalVariables(this, locals);
+ storePtr(JITTargetPlatform::LocalsRegister, Address(JITTargetPlatform::EngineRegister, qOffsetOf(ExecutionEngine, jsStackTop)));
+ }
Label exceptionReturnLabel;
IR::BasicBlock * catchBlock;
diff --git a/src/qml/jit/qv4binop.cpp b/src/qml/jit/qv4binop.cpp
index 8468bf65a6..22067bbb13 100644
--- a/src/qml/jit/qv4binop.cpp
+++ b/src/qml/jit/qv4binop.cpp
@@ -41,8 +41,128 @@
#if ENABLE(ASSEMBLER)
-using namespace QV4;
-using namespace JIT;
+QT_BEGIN_NAMESPACE
+
+namespace QV4 {
+namespace JIT {
+
+template <typename JITAssembler>
+struct ArchitectureSpecificBinaryOperation
+{
+ using FPRegisterID = typename JITAssembler::FPRegisterID;
+
+ static bool doubleAdd(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ Q_UNUSED(as);
+ Q_UNUSED(lhs);
+ Q_UNUSED(rhs);
+ Q_UNUSED(targetReg);
+ return false;
+ }
+ static bool doubleMul(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ Q_UNUSED(as);
+ Q_UNUSED(lhs);
+ Q_UNUSED(rhs);
+ Q_UNUSED(targetReg);
+ return false;
+ }
+ static bool doubleSub(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ Q_UNUSED(as);
+ Q_UNUSED(lhs);
+ Q_UNUSED(rhs);
+ Q_UNUSED(targetReg);
+ return false;
+ }
+ static bool doubleDiv(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ Q_UNUSED(as);
+ Q_UNUSED(lhs);
+ Q_UNUSED(rhs);
+ Q_UNUSED(targetReg);
+ return false;
+ }
+};
+
+#if CPU(X86)
+template <>
+struct ArchitectureSpecificBinaryOperation<Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerX86, NoOperatingSystemSpecialization>>>
+{
+ using JITAssembler = Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerX86, NoOperatingSystemSpecialization>>;
+ using FPRegisterID = JITAssembler::FPRegisterID;
+ using Address = JITAssembler::Address;
+
+ static bool doubleAdd(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ if (IR::Const *c = rhs->asConst()) { // Y = X + constant -> Y = X; Y += [constant-address]
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
+ as->addDouble(addr, targetReg);
+ return true;
+ }
+ if (IR::Temp *t = rhs->asTemp()) { // Y = X + [temp-memory-address] -> Y = X; Y += [temp-memory-address]
+ if (t->kind != IR::Temp::PhysicalRegister) {
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ as->addDouble(as->loadTempAddress(t), targetReg);
+ return true;
+ }
+ }
+ return false;
+ }
+ static bool doubleMul(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ if (IR::Const *c = rhs->asConst()) { // Y = X * constant -> Y = X; Y *= [constant-address]
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
+ as->mulDouble(addr, targetReg);
+ return true;
+ }
+ if (IR::Temp *t = rhs->asTemp()) { // Y = X * [temp-memory-address] -> Y = X; Y *= [temp-memory-address]
+ if (t->kind != IR::Temp::PhysicalRegister) {
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ as->mulDouble(as->loadTempAddress(t), targetReg);
+ return true;
+ }
+ }
+ return false;
+ }
+ static bool doubleSub(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ if (IR::Const *c = rhs->asConst()) { // Y = X - constant -> Y = X; Y -= [constant-address]
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
+ as->subDouble(addr, targetReg);
+ return true;
+ }
+ if (IR::Temp *t = rhs->asTemp()) { // Y = X - [temp-memory-address] -> Y = X; Y -= [temp-memory-address]
+ if (t->kind != IR::Temp::PhysicalRegister) {
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ as->subDouble(as->loadTempAddress(t), targetReg);
+ return true;
+ }
+ }
+ return false;
+ }
+ static bool doubleDiv(JITAssembler *as, IR::Expr *lhs, IR::Expr *rhs, FPRegisterID targetReg)
+ {
+ if (IR::Const *c = rhs->asConst()) { // Y = X / constant -> Y = X; Y /= [constant-address]
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
+ as->divDouble(addr, targetReg);
+ return true;
+ }
+ if (IR::Temp *t = rhs->asTemp()) { // Y = X / [temp-memory-address] -> Y = X; Y /= [temp-memory-address]
+ if (t->kind != IR::Temp::PhysicalRegister) {
+ as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
+ as->divDouble(as->loadTempAddress(t), targetReg);
+ return true;
+ }
+ }
+ return false;
+ }
+};
+#endif
#define OP(op) \
{ "Runtime::" isel_stringIfy(op), offsetof(QV4::Runtime, op), INT_MIN, 0, 0, QV4::Runtime::Method_##op##_NeedsExceptionCheck }
@@ -162,21 +282,9 @@ void Binop<JITAssembler>::doubleBinop(IR::Expr *lhs, IR::Expr *rhs, IR::Expr *ta
if (lhs->asConst())
std::swap(lhs, rhs); // Y = constant + X -> Y = X + constant
-#if CPU(X86)
- if (IR::Const *c = rhs->asConst()) { // Y = X + constant -> Y = X; Y += [constant-address]
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
- as->addDouble(addr, targetReg);
+ if (ArchitectureSpecificBinaryOperation<JITAssembler>::doubleAdd(as, lhs, rhs, targetReg))
break;
- }
- if (IR::Temp *t = rhs->asTemp()) { // Y = X + [temp-memory-address] -> Y = X; Y += [temp-memory-address]
- if (t->kind != IR::Temp::PhysicalRegister) {
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- as->addDouble(as->loadTempAddress(t), targetReg);
- break;
- }
- }
-#endif
+
as->addDouble(as->toDoubleRegister(lhs, JITAssembler::FPGpr0), as->toDoubleRegister(rhs, JITAssembler::FPGpr1), targetReg);
break;
@@ -184,40 +292,16 @@ void Binop<JITAssembler>::doubleBinop(IR::Expr *lhs, IR::Expr *rhs, IR::Expr *ta
if (lhs->asConst())
std::swap(lhs, rhs); // Y = constant * X -> Y = X * constant
-#if CPU(X86)
- if (IR::Const *c = rhs->asConst()) { // Y = X * constant -> Y = X; Y *= [constant-address]
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
- as->mulDouble(addr, targetReg);
+ if (ArchitectureSpecificBinaryOperation<JITAssembler>::doubleMul(as, lhs, rhs, targetReg))
break;
- }
- if (IR::Temp *t = rhs->asTemp()) { // Y = X * [temp-memory-address] -> Y = X; Y *= [temp-memory-address]
- if (t->kind != IR::Temp::PhysicalRegister) {
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- as->mulDouble(as->loadTempAddress(t), targetReg);
- break;
- }
- }
-#endif
+
as->mulDouble(as->toDoubleRegister(lhs, JITAssembler::FPGpr0), as->toDoubleRegister(rhs, JITAssembler::FPGpr1), targetReg);
break;
case IR::OpSub:
-#if CPU(X86)
- if (IR::Const *c = rhs->asConst()) { // Y = X - constant -> Y = X; Y -= [constant-address]
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
- as->subDouble(addr, targetReg);
+ if (ArchitectureSpecificBinaryOperation<JITAssembler>::doubleSub(as, lhs, rhs, targetReg))
break;
- }
- if (IR::Temp *t = rhs->asTemp()) { // Y = X - [temp-memory-address] -> Y = X; Y -= [temp-memory-address]
- if (t->kind != IR::Temp::PhysicalRegister) {
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- as->subDouble(as->loadTempAddress(t), targetReg);
- break;
- }
- }
-#endif
+
if (rhs->asTemp() && rhs->asTemp()->kind == IR::Temp::PhysicalRegister
&& targetTemp
&& targetTemp->kind == IR::Temp::PhysicalRegister
@@ -231,21 +315,8 @@ void Binop<JITAssembler>::doubleBinop(IR::Expr *lhs, IR::Expr *rhs, IR::Expr *ta
break;
case IR::OpDiv:
-#if CPU(X86)
- if (IR::Const *c = rhs->asConst()) { // Y = X / constant -> Y = X; Y /= [constant-address]
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- Address addr = as->loadConstant(c, JITAssembler::ScratchRegister);
- as->divDouble(addr, targetReg);
+ if (ArchitectureSpecificBinaryOperation<JITAssembler>::doubleDiv(as, lhs, rhs, targetReg))
break;
- }
- if (IR::Temp *t = rhs->asTemp()) { // Y = X / [temp-memory-address] -> Y = X; Y /= [temp-memory-address]
- if (t->kind != IR::Temp::PhysicalRegister) {
- as->moveDouble(as->toDoubleRegister(lhs, targetReg), targetReg);
- as->divDouble(as->loadTempAddress(t), targetReg);
- break;
- }
- }
-#endif
if (rhs->asTemp() && rhs->asTemp()->kind == IR::Temp::PhysicalRegister
&& targetTemp
@@ -260,7 +331,6 @@ void Binop<JITAssembler>::doubleBinop(IR::Expr *lhs, IR::Expr *rhs, IR::Expr *ta
break;
default: {
- Q_ASSERT(target->type == IR::BoolType);
Jump trueCase = as->branchDouble(false, op, lhs, rhs);
as->storeBool(false, target);
Jump done = as->jump();
@@ -577,8 +647,19 @@ typename JITAssembler::Jump Binop<JITAssembler>::genInlineBinop(IR::Expr *leftSo
}
template struct QV4::JIT::Binop<QV4::JIT::Assembler<DefaultAssemblerTargetConfiguration>>;
-#if defined(V4_BOOTSTRAP) && CPU(X86_64)
+#if defined(V4_BOOTSTRAP)
+#if !CPU(ARM_THUMB2)
template struct QV4::JIT::Binop<QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization>>>;
#endif
+#if !CPU(ARM64)
+template struct QV4::JIT::Binop<QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARM64, NoOperatingSystemSpecialization>>>;
+#endif
+#endif
+
+} // end of namespace JIT
+} // end of namespace QV4
+
+QT_END_NAMESPACE
+
#endif
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index b1134d2bec..69d6951bb9 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -114,37 +114,12 @@ void InstructionSelection<JITAssembler>::run(int functionIndex)
fpRegistersToSave.size());
_as->enterStandardStackFrame(regularRegistersToSave, fpRegistersToSave);
-#ifdef ARGUMENTS_IN_REGISTERS
- _as->move(_as->registerForArgument(0), JITTargetPlatform::EngineRegister);
-#else
- _as->loadPtr(addressForArgument(0), JITTargetPlatform::EngineRegister);
-#endif
-
- const int locals = _as->stackLayout().calculateJSStackFrameSize();
- if (locals > 0) {
- _as->loadPtr(Address(JITTargetPlatform::EngineRegister, qOffsetOf(ExecutionEngine, jsStackTop)), JITTargetPlatform::LocalsRegister);
-#ifdef VALUE_FITS_IN_REGISTER
- _as->move(TrustedImm64(0), JITTargetPlatform::ReturnValueRegister);
- _as->move(TrustedImm32(locals), JITTargetPlatform::ScratchRegister);
- Label loop = _as->label();
- _as->store64(JITTargetPlatform::ReturnValueRegister, Address(JITTargetPlatform::LocalsRegister));
- _as->add64(TrustedImm32(8), JITTargetPlatform::LocalsRegister);
- Jump jump = _as->branchSub32(ResultCondition::NonZero, TrustedImm32(1), JITTargetPlatform::ScratchRegister);
- jump.linkTo(loop, _as);
-#else
- _as->move(TrustedImm32(0), JITTargetPlatform::ReturnValueRegister);
- _as->move(TrustedImm32(locals), JITTargetPlatform::ScratchRegister);
- Label loop = _as->label();
- _as->store32(JITTargetPlatform::ReturnValueRegister, Address(JITTargetPlatform::LocalsRegister));
- _as->add32(TrustedImm32(4), JITTargetPlatform::LocalsRegister);
- _as->store32(JITTargetPlatform::ReturnValueRegister, Address(JITTargetPlatform::LocalsRegister));
- _as->add32(TrustedImm32(4), JITTargetPlatform::LocalsRegister);
- Jump jump = _as->branchSub32(ResultCondition::NonZero, TrustedImm32(1), JITTargetPlatform::ScratchRegister);
- jump.linkTo(loop, _as);
-#endif
- _as->storePtr(JITTargetPlatform::LocalsRegister, Address(JITTargetPlatform::EngineRegister, qOffsetOf(ExecutionEngine, jsStackTop)));
- }
+ if (JITTargetPlatform::RegisterArgumentCount > 0)
+ _as->move(_as->registerForArgument(0), JITTargetPlatform::EngineRegister);
+ else
+ _as->loadPtr(addressForArgument(0), JITTargetPlatform::EngineRegister);
+ _as->initializeLocalVariables();
int lastLine = 0;
for (int i = 0, ei = _function->basicBlockCount(); i != ei; ++i) {
@@ -474,13 +449,7 @@ void InstructionSelection<JITAssembler>::loadThisObject(IR::Expr *temp)
{
_as->loadPtr(Address(JITTargetPlatform::EngineRegister, qOffsetOf(QV4::ExecutionEngine, current)), JITTargetPlatform::ScratchRegister);
_as->loadPtr(Address(JITTargetPlatform::ScratchRegister, qOffsetOf(ExecutionContext::Data, callData)), JITTargetPlatform::ScratchRegister);
-#if defined(VALUE_FITS_IN_REGISTER)
- _as->load64(Pointer(JITTargetPlatform::ScratchRegister, qOffsetOf(CallData, thisObject)),
- JITTargetPlatform::ReturnValueRegister);
- _as->storeReturnValue(temp);
-#else
- _as->copyValue(temp, Pointer(JITTargetPlatform::ScratchRegister, qOffsetOf(CallData, thisObject)));
-#endif
+ _as->copyValue(temp, Address(JITTargetPlatform::ScratchRegister, qOffsetOf(CallData, thisObject)));
}
template <typename JITAssembler>
@@ -1374,12 +1343,10 @@ void InstructionSelection<JITAssembler>::calculateRegistersToSave(const Register
fpRegistersToSave.clear();
for (const RegisterInfo &ri : JITTargetPlatform::getRegisterInfo()) {
-#if defined(RESTORE_EBX_ON_CALL)
- if (ri.isRegularRegister() && ri.reg<JSC::X86Registers::RegisterID>() == JSC::X86Registers::ebx) {
+ if (JITTargetPlatform::gotRegister != -1 && ri.isRegularRegister() && ri.reg<RegisterID>() == JITTargetPlatform::gotRegister) {
regularRegistersToSave.append(ri);
continue;
}
-#endif // RESTORE_EBX_ON_CALL
if (ri.isCallerSaved())
continue;
if (ri.isRegularRegister()) {
@@ -1666,20 +1633,21 @@ QT_BEGIN_NAMESPACE
namespace QV4 { namespace JIT {
template class Q_QML_EXPORT InstructionSelection<>;
template class Q_QML_EXPORT ISelFactory<>;
-#if defined(V4_BOOTSTRAP) && CPU(X86_64)
+#if defined(V4_BOOTSTRAP)
Q_QML_EXPORT QV4::EvalISelFactory *createISelForArchitecture(const QString &architecture)
{
using ARMv7CrossAssembler = QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization>>;
+ using ARM64CrossAssembler = QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARM64, NoOperatingSystemSpecialization>>;
if (architecture == QLatin1String("armv7"))
return new ISelFactory<ARMv7CrossAssembler>;
+ else if (architecture == QLatin1String("armv8"))
+ return new ISelFactory<ARM64CrossAssembler>;
QString hostArch;
#if CPU(ARM_THUMB2)
hostArch = QStringLiteral("armv7");
-#elif CPU(ARM64)
- hostArch = QStringLiteral("armv8");
#elif CPU(MIPS)
hostArch = QStringLiteral("mips");
#elif CPU(X86)
diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h
index 6ae50c3260..5c046cb397 100644
--- a/src/qml/jit/qv4isel_masm_p.h
+++ b/src/qml/jit/qv4isel_masm_p.h
@@ -155,7 +155,6 @@ protected:
using JITTargetPlatform = typename JITAssembler::JITTargetPlatform;
-#if !defined(ARGUMENTS_IN_REGISTERS)
Address addressForArgument(int index) const
{
// FramePointerRegister points to its old value on the stack, and above
@@ -163,7 +162,6 @@ protected:
// values before reaching the first argument.
return Address(JITTargetPlatform::FramePointerRegister, (index + 2) * sizeof(void*));
}
-#endif
Pointer baseAddressForCallArguments()
{
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp
index d5da863ee0..8eafaaaa8a 100644
--- a/src/qml/jit/qv4regalloc.cpp
+++ b/src/qml/jit/qv4regalloc.cpp
@@ -1138,6 +1138,8 @@ private:
mapping.add(moveFrom, moveTo);
}
+ if (DebugRegAlloc)
+ mapping.dump();
mapping.order();
if (DebugRegAlloc)
mapping.dump();
@@ -1575,7 +1577,7 @@ static void longestAvailableReg(int *nextUses, int nextUseCount, int &reg, int &
#define CALLOC_ON_STACK(ty, ptr, sz, val) \
Q_ASSERT(sz > 0); \
- ty *ptr = reinterpret_cast<ty *>(alloca(sizeof(ty) * (sz))); \
+ Q_ALLOCA_VAR(ty, ptr, sizeof(ty) * (sz)); \
for (ty *it = ptr, *eit = ptr + (sz); it != eit; ++it) \
*it = val;
@@ -1958,10 +1960,10 @@ void RegisterAllocator::dump(IR::Function *function) const
// References:
// [Wimmer1] C. Wimmer and M. Franz. Linear Scan Register Allocation on SSA Form. In Proceedings of
-// CGO’10, ACM Press, 2010
+// CGO'10, ACM Press, 2010
// [Wimmer2] C. Wimmer and H. Mossenbock. Optimized Interval Splitting in a Linear Scan Register
// Allocator. In Proceedings of the ACM/USENIX International Conference on Virtual
-// Execution Environments, pages 132–141. ACM Press, 2005.
+// Execution Environments, pages 132-141. ACM Press, 2005.
// [Traub] Omri Traub, Glenn Holloway, and Michael D. Smith. Quality and Speed in Linear-scan
// Register Allocation. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming
-// Language Design and Implementation, pages 142–151, June 1998.
+// Language Design and Implementation, pages 142-151, June 1998.
diff --git a/src/qml/jit/qv4targetplatform_p.h b/src/qml/jit/qv4targetplatform_p.h
index 1c29aa2a70..d9f8034b1f 100644
--- a/src/qml/jit/qv4targetplatform_p.h
+++ b/src/qml/jit/qv4targetplatform_p.h
@@ -55,6 +55,7 @@
#if ENABLE(ASSEMBLER)
+#include <private/qv4value_p.h>
#include "qv4registerinfo_p.h"
#include <assembler/MacroAssembler.h>
@@ -97,6 +98,7 @@ public:
using PlatformAssembler = JSC::MacroAssemblerX86;
using RegisterID = PlatformAssembler::RegisterID;
using FPRegisterID = PlatformAssembler::FPRegisterID;
+ using TrustedImm32 = PlatformAssembler::TrustedImm32;
enum { RegAllocIsSupported = 1 };
@@ -130,10 +132,8 @@ public:
}
# define HAVE_ALU_OPS_WITH_MEM_OPERAND 1
-# undef VALUE_FITS_IN_REGISTER
static const int RegisterSize = 4;
-# undef ARGUMENTS_IN_REGISTERS
static const int RegisterArgumentCount = 0;
static RegisterID registerForArgument(int) { Q_UNREACHABLE(); }
@@ -141,15 +141,19 @@ public:
static const int StackShadowSpace = 0;
static const int StackSpaceAllocatedUponFunctionEntry = RegisterSize; // Return address is pushed onto stack by the CPU.
static void platformEnterStandardStackFrame(PlatformAssembler *as) { as->push(FramePointerRegister); }
- static void platformLeaveStandardStackFrame(PlatformAssembler *as) { as->pop(FramePointerRegister); }
+ static void platformFinishEnteringStandardStackFrame(PlatformAssembler *) {}
+ static void platformLeaveStandardStackFrame(PlatformAssembler *as, int frameSize)
+ {
+ if (frameSize > 0)
+ as->add32(TrustedImm32(frameSize), StackPointerRegister);
+ as->pop(FramePointerRegister);
+ }
#if OS(WINDOWS) || OS(QNX) || \
((OS(LINUX) || OS(FREEBSD)) && (defined(__PIC__) || defined(__PIE__)))
-#define RESTORE_EBX_ON_CALL
- using Address = PlatformAssembler::Address;
- static Address ebxAddressOnStack()
- {
+ static const int gotRegister = JSC::X86Registers::ebx;
+ static int savedGOTRegisterSlotOnStack() {
static int ebxIdx = -1;
if (ebxIdx == -1) {
int calleeSaves = 0;
@@ -165,8 +169,11 @@ public:
Q_ASSERT(ebxIdx >= 0);
ebxIdx += 1;
}
- return Address(FramePointerRegister, ebxIdx * -int(sizeof(void*)));
+ return ebxIdx * -int(sizeof(void*));
}
+#else
+ static const int gotRegister = -1;
+ static int savedGOTRegisterSlotOnStack() { return -1; }
#endif
};
#endif // x86
@@ -179,6 +186,7 @@ public:
using PlatformAssembler = JSC::MacroAssemblerX86_64;
using RegisterID = PlatformAssembler::RegisterID;
using FPRegisterID = PlatformAssembler::FPRegisterID;
+ using TrustedImm32 = PlatformAssembler::TrustedImm32;
enum { RegAllocIsSupported = 1 };
@@ -188,6 +196,7 @@ public:
static const RegisterID EngineRegister = JSC::X86Registers::r14;
static const RegisterID ReturnValueRegister = JSC::X86Registers::eax;
static const RegisterID ScratchRegister = JSC::X86Registers::r10;
+ static const RegisterID DoubleMaskRegister = JSC::X86Registers::r13;
static const FPRegisterID FPGpr0 = JSC::X86Registers::xmm0;
static const FPRegisterID FPGpr1 = JSC::X86Registers::xmm1;
@@ -201,8 +210,9 @@ public:
<< RI(JSC::X86Registers::edx, QStringLiteral("rdx"), RI::RegularRegister, RI::CallerSaved, RI::RegAlloc)
<< RI(JSC::X86Registers::r9, QStringLiteral("r9"), RI::RegularRegister, RI::CallerSaved, RI::RegAlloc)
<< RI(JSC::X86Registers::r8, QStringLiteral("r8"), RI::RegularRegister, RI::CallerSaved, RI::RegAlloc)
+ // r11 is used as scratch register by the macro assembler
<< RI(JSC::X86Registers::r12, QStringLiteral("r12"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
- << RI(JSC::X86Registers::r13, QStringLiteral("r13"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::r13, QStringLiteral("r13"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
<< RI(JSC::X86Registers::r14, QStringLiteral("r14"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
<< RI(JSC::X86Registers::r15, QStringLiteral("r15"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
<< RI(JSC::X86Registers::xmm2, QStringLiteral("xmm2"), RI::FloatingPointRegister, RI::CallerSaved, RI::RegAlloc)
@@ -216,10 +226,8 @@ public:
}
#define HAVE_ALU_OPS_WITH_MEM_OPERAND 1
-#define VALUE_FITS_IN_REGISTER
static const int RegisterSize = 8;
-#define ARGUMENTS_IN_REGISTERS
static const int RegisterArgumentCount = 6;
static RegisterID registerForArgument(int index)
{
@@ -239,7 +247,19 @@ public:
static const int StackShadowSpace = 0;
static const int StackSpaceAllocatedUponFunctionEntry = RegisterSize; // Return address is pushed onto stack by the CPU.
static void platformEnterStandardStackFrame(PlatformAssembler *as) { as->push(FramePointerRegister); }
- static void platformLeaveStandardStackFrame(PlatformAssembler *as) { as->pop(FramePointerRegister); }
+ static void platformFinishEnteringStandardStackFrame(PlatformAssembler *as)
+ {
+ as->move(PlatformAssembler::TrustedImm64(QV4::Value::NaNEncodeMask), DoubleMaskRegister);
+ }
+ static void platformLeaveStandardStackFrame(PlatformAssembler *as, int frameSize)
+ {
+ if (frameSize > 0)
+ as->add64(TrustedImm32(frameSize), StackPointerRegister);
+ as->pop(FramePointerRegister);
+ }
+
+ static const int gotRegister = -1;
+ static int savedGOTRegisterSlotOnStack() { return -1; }
};
#endif // Linux/MacOS on x86_64
@@ -251,11 +271,9 @@ public:
using PlatformAssembler = JSC::MacroAssemblerX86_64;
using RegisterID = PlatformAssembler::RegisterID;
using FPRegisterID = PlatformAssembler::FPRegisterID;
+ using TrustedImm32 = PlatformAssembler::TrustedImm32;
- // Register allocation is not (yet) supported on win64, because the ABI related stack handling
- // is not completely implemented. Specifically, the saving of xmm registers, and the saving of
- // incoming function parameters to the shadow space is missing.
- enum { RegAllocIsSupported = 0 };
+ enum { RegAllocIsSupported = 1 };
static const RegisterID FramePointerRegister = JSC::X86Registers::ebp;
static const RegisterID StackPointerRegister = JSC::X86Registers::esp;
@@ -263,6 +281,7 @@ public:
static const RegisterID EngineRegister = JSC::X86Registers::r14;
static const RegisterID ReturnValueRegister = JSC::X86Registers::eax;
static const RegisterID ScratchRegister = JSC::X86Registers::r10;
+ static const RegisterID DoubleMaskRegister = JSC::X86Registers::r13;
static const FPRegisterID FPGpr0 = JSC::X86Registers::xmm0;
static const FPRegisterID FPGpr1 = JSC::X86Registers::xmm1;
@@ -270,25 +289,30 @@ public:
{
typedef RegisterInfo RI;
static RegisterInformation info = RegisterInformation()
- << RI(JSC::X86Registers::ebx, QStringLiteral("rbx"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
- << RI(JSC::X86Registers::edi, QStringLiteral("rdi"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
- << RI(JSC::X86Registers::esi, QStringLiteral("rsi"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
- << RI(JSC::X86Registers::edx, QStringLiteral("rdx"), RI::RegularRegister, RI::CallerSaved, RI::Predefined)
- << RI(JSC::X86Registers::r9, QStringLiteral("r9"), RI::RegularRegister, RI::CallerSaved, RI::Predefined)
- << RI(JSC::X86Registers::r8, QStringLiteral("r8"), RI::RegularRegister, RI::CallerSaved, RI::Predefined)
+ << RI(JSC::X86Registers::ebx, QStringLiteral("rbx"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::edi, QStringLiteral("rdi"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::esi, QStringLiteral("rsi"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::edx, QStringLiteral("rdx"), RI::RegularRegister, RI::CallerSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::r8, QStringLiteral("r8"), RI::RegularRegister, RI::CallerSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::r9, QStringLiteral("r9"), RI::RegularRegister, RI::CallerSaved, RI::RegAlloc)
+ // r11 is used as scratch register by the macro assembler
<< RI(JSC::X86Registers::r12, QStringLiteral("r12"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
<< RI(JSC::X86Registers::r13, QStringLiteral("r13"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
<< RI(JSC::X86Registers::r14, QStringLiteral("r14"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
- << RI(JSC::X86Registers::r15, QStringLiteral("r15"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
+ << RI(JSC::X86Registers::r15, QStringLiteral("r15"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::xmm2, QStringLiteral("xmm2"), RI::FloatingPointRegister, RI::CallerSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::xmm3, QStringLiteral("xmm3"), RI::FloatingPointRegister, RI::CallerSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::xmm4, QStringLiteral("xmm4"), RI::FloatingPointRegister, RI::CallerSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::xmm5, QStringLiteral("xmm5"), RI::FloatingPointRegister, RI::CallerSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::xmm6, QStringLiteral("xmm6"), RI::FloatingPointRegister, RI::CalleeSaved, RI::RegAlloc)
+ << RI(JSC::X86Registers::xmm7, QStringLiteral("xmm7"), RI::FloatingPointRegister, RI::CalleeSaved, RI::RegAlloc)
;
return info;
}
#define HAVE_ALU_OPS_WITH_MEM_OPERAND 1
-#define VALUE_FITS_IN_REGISTER
static const int RegisterSize = 8;
-#define ARGUMENTS_IN_REGISTERS
static const int RegisterArgumentCount = 4;
static RegisterID registerForArgument(int index)
{
@@ -300,13 +324,25 @@ public:
};
Q_ASSERT(index >= 0 && index < RegisterArgumentCount);
return regs[index];
- };
+ }
static const int StackAlignment = 16;
static const int StackShadowSpace = 32;
static const int StackSpaceAllocatedUponFunctionEntry = RegisterSize; // Return address is pushed onto stack by the CPU.
static void platformEnterStandardStackFrame(PlatformAssembler *as) { as->push(FramePointerRegister); }
- static void platformLeaveStandardStackFrame(PlatformAssembler *as) { as->pop(FramePointerRegister); }
+ static void platformFinishEnteringStandardStackFrame(PlatformAssembler *as)
+ {
+ as->move(PlatformAssembler::TrustedImm64(QV4::Value::NaNEncodeMask), DoubleMaskRegister);
+ }
+ static void platformLeaveStandardStackFrame(PlatformAssembler *as, int frameSize)
+ {
+ if (frameSize > 0)
+ as->add64(TrustedImm32(frameSize), StackPointerRegister);
+ as->pop(FramePointerRegister);
+ }
+
+ static const int gotRegister = -1;
+ static int savedGOTRegisterSlotOnStack() { return -1; }
};
#endif // Windows on x86_64
@@ -318,6 +354,7 @@ public:
using PlatformAssembler = JSC::MacroAssemblerARMv7;
using RegisterID = PlatformAssembler::RegisterID;
using FPRegisterID = PlatformAssembler::FPRegisterID;
+ using TrustedImm32 = PlatformAssembler::TrustedImm32;
enum { RegAllocIsSupported = 1 };
@@ -389,10 +426,8 @@ public:
}
#undef HAVE_ALU_OPS_WITH_MEM_OPERAND
-#undef VALUE_FITS_IN_REGISTER
static const int RegisterSize = 4;
-#define ARGUMENTS_IN_REGISTERS
static const int RegisterArgumentCount = 4;
static RegisterID registerForArgument(int index)
{
@@ -417,15 +452,26 @@ public:
as->push(FramePointerRegister);
}
- static void platformLeaveStandardStackFrame(PlatformAssembler *as)
+ static void platformFinishEnteringStandardStackFrame(PlatformAssembler *) {}
+
+ static void platformLeaveStandardStackFrame(PlatformAssembler *as, int frameSize)
{
+ if (frameSize > 0) {
+ // Work around bug in ARMv7Assembler.h where add32(imm, sp, sp) doesn't
+ // work well for large immediates.
+ as->move(TrustedImm32(frameSize), JSC::ARMRegisters::r3);
+ as->add32(JSC::ARMRegisters::r3, StackPointerRegister);
+ }
as->pop(FramePointerRegister);
as->pop(JSC::ARMRegisters::lr);
}
+
+ static const int gotRegister = -1;
+ static int savedGOTRegisterSlotOnStack() { return -1; }
};
#endif // ARM (32 bit)
-#if CPU(ARM64)
+#if CPU(ARM64) || defined(V4_BOOTSTRAP)
template <>
class TargetPlatform<JSC::MacroAssemblerARM64, NoOperatingSystemSpecialization>
{
@@ -433,6 +479,7 @@ public:
using PlatformAssembler = JSC::MacroAssemblerARM64;
using RegisterID = PlatformAssembler::RegisterID;
using FPRegisterID = PlatformAssembler::FPRegisterID;
+ using TrustedImm32 = PlatformAssembler::TrustedImm32;
enum { RegAllocIsSupported = 1 };
@@ -442,6 +489,7 @@ public:
static const RegisterID ScratchRegister = JSC::ARM64Registers::x9;
static const RegisterID EngineRegister = JSC::ARM64Registers::x27;
static const RegisterID ReturnValueRegister = JSC::ARM64Registers::x0;
+ static const RegisterID DoubleMaskRegister = JSC::ARM64Registers::x26;
static const FPRegisterID FPGpr0 = JSC::ARM64Registers::q0;
static const FPRegisterID FPGpr1 = JSC::ARM64Registers::q1;
@@ -472,7 +520,7 @@ public:
<< RI(JSC::ARM64Registers::x23, QStringLiteral("x23"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
<< RI(JSC::ARM64Registers::x24, QStringLiteral("x24"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
<< RI(JSC::ARM64Registers::x25, QStringLiteral("x25"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
- << RI(JSC::ARM64Registers::x26, QStringLiteral("x26"), RI::RegularRegister, RI::CalleeSaved, RI::RegAlloc)
+ << RI(JSC::ARM64Registers::x26, QStringLiteral("x26"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
<< RI(JSC::ARM64Registers::x27, QStringLiteral("x27"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
<< RI(JSC::ARM64Registers::x28, QStringLiteral("x28"), RI::RegularRegister, RI::CalleeSaved, RI::Predefined)
@@ -510,10 +558,8 @@ public:
}
#undef HAVE_ALU_OPS_WITH_MEM_OPERAND
-#define VALUE_FITS_IN_REGISTER
static const int RegisterSize = 8;
-#define ARGUMENTS_IN_REGISTERS
static const int RegisterArgumentCount = 8;
static RegisterID registerForArgument(int index)
{
@@ -541,10 +587,20 @@ public:
as->pushPair(FramePointerRegister, JSC::ARM64Registers::lr);
}
- static void platformLeaveStandardStackFrame(PlatformAssembler *as)
+ static void platformFinishEnteringStandardStackFrame(PlatformAssembler *as)
+ {
+ as->move(PlatformAssembler::TrustedImm64(QV4::Value::NaNEncodeMask), DoubleMaskRegister);
+ }
+
+ static void platformLeaveStandardStackFrame(PlatformAssembler *as, int frameSize)
{
+ if (frameSize > 0)
+ as->add64(TrustedImm32(frameSize), StackPointerRegister);
as->popPair(FramePointerRegister, JSC::ARM64Registers::lr);
}
+
+ static const int gotRegister = -1;
+ static int savedGOTRegisterSlotOnStack() { return -1; }
};
#endif // ARM64
@@ -556,6 +612,7 @@ public:
using PlatformAssembler = JSC::MacroAssemblerMIPS;
using RegisterID = PlatformAssembler::RegisterID;
using FPRegisterID = PlatformAssembler::FPRegisterID;
+ using TrustedImm32 = PlatformAssembler::TrustedImm32;
enum { RegAllocIsSupported = 1 };
static const RegisterID FramePointerRegister = JSC::MIPSRegisters::fp;
@@ -598,10 +655,8 @@ public:
}
#undef HAVE_ALU_OPS_WITH_MEM_OPERAND
-#undef VALUE_FITS_IN_REGISTER
static const int RegisterSize = 4;
-#define ARGUMENTS_IN_REGISTERS
static const int RegisterArgumentCount = 4;
static RegisterID registerForArgument(int index)
{
@@ -626,11 +681,19 @@ public:
as->push(FramePointerRegister);
}
- static void platformLeaveStandardStackFrame(PlatformAssembler *as)
+ static void platformFinishEnteringStandardStackFrame(PlatformAssembler *) {}
+
+ static void platformLeaveStandardStackFrame(PlatformAssembler *as, int frameSize)
{
+ if (frameSize > 0)
+ as->add32(TrustedImm32(frameSize), StackPointerRegister);
as->pop(FramePointerRegister);
as->pop(JSC::MIPSRegisters::ra);
}
+
+
+ static const int gotRegister = -1;
+ static int savedGOTRegisterSlotOnStack() { return -1; }
};
#endif // Linux on MIPS (32 bit)
diff --git a/src/qml/jit/qv4unop.cpp b/src/qml/jit/qv4unop.cpp
index 31355e5dce..76c6457d67 100644
--- a/src/qml/jit/qv4unop.cpp
+++ b/src/qml/jit/qv4unop.cpp
@@ -145,8 +145,13 @@ void Unop<JITAssembler>::generateCompl(IR::Expr *source, IR::Expr *target)
}
template struct QV4::JIT::Unop<QV4::JIT::Assembler<DefaultAssemblerTargetConfiguration>>;
-#if defined(V4_BOOTSTRAP) && CPU(X86_64)
+#if defined(V4_BOOTSTRAP)
+#if !CPU(ARM_THUMB2)
template struct QV4::JIT::Unop<QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARMv7, NoOperatingSystemSpecialization>>>;
#endif
+#if !CPU(ARM64)
+template struct QV4::JIT::Unop<QV4::JIT::Assembler<AssemblerTargetConfiguration<JSC::MacroAssemblerARM64, NoOperatingSystemSpecialization>>>;
+#endif
+#endif
#endif
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 4404a5d79f..e4c150057a 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -525,7 +525,7 @@ QJSValue QJSEngine::newQObject(QObject *object)
\since 5.8
Creates a JavaScript object that wraps the given QMetaObject
- The metaObject must outlive the script engine. It is recommended to only
+ The \a metaObject must outlive the script engine. It is recommended to only
use this method with static metaobjects.
diff --git a/src/qml/jsruntime/qv4argumentsobject.cpp b/src/qml/jsruntime/qv4argumentsobject.cpp
index 9354bcb1a3..7c1cc92a13 100644
--- a/src/qml/jsruntime/qv4argumentsobject.cpp
+++ b/src/qml/jsruntime/qv4argumentsobject.cpp
@@ -166,18 +166,17 @@ ReturnedValue ArgumentsObject::getIndexed(const Managed *m, uint index, bool *ha
return Encode::undefined();
}
-void ArgumentsObject::putIndexed(Managed *m, uint index, const Value &value)
+bool ArgumentsObject::putIndexed(Managed *m, uint index, const Value &value)
{
ArgumentsObject *args = static_cast<ArgumentsObject *>(m);
if (!args->fullyCreated() && index >= static_cast<uint>(args->context()->callData->argc))
args->fullyCreate();
- if (args->fullyCreated()) {
- Object::putIndexed(m, index, value);
- return;
- }
+ if (args->fullyCreated())
+ return Object::putIndexed(m, index, value);
args->context()->callData->args[index] = value;
+ return true;
}
bool ArgumentsObject::deleteIndexedProperty(Managed *m, uint index)
diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h
index 0a2ea3b42a..f80ade9611 100644
--- a/src/qml/jsruntime/qv4argumentsobject_p.h
+++ b/src/qml/jsruntime/qv4argumentsobject_p.h
@@ -128,7 +128,7 @@ struct ArgumentsObject: Object {
bool defineOwnProperty(ExecutionEngine *engine, uint index, const Property *desc, PropertyAttributes attrs);
static ReturnedValue getIndexed(const Managed *m, uint index, bool *hasProperty);
- static void putIndexed(Managed *m, uint index, const Value &value);
+ static bool putIndexed(Managed *m, uint index, const Value &value);
static bool deleteIndexedProperty(Managed *m, uint index);
static PropertyAttributes queryIndexed(const Managed *m, uint index);
static void markObjects(Heap::Base *that, ExecutionEngine *e);
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 60b90e4bf0..740ebbe359 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -155,7 +155,7 @@ void ExecutionContext::createMutableBinding(String *name, bool deletable)
ctx = ctx->d()->outer;
}
- if (activation->hasProperty(name))
+ if (activation->hasOwnProperty(name))
return;
ScopedProperty desc(scope);
PropertyAttributes attrs(Attr_Data);
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index b90c335b1c..c56d007028 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -340,7 +340,9 @@ static inline double TimeClip(double t)
{
if (! qt_is_finite(t) || fabs(t) > 8.64e15)
return qt_qnan();
- return Primitive::toInteger(t);
+
+ // +0 looks weird, but is correct. See ES6 20.3.1.15. We must not return -0.
+ return Primitive::toInteger(t) + 0;
}
static inline double ParseString(const QString &s)
@@ -724,7 +726,7 @@ void DatePrototype::init(ExecutionEngine *engine, Object *ctor)
Scope scope(engine);
ScopedObject o(scope);
ctor->defineReadonlyProperty(engine->id_prototype(), (o = this));
- ctor->defineReadonlyProperty(engine->id_length(), Primitive::fromInt32(7));
+ ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(7));
LocalTZA = getLocalTZA();
ctor->defineDefaultProperty(QStringLiteral("parse"), method_parse, 1);
@@ -774,8 +776,21 @@ void DatePrototype::init(ExecutionEngine *engine, Object *ctor)
defineDefaultProperty(QStringLiteral("setYear"), method_setYear, 1);
defineDefaultProperty(QStringLiteral("setFullYear"), method_setFullYear, 3);
defineDefaultProperty(QStringLiteral("setUTCFullYear"), method_setUTCFullYear, 3);
- defineDefaultProperty(QStringLiteral("toUTCString"), method_toUTCString, 0);
- defineDefaultProperty(QStringLiteral("toGMTString"), method_toUTCString, 0);
+
+ // ES6: B.2.4.3 & 20.3.4.43:
+ // We have to use the *same object* for toUTCString and toGMTString
+ {
+ QString toUtcString(QStringLiteral("toUTCString"));
+ QString toGmtString(QStringLiteral("toGMTString"));
+ ScopedString us(scope, engine->newIdentifier(toUtcString));
+ ScopedString gs(scope, engine->newIdentifier(toGmtString));
+ ExecutionContext *global = engine->rootContext();
+ ScopedFunctionObject toUtcGmtStringFn(scope, BuiltinFunction::create(global, us, method_toUTCString));
+ toUtcGmtStringFn->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(0));
+ defineDefaultProperty(us, toUtcGmtStringFn);
+ defineDefaultProperty(gs, toUtcGmtStringFn);
+ }
+
defineDefaultProperty(QStringLiteral("toISOString"), method_toISOString, 0);
defineDefaultProperty(QStringLiteral("toJSON"), method_toJSON, 1);
}
@@ -1025,6 +1040,7 @@ void DatePrototype::method_setTime(const BuiltinFunction *, Scope &scope, CallDa
THROW_TYPE_ERROR();
double t = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
self->setDate(TimeClip(t));
scope.result = Encode(self->date());
}
@@ -1036,7 +1052,9 @@ void DatePrototype::method_setMilliseconds(const BuiltinFunction *, Scope &scope
THROW_TYPE_ERROR();
double t = LocalTime(self->date());
+ CHECK_EXCEPTION();
double ms = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
self->setDate(TimeClip(UTC(MakeDate(Day(t), MakeTime(HourFromTime(t), MinFromTime(t), SecFromTime(t), ms)))));
scope.result = Encode(self->date());
}
@@ -1048,7 +1066,9 @@ void DatePrototype::method_setUTCMilliseconds(const BuiltinFunction *, Scope &sc
THROW_TYPE_ERROR();
double t = self->date();
+ CHECK_EXCEPTION();
double ms = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
self->setDate(TimeClip(MakeDate(Day(t), MakeTime(HourFromTime(t), MinFromTime(t), SecFromTime(t), ms))));
scope.result = Encode(self->date());
}
@@ -1060,8 +1080,11 @@ void DatePrototype::method_setSeconds(const BuiltinFunction *, Scope &scope, Cal
THROW_TYPE_ERROR();
double t = LocalTime(self->date());
+ CHECK_EXCEPTION();
double sec = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
double ms = (callData->argc < 2) ? msFromTime(t) : callData->args[1].toNumber();
+ CHECK_EXCEPTION();
t = TimeClip(UTC(MakeDate(Day(t), MakeTime(HourFromTime(t), MinFromTime(t), sec, ms))));
self->setDate(t);
scope.result = Encode(self->date());
@@ -1088,9 +1111,13 @@ void DatePrototype::method_setMinutes(const BuiltinFunction *, Scope &scope, Cal
THROW_TYPE_ERROR();
double t = LocalTime(self->date());
+ CHECK_EXCEPTION();
double min = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
double sec = (callData->argc < 2) ? SecFromTime(t) : callData->args[1].toNumber();
+ CHECK_EXCEPTION();
double ms = (callData->argc < 3) ? msFromTime(t) : callData->args[2].toNumber();
+ CHECK_EXCEPTION();
t = TimeClip(UTC(MakeDate(Day(t), MakeTime(HourFromTime(t), min, sec, ms))));
self->setDate(t);
scope.result = Encode(self->date());
@@ -1118,10 +1145,15 @@ void DatePrototype::method_setHours(const BuiltinFunction *, Scope &scope, CallD
THROW_TYPE_ERROR();
double t = LocalTime(self->date());
+ CHECK_EXCEPTION();
double hour = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
double min = (callData->argc < 2) ? MinFromTime(t) : callData->args[1].toNumber();
+ CHECK_EXCEPTION();
double sec = (callData->argc < 3) ? SecFromTime(t) : callData->args[2].toNumber();
+ CHECK_EXCEPTION();
double ms = (callData->argc < 4) ? msFromTime(t) : callData->args[3].toNumber();
+ CHECK_EXCEPTION();
t = TimeClip(UTC(MakeDate(Day(t), MakeTime(hour, min, sec, ms))));
self->setDate(t);
scope.result = Encode(self->date());
@@ -1150,7 +1182,9 @@ void DatePrototype::method_setDate(const BuiltinFunction *, Scope &scope, CallDa
THROW_TYPE_ERROR();
double t = LocalTime(self->date());
+ CHECK_EXCEPTION();
double date = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
t = TimeClip(UTC(MakeDate(MakeDay(YearFromTime(t), MonthFromTime(t), date), TimeWithinDay(t))));
self->setDate(t);
scope.result = Encode(self->date());
@@ -1163,7 +1197,9 @@ void DatePrototype::method_setUTCDate(const BuiltinFunction *, Scope &scope, Cal
THROW_TYPE_ERROR();
double t = self->date();
+ CHECK_EXCEPTION();
double date = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
t = TimeClip(MakeDate(MakeDay(YearFromTime(t), MonthFromTime(t), date), TimeWithinDay(t)));
self->setDate(t);
scope.result = Encode(self->date());
@@ -1176,8 +1212,11 @@ void DatePrototype::method_setMonth(const BuiltinFunction *, Scope &scope, CallD
THROW_TYPE_ERROR();
double t = LocalTime(self->date());
+ CHECK_EXCEPTION();
double month = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
double date = (callData->argc < 2) ? DateFromTime(t) : callData->args[1].toNumber();
+ CHECK_EXCEPTION();
t = TimeClip(UTC(MakeDate(MakeDay(YearFromTime(t), month, date), TimeWithinDay(t))));
self->setDate(t);
scope.result = Encode(self->date());
@@ -1245,11 +1284,15 @@ void DatePrototype::method_setFullYear(const BuiltinFunction *, Scope &scope, Ca
THROW_TYPE_ERROR();
double t = LocalTime(self->date());
+ CHECK_EXCEPTION();
if (std::isnan(t))
t = 0;
double year = callData->argc ? callData->args[0].toNumber() : qt_qnan();
+ CHECK_EXCEPTION();
double month = (callData->argc < 2) ? MonthFromTime(t) : callData->args[1].toNumber();
+ CHECK_EXCEPTION();
double date = (callData->argc < 3) ? DateFromTime(t) : callData->args[2].toNumber();
+ CHECK_EXCEPTION();
t = TimeClip(UTC(MakeDate(MakeDay(year, month, date), TimeWithinDay(t))));
self->setDate(t);
scope.result = Encode(self->date());
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index a56d17f9b1..b32b2c3f66 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -112,7 +112,7 @@ struct DateCtor: FunctionObject
static void call(const Managed *that, Scope &scope, CallData *);
};
-struct DatePrototype: DateObject
+struct DatePrototype: Object
{
void init(ExecutionEngine *engine, Object *ctor);
diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h
index 3b589a41f1..8e2eec03d2 100644
--- a/src/qml/jsruntime/qv4debugging_p.h
+++ b/src/qml/jsruntime/qv4debugging_p.h
@@ -61,8 +61,9 @@ namespace Debugging {
#ifdef QT_NO_QML_DEBUGGER
-struct Debugger
+class Debugger
{
+public:
bool pauseAtNextOpportunity() const { return false; }
void maybeBreakAtInstruction() {}
void enteringFunction() {}
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 084ddc9010..39b433e5f9 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -258,6 +258,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
arrayClass = emptyClass->addMember(id_length(), Attr_NotConfigurable|Attr_NotEnumerable);
jsObjects[ArrayProto] = memoryManager->allocObject<ArrayPrototype>(arrayClass, objectPrototype());
+ jsObjects[PropertyListProto] = memoryManager->allocObject<PropertyListPrototype>();
InternalClass *argsClass = emptyClass->addMember(id_length(), Attr_NotEnumerable);
argumentsObjectClass = argsClass->addMember(id_callee(), Attr_Data|Attr_NotEnumerable);
@@ -360,6 +361,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
static_cast<NumberPrototype *>(numberPrototype())->init(this, numberCtor());
static_cast<BooleanPrototype *>(booleanPrototype())->init(this, booleanCtor());
static_cast<ArrayPrototype *>(arrayPrototype())->init(this, arrayCtor());
+ static_cast<PropertyListPrototype *>(propertyListPrototype())->init(this);
static_cast<DatePrototype *>(datePrototype())->init(this, dateCtor());
static_cast<FunctionPrototype *>(functionPrototype())->init(this, functionCtor());
static_cast<RegExpPrototype *>(regExpPrototype())->init(this, regExpCtor());
@@ -402,7 +404,8 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
globalObject->defineDefaultProperty(QStringLiteral("Object"), *objectCtor());
globalObject->defineDefaultProperty(QStringLiteral("String"), *stringCtor());
- globalObject->defineDefaultProperty(QStringLiteral("Number"), *numberCtor());
+ FunctionObject *numberObject = numberCtor();
+ globalObject->defineDefaultProperty(QStringLiteral("Number"), *numberObject);
globalObject->defineDefaultProperty(QStringLiteral("Boolean"), *booleanCtor());
globalObject->defineDefaultProperty(QStringLiteral("Array"), *arrayCtor());
globalObject->defineDefaultProperty(QStringLiteral("Function"), *functionCtor());
@@ -432,8 +435,26 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
jsObjects[Eval_Function] = memoryManager->allocObject<EvalFunction>(global);
globalObject->defineDefaultProperty(QStringLiteral("eval"), *evalFunction());
- globalObject->defineDefaultProperty(QStringLiteral("parseInt"), GlobalFunctions::method_parseInt, 2);
- globalObject->defineDefaultProperty(QStringLiteral("parseFloat"), GlobalFunctions::method_parseFloat, 1);
+ // ES6: 20.1.2.12 & 20.1.2.13:
+ // parseInt and parseFloat must be the same FunctionObject on the global &
+ // Number object.
+ {
+ QString piString(QStringLiteral("parseInt"));
+ QString pfString(QStringLiteral("parseFloat"));
+ Scope scope(this);
+ ScopedString pi(scope, newIdentifier(piString));
+ ScopedString pf(scope, newIdentifier(pfString));
+ ExecutionContext *global = rootContext();
+ ScopedFunctionObject parseIntFn(scope, BuiltinFunction::create(global, pi, GlobalFunctions::method_parseInt));
+ ScopedFunctionObject parseFloatFn(scope, BuiltinFunction::create(global, pf, GlobalFunctions::method_parseFloat));
+ parseIntFn->defineReadonlyConfigurableProperty(id_length(), Primitive::fromInt32(2));
+ parseFloatFn->defineReadonlyConfigurableProperty(id_length(), Primitive::fromInt32(1));
+ globalObject->defineDefaultProperty(piString, parseIntFn);
+ globalObject->defineDefaultProperty(pfString, parseFloatFn);
+ numberObject->defineDefaultProperty(piString, parseIntFn);
+ numberObject->defineDefaultProperty(pfString, parseFloatFn);
+ }
+
globalObject->defineDefaultProperty(QStringLiteral("isNaN"), GlobalFunctions::method_isNaN, 1);
globalObject->defineDefaultProperty(QStringLiteral("isFinite"), GlobalFunctions::method_isFinite, 1);
globalObject->defineDefaultProperty(QStringLiteral("decodeURI"), GlobalFunctions::method_decodeURI, 1);
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 1c20ad30aa..69aa389c44 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -157,6 +157,7 @@ public:
IntegerNull, // Has to come after the RootContext to make the context stack safe
ObjectProto,
ArrayProto,
+ PropertyListProto,
StringProto,
NumberProto,
BooleanProto,
@@ -225,6 +226,7 @@ public:
Object *objectPrototype() const { return reinterpret_cast<Object *>(jsObjects + ObjectProto); }
Object *arrayPrototype() const { return reinterpret_cast<Object *>(jsObjects + ArrayProto); }
+ Object *propertyListPrototype() const { return reinterpret_cast<Object *>(jsObjects + PropertyListProto); }
Object *stringPrototype() const { return reinterpret_cast<Object *>(jsObjects + StringProto); }
Object *numberPrototype() const { return reinterpret_cast<Object *>(jsObjects + NumberProto); }
Object *booleanPrototype() const { return reinterpret_cast<Object *>(jsObjects + BooleanProto); }
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index b2d89220ea..e9431ed25e 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -131,7 +131,7 @@ void FunctionObject::init(String *n, bool createProto)
}
if (n)
- defineReadonlyProperty(s.engine->id_name(), *n);
+ defineReadonlyConfigurableProperty(s.engine->id_name(), *n);
}
ReturnedValue FunctionObject::name() const
@@ -258,10 +258,10 @@ void FunctionPrototype::init(ExecutionEngine *engine, Object *ctor)
Scope scope(engine);
ScopedObject o(scope);
- ctor->defineReadonlyProperty(engine->id_length(), Primitive::fromInt32(1));
+ ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(1));
ctor->defineReadonlyProperty(engine->id_prototype(), (o = this));
- defineReadonlyProperty(engine->id_length(), Primitive::fromInt32(0));
+ defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(0));
defineDefaultProperty(QStringLiteral("constructor"), (o = ctor));
defineDefaultProperty(engine->id_toString(), method_toString, 0);
defineDefaultProperty(QStringLiteral("apply"), method_apply, 2);
@@ -557,7 +557,7 @@ void Heap::BoundFunction::init(QV4::ExecutionContext *scope, QV4::FunctionObject
len -= boundArgs->size();
if (len < 0)
len = 0;
- f->defineReadonlyProperty(s.engine->id_length(), Primitive::fromInt32(len));
+ f->defineReadonlyConfigurableProperty(s.engine->id_length(), Primitive::fromInt32(len));
ScopedProperty pd(s);
pd->value = s.engine->thrower();
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 66861bf697..b0d14fc2b4 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -258,6 +258,7 @@ enum PropertyFlag {
Attr_NotEnumerable = 0x4,
Attr_NotConfigurable = 0x8,
Attr_ReadOnly = Attr_NotWritable|Attr_NotEnumerable|Attr_NotConfigurable,
+ Attr_ReadOnly_ButConfigurable = Attr_NotWritable|Attr_NotEnumerable,
Attr_Invalid = 0xff
};
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 1d571f53f3..0f021c8bd0 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -705,7 +705,7 @@ QString Stringify::Str(const QString &key, const Value &v)
if (replacerFunction) {
ScopedObject holder(scope, v4->newObject());
- holder->put(scope.engine, QString(), scope.result);
+ holder->put(scope.engine->id_empty(), scope.result);
ScopedCallData callData(scope, 2);
callData->args[0] = v4->newString(key);
callData->args[1] = scope.result;
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 09644c161d..8cfa930888 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -102,6 +102,8 @@ void NumberPrototype::init(ExecutionEngine *engine, Object *ctor)
ctor->defineReadonlyProperty(QStringLiteral("POSITIVE_INFINITY"), Primitive::fromDouble(qInf()));
ctor->defineReadonlyProperty(QStringLiteral("MAX_VALUE"), Primitive::fromDouble(1.7976931348623158e+308));
ctor->defineReadonlyProperty(QStringLiteral("EPSILON"), Primitive::fromDouble(std::numeric_limits<double>::epsilon()));
+ ctor->defineReadonlyProperty(QStringLiteral("MAX_SAFE_INTEGER"), Primitive::fromDouble(9007199254740991));
+ ctor->defineReadonlyProperty(QStringLiteral("MIN_SAFE_INTEGER"), Primitive::fromDouble(-9007199254740991));
QT_WARNING_PUSH
QT_WARNING_DISABLE_INTEL(239)
@@ -109,15 +111,17 @@ QT_WARNING_DISABLE_INTEL(239)
QT_WARNING_POP
ctor->defineDefaultProperty(QStringLiteral("isFinite"), method_isFinite, 1);
+ ctor->defineDefaultProperty(QStringLiteral("isInteger"), method_isInteger, 1);
+ ctor->defineDefaultProperty(QStringLiteral("isSafeInteger"), method_isSafeInteger, 1);
ctor->defineDefaultProperty(QStringLiteral("isNaN"), method_isNaN, 1);
defineDefaultProperty(QStringLiteral("constructor"), (o = ctor));
- defineDefaultProperty(engine->id_toString(), method_toString);
+ defineDefaultProperty(engine->id_toString(), method_toString, 1);
defineDefaultProperty(QStringLiteral("toLocaleString"), method_toLocaleString);
defineDefaultProperty(engine->id_valueOf(), method_valueOf);
defineDefaultProperty(QStringLiteral("toFixed"), method_toFixed, 1);
- defineDefaultProperty(QStringLiteral("toExponential"), method_toExponential);
- defineDefaultProperty(QStringLiteral("toPrecision"), method_toPrecision);
+ defineDefaultProperty(QStringLiteral("toExponential"), method_toExponential, 1);
+ defineDefaultProperty(QStringLiteral("toPrecision"), method_toPrecision, 1);
}
inline ReturnedValue thisNumberValue(Scope &scope, CallData *callData)
@@ -155,6 +159,52 @@ void NumberPrototype::method_isFinite(const BuiltinFunction *, Scope &scope, Cal
scope.result = Encode(!std::isnan(v) && !qt_is_inf(v));
}
+void NumberPrototype::method_isInteger(const BuiltinFunction *, Scope &scope, CallData *callData)
+{
+ if (!callData->argc) {
+ scope.result = Encode(false);
+ return;
+ }
+
+ const Value &v = callData->args[0];
+ if (!v.isNumber()) {
+ scope.result = Encode(false);
+ return;
+ }
+
+ double dv = v.toNumber();
+ if (std::isnan(dv) || qt_is_inf(dv)) {
+ scope.result = Encode(false);
+ return;
+ }
+
+ double iv = v.toInteger();
+ scope.result = Encode(dv == iv);
+}
+
+void NumberPrototype::method_isSafeInteger(const BuiltinFunction *, Scope &scope, CallData *callData)
+{
+ if (!callData->argc) {
+ scope.result = Encode(false);
+ return;
+ }
+
+ const Value &v = callData->args[0];
+ if (!v.isNumber()) {
+ scope.result = Encode(false);
+ return;
+ }
+
+ double dv = v.toNumber();
+ if (std::isnan(dv) || qt_is_inf(dv)) {
+ scope.result = Encode(false);
+ return;
+ }
+
+ double iv = v.toInteger();
+ scope.result = Encode(dv == iv && std::fabs(iv) <= (2^53)-1);
+}
+
void NumberPrototype::method_isNaN(const BuiltinFunction *, Scope &scope, CallData *callData)
{
if (!callData->argc) {
diff --git a/src/qml/jsruntime/qv4numberobject_p.h b/src/qml/jsruntime/qv4numberobject_p.h
index 364b866a16..e18267c50c 100644
--- a/src/qml/jsruntime/qv4numberobject_p.h
+++ b/src/qml/jsruntime/qv4numberobject_p.h
@@ -88,6 +88,8 @@ struct NumberPrototype: NumberObject
void init(ExecutionEngine *engine, Object *ctor);
static void method_isFinite(const BuiltinFunction *, Scope &scope, CallData *callData);
+ static void method_isInteger(const BuiltinFunction *, Scope &scope, CallData *callData);
+ static void method_isSafeInteger(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_isNaN(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_toString(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_toLocaleString(const BuiltinFunction *, Scope &scope, CallData *callData);
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 2f664c6398..dd3bbccde3 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -61,7 +61,8 @@ DEFINE_OBJECT_VTABLE(Object);
void Object::setInternalClass(InternalClass *ic)
{
d()->internalClass = ic;
- if ((!d()->memberData && ic->size) || (d()->memberData->size < ic->size))
+ bool hasMD = d()->memberData != nullptr;
+ if ((!hasMD && ic->size) || (hasMD && d()->memberData->size < ic->size))
d()->memberData = MemberData::allocate(ic->engine, ic->size, d()->memberData);
}
@@ -92,13 +93,6 @@ bool Object::setPrototype(Object *proto)
return true;
}
-void Object::put(ExecutionEngine *engine, const QString &name, const Value &value)
-{
- Scope scope(engine);
- ScopedString n(scope, engine->newString(name));
- put(n, value);
-}
-
ReturnedValue Object::getValue(const Value &thisObject, const Value &v, PropertyAttributes attrs)
{
if (!attrs.isAccessor())
@@ -114,11 +108,11 @@ ReturnedValue Object::getValue(const Value &thisObject, const Value &v, Property
return scope.result.asReturnedValue();
}
-void Object::putValue(uint memberIndex, const Value &value)
+bool Object::putValue(uint memberIndex, const Value &value)
{
QV4::InternalClass *ic = internalClass();
if (ic->engine->hasException)
- return;
+ return false;
PropertyAttributes attrs = ic->propertyData[memberIndex];
@@ -131,7 +125,7 @@ void Object::putValue(uint memberIndex, const Value &value)
callData->args[0] = value;
callData->thisObject = this;
setter->call(scope, callData);
- return;
+ return !ic->engine->hasException;
}
goto reject;
}
@@ -140,11 +134,12 @@ void Object::putValue(uint memberIndex, const Value &value)
goto reject;
*propertyData(memberIndex) = value;
- return;
+ return true;
reject:
if (engine()->current->strictMode)
engine()->throwTypeError();
+ return false;
}
void Object::defineDefaultProperty(const QString &name, const Value &value)
@@ -162,7 +157,7 @@ void Object::defineDefaultProperty(const QString &name, ReturnedValue (*code)(Ca
ScopedString s(scope, e->newIdentifier(name));
ExecutionContext *global = e->rootContext();
ScopedFunctionObject function(scope, BuiltinFunction::create(global, s, code));
- function->defineReadonlyProperty(e->id_length(), Primitive::fromInt32(argumentCount));
+ function->defineReadonlyConfigurableProperty(e->id_length(), Primitive::fromInt32(argumentCount));
defineDefaultProperty(s, function);
}
@@ -173,7 +168,7 @@ void Object::defineDefaultProperty(const QString &name, void (*code)(const Built
ScopedString s(scope, e->newIdentifier(name));
ExecutionContext *global = e->rootContext();
ScopedFunctionObject function(scope, BuiltinFunction::create(global, s, code));
- function->defineReadonlyProperty(e->id_length(), Primitive::fromInt32(argumentCount));
+ function->defineReadonlyConfigurableProperty(e->id_length(), Primitive::fromInt32(argumentCount));
defineDefaultProperty(s, function);
}
@@ -183,7 +178,7 @@ void Object::defineDefaultProperty(String *name, ReturnedValue (*code)(CallConte
Scope scope(e);
ExecutionContext *global = e->rootContext();
ScopedFunctionObject function(scope, BuiltinFunction::create(global, name, code));
- function->defineReadonlyProperty(e->id_length(), Primitive::fromInt32(argumentCount));
+ function->defineReadonlyConfigurableProperty(e->id_length(), Primitive::fromInt32(argumentCount));
defineDefaultProperty(name, function);
}
@@ -193,7 +188,7 @@ void Object::defineDefaultProperty(String *name, void (*code)(const BuiltinFunct
Scope scope(e);
ExecutionContext *global = e->rootContext();
ScopedFunctionObject function(scope, BuiltinFunction::create(global, name, code));
- function->defineReadonlyProperty(e->id_length(), Primitive::fromInt32(argumentCount));
+ function->defineReadonlyConfigurableProperty(e->id_length(), Primitive::fromInt32(argumentCount));
defineDefaultProperty(name, function);
}
@@ -250,6 +245,19 @@ void Object::defineReadonlyProperty(String *name, const Value &value)
insertMember(name, value, Attr_ReadOnly);
}
+void Object::defineReadonlyConfigurableProperty(const QString &name, const Value &value)
+{
+ QV4::ExecutionEngine *e = engine();
+ Scope scope(e);
+ ScopedString s(scope, e->newIdentifier(name));
+ defineReadonlyConfigurableProperty(s, value);
+}
+
+void Object::defineReadonlyConfigurableProperty(String *name, const Value &value)
+{
+ insertMember(name, value, Attr_ReadOnly_ButConfigurable);
+}
+
void Object::markObjects(Heap::Base *that, ExecutionEngine *e)
{
Heap::Object *o = static_cast<Heap::Object *>(that);
@@ -440,14 +448,14 @@ ReturnedValue Object::getIndexed(const Managed *m, uint index, bool *hasProperty
return static_cast<const Object *>(m)->internalGetIndexed(index, hasProperty);
}
-void Object::put(Managed *m, String *name, const Value &value)
+bool Object::put(Managed *m, String *name, const Value &value)
{
- static_cast<Object *>(m)->internalPut(name, value);
+ return static_cast<Object *>(m)->internalPut(name, value);
}
-void Object::putIndexed(Managed *m, uint index, const Value &value)
+bool Object::putIndexed(Managed *m, uint index, const Value &value)
{
- static_cast<Object *>(m)->internalPutIndexed(index, value);
+ return static_cast<Object *>(m)->internalPutIndexed(index, value);
}
PropertyAttributes Object::query(const Managed *m, String *name)
@@ -705,10 +713,10 @@ ReturnedValue Object::internalGetIndexed(uint index, bool *hasProperty) const
// Section 8.12.5
-void Object::internalPut(String *name, const Value &value)
+bool Object::internalPut(String *name, const Value &value)
{
if (internalClass()->engine->hasException)
- return;
+ return false;
uint idx = name->asArrayIndex();
if (idx != UINT_MAX)
@@ -737,7 +745,7 @@ void Object::internalPut(String *name, const Value &value)
uint l = value.asArrayLength(&ok);
if (!ok) {
engine()->throwRangeError(value);
- return;
+ return false;
}
ok = setArrayLength(l);
if (!ok)
@@ -745,7 +753,7 @@ void Object::internalPut(String *name, const Value &value)
} else {
*v = value;
}
- return;
+ return true;
} else if (!prototype()) {
if (!isExtensible())
goto reject;
@@ -776,24 +784,26 @@ void Object::internalPut(String *name, const Value &value)
callData->args[0] = value;
callData->thisObject = this;
setter->call(scope, callData);
- return;
+ return !internalClass()->engine->hasException;
}
insertMember(name, value);
- return;
+ return true;
reject:
+ // ### this should be removed once everything is ported to use Object::set()
if (engine()->current->strictMode) {
QString message = QLatin1String("Cannot assign to read-only property \"") +
name->toQString() + QLatin1Char('\"');
engine()->throwTypeError(message);
}
+ return false;
}
-void Object::internalPutIndexed(uint index, const Value &value)
+bool Object::internalPutIndexed(uint index, const Value &value)
{
if (internalClass()->engine->hasException)
- return;
+ return false;
PropertyAttributes attrs;
@@ -815,7 +825,7 @@ void Object::internalPutIndexed(uint index, const Value &value)
goto reject;
else
*v = value;
- return;
+ return true;
} else if (!prototype()) {
if (!isExtensible())
goto reject;
@@ -846,15 +856,17 @@ void Object::internalPutIndexed(uint index, const Value &value)
callData->args[0] = value;
callData->thisObject = this;
setter->call(scope, callData);
- return;
+ return !internalClass()->engine->hasException;
}
arraySet(index, value);
- return;
+ return true;
reject:
+ // ### this should be removed once everything is ported to use Object::setIndexed()
if (engine()->current->strictMode)
engine()->throwTypeError();
+ return false;
}
// Section 8.12.7
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 6a543ae1a8..0d17afbf41 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -130,8 +130,8 @@ struct ObjectVTable
void (*construct)(const Managed *, Scope &scope, CallData *data);
ReturnedValue (*get)(const Managed *, String *name, bool *hasProperty);
ReturnedValue (*getIndexed)(const Managed *, uint index, bool *hasProperty);
- void (*put)(Managed *, String *name, const Value &value);
- void (*putIndexed)(Managed *, uint index, const Value &value);
+ bool (*put)(Managed *, String *name, const Value &value);
+ bool (*putIndexed)(Managed *, uint index, const Value &value);
PropertyAttributes (*query)(const Managed *, String *name);
PropertyAttributes (*queryIndexed)(const Managed *, uint index);
bool (*deleteProperty)(Managed *m, String *name);
@@ -223,8 +223,6 @@ struct Q_QML_EXPORT Object: Managed {
//
// helpers
//
- void put(ExecutionEngine *engine, const QString &name, const Value &value);
-
static ReturnedValue getValue(const Value &thisObject, const Value &v, PropertyAttributes attrs);
ReturnedValue getValue(const Value &v, PropertyAttributes attrs) const {
Scope scope(this->engine());
@@ -232,7 +230,7 @@ struct Q_QML_EXPORT Object: Managed {
return getValue(t, v, attrs);
}
- void putValue(uint memberIndex, const Value &value);
+ bool putValue(uint memberIndex, const Value &value);
/* The spec default: Writable: true, Enumerable: false, Configurable: true */
void defineDefaultProperty(String *name, const Value &value) {
@@ -253,6 +251,10 @@ struct Q_QML_EXPORT Object: Managed {
void defineReadonlyProperty(const QString &name, const Value &value);
void defineReadonlyProperty(String *name, const Value &value);
+ /* Fixed: Writable: false, Enumerable: false, Configurable: true */
+ void defineReadonlyConfigurableProperty(const QString &name, const Value &value);
+ void defineReadonlyConfigurableProperty(String *name, const Value &value);
+
void insertMember(String *s, const Value &v, PropertyAttributes attributes = Attr_Data) {
Scope scope(engine());
ScopedProperty p(scope);
@@ -334,10 +336,47 @@ public:
{ return vtable()->get(this, name, hasProperty); }
inline ReturnedValue getIndexed(uint idx, bool *hasProperty = 0) const
{ return vtable()->getIndexed(this, idx, hasProperty); }
- inline void put(String *name, const Value &v)
- { vtable()->put(this, name, v); }
- inline void putIndexed(uint idx, const Value &v)
- { vtable()->putIndexed(this, idx, v); }
+
+ // use the set variants instead, to customize throw behavior
+ inline bool put(String *name, const Value &v)
+ { return vtable()->put(this, name, v); }
+ inline bool putIndexed(uint idx, const Value &v)
+ { return vtable()->putIndexed(this, idx, v); }
+
+ enum ThrowOnFailure {
+ DoThrowOnRejection,
+ DoNotThrow
+ };
+
+ // ES6: 7.3.3 Set (O, P, V, Throw)
+ inline bool set(String *name, const Value &v, ThrowOnFailure shouldThrow)
+ {
+ bool ret = vtable()->put(this, name, v);
+ // ES6: 7.3.3, 6: If success is false and Throw is true, throw a TypeError exception.
+ if (!ret && shouldThrow == ThrowOnFailure::DoThrowOnRejection) {
+ ExecutionEngine *e = engine();
+ if (!e->hasException) { // allow a custom set impl to throw itself
+ QString message = QLatin1String("Cannot assign to read-only property \"") +
+ name->toQString() + QLatin1Char('\"');
+ e->throwTypeError(message);
+ }
+ }
+ return ret;
+ }
+
+ inline bool setIndexed(uint idx, const Value &v, ThrowOnFailure shouldThrow)
+ {
+ bool ret = vtable()->putIndexed(this, idx, v);
+ if (!ret && shouldThrow == ThrowOnFailure::DoThrowOnRejection) {
+ ExecutionEngine *e = engine();
+ if (!e->hasException) { // allow a custom set impl to throw itself
+ e->throwTypeError();
+ }
+ }
+ return ret;
+ }
+
+
PropertyAttributes query(String *name) const
{ return vtable()->query(this, name); }
PropertyAttributes queryIndexed(uint index) const
@@ -366,8 +405,8 @@ protected:
static void call(const Managed *m, Scope &scope, CallData *);
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
static ReturnedValue getIndexed(const Managed *m, uint index, bool *hasProperty);
- static void put(Managed *m, String *name, const Value &value);
- static void putIndexed(Managed *m, uint index, const Value &value);
+ static bool put(Managed *m, String *name, const Value &value);
+ static bool putIndexed(Managed *m, uint index, const Value &value);
static PropertyAttributes query(const Managed *m, String *name);
static PropertyAttributes queryIndexed(const Managed *m, uint index);
static bool deleteProperty(Managed *m, String *name);
@@ -381,8 +420,8 @@ protected:
private:
ReturnedValue internalGet(String *name, bool *hasProperty) const;
ReturnedValue internalGetIndexed(uint index, bool *hasProperty) const;
- void internalPut(String *name, const Value &value);
- void internalPutIndexed(uint index, const Value &value);
+ bool internalPut(String *name, const Value &value);
+ bool internalPutIndexed(uint index, const Value &value);
bool internalDeleteProperty(String *name);
bool internalDeleteIndexedProperty(uint index);
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 97dbe24339..f650ffc7b1 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2017 Crimson AS <info@crimson.no>
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
@@ -89,10 +90,11 @@ void ObjectPrototype::init(ExecutionEngine *v4, Object *ctor)
ScopedObject o(scope, this);
ctor->defineReadonlyProperty(v4->id_prototype(), o);
- ctor->defineReadonlyProperty(v4->id_length(), Primitive::fromInt32(1));
+ ctor->defineReadonlyConfigurableProperty(v4->id_length(), Primitive::fromInt32(1));
ctor->defineDefaultProperty(QStringLiteral("getPrototypeOf"), method_getPrototypeOf, 1);
ctor->defineDefaultProperty(QStringLiteral("getOwnPropertyDescriptor"), method_getOwnPropertyDescriptor, 2);
ctor->defineDefaultProperty(QStringLiteral("getOwnPropertyNames"), method_getOwnPropertyNames, 1);
+ ctor->defineDefaultProperty(QStringLiteral("assign"), method_assign, 2);
ctor->defineDefaultProperty(QStringLiteral("create"), method_create, 2);
ctor->defineDefaultProperty(QStringLiteral("defineProperty"), method_defineProperty, 3);
ctor->defineDefaultProperty(QStringLiteral("defineProperties"), method_defineProperties, 2);
@@ -123,9 +125,8 @@ void ObjectPrototype::init(ExecutionEngine *v4, Object *ctor)
void ObjectPrototype::method_getPrototypeOf(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ ScopedObject o(scope, callData->args[0].toObject(scope.engine));
+ CHECK_EXCEPTION();
ScopedObject p(scope, o->prototype());
scope.result = !!p ? p->asReturnedValue() : Encode::null();
@@ -133,11 +134,8 @@ void ObjectPrototype::method_getPrototypeOf(const BuiltinFunction *, Scope &scop
void ObjectPrototype::method_getOwnPropertyDescriptor(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject O(scope, callData->argument(0));
- if (!O) {
- scope.result = scope.engine->throwTypeError();
- return;
- }
+ ScopedObject O(scope, callData->args[0].toObject(scope.engine));
+ CHECK_EXCEPTION();
if (ArgumentsObject::isNonStrictArgumentsObject(O))
static_cast<ArgumentsObject *>(O.getPointer())->fullyCreate();
@@ -154,13 +152,54 @@ void ObjectPrototype::method_getOwnPropertyDescriptor(const BuiltinFunction *, S
void ObjectPrototype::method_getOwnPropertyNames(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject O(scope, callData->argument(0));
- if (!O) {
- scope.result = scope.engine->throwTypeError();
+ ScopedObject O(scope, callData->args[0].toObject(scope.engine));
+ CHECK_EXCEPTION();
+
+ scope.result = getOwnPropertyNames(scope.engine, callData->args[0]);
+}
+
+// 19.1.2.1
+void ObjectPrototype::method_assign(const BuiltinFunction *, Scope &scope, CallData *callData)
+{
+ ScopedObject to(scope, callData->args[0].toObject(scope.engine));
+ CHECK_EXCEPTION();
+
+ if (callData->argc == 1) {
+ scope.result = to;
return;
}
- scope.result = getOwnPropertyNames(scope.engine, callData->args[0]);
+ for (int i = 1; i < callData->argc; ++i) {
+ if (callData->args[i].isUndefined() || callData->args[i].isNull())
+ continue;
+
+ ScopedObject from(scope, callData->args[i].toObject(scope.engine));
+ CHECK_EXCEPTION();
+ QV4::ScopedArrayObject keys(scope, QV4::ObjectPrototype::getOwnPropertyNames(scope.engine, from));
+ quint32 length = keys->getLength();
+
+ ScopedString nextKey(scope);
+ ScopedValue propValue(scope);
+ for (quint32 i = 0; i < length; ++i) {
+ nextKey = Value::fromReturnedValue(keys->getIndexed(i)).toString(scope.engine);
+
+ PropertyAttributes attrs;
+ ScopedProperty prop(scope);
+ from->getOwnProperty(nextKey, &attrs, prop);
+
+ if (attrs == PropertyFlag::Attr_Invalid)
+ continue;
+
+ if (!attrs.isEnumerable())
+ continue;
+
+ propValue = from->get(nextKey);
+ to->set(nextKey, propValue, Object::DoThrowOnRejection);
+ CHECK_EXCEPTION();
+ }
+ }
+
+ scope.result = to;
}
void ObjectPrototype::method_create(const BuiltinFunction *builtin, Scope &scope, CallData *callData)
@@ -246,8 +285,11 @@ void ObjectPrototype::method_defineProperties(const BuiltinFunction *, Scope &sc
void ObjectPrototype::method_seal(const BuiltinFunction *, Scope &scope, CallData *callData)
{
ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ if (!o) {
+ // 19.1.2.17, 1
+ scope.result = callData->argument(0);
+ return;
+ }
o->setInternalClass(o->internalClass()->sealed());
@@ -265,8 +307,11 @@ void ObjectPrototype::method_seal(const BuiltinFunction *, Scope &scope, CallDat
void ObjectPrototype::method_freeze(const BuiltinFunction *, Scope &scope, CallData *callData)
{
ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ if (!o) {
+ // 19.1.2.5, 1
+ scope.result = callData->argument(0);
+ return;
+ }
if (ArgumentsObject::isNonStrictArgumentsObject(o))
static_cast<ArgumentsObject *>(o.getPointer())->fullyCreate();
@@ -287,9 +332,11 @@ void ObjectPrototype::method_freeze(const BuiltinFunction *, Scope &scope, CallD
void ObjectPrototype::method_preventExtensions(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ ScopedObject o(scope, callData->args[0].toObject(scope.engine));
+ if (!o) {
+ scope.result = callData->argument(0);
+ return;
+ }
o->setInternalClass(o->internalClass()->nonExtensible());
scope.result = o;
@@ -297,9 +344,11 @@ void ObjectPrototype::method_preventExtensions(const BuiltinFunction *, Scope &s
void ObjectPrototype::method_isSealed(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ ScopedObject o(scope, callData->args[0].toObject(scope.engine));
+ if (!o) {
+ scope.result = Encode(true);
+ return;
+ }
if (o->isExtensible()) {
scope.result = Encode(false);
@@ -335,9 +384,11 @@ void ObjectPrototype::method_isSealed(const BuiltinFunction *, Scope &scope, Cal
void ObjectPrototype::method_isFrozen(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ ScopedObject o(scope, callData->args[0].toObject(scope.engine));
+ if (!o) {
+ scope.result = Encode(true);
+ return;
+ }
if (o->isExtensible()) {
scope.result = Encode(false);
@@ -373,18 +424,19 @@ void ObjectPrototype::method_isFrozen(const BuiltinFunction *, Scope &scope, Cal
void ObjectPrototype::method_isExtensible(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ ScopedObject o(scope, callData->args[0].toObject(scope.engine));
+ if (!o) {
+ scope.result = Encode(false);
+ return;
+ }
scope.result = Encode((bool)o->isExtensible());
}
void ObjectPrototype::method_keys(const BuiltinFunction *, Scope &scope, CallData *callData)
{
- ScopedObject o(scope, callData->argument(0));
- if (!o)
- THROW_TYPE_ERROR();
+ ScopedObject o(scope, callData->args[0].toObject(scope.engine));
+ CHECK_EXCEPTION();
ScopedArrayObject a(scope, scope.engine->newArrayObject());
@@ -670,12 +722,12 @@ ReturnedValue ObjectPrototype::fromPropertyDescriptor(ExecutionEngine *engine, c
return o.asReturnedValue();
}
-
+// es6: GetOwnPropertyKeys
Heap::ArrayObject *ObjectPrototype::getOwnPropertyNames(ExecutionEngine *v4, const Value &o)
{
Scope scope(v4);
ScopedArrayObject array(scope, v4->newArrayObject());
- ScopedObject O(scope, o);
+ ScopedObject O(scope, o.toObject(v4));
if (O) {
ObjectIterator it(scope, O, ObjectIterator::NoFlags);
ScopedValue name(scope);
diff --git a/src/qml/jsruntime/qv4objectproto_p.h b/src/qml/jsruntime/qv4objectproto_p.h
index 1db8615511..44b54267f3 100644
--- a/src/qml/jsruntime/qv4objectproto_p.h
+++ b/src/qml/jsruntime/qv4objectproto_p.h
@@ -81,6 +81,7 @@ struct ObjectPrototype: Object
static void method_getPrototypeOf(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_getOwnPropertyDescriptor(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_getOwnPropertyNames(const BuiltinFunction *, Scope &scope, CallData *callData);
+ static void method_assign(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_create(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_defineProperty(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_defineProperties(const BuiltinFunction *, Scope &scope, CallData *callData);
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h
index f75ac4d33a..9de597ad0e 100644
--- a/src/qml/jsruntime/qv4profiling_p.h
+++ b/src/qml/jsruntime/qv4profiling_p.h
@@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE
namespace QV4 {
namespace Profiling {
-struct Profiler {};
+class Profiler {};
}
}
diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp
index 889f4ea288..cdc29c8b9c 100644
--- a/src/qml/jsruntime/qv4qmlcontext.cpp
+++ b/src/qml/jsruntime/qv4qmlcontext.cpp
@@ -225,21 +225,19 @@ ReturnedValue QmlContextWrapper::get(const Managed *m, String *name, bool *hasPr
return Encode::undefined();
}
-void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
+bool QmlContextWrapper::put(Managed *m, String *name, const Value &value)
{
Q_ASSERT(m->as<QmlContextWrapper>());
QmlContextWrapper *resource = static_cast<QmlContextWrapper *>(m);
ExecutionEngine *v4 = resource->engine();
QV4::Scope scope(v4);
if (scope.hasException())
- return;
+ return false;
QV4::Scoped<QmlContextWrapper> wrapper(scope, resource);
uint member = wrapper->internalClass()->find(name);
- if (member < UINT_MAX) {
- wrapper->putValue(member, value);
- return;
- }
+ if (member < UINT_MAX)
+ return wrapper->putValue(member, value);
if (wrapper->d()->isNullWrapper) {
if (wrapper && wrapper->d()->readOnly) {
@@ -247,11 +245,10 @@ void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
QLatin1Char('"');
ScopedString e(scope, v4->newString(error));
v4->throwError(e);
- return;
+ return false;
}
- Object::put(m, name, value);
- return;
+ return Object::put(m, name, value);
}
// Its possible we could delay the calculation of the "actual" context (in the case
@@ -260,7 +257,7 @@ void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
QQmlContextData *expressionContext = context;
if (!context)
- return;
+ return false;
// See QV8ContextWrapper::Getter for resolution order
@@ -270,18 +267,18 @@ void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
const QV4::IdentifierHash<int> &properties = context->propertyNames();
// Search context properties
if (properties.count() && properties.value(name) != -1)
- return;
+ return false;
// Search scope object
if (scopeObject &&
QV4::QObjectWrapper::setQmlProperty(v4, context, scopeObject, name, QV4::QObjectWrapper::CheckRevision, value))
- return;
+ return true;
scopeObject = 0;
// Search context object
if (context->contextObject &&
QV4::QObjectWrapper::setQmlProperty(v4, context, context->contextObject, name, QV4::QObjectWrapper::CheckRevision, value))
- return;
+ return true;
context = context->parent;
}
@@ -292,10 +289,10 @@ void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
QString error = QLatin1String("Invalid write to global property \"") + name->toQString() +
QLatin1Char('"');
v4->throwError(error);
- return;
+ return false;
}
- Object::put(m, name, value);
+ return Object::put(m, name, value);
}
void Heap::QmlContext::init(QV4::ExecutionContext *outerContext, QV4::QmlContextWrapper *qml)
diff --git a/src/qml/jsruntime/qv4qmlcontext_p.h b/src/qml/jsruntime/qv4qmlcontext_p.h
index 9aec7467da..6e5e743609 100644
--- a/src/qml/jsruntime/qv4qmlcontext_p.h
+++ b/src/qml/jsruntime/qv4qmlcontext_p.h
@@ -100,7 +100,7 @@ struct Q_QML_EXPORT QmlContextWrapper : Object
void setReadOnly(bool b) { d()->readOnly = b; }
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
- static void put(Managed *m, String *name, const Value &value);
+ static bool put(Managed *m, String *name, const Value &value);
};
struct Q_QML_EXPORT QmlContext : public ExecutionContext
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 7260e71fab..c9b4b433bd 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -625,13 +625,13 @@ QV4::ReturnedValue QObjectWrapper::get(const Managed *m, String *name, bool *has
return that->getQmlProperty(qmlContext, name, IgnoreRevision, hasProperty, /*includeImports*/ true);
}
-void QObjectWrapper::put(Managed *m, String *name, const Value &value)
+bool QObjectWrapper::put(Managed *m, String *name, const Value &value)
{
QObjectWrapper *that = static_cast<QObjectWrapper*>(m);
ExecutionEngine *v4 = that->engine();
if (v4->hasException || QQmlData::wasDeleted(that->d()->object()))
- return;
+ return false;
QQmlContextData *qmlContext = v4->callingQmlContext();
if (!setQmlProperty(v4, qmlContext, that->d()->object(), name, QV4::QObjectWrapper::IgnoreRevision, value)) {
@@ -642,10 +642,13 @@ void QObjectWrapper::put(Managed *m, String *name, const Value &value)
QString error = QLatin1String("Cannot assign to non-existent property \"") +
name->toQString() + QLatin1Char('\"');
v4->throwError(error);
+ return false;
} else {
- QV4::Object::put(m, name, value);
+ return QV4::Object::put(m, name, value);
}
}
+
+ return true;
}
PropertyAttributes QObjectWrapper::query(const Managed *m, String *name)
@@ -673,18 +676,24 @@ void QObjectWrapper::advanceIterator(Managed *m, ObjectIterator *it, Value *name
QObjectWrapper *that = static_cast<QObjectWrapper*>(m);
- if (that->d()->object()) {
- const QMetaObject *mo = that->d()->object()->metaObject();
+ QObject *thatObject = that->d()->object();
+ if (thatObject && !QQmlData::wasDeleted(thatObject)) {
+ const QMetaObject *mo = thatObject->metaObject();
// These indices don't apply to gadgets, so don't block them.
const bool preventDestruction = mo->superClass() || mo == &QObject::staticMetaObject;
const int propertyCount = mo->propertyCount();
if (it->arrayIndex < static_cast<uint>(propertyCount)) {
- Scope scope(that->engine());
- ScopedString propName(scope, that->engine()->newString(QString::fromUtf8(mo->property(it->arrayIndex).name())));
+ ExecutionEngine *thatEngine = that->engine();
+ Scope scope(thatEngine);
+ const QMetaProperty property = mo->property(it->arrayIndex);
+ ScopedString propName(scope, thatEngine->newString(QString::fromUtf8(property.name())));
name->setM(propName->d());
++it->arrayIndex;
*attributes = QV4::Attr_Data;
- p->value = that->get(propName);
+
+ QQmlPropertyData local;
+ local.load(property);
+ p->value = that->getProperty(thatEngine, thatObject, &local);
return;
}
const int methodCount = mo->methodCount();
@@ -694,11 +703,15 @@ void QObjectWrapper::advanceIterator(Managed *m, ObjectIterator *it, Value *name
++it->arrayIndex;
if (method.access() == QMetaMethod::Private || (preventDestruction && (index == deleteLaterIdx || index == destroyedIdx1 || index == destroyedIdx2)))
continue;
- Scope scope(that->engine());
- ScopedString methodName(scope, that->engine()->newString(QString::fromUtf8(method.name())));
+ ExecutionEngine *thatEngine = that->engine();
+ Scope scope(thatEngine);
+ ScopedString methodName(scope, thatEngine->newString(QString::fromUtf8(method.name())));
name->setM(methodName->d());
*attributes = QV4::Attr_Data;
- p->value = that->get(methodName);
+
+ QQmlPropertyData local;
+ local.load(method);
+ p->value = that->getProperty(thatEngine, thatObject, &local);
return;
}
}
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h
index b09e06cec5..d81ef2a680 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper_p.h
+++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h
@@ -192,7 +192,7 @@ protected:
QQmlPropertyData *findProperty(ExecutionEngine *engine, QQmlContextData *qmlContext, String *name, RevisionMode revisionMode, QQmlPropertyData *local) const;
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
- static void put(Managed *m, String *name, const Value &value);
+ static bool put(Managed *m, String *name, const Value &value);
static PropertyAttributes query(const Managed *, String *name);
static void advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes);
static void markObjects(Heap::Base *that, QV4::ExecutionEngine *e);
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 40682aaa4b..0894d0c25b 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -367,7 +367,7 @@ void RegExpPrototype::method_exec(const BuiltinFunction *, Scope &scope, CallDat
RETURN_RESULT(Encode::null());
}
- uint* matchOffsets = (uint*)alloca(r->value()->captureCount() * 2 * sizeof(uint));
+ Q_ALLOCA_VAR(uint, matchOffsets, r->value()->captureCount() * 2 * sizeof(uint));
const int result = Scoped<RegExp>(scope, r->value())->match(s, offset, matchOffsets);
Scoped<RegExpCtor> regExpCtor(scope, scope.engine->regExpCtor());
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 7f184f8221..6590054bf3 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1264,12 +1264,16 @@ ReturnedValue Runtime::method_unwindException(ExecutionEngine *engine)
*/
void Runtime::method_pushWithScope(const Value &o, NoThrowEngine *engine)
{
- engine->pushContext(engine->currentContext->newWithContext(o.toObject(engine)));
+ QV4::Value *v = engine->jsAlloca(1);
+ Heap::Object *withObject = o.toObject(engine);
+ *v = withObject;
+ engine->pushContext(engine->currentContext->newWithContext(withObject));
Q_ASSERT(engine->jsStackTop == engine->currentContext + 2);
}
void Runtime::method_pushCatchScope(NoThrowEngine *engine, int exceptionVarNameIndex)
{
+ engine->jsAlloca(1); // keep this symmetric with pushWithScope
ExecutionContext *c = engine->currentContext;
engine->pushContext(c->newCatchContext(c->d()->compilationUnit->runtimeStrings[exceptionVarNameIndex], engine->catchException(0)));
Q_ASSERT(engine->jsStackTop == engine->currentContext + 2);
@@ -1279,7 +1283,7 @@ void Runtime::method_popScope(NoThrowEngine *engine)
{
Q_ASSERT(engine->jsStackTop == engine->currentContext + 2);
engine->popContext();
- engine->jsStackTop -= 2;
+ engine->jsStackTop -= 3;
}
void Runtime::method_declareVar(ExecutionEngine *engine, bool deletable, int nameIndex)
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index 8ce10e326d..6d3110771e 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -274,20 +274,20 @@ public:
return Encode::undefined();
}
- void containerPutIndexed(uint index, const QV4::Value &value)
+ bool containerPutIndexed(uint index, const QV4::Value &value)
{
if (internalClass()->engine->hasException)
- return;
+ return false;
/* Qt containers have int (rather than uint) allowable indexes. */
if (index > INT_MAX) {
generateWarning(engine(), QLatin1String("Index out of range during indexed set"));
- return;
+ return false;
}
if (d()->isReference) {
if (!d()->object)
- return;
+ return false;
loadReference();
}
@@ -313,6 +313,7 @@ public:
if (d()->isReference)
storeReference();
+ return true;
}
QV4::PropertyAttributes containerQueryIndexed(uint index) const
@@ -540,8 +541,8 @@ public:
static QV4::ReturnedValue getIndexed(const QV4::Managed *that, uint index, bool *hasProperty)
{ return static_cast<const QQmlSequence<Container> *>(that)->containerGetIndexed(index, hasProperty); }
- static void putIndexed(Managed *that, uint index, const QV4::Value &value)
- { static_cast<QQmlSequence<Container> *>(that)->containerPutIndexed(index, value); }
+ static bool putIndexed(Managed *that, uint index, const QV4::Value &value)
+ { return static_cast<QQmlSequence<Container> *>(that)->containerPutIndexed(index, value); }
static QV4::PropertyAttributes queryIndexed(const QV4::Managed *that, uint index)
{ return static_cast<const QQmlSequence<Container> *>(that)->containerQueryIndexed(index); }
static bool deleteIndexedProperty(QV4::Managed *that, uint index)
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 3c6a24e035..72be11eca0 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -200,6 +200,7 @@ void StringPrototype::init(ExecutionEngine *engine, Object *ctor)
defineDefaultProperty(QStringLiteral("lastIndexOf"), method_lastIndexOf, 1);
defineDefaultProperty(QStringLiteral("localeCompare"), method_localeCompare, 1);
defineDefaultProperty(QStringLiteral("match"), method_match, 1);
+ defineDefaultProperty(QStringLiteral("repeat"), method_repeat, 1);
defineDefaultProperty(QStringLiteral("replace"), method_replace, 2);
defineDefaultProperty(QStringLiteral("search"), method_search, 1);
defineDefaultProperty(QStringLiteral("slice"), method_slice, 2);
@@ -458,6 +459,21 @@ void StringPrototype::method_match(const BuiltinFunction *, Scope &scope, CallDa
scope.result = a;
}
+void StringPrototype::method_repeat(const BuiltinFunction *, Scope &scope, CallData *callData)
+{
+ QString value = getThisString(scope, callData);
+ CHECK_EXCEPTION();
+
+ double repeats = callData->args[0].toInteger();
+
+ if (repeats < 0 || qIsInf(repeats)) {
+ scope.result = scope.engine->throwRangeError(QLatin1String("Invalid count value"));
+ return;
+ }
+
+ scope.result = scope.engine->newString(value.repeated(int(repeats)));
+}
+
static void appendReplacementString(QString *result, const QString &input, const QString& replaceValue, uint* matchOffsets, int captureCount)
{
result->reserve(result->length() + replaceValue.length());
@@ -634,7 +650,7 @@ void StringPrototype::method_search(const BuiltinFunction *, Scope &scope, CallD
Q_ASSERT(regExp);
}
Scoped<RegExp> re(scope, regExp->value());
- uint* matchOffsets = (uint*)alloca(regExp->value()->captureCount() * 2 * sizeof(uint));
+ Q_ALLOCA_VAR(uint, matchOffsets, regExp->value()->captureCount() * 2 * sizeof(uint));
uint result = re->match(string, /*offset*/0, matchOffsets);
if (result == JSC::Yarr::offsetNoMatch)
scope.result = Encode(-1);
@@ -705,7 +721,7 @@ void StringPrototype::method_split(const BuiltinFunction *, Scope &scope, CallDa
ScopedString s(scope);
if (re) {
uint offset = 0;
- uint* matchOffsets = (uint*)alloca(re->value()->captureCount() * 2 * sizeof(uint));
+ Q_ALLOCA_VAR(uint, matchOffsets, re->value()->captureCount() * 2 * sizeof(uint));
while (true) {
Scoped<RegExp> regexp(scope, re->value());
uint result = regexp->match(text, offset, matchOffsets);
diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h
index 0ee7a6ece9..aed3bc1e28 100644
--- a/src/qml/jsruntime/qv4stringobject_p.h
+++ b/src/qml/jsruntime/qv4stringobject_p.h
@@ -121,6 +121,7 @@ struct StringPrototype: StringObject
static void method_lastIndexOf(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_localeCompare(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_match(const BuiltinFunction *, Scope &scope, CallData *callData);
+ static void method_repeat(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_replace(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_search(const BuiltinFunction *, Scope &scope, CallData *callData);
static void method_slice(const BuiltinFunction *, Scope &scope, CallData *callData);
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index cecd1e6958..5573a2e57f 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -398,11 +398,11 @@ ReturnedValue TypedArray::getIndexed(const Managed *m, uint index, bool *hasProp
return a->d()->type->read(a->d()->buffer->data->data(), byteOffset);
}
-void TypedArray::putIndexed(Managed *m, uint index, const Value &value)
+bool TypedArray::putIndexed(Managed *m, uint index, const Value &value)
{
ExecutionEngine *v4 = static_cast<Object *>(m)->engine();
if (v4->hasException)
- return;
+ return false;
Scope scope(v4);
Scoped<TypedArray> a(scope, static_cast<TypedArray *>(m));
@@ -413,11 +413,12 @@ void TypedArray::putIndexed(Managed *m, uint index, const Value &value)
goto reject;
a->d()->type->write(scope.engine, a->d()->buffer->data->data(), byteOffset, value);
- return;
+ return true;
reject:
if (scope.engine->current->strictMode)
scope.engine->throwTypeError();
+ return false;
}
void TypedArrayPrototype::init(ExecutionEngine *engine, TypedArrayCtor *ctor)
diff --git a/src/qml/jsruntime/qv4typedarray_p.h b/src/qml/jsruntime/qv4typedarray_p.h
index eefed2db4b..fbf13c9815 100644
--- a/src/qml/jsruntime/qv4typedarray_p.h
+++ b/src/qml/jsruntime/qv4typedarray_p.h
@@ -133,7 +133,7 @@ struct Q_QML_PRIVATE_EXPORT TypedArray : Object
static void markObjects(Heap::Base *that, ExecutionEngine *e);
static ReturnedValue getIndexed(const Managed *m, uint index, bool *hasProperty);
- static void putIndexed(Managed *m, uint index, const Value &value);
+ static bool putIndexed(Managed *m, uint index, const Value &value);
};
struct TypedArrayCtor: FunctionObject
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index b9183313cd..be2772c23f 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -402,7 +402,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
}
}
- QV4::Value **scopes = static_cast<QV4::Value **>(alloca(sizeof(QV4::Value *)*(2 + 2*scopeDepth)));
+ Q_ALLOCA_VAR(QV4::Value*, scopes, sizeof(QV4::Value *)*(2 + 2*scopeDepth));
{
scopes[0] = const_cast<QV4::Value *>(context->d()->compilationUnit->constants);
// stack gets setup in push instruction
@@ -957,8 +957,6 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
return QV4::Encode::undefined();
code = exceptionHandler;
}
-
-
}
#ifdef MOTH_THREADED_INTERPRETER
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 6330ef6038..a829e902fb 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -328,40 +328,65 @@ void Chunk::freeAll()
void Chunk::sortIntoBins(HeapItem **bins, uint nBins)
{
+// qDebug() << "sortIntoBins:";
HeapItem *base = realBase();
#if QT_POINTER_SIZE == 8
const int start = 0;
#else
const int start = 1;
#endif
+#ifndef QT_NO_DEBUG
+ uint freeSlots = 0;
+ uint allocatedSlots = 0;
+#endif
for (int i = start; i < EntriesInBitmap; ++i) {
quintptr usedSlots = (objectBitmap[i]|extendsBitmap[i]);
#if QT_POINTER_SIZE == 8
if (!i)
usedSlots |= (static_cast<quintptr>(1) << (HeaderSize/SlotSize)) - 1;
#endif
- uint index = qCountTrailingZeroBits(usedSlots + 1);
- if (index == Bits)
- continue;
- uint freeStart = i*Bits + index;
- usedSlots &= ~((static_cast<quintptr>(1) << index) - 1);
- while (i < EntriesInBitmap && !usedSlots) {
- ++i;
- usedSlots = (objectBitmap[i]|extendsBitmap[i]);
+#ifndef QT_NO_DEBUG
+ allocatedSlots += qPopulationCount(usedSlots);
+// qDebug() << hex << " i=" << i << "used=" << usedSlots;
+#endif
+ while (1) {
+ uint index = qCountTrailingZeroBits(usedSlots + 1);
+ if (index == Bits)
+ break;
+ uint freeStart = i*Bits + index;
+ usedSlots &= ~((static_cast<quintptr>(1) << index) - 1);
+ while (!usedSlots) {
+ ++i;
+ if (i == EntriesInBitmap) {
+ usedSlots = (quintptr)-1;
+ break;
+ }
+ usedSlots = (objectBitmap[i]|extendsBitmap[i]);
+#ifndef QT_NO_DEBUG
+ allocatedSlots += qPopulationCount(usedSlots);
+// qDebug() << hex << " i=" << i << "used=" << usedSlots;
+#endif
+ }
+ HeapItem *freeItem = base + freeStart;
+
+ index = qCountTrailingZeroBits(usedSlots);
+ usedSlots |= (quintptr(1) << index) - 1;
+ uint freeEnd = i*Bits + index;
+ uint nSlots = freeEnd - freeStart;
+#ifndef QT_NO_DEBUG
+// qDebug() << hex << " got free slots from" << freeStart << "to" << freeEnd << "n=" << nSlots << "usedSlots=" << usedSlots;
+ freeSlots += nSlots;
+#endif
+ Q_ASSERT(freeEnd > freeStart && freeEnd <= NumSlots);
+ freeItem->freeData.availableSlots = nSlots;
+ uint bin = qMin(nBins - 1, nSlots);
+ freeItem->freeData.next = bins[bin];
+ bins[bin] = freeItem;
}
- if (i == EntriesInBitmap)
- usedSlots = 1;
- HeapItem *freeItem = base + freeStart;
-
- uint freeEnd = i*Bits + qCountTrailingZeroBits(usedSlots);
- uint nSlots = freeEnd - freeStart;
- Q_ASSERT(freeEnd > freeStart && freeEnd <= NumSlots);
- freeItem->freeData.availableSlots = nSlots;
- uint bin = qMin(nBins - 1, nSlots);
- freeItem->freeData.next = bins[bin];
- bins[bin] = freeItem;
- // DEBUG << "binnig item" << freeItem << nSlots << bin << freeItem->freeData.availableSlots;
}
+#ifndef QT_NO_DEBUG
+ Q_ASSERT(freeSlots + allocatedSlots == (EntriesInBitmap - start) * 8 * sizeof(quintptr));
+#endif
}
@@ -427,28 +452,7 @@ HeapItem *BlockAllocator::allocate(size_t size, bool forceAllocation) {
goto done;
}
}
-#if 0
- for (uint b = bin + 1; b < NumBins - 1; ++b) {
- if ((m = freeBins[b])) {
- Q_ASSERT(binForSlots(m->freeData.availableSlots) == b);
- freeBins[b] = m->freeData.next;
- // DEBUG << "looking for empty bin" << bin << "size" << size << "found" << b;
- uint remainingSlots = m->freeData.availableSlots - slotsRequired;
- // DEBUG << "found free slots of size" << m->freeData.availableSlots << m << "remaining" << remainingSlots;
- if (remainingSlots < 2) {
- // avoid too much fragmentation and rather mark the memory as used
- size += remainingSlots*Chunk::SlotSize;
- goto done;
- }
- HeapItem *remainder = m + slotsRequired;
- remainder->freeData.availableSlots = remainingSlots;
- uint binForRemainder = binForSlots(remainingSlots);
- remainder->freeData.next = freeBins[binForRemainder];
- freeBins[binForRemainder] = remainder;
- goto done;
- }
- }
-#endif
+
if (nFree >= slotsRequired) {
// use bump allocation
Q_ASSERT(nextFree);
@@ -467,13 +471,11 @@ HeapItem *BlockAllocator::allocate(size_t size, bool forceAllocation) {
size_t remainingSlots = m->freeData.availableSlots - slotsRequired;
// DEBUG << "found large free slots of size" << m->freeData.availableSlots << m << "remaining" << remainingSlots;
- if (remainingSlots < 2) {
- // avoid too much fragmentation and rather mark the memory as used
- size += remainingSlots*Chunk::SlotSize;
+ if (remainingSlots == 0)
goto done;
- }
+
HeapItem *remainder = m + slotsRequired;
- if (remainingSlots >= 2*NumBins) {
+ if (remainingSlots > nFree) {
if (nFree) {
size_t bin = binForSlots(nFree);
nextFree->freeData.next = freeBins[bin];
@@ -493,6 +495,24 @@ HeapItem *BlockAllocator::allocate(size_t size, bool forceAllocation) {
last = &m->freeData.next;
}
+ if (slotsRequired < NumBins - 1) {
+ // check if we can split up another slot
+ for (size_t i = slotsRequired + 1; i < NumBins - 1; ++i) {
+ m = freeBins[i];
+ if (m) {
+ freeBins[i] = m->freeData.next; // take it out of the list
+// qDebug() << "got item" << slotsRequired << "from slot" << i;
+ size_t remainingSlots = i - slotsRequired;
+ Q_ASSERT(remainingSlots < NumBins - 1);
+ HeapItem *remainder = m + slotsRequired;
+ remainder->freeData.availableSlots = remainingSlots;
+ remainder->freeData.next = freeBins[remainingSlots];
+ freeBins[remainingSlots] = remainder;
+ goto done;
+ }
+ }
+ }
+
if (!m) {
if (!forceAllocation)
return 0;
@@ -622,14 +642,24 @@ MemoryManager::MemoryManager(ExecutionEngine *engine)
#endif
}
+#ifndef QT_NO_DEBUG
+static size_t lastAllocRequestedSlots = 0;
+#endif
+
Heap::Base *MemoryManager::allocString(std::size_t unmanagedSize)
{
- if (aggressiveGC)
+ const size_t stringSize = align(sizeof(Heap::String));
+#ifndef QT_NO_DEBUG
+ lastAllocRequestedSlots = stringSize >> Chunk::SlotSizeShift;
+#endif
+
+ bool didGCRun = false;
+ if (aggressiveGC) {
runGC();
+ didGCRun = true;
+ }
- const size_t stringSize = align(sizeof(Heap::String));
unmanagedHeapSize += unmanagedSize;
- bool didGCRun = false;
if (unmanagedHeapSize > unmanagedHeapSizeGCLimit) {
runGC();
@@ -655,8 +685,15 @@ Heap::Base *MemoryManager::allocString(std::size_t unmanagedSize)
Heap::Base *MemoryManager::allocData(std::size_t size)
{
- if (aggressiveGC)
+#ifndef QT_NO_DEBUG
+ lastAllocRequestedSlots = size >> Chunk::SlotSizeShift;
+#endif
+
+ bool didRunGC = false;
+ if (aggressiveGC) {
runGC();
+ didRunGC = true;
+ }
#ifdef DETAILED_MM_STATS
willAllocate(size);
#endif // DETAILED_MM_STATS
@@ -671,7 +708,7 @@ Heap::Base *MemoryManager::allocData(std::size_t size)
HeapItem *m = blockAllocator.allocate(size);
if (!m) {
- if (shouldRunGC())
+ if (!didRunGC && shouldRunGC())
runGC();
m = blockAllocator.allocate(size, true);
}
@@ -817,6 +854,26 @@ bool MemoryManager::shouldRunGC() const
return false;
}
+size_t dumpBins(BlockAllocator *b, bool printOutput = true)
+{
+ size_t totalFragmentedSlots = 0;
+ if (printOutput)
+ qDebug() << "Fragmentation map:";
+ for (uint i = 0; i < BlockAllocator::NumBins; ++i) {
+ uint nEntries = 0;
+ HeapItem *h = b->freeBins[i];
+ while (h) {
+ ++nEntries;
+ totalFragmentedSlots += h->freeData.availableSlots;
+ h = h->freeData.next;
+ }
+ if (printOutput)
+ qDebug() << " number of entries in slot" << i << ":" << nEntries;
+ }
+ if (printOutput)
+ qDebug() << " total mem in bins" << totalFragmentedSlots*Chunk::SlotSize;
+ return totalFragmentedSlots*Chunk::SlotSize;
+}
void MemoryManager::runGC()
{
@@ -833,31 +890,56 @@ void MemoryManager::runGC()
sweep();
// DEBUG << "RUN GC: allocated:" << allocator.allocatedMem() << "used before" << oldUsed << "used now" << allocator.usedMem();
} else {
+ bool triggeredByUnmanagedHeap = (unmanagedHeapSize > unmanagedHeapSizeGCLimit);
+ size_t oldUnmanagedSize = unmanagedHeapSize;
const size_t totalMem = getAllocatedMem();
+ const size_t usedBefore = getUsedMem();
+ const size_t largeItemsBefore = getLargeItemsMem();
+
+ qDebug() << "========== GC ==========";
+#ifndef QT_NO_DEBUG
+ qDebug() << " Triggered by alloc request of" << lastAllocRequestedSlots << "slots.";
+#endif
+ qDebug() << "Allocated" << totalMem << "bytes in" << blockAllocator.chunks.size() << "chunks";
+ qDebug() << "Fragmented memory before GC" << (totalMem - usedBefore);
+ dumpBins(&blockAllocator);
QElapsedTimer t;
t.start();
mark();
qint64 markTime = t.restart();
- const size_t usedBefore = getUsedMem();
- const size_t largeItemsBefore = getLargeItemsMem();
sweep();
const size_t usedAfter = getUsedMem();
const size_t largeItemsAfter = getLargeItemsMem();
qint64 sweepTime = t.elapsed();
- qDebug() << "========== GC ==========";
+ if (triggeredByUnmanagedHeap) {
+ qDebug() << "triggered by unmanaged heap:";
+ qDebug() << " old unmanaged heap size:" << oldUnmanagedSize;
+ qDebug() << " new unmanaged heap:" << unmanagedHeapSize;
+ qDebug() << " unmanaged heap limit:" << unmanagedHeapSizeGCLimit;
+ }
+ size_t memInBins = dumpBins(&blockAllocator);
qDebug() << "Marked object in" << markTime << "ms.";
qDebug() << "Sweeped object in" << sweepTime << "ms.";
- qDebug() << "Allocated" << totalMem << "bytes";
qDebug() << "Used memory before GC:" << usedBefore;
qDebug() << "Used memory after GC:" << usedAfter;
qDebug() << "Freed up bytes:" << (usedBefore - usedAfter);
- qDebug() << "Large item memory before GC:" << largeItemsBefore;
- qDebug() << "Large item memory after GC:" << largeItemsAfter;
- qDebug() << "Large item memory freed up:" << (largeItemsBefore - largeItemsAfter);
+ size_t lost = blockAllocator.allocatedMem() - memInBins - usedAfter;
+ if (lost)
+ qDebug() << "!!!!!!!!!!!!!!!!!!!!! LOST MEM:" << lost << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
+ if (largeItemsBefore || largeItemsAfter) {
+ qDebug() << "Large item memory before GC:" << largeItemsBefore;
+ qDebug() << "Large item memory after GC:" << largeItemsAfter;
+ qDebug() << "Large item memory freed up:" << (largeItemsBefore - largeItemsAfter);
+ }
qDebug() << "======== End GC ========";
}
+
+ if (aggressiveGC) {
+ // ensure we don't 'loose' any memory
+ Q_ASSERT(blockAllocator.allocatedMem() == getUsedMem() + dumpBins(&blockAllocator, false));
+ }
}
size_t MemoryManager::getUsedMem() const
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g
index 9cd212015e..ca84e0c157 100644
--- a/src/qml/parser/qqmljs.g
+++ b/src/qml/parser/qqmljs.g
@@ -71,7 +71,7 @@
%token T_VAR "var" T_VOID "void" T_WHILE "while"
%token T_WITH "with" T_XOR "^" T_XOR_EQ "^="
%token T_NULL "null" T_TRUE "true" T_FALSE "false"
-%token T_CONST "const"
+%token T_CONST "const" T_LET "let"
%token T_DEBUGGER "debugger"
%token T_RESERVED_WORD "reserved word"
%token T_MULTILINE_STRING_LITERAL "multiline string literal"
@@ -1622,6 +1622,7 @@ ReservedIdentifier: T_VAR ;
ReservedIdentifier: T_VOID ;
ReservedIdentifier: T_WHILE ;
ReservedIdentifier: T_CONST ;
+ReservedIdentifier: T_LET ;
ReservedIdentifier: T_DEBUGGER ;
ReservedIdentifier: T_RESERVED_WORD ;
ReservedIdentifier: T_WITH ;
@@ -2486,14 +2487,26 @@ VariableStatement: VariableDeclarationKind VariableDeclarationList T_AUTOMATIC_S
VariableStatement: VariableDeclarationKind VariableDeclarationList T_SEMICOLON ;
/.
case $rule_number: {
- AST::VariableStatement *node = new (pool) AST::VariableStatement(
- sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
+ if (sym(1).ival == T_LET)
+ s = AST::VariableDeclaration::BlockScope;
+ else if (sym(1).ival == T_CONST)
+ s = AST::VariableDeclaration::ReadOnlyBlockScope;
+
+ AST::VariableStatement *node = new (pool) AST::VariableStatement(sym(2).VariableDeclarationList->finish(s));
node->declarationKindToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
./
+VariableDeclarationKind: T_LET ;
+/.
+case $rule_number: {
+ sym(1).ival = T_LET;
+} break;
+./
+
VariableDeclarationKind: T_CONST ;
/.
case $rule_number: {
@@ -2542,7 +2555,8 @@ case $rule_number: {
VariableDeclaration: JsIdentifier InitialiserOpt ;
/.
case $rule_number: {
- AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
+ AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression, s);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
@@ -2551,7 +2565,8 @@ case $rule_number: {
VariableDeclarationNotIn: JsIdentifier InitialiserNotInOpt ;
/.
case $rule_number: {
- AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
+ AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression, s);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
@@ -2677,8 +2692,9 @@ case $rule_number: {
IterationStatement: T_FOR T_LPAREN T_VAR VariableDeclarationListNotIn T_SEMICOLON ExpressionOpt T_SEMICOLON ExpressionOpt T_RPAREN Statement ;
/.
case $rule_number: {
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
AST::LocalForStatement *node = new (pool) AST::LocalForStatement(
- sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
+ sym(4).VariableDeclarationList->finish(s), sym(6).Expression,
sym(8).Expression, sym(10).Statement);
node->forToken = loc(1);
node->lparenToken = loc(2);
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h
index 9b06bf3d31..0de419d697 100644
--- a/src/qml/parser/qqmljsast_p.h
+++ b/src/qml/parser/qqmljsast_p.h
@@ -1315,10 +1315,18 @@ class QML_PARSER_EXPORT VariableDeclaration: public Node
public:
QQMLJS_DECLARE_AST_NODE(VariableDeclaration)
- VariableDeclaration(const QStringRef &n, ExpressionNode *e):
- name (n), expression (e), readOnly(false)
+ enum VariableScope {
+ FunctionScope,
+ BlockScope, // let
+ ReadOnlyBlockScope // const
+ };
+
+ VariableDeclaration(const QStringRef &n, ExpressionNode *e, VariableScope s):
+ name (n), expression (e), scope(s)
{ kind = K; }
+ bool isLexicallyScoped() const { return scope != FunctionScope; }
+
void accept0(Visitor *visitor) override;
SourceLocation firstSourceLocation() const override
@@ -1330,8 +1338,8 @@ public:
// attributes
QStringRef name;
ExpressionNode *expression;
- bool readOnly;
SourceLocation identifierToken;
+ VariableScope scope;
};
class QML_PARSER_EXPORT VariableDeclarationList: public Node
@@ -1363,14 +1371,13 @@ public:
return declaration->lastSourceLocation();
}
- inline VariableDeclarationList *finish (bool readOnly)
+ inline VariableDeclarationList *finish(VariableDeclaration::VariableScope s)
{
VariableDeclarationList *front = next;
next = 0;
- if (readOnly) {
- VariableDeclarationList *vdl;
- for (vdl = front; vdl != 0; vdl = vdl->next)
- vdl->declaration->readOnly = true;
+ VariableDeclarationList *vdl;
+ for (vdl = front; vdl != 0; vdl = vdl->next) {
+ vdl->declaration->scope = s;
}
return front;
}
diff --git a/src/qml/parser/qqmljsgrammar.cpp b/src/qml/parser/qqmljsgrammar.cpp
index b27f4af080..ca5a4bbd85 100644
--- a/src/qml/parser/qqmljsgrammar.cpp
+++ b/src/qml/parser/qqmljsgrammar.cpp
@@ -51,48 +51,48 @@ const char *const QQmlJSGrammar::spell [] = {
"||", "+", "+=", "++", "?", "}", "]", "%", "%=", "return",
")", ";", 0, "*", "*=", "string literal", "property", "signal", "readonly", "switch",
"this", "throw", "~", "try", "typeof", "var", "void", "while", "with", "^",
- "^=", "null", "true", "false", "const", "debugger", "reserved word", "multiline string literal", "comment", 0,
- "public", "import", "pragma", "as", "on", "get", "set", 0, 0, 0,
- 0, 0, 0, 0, 0, 0};
+ "^=", "null", "true", "false", "const", "let", "debugger", "reserved word", "multiline string literal", "comment",
+ 0, "public", "import", "pragma", "as", "on", "get", "set", 0, 0,
+ 0, 0, 0, 0, 0, 0, 0};
const short QQmlJSGrammar::lhs [] = {
- 106, 106, 106, 106, 106, 106, 107, 113, 113, 116,
- 116, 116, 116, 119, 121, 117, 117, 118, 118, 118,
- 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, 138, 139, 139, 140, 140, 111, 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, 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, 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};
+ 107, 107, 107, 107, 107, 107, 108, 114, 114, 117,
+ 117, 117, 117, 120, 122, 118, 118, 119, 119, 119,
+ 119, 119, 119, 119, 119, 123, 124, 116, 115, 127,
+ 127, 128, 128, 129, 129, 126, 112, 112, 112, 112,
+ 131, 131, 131, 131, 131, 131, 131, 112, 139, 139,
+ 139, 139, 140, 140, 141, 141, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 125, 125, 125, 125,
+ 125, 125, 125, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 130, 146, 146, 146, 146, 145, 145, 150, 150,
+ 150, 148, 148, 151, 151, 151, 151, 154, 154, 154,
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 155,
+ 155, 121, 121, 121, 121, 121, 158, 158, 159, 159,
+ 159, 159, 157, 157, 160, 160, 161, 161, 162, 162,
+ 162, 163, 163, 163, 163, 163, 163, 163, 163, 163,
+ 163, 164, 164, 164, 164, 165, 165, 165, 166, 166,
+ 166, 166, 167, 167, 167, 167, 167, 167, 167, 168,
+ 168, 168, 168, 168, 168, 169, 169, 169, 169, 169,
+ 170, 170, 170, 170, 170, 171, 171, 172, 172, 173,
+ 173, 174, 174, 175, 175, 176, 176, 177, 177, 178,
+ 178, 179, 179, 180, 180, 181, 181, 182, 182, 149,
+ 149, 183, 183, 184, 184, 184, 184, 184, 184, 184,
+ 184, 184, 184, 184, 184, 110, 110, 185, 185, 186,
+ 186, 187, 187, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 132, 196,
+ 196, 195, 195, 143, 143, 197, 197, 197, 198, 198,
+ 200, 200, 199, 201, 204, 202, 202, 205, 203, 203,
+ 133, 134, 134, 135, 135, 188, 188, 188, 188, 188,
+ 188, 188, 188, 189, 189, 189, 189, 190, 190, 190,
+ 190, 191, 191, 136, 137, 206, 206, 209, 209, 207,
+ 207, 210, 208, 192, 193, 193, 138, 138, 138, 211,
+ 212, 194, 194, 213, 142, 156, 156, 214, 214, 153,
+ 153, 152, 152, 215, 113, 113, 216, 216, 111, 111,
+ 147, 147, 217};
const short QQmlJSGrammar::rhs [] = {
2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
@@ -110,777 +110,798 @@ const short QQmlJSGrammar::rhs [] = {
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, 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, 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, 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, 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, 0, 28, 0, 0, 0, 28, 0, 189, 256,
+ 220, 228, 224, 168, 240, 216, 3, 153, 85, 169,
+ 232, 236, 157, 186, 167, 172, 152, 206, 193, 0,
+ 92, 93, 88, 0, 82, 77, 361, 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};
+ 80, 83, 79, 91, 84, 0, 87, 0, 0, 182,
+ 0, 0, 169, 188, 171, 170, 0, 0, 0, 184,
+ 185, 183, 187, 0, 217, 0, 0, 0, 0, 207,
+ 0, 0, 0, 0, 0, 0, 197, 0, 0, 0,
+ 191, 192, 190, 195, 199, 198, 196, 194, 209, 208,
+ 210, 0, 225, 0, 221, 0, 0, 163, 150, 162,
+ 151, 118, 119, 120, 145, 121, 147, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 146, 133,
+ 134, 148, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 149, 0, 0, 161, 257, 164, 0, 165,
+ 0, 166, 160, 0, 253, 246, 244, 251, 252, 250,
+ 249, 255, 248, 247, 245, 254, 241, 0, 229, 0,
+ 0, 233, 0, 0, 237, 0, 0, 163, 155, 0,
+ 154, 0, 159, 173, 0, 350, 350, 351, 0, 348,
+ 0, 349, 0, 352, 264, 271, 270, 278, 266, 0,
+ 267, 0, 353, 0, 360, 268, 269, 85, 274, 272,
+ 357, 354, 359, 275, 0, 287, 0, 0, 0, 0,
+ 344, 0, 361, 286, 258, 301, 0, 0, 0, 288,
+ 0, 0, 276, 277, 0, 265, 273, 302, 303, 0,
+ 350, 0, 0, 352, 0, 345, 346, 0, 334, 358,
+ 0, 318, 319, 320, 321, 0, 314, 315, 316, 317,
+ 342, 343, 0, 0, 0, 0, 0, 306, 307, 308,
+ 262, 260, 222, 230, 226, 242, 218, 263, 0, 169,
+ 234, 238, 211, 200, 0, 0, 219, 0, 0, 0,
+ 0, 212, 0, 0, 0, 0, 0, 204, 202, 205,
+ 203, 201, 214, 213, 215, 0, 227, 0, 223, 0,
+ 261, 169, 0, 243, 258, 259, 0, 258, 0, 0,
+ 310, 0, 0, 0, 312, 0, 231, 0, 0, 235,
+ 0, 0, 239, 299, 0, 291, 300, 294, 0, 298,
+ 0, 258, 292, 0, 258, 0, 0, 311, 0, 0,
+ 0, 313, 0, 0, 0, 305, 0, 304, 85, 112,
+ 362, 0, 0, 117, 280, 283, 0, 118, 287, 121,
+ 147, 123, 124, 88, 128, 129, 82, 130, 286, 133,
+ 86, 89, 258, 83, 91, 136, 84, 138, 87, 140,
+ 141, 288, 143, 144, 149, 0, 114, 113, 116, 100,
+ 115, 99, 0, 109, 281, 279, 0, 0, 0, 352,
+ 0, 110, 157, 158, 163, 0, 156, 0, 322, 323,
+ 0, 350, 0, 0, 352, 0, 111, 0, 0, 0,
+ 325, 330, 328, 331, 0, 0, 329, 330, 0, 326,
+ 0, 327, 282, 333, 0, 282, 332, 0, 335, 336,
+ 0, 282, 337, 338, 0, 0, 339, 0, 0, 0,
+ 340, 341, 175, 174, 0, 0, 0, 309, 0, 0,
+ 0, 324, 296, 289, 0, 297, 293, 0, 295, 284,
+ 0, 285, 290, 0, 0, 352, 0, 347, 103, 0,
+ 0, 107, 94, 0, 96, 105, 0, 97, 106, 108,
+ 98, 104, 95, 0, 101, 179, 177, 181, 178, 176,
+ 180, 355, 6, 356, 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, 157, 0, 69, 73, 0, 0, 0, 0, 157,
+ 282, 0, 70, 85, 118, 287, 121, 147, 123, 124,
+ 88, 128, 129, 130, 286, 133, 86, 89, 258, 91,
+ 136, 84, 138, 87, 140, 141, 288, 143, 144, 149,
+ 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, 363};
const short QQmlJSGrammar::goto_default [] = {
- 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,
- 20, 278, 21, 279, 14, 273, 269, 310, 414, 275,
- 276, 205, 195, 194, 208, 207, 230, 196, 364, 363,
- 232, 471, 470, 332, 333, 473, 335, 472, 334, 427,
- 431, 434, 430, 429, 449, 450, 200, 186, 201, 210,
+ 7, 654, 212, 199, 210, 524, 512, 649, 662, 511,
+ 648, 652, 650, 658, 22, 655, 653, 651, 18, 523,
+ 574, 564, 571, 566, 551, 194, 198, 200, 205, 236,
+ 213, 233, 555, 626, 625, 204, 235, 26, 490, 489,
+ 361, 360, 9, 359, 362, 203, 483, 363, 109, 17,
+ 148, 24, 13, 147, 19, 25, 59, 23, 8, 28,
+ 27, 282, 15, 276, 10, 272, 12, 274, 11, 273,
+ 20, 280, 21, 281, 14, 275, 271, 312, 417, 277,
+ 278, 206, 196, 195, 209, 208, 232, 197, 366, 365,
+ 234, 474, 473, 334, 335, 476, 337, 475, 336, 430,
+ 434, 437, 433, 432, 452, 453, 201, 187, 202, 211,
0};
const short QQmlJSGrammar::action_index [] = {
- 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, 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,
+ 308, 1392, 2787, 2787, 2890, 1102, 71, 6, 103, -107,
+ 10, -35, -64, 287, -107, 310, 11, -107, -107, 815,
+ 30, 112, 183, 214, -107, -107, -107, 463, 203, 1392,
+ -107, -107, -107, 536, -107, -107, 2478, 1786, 1392, 1392,
+ 1392, -107, 1005, 1392, -107, -107, -107, 1392, 1392, -107,
+ -107, -107, -107, -107, -107, 1392, -107, 1392, 1392, -107,
+ 1392, 1392, 75, 204, -107, -107, 1392, 1392, 1392, -107,
+ -107, -107, 221, 1392, 306, 1392, 1392, 1392, 1392, 463,
+ 1392, 1392, 1392, 1392, 1392, 1392, 200, 1392, 1392, 1392,
+ 149, 145, 108, 231, 241, 295, 379, 379, 463, 463,
+ 463, 1392, -70, 1392, 4, 2375, 1392, 1392, -107, -107,
+ -107, -107, -107, -107, -107, -107, -107, -107, -107, -107,
+ -107, -107, -107, -107, -107, -107, -107, -107, -107, -107,
+ -107, -107, -107, -107, -107, -107, -107, -107, -107, -107,
+ -107, -107, -107, 105, 1392, -107, -107, -5, -58, -107,
+ 1392, -107, -107, 1392, -107, -107, -107, -107, -107, -107,
+ -107, -107, -107, -107, -107, -107, -107, 1392, -44, 1392,
+ 1392, 5, 7, 1392, -107, 2375, 1392, 1392, -107, 134,
+ -107, -43, -107, -107, -16, 541, 541, 15, -36, -107,
+ 462, -107, -4, 2787, -107, -107, -107, -107, -107, 213,
+ -107, 449, -107, -20, -107, -107, -107, 31, -107, -107,
+ -107, 2787, -107, -107, 616, -107, 711, 144, 2890, 21,
+ 42, 43, 3096, -107, 1392, -107, 62, 1392, 101, -107,
+ 102, 99, -107, -107, 417, -107, -107, -107, -107, 93,
+ 441, 56, 92, 2787, 34, -107, -107, 2890, -107, -107,
+ 118, -107, -107, -107, -107, 125, -107, -107, -107, -107,
+ -107, -107, -14, 33, 1392, 137, 193, -107, -107, -107,
+ 1488, -107, 44, -1, -42, -107, 316, -8, -60, 718,
+ 97, 87, 368, 222, 359, 1392, 313, 1392, 1392, 1392,
+ 1392, 342, 1392, 1392, 1392, 1392, 1392, 271, 270, 263,
+ 262, 225, 346, 352, 362, 1392, -51, 1392, 29, 1392,
+ -107, 815, 1392, -107, 1392, 28, -22, 1392, -19, 2890,
+ -107, 1392, 160, 2890, -107, 1392, 0, 1392, 1392, 97,
+ 45, 1392, -107, 37, 142, 25, -107, -107, 1392, -107,
+ 541, 1392, -107, 9, 1392, 12, 2890, -107, 1392, 128,
+ 2890, -107, 1392, 124, 2890, 61, 2890, -107, 60, -107,
+ 67, 26, 73, -107, -107, 2890, 49, 544, 80, 556,
+ 114, 1392, 2890, 85, 58, 482, 2581, 64, 88, 1005,
+ 90, 94, 1588, 2581, 96, 70, 197, 1392, 100, 76,
+ 1392, 104, 1392, 82, 84, 2684, -107, -107, -107, -107,
+ -107, -107, 1392, -107, -107, -107, 95, 63, 91, 2787,
+ 53, -107, 217, -107, 1392, 50, -107, 120, -107, -107,
+ 40, 372, 8, 27, 2787, 3, -107, 1392, 141, 20,
+ -107, 46, -107, 41, 147, 1392, -107, 39, 36, -107,
+ -15, -107, 2890, -107, 297, 2890, -107, 175, -107, -107,
+ 187, 2890, 14, -107, -3, -2, -107, 459, -34, -6,
+ -107, -107, -107, -107, 1392, 139, 2890, -107, 1392, 132,
+ 2890, -107, 1, -107, 251, -107, -107, 1392, -107, -107,
+ 541, -107, -107, -48, -23, 2787, -47, -107, -107, 113,
+ 1984, -107, -107, 1885, -107, -107, 1687, -107, -107, -107,
+ -107, -107, -107, 107, -107, -107, -107, -107, -107, -107,
+ -107, -107, -107, 2787, -107, -107, -107, 131, -50, 910,
+ 243, -45, -7, -107, -107, 232, -107, 206, -12, -107,
+ -107, 633, 189, -107, 198, 13, 385, -107, 153, -107,
+ -107, 184, -107, 2080, -107, -107, -107, -107, -107, -107,
+ -107, -107, -107, 208, 18, 633, 219, 129, 353, 292,
+ -107, 48, -107, 910, 122, -107, 81, 910, -107, -107,
+ 1296, -107, -107, -107, 1199, -107, -107, 224, -107, 2080,
+ -107, 311, 81, -107, -107, 205, 633, 98, 2176, 304,
+ 2993, 69, -107, 89, 613, 86, 597, 109, 1392, 2890,
+ 83, 55, 467, 52, 79, 804, 78, 77, 1588, 66,
+ 47, 59, 1392, 57, 32, 1392, 54, 1392, 38, 35,
+ -107, 255, -107, 228, -107, 51, 2, 524, 195, 532,
+ -107, 133, -107, -107, -107, 2272, 910, 1786, 17, -107,
+ 152, -107, -107, 16, -107, -107, 910, 910, 119, 910,
+ -107, 302, -107, 148, -107, -107, 143, 140, -107, -107,
+ -107, -107, -107, 369, -107, 249, -107, 111, -107, -107,
+ 364, -107, -107, 65, -107, -107, -107, -107, -107,
- -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, 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, 55, 62, 77, 71, 279, -7, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -74,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, 70,
+ -111, -111, -111, -8, -111, -111, -6, -28, 12, 84,
+ 85, -111, 93, 100, -111, -111, -111, 101, 104, -111,
+ -111, -111, -111, -111, -111, 107, -111, 112, 118, -111,
+ 182, 184, -111, -111, -111, -111, 218, 215, 209, -111,
+ -111, -111, -111, 202, -111, 195, 193, 192, 191, -111,
+ 189, 183, 181, 175, 168, 155, -111, 170, 153, 150,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- -111, 150, -111, 155, -111, 192, 4, -33, -111, -111,
+ -111, 151, -111, 142, -111, 172, 30, -4, -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, -111, -111, -111, -111, -111, -111, -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, -2, -111, -111, -111, -111, -111,
+ 0, -111, -111, 9, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, 125, -111, 122,
+ 10, -111, -111, 22, -111, 236, 46, 127, -111, -111,
+ -111, -111, -111, -111, -111, 37, 124, -111, -111, -111,
+ 39, -111, -111, 42, -111, -111, -111, -111, -111, -111,
+ -111, 44, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, 94, -111, -111, 47, -111, 48, -111, 128, -111,
+ 50, -111, 91, -111, -3, -111, -111, 66, 53, -111,
+ -111, -111, -111, -111, 57, -111, -111, -111, -111, -111,
+ 79, -111, -111, 78, -111, -111, -111, 82, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
- -111, -111, 15, -111, -111, -111, -111, -111, 74, -111,
+ -111, -111, -111, -111, 67, -111, -111, -111, -111, -111,
+ 61, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, 59, 258, -111, 259, 268, 269,
+ 272, -111, 60, 63, 73, 74, 75, -111, -111, -111,
+ -111, -111, -111, -111, -111, 252, -111, 242, -111, 233,
+ -111, -111, 232, -111, 87, -111, -111, 89, -111, 133,
+ -111, 51, -111, 135, -111, 231, -111, 223, 222, -111,
+ -111, 221, -111, -111, -111, -111, -111, -111, 219, -111,
+ 92, 102, -111, -111, 110, -111, 171, -111, 40, -111,
+ 173, -111, 38, -111, 176, -111, 179, -111, -111, -111,
+ -111, -111, -111, -111, -111, 180, -111, 19, -111, 18,
+ -111, 145, 185, -111, -111, 17, 166, -111, -111, 65,
+ -111, -111, 29, 177, -111, -111, -111, 25, -111, 5,
+ 159, -111, 164, -111, -111, 207, -111, -111, -111, -111,
+ -111, -111, -18, -111, -111, -111, -111, -111, -111, 212,
+ -111, -111, -111, -111, 216, -111, -111, -111, -111, -111,
+ -111, 213, -111, -111, 86, -111, -111, 16, -111, -111,
+ -111, -111, -111, -85, -111, 14, -111, -84, -111, -111,
+ -111, -111, 286, -111, -111, 287, -111, -111, -111, -111,
+ -111, 214, -94, -111, -111, -16, -111, -10, -111, -19,
+ -111, -111, -111, -111, 2, -111, 83, -111, 105, -111,
+ 81, -111, -111, -111, -111, -111, -111, -41, -111, -111,
+ 131, -111, -111, -111, -111, 76, -111, -111, -111, -111,
+ -35, -111, -111, 64, -111, -111, -29, -111, -111, -111,
-111, -111, -111, -111, -111, -111, -111, -111, -111, -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, 208, -111, -111, -111, -111, -111, 20,
+ -111, -111, -111, -111, -111, -111, -111, 13, -111, -111,
+ -111, 26, 15, -111, -111, -111, 32, -111, -111, -111,
+ -111, -111, -111, 329, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, 54, 56, -111, 58, -111,
+ -111, -111, -111, 68, -111, -111, -111, 72, -111, -111,
+ 330, -111, -111, -111, 327, -111, -111, -111, -111, 389,
+ -111, -111, 52, -111, -111, 31, 49, -111, 371, -111,
+ 134, 34, -111, -111, 43, -111, 41, -111, 108, 141,
+ -111, -111, 35, -111, -111, 97, -111, -111, 45, -111,
+ -111, -111, 36, -111, 21, 129, -111, 146, -111, -111,
+ -111, -111, -111, -1, -111, -111, -111, 11, -5, 7,
+ -111, -111, -111, -111, -111, 353, 311, 408, 4, -111,
+ -111, -111, -111, 1, -111, -111, 8, 6, 249, 248,
-111, -111, -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};
+ -111, -111, -111, 3, -111, -111, -111, -111, -111, -111,
+ -14, -111, -111, -111, -111, -111, -111, -111, -111};
const short QQmlJSGrammar::action_info [] = {
- -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,
+ 309, 314, 152, 150, 101, 73, 678, 167, 487, 103,
+ 485, 73, 484, 101, 173, 103, 527, 182, 477, 144,
+ 186, 585, 621, 190, 192, 532, 459, 451, 307, 193,
+ 285, 451, 167, 457, 455, 246, 144, 307, 247, 317,
+ 441, 319, 537, 442, 435, 285, 435, 305, 305, 570,
+ 570, 435, 331, 431, 338, 556, 348, 270, 426, 628,
+ 424, -142, 631, 263, -139, 451, -137, 247, 423, 264,
+ 344, 468, 346, -115, 464, 395, 421, 356, 185, 352,
+ 402, 401, 563, 427, -116, -134, -146, -145, 352, 245,
+ -126, 270, -126, -145, 270, -146, 247, -134, 427, 325,
+ 352, -116, 570, -115, 405, 588, 427, -139, 411, 451,
+ 416, -142, 0, 144, 570, 144, 242, 64, 464, 0,
+ 468, 493, 0, 408, 409, 243, 675, 674, 65, 240,
+ 567, 407, 144, 0, 451, 468, 144, 327, 464, 0,
+ 144, 328, 144, 60, 535, 144, 175, 144, 60, 144,
+ 340, 0, 0, 558, 61, 175, 0, 438, 175, 61,
+ 567, 145, 169, 646, 647, 176, 170, 504, 144, 494,
+ 261, 260, 669, 668, 176, 261, 260, 176, 568, 254,
+ 253, 419, 418, 144, 354, 60, 259, 258, 350, 60,
+ 180, 543, 470, 454, 633, 632, 61, 266, 175, 466,
+ 61, 429, 439, 341, -137, 261, 260, 455, 641, 677,
+ 676, 646, 647, 535, 540, 539, 66, 176, 533, 177,
+ 323, 144, 536, 175, 533, 87, 66, 88, 87, 0,
+ 88, 579, 175, 66, 533, 528, 449, 448, 89, 635,
+ 0, 89, 176, 0, 414, 544, 542, 87, 533, 88,
+ 87, 176, 88, 414, 269, 267, 87, 533, 88, 480,
+ 89, 67, 0, 89, 530, 570, 87, 68, 88, 89,
+ 530, 67, 554, 0, 238, 237, 529, 68, 67, 89,
+ 530, 530, 529, 268, 68, 580, 578, 87, 87, 88,
+ 88, 623, 529, 529, 530, 87, 87, 88, 88, 561,
+ 89, 89, 105, 530, 445, 144, 529, 0, 89, 89,
+ 672, 671, 481, 479, 0, 529, 624, 622, 530, 175,
+ 87, 106, 88, 107, 75, 76, 175, 636, 75, 76,
+ 529, 287, 288, 89, 287, 288, 0, -102, 176, 0,
+ 177, 0, 0, 670, -102, 176, 0, 177, 0, 665,
+ 0, 77, 78, 562, 560, 77, 78, 0, 289, 290,
+ 0, 289, 290, 666, 664, 292, 293, 0, 0, 292,
+ 293, 0, 0, 0, 294, 292, 293, 295, 294, 296,
+ 0, 295, 35, 296, 294, 292, 293, 295, 35, 296,
+ 0, 292, 293, 35, 294, 0, 663, 295, 35, 296,
+ 294, 35, 0, 295, 87, 296, 88, 6, 5, 4,
+ 1, 3, 2, 0, 35, 0, 0, 89, 0, 49,
+ 52, 50, 0, 0, 0, 49, 52, 50, 0, 0,
+ 49, 52, 50, 0, 0, 49, 52, 50, 49, 52,
+ 50, 0, 0, 0, 0, 0, 35, 0, 46, 34,
+ 51, 49, 52, 50, 46, 34, 51, 0, 0, 46,
+ 34, 51, 0, 0, 46, 34, 51, 46, 34, 51,
+ 35, 0, 0, 0, 0, 0, 0, 0, 35, 0,
+ 46, 34, 51, 49, 52, 50, 80, 81, 35, 0,
+ 0, 35, 0, 0, 82, 83, 35, 0, 84, 0,
+ 85, 0, 0, 185, 0, 0, 0, 49, 52, 50,
+ 0, 35, 46, 34, 51, 49, 52, 50, 185, 0,
+ 0, 0, 0, 0, 0, 49, 52, 50, 49, 52,
+ 50, 0, 0, 49, 52, 50, 46, 34, 51, 535,
+ 0, 0, 0, 0, 46, 34, 51, 535, 49, 52,
+ 50, 0, 0, 35, 46, 34, 51, 46, 34, 51,
+ 0, 35, 46, 34, 51, 35, 0, 0, 0, 0,
+ 35, 0, 185, 35, 0, 0, 0, 46, 34, 51,
+ 0, 0, 0, 0, 0, 35, 0, 0, 0, 0,
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,
- 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,
+ 50, 0, 49, 52, 50, 252, 251, 49, 52, 50,
+ 49, 52, 50, 0, 0, 0, 0, 257, 256, 46,
+ 34, 51, 49, 52, 50, 0, 35, 46, 34, 51,
+ 0, 46, 34, 51, 0, 0, 46, 34, 51, 46,
+ 34, 51, 35, 0, 0, 35, 0, 0, 535, 0,
+ 0, 46, 34, 51, 0, 0, 0, 0, 257, 256,
+ 0, 0, 35, 49, 52, 50, 0, 0, 0, 0,
+ 0, 0, 0, 0, 252, 251, 0, 252, 251, 49,
+ 52, 50, 49, 52, 50, 0, 0, 0, 0, 0,
+ 0, 0, 46, 34, 51, 0, 0, 0, 0, 49,
+ 52, 50, 0, 0, 0, 0, 0, 0, 46, 34,
+ 51, 46, 34, 51, 0, 0, 0, 0, 0, 0,
+ 0, 154, 0, 0, 0, 0, 0, 0, 46, 34,
+ 51, 155, 0, 0, 0, 156, 0, 0, 0, 0,
+ 35, 0, 0, 0, 157, 0, 158, 0, 0, 321,
+ 0, 0, 0, 0, 0, 0, 0, 159, 0, 160,
+ 64, 0, 0, 0, 0, 0, 0, 161, 0, 0,
+ 162, 65, 257, 256, 0, 0, 163, 49, 52, 50,
+ 0, 0, 164, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 165, 0,
+ 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
+ 0, 0, 0, 0, 0, 0, 30, 31, 154, 0,
+ 0, 0, 0, 0, 0, 0, 33, 0, 155, 0,
+ 0, 0, 156, 35, 0, 0, 0, 36, 37, 0,
+ 38, 157, 0, 158, 0, 0, 0, 42, 0, 0,
+ 0, 45, 0, 0, 159, 0, 160, 64, 0, 0,
+ 0, 0, 0, 0, 161, 0, 0, 162, 65, 53,
+ 49, 52, 50, 163, 54, 0, 0, 0, 0, 164,
+ 0, 0, 0, 0, 0, 44, 56, 32, 0, 0,
+ 0, 0, 41, 0, 0, 165, 0, 0, 0, 46,
+ 34, 51, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 164, 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, 519, 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, 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, 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,
- 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,
+ 53, 49, 52, 50, 0, 54, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 44, 56, 32, 0,
+ 0, 0, 0, 41, 0, 0, 0, 0, 0, 0,
+ 46, 34, 51, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 518, 0, 30, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 220, 0, 0, 0, 0, 0,
+ 0, 35, 0, 0, 0, 36, 37, 0, 38, 0,
+ 0, 0, 0, 0, 0, 519, 0, 0, 0, 45,
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, 30, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 53, 520, 522,
+ 521, 0, 54, 0, 0, 0, 0, 229, 0, 0,
+ 0, 0, 0, 44, 56, 32, 215, 223, 0, 0,
+ 41, 0, 0, 0, 0, 0, 0, 46, 34, 51,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 518,
+ 0, 30, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 220, 0, 0, 0, 0, 0, 0, 35, 0,
+ 0, 0, 36, 37, 0, 38, 0, 0, 0, 0,
+ 0, 0, 519, 0, 0, 0, 45, 0, 0, 0,
+ 0, 0, 0, 0, 575, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 53, 520, 522, 521, 0, 54,
+ 0, 0, 0, 0, 229, 0, 0, 0, 0, 0,
+ 44, 56, 32, 215, 223, 0, 0, 41, 0, 0,
+ 0, 0, 0, 0, 46, 34, 51, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 518, 0, 30, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 220, 0,
+ 0, 0, 0, 0, 0, 35, 0, 0, 0, 36,
+ 37, 0, 38, 0, 0, 0, 0, 0, 0, 519,
+ 0, 0, 0, 45, 0, 0, 0, 0, 0, 0,
+ 0, 572, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 53, 520, 522, 521, 0, 54, 0, 0, 0,
+ 0, 229, 0, 0, 0, 0, 0, 44, 56, 32,
+ 215, 223, 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, 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, 0, 0, 41,
- 0, 0, 0, 0, 0, 0, 46, 34, 51, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 515, 0,
+ 50, 0, 54, 0, 55, 0, 57, 0, 58, 0,
+ 0, 0, 0, 44, 56, 32, 0, 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,
- 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, 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, 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, -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, 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, 41, 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, 284, 58, 0, 0, 0, 0, 44,
+ 56, 32, 0, 0, 0, 0, 41, 0, 0, 0,
+ 0, 0, 0, 46, 34, 51, 0, 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, 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,
+ 0, 0, 0, 0, 0, 499, 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,
+ 48, 0, 0, 500, 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,
+ 32, 0, 0, 0, 0, 41, 0, 0, 0, 0,
+ 0, 0, 46, 34, 51, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 491, 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, 492, 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, 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, 491, 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,
+ 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, 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, 29, 30, 31,
- 0, 0, 0, 0, 0, 0, 0, 0, 33, 0,
- 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, 499, 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,
+ 502, 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, 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,
+ 221, 0, 0, 222, 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, 225, 0, 0, 0, 53, 49, 52, 50, 226,
+ 54, 0, 55, 228, 57, 0, 58, 0, 231, 0,
+ 0, 44, 56, 32, 0, 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,
+ 0, 0, 0, 0, 0, 35, 221, 0, 0, 590,
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,
+ 0, 0, 0, 0, 0, 0, 0, 225, 0, 0,
+ 0, 53, 49, 52, 50, 226, 54, 0, 55, 228,
+ 57, 0, 58, 0, 231, 0, 0, 44, 56, 32,
+ 0, 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, 221, 0, 0, 590, 637, 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, 225, 0, 0, 0, 53, 49, 52,
+ 50, 226, 54, 0, 55, 228, 57, 0, 58, 0,
+ 231, 0, 0, 44, 56, 32, 0, 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, 129, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 132, 0, 0, 0, 0, 0,
+ 0, 49, 52, 50, 133, 134, 135, 0, 137, 138,
+ 139, 140, 141, 142, 0, 0, 130, 136, 121, 114,
+ 128, 116, 131, 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, 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, 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, 129, 0, 0, 0, 398, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 132, 0, 0,
+ 0, 0, 0, 400, 49, 52, 50, 133, 134, 135,
+ 0, 137, 138, 139, 140, 141, 142, 0, 0, 130,
+ 136, 121, 114, 128, 116, 131, 0, 0, 0, 0,
+ 0, 0, 0, 46, 376, 383, 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, 129, 0, 0, 0, 398, 0,
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,
+ 132, 0, 0, 0, 0, 0, 400, 49, 52, 50,
+ 133, 134, 135, 0, 137, 138, 139, 140, 141, 142,
+ 0, 0, 130, 136, 121, 114, 128, 116, 131, 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, 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, 0, 0, 0, 0, 0, 129, 0, 0,
+ 0, 398, 0, 0, 0, 0, 0, 0, 0, 399,
+ 0, 0, 0, 132, 0, 0, 0, 0, 0, 400,
+ 49, 52, 50, 133, 134, 135, 0, 137, 138, 139,
+ 140, 141, 142, 0, 0, 130, 136, 121, 114, 128,
+ 116, 131, 0, 0, 0, 0, 0, 0, 0, 46,
+ 376, 383, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 214, 0, 0, 0, 0, 216, 0, 29, 30,
+ 31, 218, 0, 0, 0, 0, 0, 0, 219, 220,
+ 0, 0, 0, 0, 0, 0, 35, 221, 0, 0,
+ 222, 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, 224, 0, 225, 0,
+ 0, 0, 53, 49, 52, 50, 226, 54, 227, 55,
+ 228, 57, 229, 58, 230, 231, 0, 0, 44, 56,
+ 32, 215, 223, 217, 0, 41, 0, 0, 0, 0,
0, 0, 46, 34, 51, 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,
+ 0, 0, 0, 0, 214, 0, 0, 0, 0, 216,
+ 0, 29, 30, 31, 218, 0, 0, 0, 0, 0,
+ 0, 219, 33, 0, 0, 0, 0, 0, 0, 35,
+ 221, 0, 0, 222, 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, 224,
+ 0, 225, 0, 0, 0, 53, 49, 52, 50, 226,
+ 54, 227, 55, 228, 57, 229, 58, 230, 231, 0,
+ 0, 44, 56, 32, 215, 223, 217, 0, 41, 0,
+ 0, 0, 0, 0, 0, 46, 34, 51, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 594, 112, 113,
+ 0, 0, 596, 117, 598, 30, 31, 599, 0, 120,
+ 0, 0, 0, 122, 601, 602, 0, 0, 0, 0,
+ 0, 0, 35, 603, 126, 127, 222, 37, 0, 38,
+ 0, 0, 0, 39, 0, 40, 605, 43, 0, 0,
+ 607, 0, 0, 0, 47, 0, 48, 0, 0, 0,
+ 0, 0, 608, 0, 225, 0, 0, 0, 609, 49,
+ 52, 50, 610, 611, 612, 55, 614, 615, 616, 617,
+ 618, 619, 0, 0, 606, 613, 600, 595, 604, 597,
+ 131, 41, 0, 0, 0, 0, 0, 0, 46, 376,
+ 383, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 367, 112, 113, 0, 0, 369, 117, 371, 30, 31,
+ 372, 0, 120, 0, 0, 0, 122, 374, 375, 0,
+ 0, 0, 0, 0, 0, 35, 377, 126, 127, 222,
+ 37, 0, 38, 0, 0, 0, 39, 0, 40, 379,
+ 43, 0, 0, 381, 0, 0, 0, 47, 0, 48,
+ 0, -282, 0, 0, 0, 382, 0, 225, 0, 0,
+ 0, 384, 49, 52, 50, 385, 386, 387, 55, 389,
+ 390, 391, 392, 393, 394, 0, 0, 380, 388, 373,
+ 368, 378, 370, 131, 41, 0, 0, 0, 0, 0,
+ 0, 46, 376, 383, 0, 0, 0, 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,
+ 315, 478, 645, 153, 673, 465, 460, 501, 458, 461,
+ 184, 456, 396, 498, 488, 503, 440, 444, 436, 428,
+ 657, 667, 656, 644, 403, 630, 642, 629, 447, 634,
+ 450, 627, 315, 143, 553, 184, 255, 250, 149, 447,
+ 146, 353, 151, 349, 541, 531, 450, 534, 315, 179,
+ 538, 166, 172, 184, 322, 189, 620, 191, 16, 255,
+ 207, 250, 239, 586, 174, 250, 255, 587, 184, 447,
+ 265, 0, 577, 515, 584, 472, 559, 333, 450, 412,
+ 207, 514, 517, 471, 248, 467, 517, 565, 557, 207,
+ 315, 569, 315, 364, 207, 207, 207, 189, 249, 207,
+ 207, 207, 496, 0, 207, 315, 495, 412, 469, 358,
+ 333, 412, 207, 315, 62, 279, 413, 62, 0, 297,
+ 283, 486, 298, 244, 62, 241, 183, 62, 62, 62,
+ 262, 425, 299, 300, 301, 320, 364, 324, 62, 62,
+ 505, 506, 189, 262, 413, 0, 207, 0, 413, 472,
+ 0, 207, 593, 207, 62, 62, 507, 508, 62, 207,
+ 509, 62, 62, 510, 183, 316, 62, 318, 462, 149,
+ 188, 513, 62, 347, 463, 351, 62, 181, 355, 62,
+ 343, 357, 404, 62, 396, 462, 342, 262, 345, 207,
+ 108, 207, 171, 168, 207, 396, 62, 207, 207, 62,
+ 62, 183, 463, 207, 62, 62, 104, 62, 92, 62,
+ 406, 91, 249, 62, 97, 462, 364, 102, 62, 110,
+ 463, 420, 62, 482, 62, 396, 207, 96, 90, 62,
+ 207, 189, 207, 0, 95, 62, 62, 62, 62, 63,
+ 94, 72, 93, 62, 0, 62, 62, 62, 86, 62,
+ 397, 100, 99, 98, 108, 79, 62, 410, 149, 422,
+ 660, 659, 517, 62, 74, 71, 415, 661, 0, 62,
+ 0, 70, 62, 311, 69, 311, 311, 62, 283, 0,
+ 283, 283, 283, 110, 178, 62, 311, 311, 364, 364,
+ 283, 283, 283, 517, 329, 339, 62, 332, 330, 0,
+ 326, 283, 525, 0, 207, 207, 62, 308, 313, 310,
+ 0, 283, 62, 62, 516, 526, 0, 283, 283, 306,
+ 291, 286, 62, 62, 0, 517, 62, 283, 283, 302,
+ 303, 283, 576, 304, 643, 573, 0, 0, 0, 0,
+ 0, 517, 0, 0, 517, 0, 0, 0, 0, 0,
+ 525, 0, 0, 525, 545, 546, 547, 548, 552, 549,
+ 550, 0, 516, 526, 0, 516, 526, 589, 0, 0,
+ 0, 0, 0, 0, 443, 446, 638, 639, 545, 546,
+ 547, 548, 552, 549, 550, 589, 0, 0, 0, 0,
+ 0, 0, 0, 0, 591, 592, 545, 546, 547, 548,
+ 552, 549, 550, 581, 0, 0, 0, 0, 0, 0,
+ 0, 0, 582, 583, 545, 546, 547, 548, 552, 549,
+ 550, 0, 581, 0, 0, 0, 0, 565, 0, 640,
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,
+ 488, 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 [] = {
- 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,
+ 8, 61, 60, 8, 48, 1, 0, 2, 55, 79,
+ 33, 1, 60, 48, 7, 79, 66, 60, 17, 8,
+ 36, 66, 29, 8, 60, 37, 60, 33, 79, 33,
+ 1, 33, 2, 36, 20, 55, 8, 79, 7, 61,
+ 55, 60, 29, 7, 5, 1, 5, 48, 48, 33,
+ 33, 5, 7, 33, 17, 37, 31, 36, 55, 8,
+ 33, 7, 60, 77, 7, 33, 7, 7, 60, 36,
+ 61, 36, 60, 7, 36, 8, 36, 16, 36, 36,
+ 7, 55, 34, 36, 7, 7, 7, 7, 36, 55,
+ 7, 36, 7, 7, 36, 7, 7, 7, 36, 2,
+ 36, 7, 33, 7, 55, 7, 36, 7, 55, 33,
+ 60, 7, -1, 8, 33, 8, 60, 42, 36, -1,
+ 36, 8, -1, 60, 33, 33, 61, 62, 53, 36,
+ 8, 36, 8, -1, 33, 36, 8, 50, 36, -1,
+ 8, 54, 8, 40, 15, 8, 15, 8, 40, 8,
+ 8, -1, -1, 24, 51, 15, -1, 10, 15, 51,
+ 8, 56, 50, 92, 93, 34, 54, 60, 8, 56,
+ 61, 62, 61, 62, 34, 61, 62, 34, 56, 61,
+ 62, 61, 62, 8, 60, 40, 61, 62, 60, 40,
+ 56, 7, 60, 6, 61, 62, 51, 60, 15, 60,
+ 51, 60, 55, 61, 7, 61, 62, 20, 56, 61,
+ 62, 92, 93, 15, 61, 62, 12, 34, 29, 36,
+ 60, 8, 24, 15, 29, 25, 12, 27, 25, -1,
+ 27, 7, 15, 12, 29, 29, 61, 62, 38, 7,
+ -1, 38, 34, -1, 36, 61, 62, 25, 29, 27,
+ 25, 34, 27, 36, 61, 62, 25, 29, 27, 8,
+ 38, 57, -1, 38, 75, 33, 25, 63, 27, 38,
+ 75, 57, 29, -1, 61, 62, 87, 63, 57, 38,
+ 75, 75, 87, 90, 63, 61, 62, 25, 25, 27,
+ 27, 36, 87, 87, 75, 25, 25, 27, 27, 7,
+ 38, 38, 15, 75, 7, 8, 87, -1, 38, 38,
+ 61, 62, 61, 62, -1, 87, 61, 62, 75, 15,
+ 25, 34, 27, 36, 18, 19, 15, 95, 18, 19,
+ 87, 18, 19, 38, 18, 19, -1, 33, 34, -1,
+ 36, -1, -1, 94, 33, 34, -1, 36, -1, 47,
+ -1, 45, 46, 61, 62, 45, 46, -1, 45, 46,
+ -1, 45, 46, 61, 62, 23, 24, -1, -1, 23,
+ 24, -1, -1, -1, 32, 23, 24, 35, 32, 37,
+ -1, 35, 29, 37, 32, 23, 24, 35, 29, 37,
+ -1, 23, 24, 29, 32, -1, 94, 35, 29, 37,
+ 32, 29, -1, 35, 25, 37, 27, 99, 100, 101,
+ 102, 103, 104, -1, 29, -1, -1, 38, -1, 66,
+ 67, 68, -1, -1, -1, 66, 67, 68, -1, -1,
+ 66, 67, 68, -1, -1, 66, 67, 68, 66, 67,
+ 68, -1, -1, -1, -1, -1, 29, -1, 95, 96,
+ 97, 66, 67, 68, 95, 96, 97, -1, -1, 95,
+ 96, 97, -1, -1, 95, 96, 97, 95, 96, 97,
+ 29, -1, -1, -1, -1, -1, -1, -1, 29, -1,
+ 95, 96, 97, 66, 67, 68, 23, 24, 29, -1,
+ -1, 29, -1, -1, 31, 32, 29, -1, 35, -1,
+ 37, -1, -1, 36, -1, -1, -1, 66, 67, 68,
+ -1, 29, 95, 96, 97, 66, 67, 68, 36, -1,
+ -1, -1, -1, -1, -1, 66, 67, 68, 66, 67,
+ 68, -1, -1, 66, 67, 68, 95, 96, 97, 15,
+ -1, -1, -1, -1, 95, 96, 97, 15, 66, 67,
+ 68, -1, -1, 29, 95, 96, 97, 95, 96, 97,
+ -1, 29, 95, 96, 97, 29, -1, -1, -1, -1,
+ 29, -1, 36, 29, -1, -1, -1, 95, 96, 97,
+ -1, -1, -1, -1, -1, 29, -1, -1, -1, -1,
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,
- 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,
+ 68, -1, 66, 67, 68, 61, 62, 66, 67, 68,
+ 66, 67, 68, -1, -1, -1, -1, 61, 62, 95,
+ 96, 97, 66, 67, 68, -1, 29, 95, 96, 97,
+ -1, 95, 96, 97, -1, -1, 95, 96, 97, 95,
+ 96, 97, 29, -1, -1, 29, -1, -1, 15, -1,
+ -1, 95, 96, 97, -1, -1, -1, -1, 61, 62,
+ -1, -1, 29, 66, 67, 68, -1, -1, -1, -1,
+ -1, -1, -1, -1, 61, 62, -1, 61, 62, 66,
+ 67, 68, 66, 67, 68, -1, -1, -1, -1, -1,
+ -1, -1, 95, 96, 97, -1, -1, -1, -1, 66,
+ 67, 68, -1, -1, -1, -1, -1, -1, 95, 96,
+ 97, 95, 96, 97, -1, -1, -1, -1, -1, -1,
+ -1, 3, -1, -1, -1, -1, -1, -1, 95, 96,
+ 97, 13, -1, -1, -1, 17, -1, -1, -1, -1,
+ 29, -1, -1, -1, 26, -1, 28, -1, -1, 31,
+ -1, -1, -1, -1, -1, -1, -1, 39, -1, 41,
+ 42, -1, -1, -1, -1, -1, -1, 49, -1, -1,
+ 52, 53, 61, 62, -1, -1, 58, 66, 67, 68,
+ -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, 95, 96, 97, -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, -1, 88, -1, -1, 80, -1, -1, -1, 95,
+ 96, 97, -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,
- 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, 65, 66, 67, 68, -1,
+ 70, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 81, 82, 83, -1, -1, -1, -1, 88, -1,
+ -1, -1, -1, -1, -1, 95, 96, 97, -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,
- -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, 12, 13, -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, -1, 88, -1, -1, -1, -1, -1, -1,
+ 95, 96, 97, -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, 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,
+ 68, -1, 70, -1, -1, -1, -1, 75, -1, -1,
+ -1, -1, -1, 81, 82, 83, 84, 85, -1, -1,
+ 88, -1, -1, -1, -1, -1, -1, 95, 96, 97,
+ -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, 85, -1, -1, 88, -1, -1,
+ -1, -1, -1, -1, 95, 96, 97, -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, 85, -1, -1, 88, -1, -1, -1, -1, -1,
+ -1, 95, 96, 97, -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, -1,
+ 88, -1, -1, -1, -1, -1, -1, 95, 96, 97,
+ -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, 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, 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, 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, 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, 87, -1, -1, -1,
- -1, -1, -1, 94, 95, 96, -1, -1, -1, -1,
+ 72, -1, 74, 75, 76, -1, -1, -1, -1, 81,
+ 82, 83, -1, -1, -1, -1, 88, -1, -1, -1,
+ -1, -1, -1, 95, 96, 97, -1, -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, -1, 88, -1, -1, -1,
+ -1, -1, -1, 95, 96, 97, -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,
@@ -889,8 +910,18 @@ const short QQmlJSGrammar::action_check [] = {
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,
+ 83, -1, -1, -1, -1, 88, -1, -1, -1, -1,
+ -1, -1, 95, 96, 97, -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, -1, 88, -1, -1, -1, -1, -1,
+ -1, 95, 96, 97, -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,
@@ -899,46 +930,27 @@ const short QQmlJSGrammar::action_check [] = {
-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, 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, 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, 88, -1, -1, -1, -1, -1, -1,
+ 95, 96, 97, -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, -1, 88, -1, -1, -1, -1, -1, -1, 95,
+ 96, 97, -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, -1, 88, -1,
+ -1, -1, -1, -1, -1, 95, 96, 97, -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,
@@ -947,38 +959,48 @@ const short QQmlJSGrammar::action_check [] = {
-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, -1, -1, 88, -1, -1, -1, -1, -1,
+ -1, 95, 96, 97, -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, -1,
+ 88, -1, -1, -1, -1, -1, -1, 95, 96, 97,
+ -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, 87, -1, -1, -1, -1, -1, -1, -1,
+ 95, 96, 97, -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, 43, -1, -1, -1, 47, -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, -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,
+ 82, 83, 84, 85, 86, 87, -1, -1, -1, -1,
+ -1, -1, -1, 95, 96, 97, -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,
- -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,
+ 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, 87, -1,
+ -1, -1, -1, -1, -1, -1, 95, 96, 97, -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,
@@ -988,104 +1010,102 @@ const short QQmlJSGrammar::action_check [] = {
-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,
+ 86, 87, -1, -1, -1, -1, -1, -1, -1, 95,
+ 96, 97, -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, 86, -1, 88, -1, -1, -1, -1,
+ -1, -1, 95, 96, 97, -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, 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, 81, 82, 83, 84, 85, 86, -1, 88, -1,
+ -1, -1, -1, -1, -1, 95, 96, 97, -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, 88, -1, -1, -1, -1, -1, -1, 95, 96,
+ 97, -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, 88, -1, -1, -1, -1, -1,
+ -1, 95, 96, 97, -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,
+ 3, 42, 9, 77, 18, 3, 25, 42, 18, 25,
+ 18, 105, 18, 42, 42, 3, 100, 3, 103, 3,
+ 14, 18, 14, 22, 42, 18, 22, 32, 3, 18,
+ 25, 32, 3, 3, 14, 18, 18, 18, 42, 3,
+ 42, 3, 42, 3, 18, 32, 25, 32, 3, 3,
+ 18, 42, 42, 18, 3, 18, 22, 18, 3, 18,
+ 18, 18, 18, 32, 42, 18, 18, 18, 18, 3,
+ 3, -1, 18, 2, 22, 18, 18, 18, 25, 14,
+ 18, 4, 14, 2, 2, 2, 14, 19, 32, 18,
+ 3, 19, 3, 2, 18, 18, 18, 18, 4, 18,
+ 18, 18, 38, -1, 18, 3, 42, 14, 3, 18,
+ 18, 14, 18, 3, 54, 54, 51, 54, -1, 59,
+ 59, 45, 59, 45, 54, 46, 56, 54, 54, 54,
+ 2, 45, 59, 59, 59, 2, 2, 2, 54, 54,
+ 56, 56, 18, 2, 51, -1, 18, -1, 51, 18,
+ -1, 18, 18, 18, 54, 54, 56, 56, 54, 18,
+ 56, 54, 54, 56, 56, 78, 54, 78, 56, 42,
+ 46, 109, 54, 2, 56, 2, 54, 50, 2, 54,
+ 78, 2, 2, 54, 18, 56, 94, 2, 78, 18,
+ 18, 18, 70, 68, 18, 18, 54, 18, 18, 54,
+ 54, 56, 56, 18, 54, 54, 64, 54, 58, 54,
+ 44, 58, 4, 54, 59, 56, 2, 66, 54, 47,
+ 56, 44, 54, 92, 54, 18, 18, 59, 58, 54,
+ 18, 18, 18, -1, 59, 54, 54, 54, 54, 57,
+ 59, 57, 59, 54, -1, 54, 54, 54, 59, 54,
+ 43, 60, 60, 60, 18, 60, 54, 45, 42, 46,
+ 11, 12, 14, 54, 62, 56, 50, 19, -1, 54,
+ -1, 56, 54, 54, 56, 54, 54, 54, 59, -1,
+ 59, 59, 59, 47, 48, 54, 54, 54, 2, 2,
+ 59, 59, 59, 14, 71, 76, 54, 76, 76, -1,
+ 69, 59, 23, -1, 18, 18, 54, 65, 76, 76,
+ -1, 59, 54, 54, 35, 36, -1, 59, 59, 67,
+ 61, 63, 54, 54, -1, 14, 54, 59, 59, 61,
+ 61, 59, 5, 61, 23, 5, -1, -1, -1, -1,
+ -1, 14, -1, -1, 14, -1, -1, -1, -1, -1,
+ 23, -1, -1, 23, 25, 26, 27, 28, 29, 30,
+ 31, -1, 35, 36, -1, 35, 36, 14, -1, -1,
+ -1, -1, -1, -1, 88, 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, 14, -1, -1, -1, -1, 19, -1, 21,
-1, -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,
+ 42, -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 050ef6c288..b4f762d28b 100644
--- a/src/qml/parser/qqmljsgrammar_p.h
+++ b/src/qml/parser/qqmljsgrammar_p.h
@@ -61,23 +61,23 @@ class QQmlJSGrammar
public:
enum VariousConstants {
EOF_SYMBOL = 0,
- REDUCE_HERE = 105,
- SHIFT_THERE = 104,
+ REDUCE_HERE = 106,
+ SHIFT_THERE = 105,
T_AND = 1,
T_AND_AND = 2,
T_AND_EQ = 3,
- T_AS = 93,
+ T_AS = 94,
T_AUTOMATIC_SEMICOLON = 62,
T_BREAK = 4,
T_CASE = 5,
T_CATCH = 6,
T_COLON = 7,
T_COMMA = 8,
- T_COMMENT = 88,
- T_COMPATIBILITY_SEMICOLON = 89,
+ T_COMMENT = 89,
+ T_COMPATIBILITY_SEMICOLON = 90,
T_CONST = 84,
T_CONTINUE = 9,
- T_DEBUGGER = 85,
+ T_DEBUGGER = 86,
T_DEFAULT = 10,
T_DELETE = 11,
T_DIVIDE_ = 12,
@@ -88,19 +88,19 @@ public:
T_EQ = 17,
T_EQ_EQ = 18,
T_EQ_EQ_EQ = 19,
- T_ERROR = 97,
+ T_ERROR = 98,
T_FALSE = 83,
- T_FEED_JS_EXPRESSION = 101,
- T_FEED_JS_PROGRAM = 103,
- T_FEED_JS_SOURCE_ELEMENT = 102,
- T_FEED_JS_STATEMENT = 100,
- T_FEED_UI_OBJECT_MEMBER = 99,
- T_FEED_UI_PROGRAM = 98,
+ T_FEED_JS_EXPRESSION = 102,
+ T_FEED_JS_PROGRAM = 104,
+ T_FEED_JS_SOURCE_ELEMENT = 103,
+ T_FEED_JS_STATEMENT = 101,
+ T_FEED_UI_OBJECT_MEMBER = 100,
+ T_FEED_UI_PROGRAM = 99,
T_FINALLY = 20,
T_FOR = 21,
T_FUNCTION = 22,
T_GE = 23,
- T_GET = 95,
+ T_GET = 96,
T_GT = 24,
T_GT_GT = 25,
T_GT_GT_EQ = 26,
@@ -108,12 +108,13 @@ public:
T_GT_GT_GT_EQ = 28,
T_IDENTIFIER = 29,
T_IF = 30,
- T_IMPORT = 91,
+ T_IMPORT = 92,
T_IN = 31,
T_INSTANCEOF = 32,
T_LBRACE = 33,
T_LBRACKET = 34,
T_LE = 35,
+ T_LET = 85,
T_LPAREN = 36,
T_LT = 37,
T_LT_LT = 38,
@@ -121,34 +122,34 @@ public:
T_MINUS = 40,
T_MINUS_EQ = 41,
T_MINUS_MINUS = 42,
- T_MULTILINE_STRING_LITERAL = 87,
+ T_MULTILINE_STRING_LITERAL = 88,
T_NEW = 43,
T_NOT = 44,
T_NOT_EQ = 45,
T_NOT_EQ_EQ = 46,
T_NULL = 81,
T_NUMERIC_LITERAL = 47,
- T_ON = 94,
+ T_ON = 95,
T_OR = 48,
T_OR_EQ = 49,
T_OR_OR = 50,
T_PLUS = 51,
T_PLUS_EQ = 52,
T_PLUS_PLUS = 53,
- T_PRAGMA = 92,
+ T_PRAGMA = 93,
T_PROPERTY = 66,
- T_PUBLIC = 90,
+ T_PUBLIC = 91,
T_QUESTION = 54,
T_RBRACE = 55,
T_RBRACKET = 56,
T_READONLY = 68,
T_REMAINDER = 57,
T_REMAINDER_EQ = 58,
- T_RESERVED_WORD = 86,
+ T_RESERVED_WORD = 87,
T_RETURN = 59,
T_RPAREN = 60,
T_SEMICOLON = 61,
- T_SET = 96,
+ T_SET = 97,
T_SIGNAL = 67,
T_STAR = 63,
T_STAR_EQ = 64,
@@ -167,15 +168,15 @@ public:
T_XOR = 79,
T_XOR_EQ = 80,
- ACCEPT_STATE = 674,
- RULE_COUNT = 361,
- STATE_COUNT = 675,
- TERMINAL_COUNT = 106,
+ ACCEPT_STATE = 678,
+ RULE_COUNT = 363,
+ STATE_COUNT = 679,
+ TERMINAL_COUNT = 107,
NON_TERMINAL_COUNT = 111,
- GOTO_INDEX_OFFSET = 675,
- GOTO_INFO_OFFSET = 3078,
- GOTO_CHECK_OFFSET = 3078
+ GOTO_INDEX_OFFSET = 679,
+ GOTO_INFO_OFFSET = 3203,
+ GOTO_CHECK_OFFSET = 3203
};
static const char *const spell [];
diff --git a/src/qml/parser/qqmljskeywords_p.h b/src/qml/parser/qqmljskeywords_p.h
index a31c188efc..8b789526a5 100644
--- a/src/qml/parser/qqmljskeywords_p.h
+++ b/src/qml/parser/qqmljskeywords_p.h
@@ -106,6 +106,13 @@ static inline int classify3(const QChar *s, bool qmlMode) {
}
}
}
+ else if (s[0].unicode() == 'l') {
+ if (s[1].unicode() == 'e') {
+ if (s[2].unicode() == 't') {
+ return int(Lexer::T_LET);
+ }
+ }
+ }
else if (s[0].unicode() == 'n') {
if (s[1].unicode() == 'e') {
if (s[2].unicode() == 'w') {
diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp
index 50518a92ee..636b959097 100644
--- a/src/qml/parser/qqmljsparser.cpp
+++ b/src/qml/parser/qqmljsparser.cpp
@@ -914,21 +914,21 @@ case 116: {
sym(1).Node = node;
} break;
-case 152: {
+case 153: {
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 153: {
+case 154: {
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 154: {
+case 155: {
AST::NewMemberExpression *node = new (pool) AST::NewMemberExpression(sym(2).Expression, sym(4).ArgumentList);
node->newToken = loc(1);
node->lparenToken = loc(3);
@@ -936,384 +936,384 @@ case 154: {
sym(1).Node = node;
} break;
-case 156: {
+case 157: {
AST::NewExpression *node = new (pool) AST::NewExpression(sym(2).Expression);
node->newToken = loc(1);
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::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 159: {
+case 160: {
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 160: {
+case 161: {
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 161: {
+case 162: {
sym(1).Node = 0;
} break;
-case 162: {
+case 163: {
sym(1).Node = sym(1).ArgumentList->finish();
} break;
-case 163: {
+case 164: {
sym(1).Node = new (pool) AST::ArgumentList(sym(1).Expression);
} break;
-case 164: {
+case 165: {
AST::ArgumentList *node = new (pool) AST::ArgumentList(sym(1).ArgumentList, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 168: {
+case 169: {
AST::PostIncrementExpression *node = new (pool) AST::PostIncrementExpression(sym(1).Expression);
node->incrementToken = loc(2);
sym(1).Node = node;
} break;
-case 169: {
+case 170: {
AST::PostDecrementExpression *node = new (pool) AST::PostDecrementExpression(sym(1).Expression);
node->decrementToken = loc(2);
sym(1).Node = node;
} break;
-case 171: {
+case 172: {
AST::DeleteExpression *node = new (pool) AST::DeleteExpression(sym(2).Expression);
node->deleteToken = loc(1);
sym(1).Node = node;
} break;
-case 172: {
+case 173: {
AST::VoidExpression *node = new (pool) AST::VoidExpression(sym(2).Expression);
node->voidToken = loc(1);
sym(1).Node = node;
} break;
-case 173: {
+case 174: {
AST::TypeOfExpression *node = new (pool) AST::TypeOfExpression(sym(2).Expression);
node->typeofToken = loc(1);
sym(1).Node = node;
} break;
-case 174: {
+case 175: {
AST::PreIncrementExpression *node = new (pool) AST::PreIncrementExpression(sym(2).Expression);
node->incrementToken = loc(1);
sym(1).Node = node;
} break;
-case 175: {
+case 176: {
AST::PreDecrementExpression *node = new (pool) AST::PreDecrementExpression(sym(2).Expression);
node->decrementToken = loc(1);
sym(1).Node = node;
} break;
-case 176: {
+case 177: {
AST::UnaryPlusExpression *node = new (pool) AST::UnaryPlusExpression(sym(2).Expression);
node->plusToken = loc(1);
sym(1).Node = node;
} break;
-case 177: {
+case 178: {
AST::UnaryMinusExpression *node = new (pool) AST::UnaryMinusExpression(sym(2).Expression);
node->minusToken = loc(1);
sym(1).Node = node;
} break;
-case 178: {
+case 179: {
AST::TildeExpression *node = new (pool) AST::TildeExpression(sym(2).Expression);
node->tildeToken = loc(1);
sym(1).Node = node;
} break;
-case 179: {
+case 180: {
AST::NotExpression *node = new (pool) AST::NotExpression(sym(2).Expression);
node->notToken = loc(1);
sym(1).Node = node;
} break;
-case 181: {
+case 182: {
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 182: {
+case 183: {
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 183: {
+case 184: {
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 185: {
+case 186: {
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 186: {
+case 187: {
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 188: {
+case 189: {
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 189: {
+case 190: {
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 190: {
+case 191: {
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 192: {
+case 193: {
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 193: {
+case 194: {
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 194: {
+case 195: {
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 195: {
+case 196: {
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 196: {
+case 197: {
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 197: {
+case 198: {
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 199: {
+case 200: {
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 200: {
+case 201: {
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 201: {
+case 202: {
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 202: {
+case 203: {
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 203: {
+case 204: {
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 205: {
+case 206: {
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 206: {
+case 207: {
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 207: {
+case 208: {
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 208: {
+case 209: {
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 210: {
+case 211: {
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 211: {
+case 212: {
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 212: {
+case 213: {
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 213: {
+case 214: {
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 215: {
+case 216: {
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 217: {
+case 218: {
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 219: {
+case 220: {
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 221: {
+case 222: {
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 223: {
+case 224: {
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 225: {
+case 226: {
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 227: {
+case 228: {
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 229: {
+case 230: {
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 231: {
+case 232: {
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 233: {
+case 234: {
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 235: {
+case 236: {
AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1321,7 +1321,7 @@ case 235: {
sym(1).Node = node;
} break;
-case 237: {
+case 238: {
AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1329,189 +1329,200 @@ case 237: {
sym(1).Node = node;
} break;
-case 239: {
+case 240: {
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: {
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 242: {
+case 243: {
sym(1).ival = QSOperator::Assign;
} break;
-case 243: {
+case 244: {
sym(1).ival = QSOperator::InplaceMul;
} break;
-case 244: {
+case 245: {
sym(1).ival = QSOperator::InplaceDiv;
} break;
-case 245: {
+case 246: {
sym(1).ival = QSOperator::InplaceMod;
} break;
-case 246: {
+case 247: {
sym(1).ival = QSOperator::InplaceAdd;
} break;
-case 247: {
+case 248: {
sym(1).ival = QSOperator::InplaceSub;
} break;
-case 248: {
+case 249: {
sym(1).ival = QSOperator::InplaceLeftShift;
} break;
-case 249: {
+case 250: {
sym(1).ival = QSOperator::InplaceRightShift;
} break;
-case 250: {
+case 251: {
sym(1).ival = QSOperator::InplaceURightShift;
} break;
-case 251: {
+case 252: {
sym(1).ival = QSOperator::InplaceAnd;
} break;
-case 252: {
+case 253: {
sym(1).ival = QSOperator::InplaceXor;
} break;
-case 253: {
+case 254: {
sym(1).ival = QSOperator::InplaceOr;
} break;
-case 255: {
+case 256: {
AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 256: {
+case 257: {
sym(1).Node = 0;
} break;
-case 259: {
+case 260: {
AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 260: {
+case 261: {
sym(1).Node = 0;
} break;
-case 277: {
+case 278: {
AST::Block *node = new (pool) AST::Block(sym(2).StatementList);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 278: {
+case 279: {
sym(1).Node = new (pool) AST::StatementList(sym(1).Statement);
} break;
-case 279: {
+case 280: {
sym(1).Node = new (pool) AST::StatementList(sym(1).StatementList, sym(2).Statement);
} break;
-case 280: {
+case 281: {
sym(1).Node = 0;
} break;
-case 281: {
+case 282: {
sym(1).Node = sym(1).StatementList->finish ();
} break;
-case 283: {
- AST::VariableStatement *node = new (pool) AST::VariableStatement(
- sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
+case 284: {
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
+ if (sym(1).ival == T_LET)
+ s = AST::VariableDeclaration::BlockScope;
+ else if (sym(1).ival == T_CONST)
+ s = AST::VariableDeclaration::ReadOnlyBlockScope;
+
+ AST::VariableStatement *node = new (pool) AST::VariableStatement(sym(2).VariableDeclarationList->finish(s));
node->declarationKindToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 284: {
+case 285: {
+ sym(1).ival = T_LET;
+} break;
+
+case 286: {
sym(1).ival = T_CONST;
} break;
-case 285: {
+case 287: {
sym(1).ival = T_VAR;
} break;
-case 286: {
+case 288: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration);
} break;
-case 287: {
+case 289: {
AST::VariableDeclarationList *node = new (pool) AST::VariableDeclarationList(
sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 288: {
+case 290: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration);
} break;
-case 289: {
+case 291: {
sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
} break;
-case 290: {
- AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
+case 292: {
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
+ AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression, s);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 291: {
- AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression);
+case 293: {
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
+ AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression, s);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 292: {
+case 294: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 293: {
+case 295: {
sym(1).Node = 0;
} break;
-case 295: {
+case 297: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 296: {
+case 298: {
sym(1).Node = 0;
} break;
-case 298: {
+case 300: {
AST::EmptyStatement *node = new (pool) AST::EmptyStatement();
node->semicolonToken = loc(1);
sym(1).Node = node;
} break;
-case 300: {
+case 302: {
AST::ExpressionStatement *node = new (pool) AST::ExpressionStatement(sym(1).Expression);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 301: {
+case 303: {
AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement, sym(7).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1520,7 +1531,7 @@ case 301: {
sym(1).Node = node;
} break;
-case 302: {
+case 304: {
AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1528,7 +1539,7 @@ case 302: {
sym(1).Node = node;
} break;
-case 305: {
+case 307: {
AST::DoWhileStatement *node = new (pool) AST::DoWhileStatement(sym(2).Statement, sym(5).Expression);
node->doToken = loc(1);
node->whileToken = loc(3);
@@ -1538,7 +1549,7 @@ case 305: {
sym(1).Node = node;
} break;
-case 306: {
+case 308: {
AST::WhileStatement *node = new (pool) AST::WhileStatement(sym(3).Expression, sym(5).Statement);
node->whileToken = loc(1);
node->lparenToken = loc(2);
@@ -1546,7 +1557,7 @@ case 306: {
sym(1).Node = node;
} break;
-case 307: {
+case 309: {
AST::ForStatement *node = new (pool) AST::ForStatement(sym(3).Expression,
sym(5).Expression, sym(7).Expression, sym(9).Statement);
node->forToken = loc(1);
@@ -1557,9 +1568,10 @@ case 307: {
sym(1).Node = node;
} break;
-case 308: {
+case 310: {
+ AST::VariableDeclaration::VariableScope s = AST::VariableDeclaration::FunctionScope;
AST::LocalForStatement *node = new (pool) AST::LocalForStatement(
- sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
+ sym(4).VariableDeclarationList->finish(s), sym(6).Expression,
sym(8).Expression, sym(10).Statement);
node->forToken = loc(1);
node->lparenToken = loc(2);
@@ -1570,7 +1582,7 @@ case 308: {
sym(1).Node = node;
} break;
-case 309: {
+case 311: {
AST:: ForEachStatement *node = new (pool) AST::ForEachStatement(sym(3).Expression,
sym(5).Expression, sym(7).Statement);
node->forToken = loc(1);
@@ -1580,7 +1592,7 @@ case 309: {
sym(1).Node = node;
} break;
-case 310: {
+case 312: {
AST::LocalForEachStatement *node = new (pool) AST::LocalForEachStatement(
sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
node->forToken = loc(1);
@@ -1591,14 +1603,14 @@ case 310: {
sym(1).Node = node;
} break;
-case 312: {
+case 314: {
AST::ContinueStatement *node = new (pool) AST::ContinueStatement();
node->continueToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 314: {
+case 316: {
AST::ContinueStatement *node = new (pool) AST::ContinueStatement(stringRef(2));
node->continueToken = loc(1);
node->identifierToken = loc(2);
@@ -1606,14 +1618,14 @@ case 314: {
sym(1).Node = node;
} break;
-case 316: {
+case 318: {
AST::BreakStatement *node = new (pool) AST::BreakStatement(QStringRef());
node->breakToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 318: {
+case 320: {
AST::BreakStatement *node = new (pool) AST::BreakStatement(stringRef(2));
node->breakToken = loc(1);
node->identifierToken = loc(2);
@@ -1621,14 +1633,14 @@ case 318: {
sym(1).Node = node;
} break;
-case 320: {
+case 322: {
AST::ReturnStatement *node = new (pool) AST::ReturnStatement(sym(2).Expression);
node->returnToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 321: {
+case 323: {
AST::WithStatement *node = new (pool) AST::WithStatement(sym(3).Expression, sym(5).Statement);
node->withToken = loc(1);
node->lparenToken = loc(2);
@@ -1636,7 +1648,7 @@ case 321: {
sym(1).Node = node;
} break;
-case 322: {
+case 324: {
AST::SwitchStatement *node = new (pool) AST::SwitchStatement(sym(3).Expression, sym(5).CaseBlock);
node->switchToken = loc(1);
node->lparenToken = loc(2);
@@ -1644,83 +1656,83 @@ case 322: {
sym(1).Node = node;
} break;
-case 323: {
+case 325: {
AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 324: {
+case 326: {
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 325: {
+case 327: {
sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClause);
} break;
-case 326: {
+case 328: {
sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClauses, sym(2).CaseClause);
} break;
-case 327: {
+case 329: {
sym(1).Node = 0;
} break;
-case 328: {
+case 330: {
sym(1).Node = sym(1).CaseClauses->finish ();
} break;
-case 329: {
+case 331: {
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 330: {
+case 332: {
AST::DefaultClause *node = new (pool) AST::DefaultClause(sym(3).StatementList);
node->defaultToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 331: {
+case 333: {
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 333: {
+case 335: {
AST::ThrowStatement *node = new (pool) AST::ThrowStatement(sym(2).Expression);
node->throwToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 334: {
+case 336: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 335: {
+case 337: {
AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 336: {
+case 338: {
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 337: {
+case 339: {
AST::Catch *node = new (pool) AST::Catch(stringRef(3), sym(5).Block);
node->catchToken = loc(1);
node->lparenToken = loc(2);
@@ -1729,20 +1741,20 @@ case 337: {
sym(1).Node = node;
} break;
-case 338: {
+case 340: {
AST::Finally *node = new (pool) AST::Finally(sym(2).Block);
node->finallyToken = loc(1);
sym(1).Node = node;
} break;
-case 340: {
+case 342: {
AST::DebuggerStatement *node = new (pool) AST::DebuggerStatement();
node->debuggerToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 342: {
+case 344: {
AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
node->identifierToken = loc(2);
@@ -1753,7 +1765,7 @@ case 342: {
sym(1).Node = node;
} break;
-case 343: {
+case 345: {
AST::FunctionExpression *node = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
if (! stringRef(2).isNull())
@@ -1765,7 +1777,7 @@ case 343: {
sym(1).Node = node;
} break;
-case 344: {
+case 346: {
AST::FunctionExpression *node = new (pool) AST::FunctionExpression(QStringRef(), sym(3).FormalParameterList, sym(6).FunctionBody);
node->functionToken = loc(1);
node->lparenToken = loc(2);
@@ -1775,56 +1787,56 @@ case 344: {
sym(1).Node = node;
} break;
-case 345: {
+case 347: {
AST::FormalParameterList *node = new (pool) AST::FormalParameterList(stringRef(1));
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 346: {
+case 348: {
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 347: {
+case 349: {
sym(1).Node = 0;
} break;
-case 348: {
+case 350: {
sym(1).Node = sym(1).FormalParameterList->finish ();
} break;
-case 349: {
+case 351: {
sym(1).Node = 0;
} break;
-case 351: {
+case 353: {
sym(1).Node = new (pool) AST::FunctionBody(sym(1).SourceElements->finish ());
} break;
-case 353: {
+case 355: {
sym(1).Node = new (pool) AST::Program(sym(1).SourceElements->finish ());
} break;
-case 354: {
+case 356: {
sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElement);
} break;
-case 355: {
+case 357: {
sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElements, sym(2).SourceElement);
} break;
-case 356: {
+case 358: {
sym(1).Node = new (pool) AST::StatementSourceElement(sym(1).Statement);
} break;
-case 357: {
+case 359: {
sym(1).Node = new (pool) AST::FunctionSourceElement(sym(1).FunctionDeclaration);
} break;
-case 358: {
+case 360: {
sym(1).Node = 0;
} break;
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index f0973338ea..ddb4af0b81 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -238,6 +238,44 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve
return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type);
}
+template<typename T, typename E, int metaObjectRevision>
+int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason)
+{
+ QML_GETTYPENAMES
+
+ QQmlAttachedPropertiesFunc attached = QQmlPrivate::attachedPropertiesFunc<E>();
+ const QMetaObject * attachedMetaObject = QQmlPrivate::attachedPropertiesMetaObject<E>();
+ if (!attached) {
+ attached = QQmlPrivate::attachedPropertiesFunc<T>();
+ attachedMetaObject = QQmlPrivate::attachedPropertiesMetaObject<T>();
+ }
+
+ QQmlPrivate::RegisterType type = {
+ 1,
+
+ qRegisterNormalizedMetaType<T *>(pointerName.constData()),
+ qRegisterNormalizedMetaType<QQmlListProperty<T> >(listName.constData()),
+ 0,
+ Q_NULLPTR,
+ reason,
+
+ uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
+
+ attached,
+ attachedMetaObject,
+
+ QQmlPrivate::StaticCastSelector<T,QQmlParserStatus>::cast(),
+ QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueSource>::cast(),
+ QQmlPrivate::StaticCastSelector<T,QQmlPropertyValueInterceptor>::cast(),
+
+ QQmlPrivate::createParent<E>, &E::staticMetaObject,
+
+ Q_NULLPTR,
+ metaObjectRevision
+ };
+
+ return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type);
+}
Q_QML_EXPORT int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason);
diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp
index 2a96d96302..a10dda166c 100644
--- a/src/qml/qml/qqmlapplicationengine.cpp
+++ b/src/qml/qml/qqmlapplicationengine.cpp
@@ -66,8 +66,6 @@ void QQmlApplicationEnginePrivate::cleanUp()
void QQmlApplicationEnginePrivate::init()
{
Q_Q(QQmlApplicationEngine);
- q->connect(&statusMapper, SIGNAL(mapped(QObject*)),
- q, SLOT(_q_finishLoad(QObject*)));
q->connect(q, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));
q->connect(q, &QQmlApplicationEngine::exit, QCoreApplication::instance(), &QCoreApplication::exit);
#if QT_CONFIG(translation)
@@ -113,20 +111,15 @@ void QQmlApplicationEnginePrivate::startLoad(const QUrl &url, const QByteArray &
c->loadUrl(url);
if (!c->isLoading()) {
- _q_finishLoad(c);
+ finishLoad(c);
return;
}
- statusMapper.setMapping(c, c);
- q->connect(c, SIGNAL(statusChanged(QQmlComponent::Status)),
- &statusMapper, SLOT(map()));
+ QObject::connect(c, &QQmlComponent::statusChanged, q, [this, c] { this->finishLoad(c); });
}
-void QQmlApplicationEnginePrivate::_q_finishLoad(QObject *o)
+void QQmlApplicationEnginePrivate::finishLoad(QQmlComponent *c)
{
Q_Q(QQmlApplicationEngine);
- QQmlComponent *c = qobject_cast<QQmlComponent *>(o);
- if (!c)
- return;
switch (c->status()) {
case QQmlComponent::Error:
qWarning() << "QQmlApplicationEngine failed to load component";
diff --git a/src/qml/qml/qqmlapplicationengine.h b/src/qml/qml/qqmlapplicationengine.h
index e64d7495cd..6c57f46c72 100644
--- a/src/qml/qml/qqmlapplicationengine.h
+++ b/src/qml/qml/qqmlapplicationengine.h
@@ -74,7 +74,6 @@ Q_SIGNALS:
private:
Q_DISABLE_COPY(QQmlApplicationEngine)
Q_DECLARE_PRIVATE(QQmlApplicationEngine)
- Q_PRIVATE_SLOT(d_func(), void _q_finishLoad(QObject*))
};
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmlapplicationengine_p.h b/src/qml/qml/qqmlapplicationengine_p.h
index 8c342a43a9..4795170bed 100644
--- a/src/qml/qml/qqmlapplicationengine_p.h
+++ b/src/qml/qml/qqmlapplicationengine_p.h
@@ -42,7 +42,6 @@
#include "qqmlapplicationengine.h"
#include "qqmlengine_p.h"
-#include <QSignalMapper>
#include <QCoreApplication>
#include <QFileInfo>
#include <QLibraryInfo>
@@ -73,9 +72,8 @@ public:
void startLoad(const QUrl &url, const QByteArray &data = QByteArray(), bool dataFlag = false);
void loadTranslations(const QUrl &rootFile);
- void _q_finishLoad(QObject *component);
+ void finishLoad(QQmlComponent *component);
QList<QObject *> objects;
- QSignalMapper statusMapper;
QObject *appObj;
#if QT_CONFIG(translation)
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index e1fa97b52f..af94ece496 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -65,6 +65,7 @@
#include <QtCore/qmetaobject.h>
#include <QDebug>
#include <QtCore/qcoreapplication.h>
+#include <QtCore/qcryptographichash.h>
#include <QtCore/qdir.h>
#include <QtCore/qmutex.h>
#include <QtCore/qthread.h>
@@ -564,7 +565,7 @@ The following functions are also on the Qt object.
\l{Screen} attached object. In practice the array corresponds to the screen
list returned by QGuiApplication::screens(). In addition to examining
properties like name, width, height, etc., the array elements can also be
- assigned to the targetScreen property of Window items, thus serving as an
+ assigned to the screen property of Window items, thus serving as an
alternative to the C++ side's QWindow::setScreen(). This property has been
added in Qt 5.9.
@@ -585,7 +586,7 @@ The following functions are also on the Qt object.
\li application.font
\endlist
- \sa Screen, Window, Window.targetScreen
+ \sa Screen, Window, Window.screen
*/
/*!
@@ -760,7 +761,7 @@ class QQmlThreadNotifierProxyObject : public QObject
public:
QPointer<QObject> target;
- virtual int qt_metacall(QMetaObject::Call, int methodIndex, void **a) {
+ int qt_metacall(QMetaObject::Call, int methodIndex, void **a) override {
if (!target)
return -1;
@@ -1038,7 +1039,7 @@ QQmlEngine::~QQmlEngine()
/*! \fn void QQmlEngine::exit(int retCode)
This signal is emitted when the QML loaded by the engine would like to exit
- from the event loop with the specified return code.
+ from the event loop with the specified return code \a retCode.
\since 5.8
\sa quit()
@@ -2178,6 +2179,27 @@ QString QQmlEngine::offlineStoragePath() const
return d->offlineStoragePath;
}
+/*!
+ Returns the file path where a \l{QtQuick.LocalStorage}{Local Storage}
+ database with the identifier \a databaseName is (or would be) located.
+
+ \sa LocalStorage.openDatabaseSync()
+ \since 5.9
+*/
+QString QQmlEngine::offlineStorageDatabaseFilePath(const QString &databaseName) const
+{
+ Q_D(const QQmlEngine);
+ QCryptographicHash md5(QCryptographicHash::Md5);
+ md5.addData(databaseName.toUtf8());
+ return d->offlineStorageDatabaseDirectory() + QLatin1String(md5.result().toHex());
+}
+
+QString QQmlEnginePrivate::offlineStorageDatabaseDirectory() const
+{
+ Q_Q(const QQmlEngine);
+ return q->offlineStoragePath() + QDir::separator() + QLatin1String("Databases") + QDir::separator();
+}
+
QQmlPropertyCache *QQmlEnginePrivate::createCache(QQmlType *type, int minorVersion)
{
QList<QQmlType *> types;
diff --git a/src/qml/qml/qqmlengine.h b/src/qml/qml/qqmlengine.h
index 3102a20fac..8cada954fe 100644
--- a/src/qml/qml/qqmlengine.h
+++ b/src/qml/qml/qqmlengine.h
@@ -136,6 +136,7 @@ public:
void setOfflineStoragePath(const QString& dir);
QString offlineStoragePath() const;
+ QString offlineStorageDatabaseFilePath(const QString &databaseName) const;
QUrl baseUrl() const;
void setBaseUrl(const QUrl &);
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h
index 916566b6c7..1bdeacd524 100644
--- a/src/qml/qml/qqmlengine_p.h
+++ b/src/qml/qml/qqmlengine_p.h
@@ -205,6 +205,7 @@ public:
inline void deleteInEngineThread(T *);
template<typename T>
inline static void deleteInEngineThread(QQmlEngine *, T *);
+ QString offlineStorageDatabaseDirectory() const;
// These methods may be called from the loader thread
inline QQmlPropertyCache *cache(QQmlType *, int);
diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp
index 1e1fbcf448..b70db5ed86 100644
--- a/src/qml/qml/qqmlexpression.cpp
+++ b/src/qml/qml/qqmlexpression.cpp
@@ -202,6 +202,7 @@ QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope,
*/
QQmlExpression::~QQmlExpression()
{
+ clearError();
}
/*!
diff --git a/src/qml/qml/qqmllist.cpp b/src/qml/qml/qqmllist.cpp
index edd93ef03d..2c71293363 100644
--- a/src/qml/qml/qqmllist.cpp
+++ b/src/qml/qml/qqmllist.cpp
@@ -394,8 +394,9 @@ can be very useful while prototyping.
\fn QQmlListProperty::QQmlListProperty(QObject *object, void *data,
CountFunction count, AtFunction at)
-Construct a readonly QQmlListProperty from a set of operation functions. An opaque \a data handle
-may be passed which can be accessed from within the operation functions. The list property
+Construct a readonly QQmlListProperty from a set of operation functions
+\a count and \a at. An opaque \a data handle may be passed which can be
+accessed from within the operation functions. The list property
remains valid while \a object exists.
*/
@@ -404,8 +405,9 @@ remains valid while \a object exists.
CountFunction count, AtFunction at,
ClearFunction clear)
-Construct a QQmlListProperty from a set of operation functions. An opaque \a data handle
-may be passed which can be accessed from within the operation functions. The list property
+Construct a QQmlListProperty from a set of operation functions \a append,
+\a count, \a at, and \a clear. An opaque \a data handle may be passed which
+can be accessed from within the operation functions. The list property
remains valid while \a object exists.
Null pointers can be passed for any function. If any null pointers are passed in, the list
diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp
index 8aa107dc17..43677e0d78 100644
--- a/src/qml/qml/qqmllistwrapper.cpp
+++ b/src/qml/qml/qqmllistwrapper.cpp
@@ -140,12 +140,13 @@ ReturnedValue QmlListWrapper::getIndexed(const Managed *m, uint index, bool *has
return Primitive::undefinedValue().asReturnedValue();
}
-void QmlListWrapper::put(Managed *m, String *name, const Value &value)
+bool QmlListWrapper::put(Managed *m, String *name, const Value &value)
{
// doesn't do anything. Should we throw?
Q_UNUSED(m);
Q_UNUSED(name);
Q_UNUSED(value);
+ return false;
}
void QmlListWrapper::advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs)
@@ -165,4 +166,29 @@ void QmlListWrapper::advanceIterator(Managed *m, ObjectIterator *it, Value *name
return QV4::Object::advanceIterator(m, it, name, index, p, attrs);
}
+void PropertyListPrototype::init(ExecutionEngine *)
+{
+ defineDefaultProperty(QStringLiteral("push"), method_push, 1);
+}
+
+void PropertyListPrototype::method_push(const BuiltinFunction *, Scope &scope, CallData *callData)
+{
+ ScopedObject instance(scope, callData->thisObject.toObject(scope.engine));
+ if (!instance)
+ RETURN_UNDEFINED();
+ QmlListWrapper *w = instance->as<QmlListWrapper>();
+ if (!w)
+ RETURN_UNDEFINED();
+ if (!w->d()->property().append)
+ THROW_GENERIC_ERROR("List doesn't define an Append function");
+
+ QV4::ScopedObject so(scope);
+ for (int i = 0; i < callData->argc; ++i)
+ {
+ so = callData->args[i].toObject(scope.engine);
+ if (QV4::QObjectWrapper *wrapper = so->as<QV4::QObjectWrapper>())
+ w->d()->property().append(&w->d()->property(), wrapper->object() );
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmllistwrapper_p.h b/src/qml/qml/qqmllistwrapper_p.h
index d01b332159..84dadba01a 100644
--- a/src/qml/qml/qqmllistwrapper_p.h
+++ b/src/qml/qml/qqmllistwrapper_p.h
@@ -86,6 +86,7 @@ struct Q_QML_EXPORT QmlListWrapper : Object
{
V4_OBJECT2(QmlListWrapper, Object)
V4_NEEDS_DESTROY
+ V4_PROTOTYPE(propertyListPrototype)
static ReturnedValue create(ExecutionEngine *engine, QObject *object, int propId, int propType);
static ReturnedValue create(ExecutionEngine *engine, const QQmlListProperty<QObject> &prop, int propType);
@@ -94,10 +95,17 @@ struct Q_QML_EXPORT QmlListWrapper : Object
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
static ReturnedValue getIndexed(const Managed *m, uint index, bool *hasProperty);
- static void put(Managed *m, String *name, const Value &value);
+ static bool put(Managed *m, String *name, const Value &value);
static void advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes);
};
+struct PropertyListPrototype : Object
+{
+ void init(ExecutionEngine *engine);
+
+ static void method_push(const BuiltinFunction *, Scope &, CallData *callData);
+};
+
}
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index df336f0803..ca522c29af 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -789,12 +789,12 @@ void QQmlPropertyPrivate::removeBinding(const QQmlProperty &that)
QQmlAbstractBinding *
QQmlPropertyPrivate::binding(QObject *object, QQmlPropertyIndex index)
{
+ findAliasTarget(object, index, &object, &index);
+
QQmlData *data = QQmlData::get(object);
if (!data)
return 0;
- findAliasTarget(object, index, &object, &index);
-
const int coreIndex = index.coreIndex();
const int valueTypeIndex = index.valueTypeIndex();
@@ -1399,9 +1399,9 @@ QQmlMetaObject QQmlPropertyPrivate::rawMetaObjectForType(QQmlEnginePrivate *engi
}
/*!
- Sets the property value to \a value and returns true.
- Returns false if the property can't be set because the
- \a value is the wrong type, for example.
+ Sets the property value to \a value. Returns \c true on success, or
+ \c false if the property can't be set because the \a value is the
+ wrong type, for example.
*/
bool QQmlProperty::write(const QVariant &value) const
{
@@ -1416,6 +1416,8 @@ bool QQmlProperty::write(const QVariant &value) const
QQmlProperty p(object, name);
p.write(value);
\endcode
+
+ Returns \c true on success, \c false otherwise.
*/
bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &value)
{
@@ -1432,6 +1434,8 @@ bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &v
QQmlProperty p(object, name, ctxt);
p.write(value);
\endcode
+
+ Returns \c true on success, \c false otherwise.
*/
bool QQmlProperty::write(QObject *object,
const QString &name,
@@ -1452,6 +1456,8 @@ bool QQmlProperty::write(QObject *object,
QQmlProperty p(object, name, engine);
p.write(value);
\endcode
+
+ Returns \c true on success, \c false otherwise.
*/
bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &value,
QQmlEngine *engine)
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp
index fd1e9cc2be..49103ed653 100644
--- a/src/qml/qml/qqmltypewrapper.cpp
+++ b/src/qml/qml/qqmltypewrapper.cpp
@@ -129,15 +129,20 @@ ReturnedValue QmlTypeWrapper::create(QV4::ExecutionEngine *engine, QObject *o, Q
return w.asReturnedValue();
}
-static int enumForSingleton(String *name, QObject *qobjectSingleton)
+static int enumForSingleton(QV4::ExecutionEngine *v4, String *name, QObject *qobjectSingleton,
+ QQmlType *type)
{
+ bool ok;
+ int value = type->enumValue(QQmlEnginePrivate::get(v4->qmlEngine()), name, &ok);
+ if (ok)
+ return value;
+
// ### Optimize
QByteArray enumName = name->toQString().toUtf8();
const QMetaObject *metaObject = qobjectSingleton->metaObject();
for (int ii = metaObject->enumeratorCount() - 1; ii >= 0; --ii) {
QMetaEnum e = metaObject->enumerator(ii);
- bool ok;
- int value = e.keyToValue(enumName.constData(), &ok);
+ value = e.keyToValue(enumName.constData(), &ok);
if (ok)
return value;
}
@@ -183,7 +188,7 @@ ReturnedValue QmlTypeWrapper::get(const Managed *m, String *name, bool *hasPrope
// check for enum value
const bool includeEnums = w->d()->mode == Heap::QmlTypeWrapper::IncludeEnums;
if (includeEnums && name->startsWithUpper()) {
- const int value = enumForSingleton(name, qobjectSingleton);
+ const int value = enumForSingleton(v4, name, qobjectSingleton, type);
if (value != -1)
return QV4::Primitive::fromInt32(value).asReturnedValue();
}
@@ -196,7 +201,7 @@ ReturnedValue QmlTypeWrapper::get(const Managed *m, String *name, bool *hasPrope
// Warn when attempting to access a lowercased enum value, singleton case
if (!ok && includeEnums && !name->startsWithUpper()) {
- const int value = enumForSingleton(name, qobjectSingleton);
+ const int value = enumForSingleton(v4, name, qobjectSingleton, type);
if (value != -1)
return throwLowercaseEnumError(v4, name, type);
}
@@ -275,13 +280,13 @@ ReturnedValue QmlTypeWrapper::get(const Managed *m, String *name, bool *hasPrope
}
-void QmlTypeWrapper::put(Managed *m, String *name, const Value &value)
+bool QmlTypeWrapper::put(Managed *m, String *name, const Value &value)
{
Q_ASSERT(m->as<QmlTypeWrapper>());
QmlTypeWrapper *w = static_cast<QmlTypeWrapper *>(m);
QV4::ExecutionEngine *v4 = w->engine();
if (v4->hasException)
- return;
+ return false;
QV4::Scope scope(v4);
QQmlContextData *context = v4->callingQmlContext();
@@ -292,7 +297,8 @@ void QmlTypeWrapper::put(Managed *m, String *name, const Value &value)
QQmlEngine *e = scope.engine->qmlEngine();
QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(QQmlEnginePrivate::get(e)), object);
if (ao)
- QV4::QObjectWrapper::setQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value);
+ return QV4::QObjectWrapper::setQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value);
+ return false;
} else if (type && type->isSingleton()) {
QQmlEngine *e = scope.engine->qmlEngine();
QQmlType::SingletonInstanceInfo *siinfo = type->singletonInstanceInfo();
@@ -300,18 +306,20 @@ void QmlTypeWrapper::put(Managed *m, String *name, const Value &value)
QObject *qobjectSingleton = siinfo->qobjectApi(e);
if (qobjectSingleton) {
- QV4::QObjectWrapper::setQmlProperty(v4, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision, value);
+ return QV4::QObjectWrapper::setQmlProperty(v4, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision, value);
} else if (!siinfo->scriptApi(e).isUndefined()) {
QV4::ScopedObject apiprivate(scope, QJSValuePrivate::convertedToValue(v4, siinfo->scriptApi(e)));
if (!apiprivate) {
QString error = QLatin1String("Cannot assign to read-only property \"") + name->toQString() + QLatin1Char('\"');
v4->throwError(error);
- return;
+ return false;
} else {
- apiprivate->put(name, value);
+ return apiprivate->put(name, value);
}
}
}
+
+ return false;
}
PropertyAttributes QmlTypeWrapper::query(const Managed *m, String *name)
diff --git a/src/qml/qml/qqmltypewrapper_p.h b/src/qml/qml/qqmltypewrapper_p.h
index 3b0ae04cc1..cfb6cb0ec9 100644
--- a/src/qml/qml/qqmltypewrapper_p.h
+++ b/src/qml/qml/qqmltypewrapper_p.h
@@ -100,7 +100,7 @@ struct Q_QML_EXPORT QmlTypeWrapper : Object
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
- static void put(Managed *m, String *name, const Value &value);
+ static bool put(Managed *m, String *name, const Value &value);
static PropertyAttributes query(const Managed *, String *name);
static bool isEqualTo(Managed *that, Managed *o);
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index 44b612e7d2..d262b230e2 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -290,9 +290,11 @@ int QQmlValueTypeWrapper::typeId() const
bool QQmlValueTypeWrapper::write(QObject *target, int propertyIndex) const
{
bool destructGadgetOnExit = false;
+ Q_ALLOCA_DECLARE(void, gadget);
if (const QQmlValueTypeReference *ref = as<const QQmlValueTypeReference>()) {
if (!d()->gadgetPtr) {
- d()->gadgetPtr = alloca(d()->valueType->metaType.sizeOf());
+ Q_ALLOCA_ASSIGN(void, gadget, d()->valueType->metaType.sizeOf());
+ d()->gadgetPtr = gadget;
d()->valueType->metaType.construct(d()->gadgetPtr, 0);
destructGadgetOnExit = true;
}
@@ -407,13 +409,13 @@ ReturnedValue QQmlValueTypeWrapper::get(const Managed *m, String *name, bool *ha
#undef VALUE_TYPE_ACCESSOR
}
-void QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
+bool QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
{
Q_ASSERT(m->as<QQmlValueTypeWrapper>());
ExecutionEngine *v4 = static_cast<QQmlValueTypeWrapper *>(m)->engine();
Scope scope(v4);
if (scope.hasException())
- return;
+ return false;
Scoped<QQmlValueTypeWrapper> r(scope, static_cast<QQmlValueTypeWrapper *>(m));
Scoped<QQmlValueTypeReference> reference(scope, m->d());
@@ -424,7 +426,7 @@ void QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
QMetaProperty writebackProperty = reference->d()->object->metaObject()->property(reference->d()->property);
if (!writebackProperty.isWritable() || !reference->readReferenceValue())
- return;
+ return false;
writeBackPropertyType = writebackProperty.userType();
}
@@ -432,7 +434,7 @@ void QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
const QMetaObject *metaObject = r->d()->propertyCache()->metaObject();
const QQmlPropertyData *pd = r->d()->propertyCache()->property(name, 0, 0);
if (!pd)
- return;
+ return false;
if (reference) {
QV4::ScopedFunctionObject f(scope, value);
@@ -442,7 +444,7 @@ void QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
QString error = QStringLiteral("Cannot assign JavaScript function to value-type property");
ScopedString e(scope, v4->newString(error));
v4->throwError(e);
- return;
+ return false;
}
QQmlContextData *context = v4->callingQmlContext();
@@ -459,7 +461,7 @@ void QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
newBinding->setSourceLocation(bindingFunction->currentLocation());
newBinding->setTarget(reference->d()->object, cacheData, pd);
QQmlPropertyPrivate::setBinding(newBinding);
- return;
+ return true;
} else {
QQmlPropertyPrivate::removeBinding(reference->d()->object, QQmlPropertyIndex(reference->d()->property, pd->coreIndex()));
}
@@ -493,6 +495,8 @@ void QQmlValueTypeWrapper::put(Managed *m, String *name, const Value &value)
QMetaObject::metacall(reference->d()->object, QMetaObject::WriteProperty, reference->d()->property, a);
}
}
+
+ return true;
}
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmlvaluetypewrapper_p.h b/src/qml/qml/qqmlvaluetypewrapper_p.h
index 87f9116056..c8aac719ab 100644
--- a/src/qml/qml/qqmlvaluetypewrapper_p.h
+++ b/src/qml/qml/qqmlvaluetypewrapper_p.h
@@ -106,7 +106,7 @@ public:
bool write(QObject *target, int propertyIndex) const;
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
- static void put(Managed *m, String *name, const Value &value);
+ static bool put(Managed *m, String *name, const Value &value);
static bool isEqualTo(Managed *m, Managed *other);
static PropertyAttributes query(const Managed *, String *name);
static void advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes);
diff --git a/src/qml/qtqmlglobal_p.h b/src/qml/qtqmlglobal_p.h
index 63585fd62e..026be5a703 100644
--- a/src/qml/qtqmlglobal_p.h
+++ b/src/qml/qtqmlglobal_p.h
@@ -55,6 +55,46 @@
#include <QtQml/private/qtqml-config_p.h>
#include <QtQml/qtqmlglobal.h>
+// Define Q_ALLOCA_VAR macro to be used instead of #ifdeffing
+// the occurrences of alloca() in case it's not supported.
+// Q_ALLOCA_DECLARE and Q_ALLOCA_ASSIGN macros separate
+// memory allocation from the declaration and RAII.
+#define Q_ALLOCA_VAR(type, name, size) \
+ Q_ALLOCA_DECLARE(type, name); \
+ Q_ALLOCA_ASSIGN(type, name, size)
+
+#if QT_CONFIG(alloca)
+
+#define Q_ALLOCA_DECLARE(type, name) \
+ type *name = 0
+
+#define Q_ALLOCA_ASSIGN(type, name, size) \
+ name = static_cast<type*>(alloca(size))
+
+#else
+QT_BEGIN_NAMESPACE
+class Qt_AllocaWrapper
+{
+public:
+ Qt_AllocaWrapper() { m_data = 0; }
+ ~Qt_AllocaWrapper() { free(m_data); }
+ void *data() { return m_data; }
+ void allocate(int size) { m_data = malloc(size); }
+private:
+ void *m_data;
+};
+QT_END_NAMESPACE
+
+#define Q_ALLOCA_DECLARE(type, name) \
+ Qt_AllocaWrapper _qt_alloca_##name; \
+ type *name = 0
+
+#define Q_ALLOCA_ASSIGN(type, name, size) \
+ _qt_alloca_##name.allocate(size); \
+ name = static_cast<type*>(_qt_alloca_##name.data())
+
+#endif
+
#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
# define Q_QML_PRIVATE_EXPORT
#else
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index cc4ccbaeb1..efc2828dc5 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -1268,7 +1268,7 @@ void ModelNodeMetaObject::updateValues()
const int roleCount = m_model->m_listModel->roleCount();
if (!m_initialized) {
if (roleCount) {
- int *changedRoles = reinterpret_cast<int *>(alloca(roleCount * sizeof(int)));
+ Q_ALLOCA_VAR(int, changedRoles, roleCount * sizeof(int));
for (int i = 0; i < roleCount; ++i)
changedRoles[i] = i;
emitDirectNotifies(changedRoles, roleCount);
@@ -1333,7 +1333,7 @@ void ModelNodeMetaObject::emitDirectNotifies(const int *changedRoles, int roleCo
namespace QV4 {
-void ModelObject::put(Managed *m, String *name, const Value &value)
+bool ModelObject::put(Managed *m, String *name, const Value &value)
{
ModelObject *that = static_cast<ModelObject*>(m);
@@ -1347,6 +1347,7 @@ void ModelObject::put(Managed *m, String *name, const Value &value)
ModelNodeMetaObject *mo = ModelNodeMetaObject::get(that->object());
if (mo->initialized())
mo->emitPropertyNotification(name->toQString().toUtf8());
+ return true;
}
ReturnedValue ModelObject::get(const Managed *m, String *name, bool *hasProperty)
diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h
index cdce78e542..44583df2a6 100644
--- a/src/qml/types/qqmllistmodel_p_p.h
+++ b/src/qml/types/qqmllistmodel_p_p.h
@@ -179,7 +179,7 @@ struct ModelObject : public QObjectWrapper {
struct ModelObject : public QObjectWrapper
{
- static void put(Managed *m, String *name, const Value& value);
+ static bool put(Managed *m, String *name, const Value& value);
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
static void advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attributes);
diff --git a/src/qml/types/qqmlobjectmodel.cpp b/src/qml/types/qqmlobjectmodel.cpp
index 21205f4490..d926ecb6ce 100644
--- a/src/qml/types/qqmlobjectmodel.cpp
+++ b/src/qml/types/qqmlobjectmodel.cpp
@@ -178,8 +178,8 @@ public:
\ingroup qtquick-models
\brief Defines a set of items to be used as a model
- A ObjectModel contains the visual items to be used in a view.
- When a ObjectModel is used in a view, the view does not require
+ An ObjectModel contains the visual items to be used in a view.
+ When an ObjectModel is used in a view, the view does not require
a delegate since the ObjectModel already contains the visual
delegate (items).
diff --git a/src/qml/types/qquickpackage.cpp b/src/qml/types/qquickpackage.cpp
index 47d9f2f483..17eff5ac40 100644
--- a/src/qml/types/qquickpackage.cpp
+++ b/src/qml/types/qquickpackage.cpp
@@ -89,7 +89,7 @@ public:
{
DataGuard(QObject *obj, QList<DataGuard> *l) : list(l) { (QQmlGuard<QObject>&)*this = obj; }
QList<DataGuard> *list;
- void objectDestroyed(QObject *) {
+ void objectDestroyed(QObject *) override {
// we assume priv will always be destroyed after objectDestroyed calls
list->removeOne(*this);
}
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp
index b9d312d41f..c77495a1a7 100644
--- a/src/qml/util/qqmladaptormodel.cpp
+++ b/src/qml/util/qqmladaptormodel.cpp
@@ -103,8 +103,8 @@ public:
virtual QVariant value(int role) const = 0;
virtual void setValue(int role, const QVariant &value) = 0;
- void setValue(const QString &role, const QVariant &value);
- bool resolveIndex(const QQmlAdaptorModel &model, int idx);
+ void setValue(const QString &role, const QVariant &value) override;
+ bool resolveIndex(const QQmlAdaptorModel &model, int idx) override;
static QV4::ReturnedValue get_property(QV4::CallContext *ctx, uint propertyId);
static QV4::ReturnedValue set_property(QV4::CallContext *ctx, uint propertyId);
@@ -141,7 +141,7 @@ public:
const QList<QQmlDelegateModelItem *> &items,
int index,
int count,
- const QVector<int> &roles) const
+ const QVector<int> &roles) const override
{
bool changed = roles.isEmpty() && !watchedRoles.isEmpty();
if (!changed && !watchedRoles.isEmpty() && watchedRoleIds.isEmpty()) {
@@ -185,7 +185,7 @@ public:
void replaceWatchedRoles(
QQmlAdaptorModel &,
const QList<QByteArray> &oldRoles,
- const QList<QByteArray> &newRoles) const
+ const QList<QByteArray> &newRoles) const override
{
VDMModelDelegateDataType *dataType = const_cast<VDMModelDelegateDataType *>(this);
@@ -239,12 +239,12 @@ public:
// QAbstractDynamicMetaObject
- void objectDestroyed(QObject *)
+ void objectDestroyed(QObject *) override
{
release();
}
- int metaCall(QObject *object, QMetaObject::Call call, int id, void **arguments)
+ int metaCall(QObject *object, QMetaObject::Call call, int id, void **arguments) override
{
return static_cast<QQmlDMCachedModelData *>(object)->metaCall(call, id, arguments);
}
@@ -415,18 +415,18 @@ public:
}
}
- QVariant value(int role) const
+ QVariant value(int role) const override
{
return type->model->aim()->index(index, 0, type->model->rootIndex).data(role);
}
- void setValue(int role, const QVariant &value)
+ void setValue(int role, const QVariant &value) override
{
type->model->aim()->setData(
type->model->aim()->index(index, 0, type->model->rootIndex), value, role);
}
- QV4::ReturnedValue get()
+ QV4::ReturnedValue get() override
{
if (type->prototype.isUndefined()) {
QQmlAdaptorModelEngineData * const data = engineData(v4);
@@ -449,12 +449,12 @@ public:
{
}
- int count(const QQmlAdaptorModel &model) const
+ int count(const QQmlAdaptorModel &model) const override
{
return model.aim()->rowCount(model.rootIndex);
}
- void cleanup(QQmlAdaptorModel &model, QQmlDelegateModel *vdm) const
+ void cleanup(QQmlAdaptorModel &model, QQmlDelegateModel *vdm) const override
{
QAbstractItemModel * const aim = model.aim();
if (aim && vdm) {
@@ -477,7 +477,7 @@ public:
const_cast<VDMAbstractItemModelDataType *>(this)->release();
}
- QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const
+ QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const override
{
QHash<QByteArray, int>::const_iterator it = roleNames.find(role.toUtf8());
if (it != roleNames.end()) {
@@ -489,26 +489,26 @@ public:
}
}
- QVariant parentModelIndex(const QQmlAdaptorModel &model) const
+ QVariant parentModelIndex(const QQmlAdaptorModel &model) const override
{
return model
? QVariant::fromValue(model.aim()->parent(model.rootIndex))
: QVariant();
}
- QVariant modelIndex(const QQmlAdaptorModel &model, int index) const
+ QVariant modelIndex(const QQmlAdaptorModel &model, int index) const override
{
return model
? QVariant::fromValue(model.aim()->index(index, 0, model.rootIndex))
: QVariant();
}
- bool canFetchMore(const QQmlAdaptorModel &model) const
+ bool canFetchMore(const QQmlAdaptorModel &model) const override
{
return model && model.aim()->canFetchMore(model.rootIndex);
}
- void fetchMore(QQmlAdaptorModel &model) const
+ void fetchMore(QQmlAdaptorModel &model) const override
{
if (model)
model.aim()->fetchMore(model.rootIndex);
@@ -518,7 +518,7 @@ public:
QQmlAdaptorModel &model,
QQmlDelegateModelItemMetaType *metaType,
QQmlEngine *engine,
- int index) const
+ int index) const override
{
VDMAbstractItemModelDataType *dataType = const_cast<VDMAbstractItemModelDataType *>(this);
if (!metaObject)
@@ -606,7 +606,7 @@ public:
return QV4::Encode::undefined();
}
- QV4::ReturnedValue get()
+ QV4::ReturnedValue get() override
{
QQmlAdaptorModelEngineData *data = engineData(v4);
QV4::Scope scope(v4);
@@ -617,13 +617,13 @@ public:
return o.asReturnedValue();
}
- void setValue(const QString &role, const QVariant &value)
+ void setValue(const QString &role, const QVariant &value) override
{
if (role == QLatin1String("modelData"))
cachedData = value;
}
- bool resolveIndex(const QQmlAdaptorModel &model, int idx)
+ bool resolveIndex(const QQmlAdaptorModel &model, int idx) override
{
if (index == -1) {
index = idx;
@@ -650,12 +650,12 @@ class VDMListDelegateDataType : public QQmlAdaptorModel::Accessors
public:
inline VDMListDelegateDataType() {}
- int count(const QQmlAdaptorModel &model) const
+ int count(const QQmlAdaptorModel &model) const override
{
return model.list.count();
}
- QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const
+ QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const override
{
return role == QLatin1String("modelData")
? model.list.at(index)
@@ -666,7 +666,7 @@ public:
QQmlAdaptorModel &model,
QQmlDelegateModelItemMetaType *metaType,
QQmlEngine *,
- int index) const
+ int index) const override
{
return new QQmlDMListAccessorData(
metaType,
@@ -693,7 +693,7 @@ public:
QObject *object);
QObject *modelData() const { return object; }
- QObject *proxiedObject() { return object; }
+ QObject *proxiedObject() override { return object; }
QPointer<QObject> object;
};
@@ -735,12 +735,12 @@ public:
free(metaObject);
}
- int count(const QQmlAdaptorModel &model) const
+ int count(const QQmlAdaptorModel &model) const override
{
return model.list.count();
}
- QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const
+ QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const override
{
if (QObject *object = model.list.at(index).value<QObject *>())
return object->property(role.toUtf8());
@@ -751,7 +751,7 @@ public:
QQmlAdaptorModel &model,
QQmlDelegateModelItemMetaType *metaType,
QQmlEngine *,
- int index) const
+ int index) const override
{
VDMObjectDelegateDataType *dataType = const_cast<VDMObjectDelegateDataType *>(this);
if (!metaObject)
@@ -768,7 +768,7 @@ public:
metaObject = builder.toMetaObject();
}
- void cleanup(QQmlAdaptorModel &, QQmlDelegateModel *) const
+ void cleanup(QQmlAdaptorModel &, QQmlDelegateModel *) const override
{
const_cast<VDMObjectDelegateDataType *>(this)->release();
}
@@ -792,7 +792,7 @@ public:
m_type->release();
}
- int metaCall(QObject *o, QMetaObject::Call call, int id, void **arguments)
+ int metaCall(QObject *o, QMetaObject::Call call, int id, void **arguments) override
{
Q_ASSERT(o == m_data);
Q_UNUSED(o);
@@ -813,7 +813,7 @@ public:
}
}
- int createProperty(const char *name, const char *)
+ int createProperty(const char *name, const char *) override
{
if (!m_data->object)
return -1;