| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This is needed for symbol support.
Change-Id: I83db21f232168710d18999fd97d912016e86d630
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This is required, so we can also use Symbols in
the internal classes.
Change-Id: I630e7aa7b8b16d5a94041f8d18515fd582f94264
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
get rid of some defineProperty usages
Change-Id: I683b35b3042a0ba7f1b68235acaa6325c6acf2f1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Both classes basically did the same thing. Unify them in a new
PropertyIndex class.
Change-Id: Ieb6fb670e4d204bf20ee4c0b70b4381c95c6268e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
This introduces a common base class for Strings and Symbols
giving us a unified approach to handling object properties for
both.
Change-Id: Ic9e5a18b084c8b730e134db990f101d47af224e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ib25c08027013217657beb2675dafa9a8c85cbaf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add a reverse mapping table to the IdentifierHash to
avoid having to store a hash value inside the identifier.
This makes it possible to then use the identifiers value
based and not new them on the heap anymore.
Change-Id: If1f177588ea104565c6e3add49c70534a6c7dcb8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Variables do not escape if they are being used from an
inner block in the same function.
Change-Id: I494861edf9d8a492930797928a3137362082d084
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a CompilerContext for with, whose only purpose it
is to trigger variable lookup by name. This avoids looking
up variables declared inside the with() {} block by name and
we do not lookup variables outside the with block by name
neither anymore.
Change-Id: I52e9fb2daa9601f9e5102714c002dc506ad5ed23
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the need for a specialized catch context, instead
use a regular block context, that also captures the
catched variable.
This also removes the need to do lookups by name inside
a catch expression.
Change-Id: I8b037add7f423922e2a76b4c0da646ca7e25813a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is still to some extend work in progress as
lexically scoped for loops won't yet do the right
thing.
let and const variables are still accessible before
they are declared, and the global scope doesn't yet
have a proper context for lexically declared variables.
Change-Id: Ie39f74a8fccdaead437fbf07f9fc228a444c26ed
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far, when instantiating QML bindings, the node parameter
could be the same or a child of the body. This will break
badly when we introduce lexical scopeing as that node
could be an AST::Block that opens it's own context.
Changing this requires some smaller adjustments to our autotests,
as error locations will now be slightly different (pointing to
the beginning of the binding, not the beginning of the RHS of
the binding).
Change-Id: I2c536a4fe6d8b549a138cc7967ef034eb2523f3b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: If22845b19c72362249347083edef591f7032f468
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Add a Value::getLength(), that converts a Value to a length bound
between 0 and 2^53-1 as per ES7 spec. Use the extended range in
Array.prototype.splice and map to fix hanging test cases.
Change-Id: If9280d501423cfc10a60abd4e8aa30521d2a7bca
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I8c437f7bc642e600358d88849330dcf64bc32ad4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I0e98ccba9ae3026cd8bfdc4cae100f280b5aa22c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Move variable resolving into the context, and avoid creating
ExecutionContext's whereever we can. This prepares things for
block scoping, where this becomes rather important to be
able to achieve decent performance.
Change-Id: Idf3d3c12cf348a2c3da01989c26c8529ceb36c12
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
First step to turning identifier into a simple int.
Change-Id: I4988587aa61f1f02ed80426ccbf00b685f38c829
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
And make it an enum class. The new name fits better, as it's mainly
used to determine the type of the context when parsing. Also already
added the 'Block' value that will be needed.
Change-Id: I70d963b6a0b22db1a3c607cce6bdd2054b29e000
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I64b49ae77ecd81eafb320cda04a1a7bf4b2dc90c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
In ES6, anonymous functions assigned to a variable/property with
a known name, inherit the name of that variable/property.
Change-Id: I79479b9358b24d610e3e696eb19fe0ec4aee15d1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Commit da5fffbd34d8be68f8ee4c649881dbb673c9c0a5 introduced deferencing
of the formals parameter list that can be a null pointer if the declared
function has no parameters.
Change-Id: Id7dce0f78b16266e672f0ae430ee4f979de5734d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
This makes reading the code less confusing.
Change-Id: Id49de8ff6645d5e1d66eb07d36c3b322dbb60c68
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Not everything works yet, but basic destructuring
assignments do.
Change-Id: I5f74691fd6458092ecfde9d1a8a802f99fc57b9e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ia7f894fb61cfa760e253963ab4815d98103cfd9b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Required to get proper destructuring working.
Change-Id: I99fc20a9f1bace1fe3981d88ce5466f9c8d98245
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Array/ObjectLiterals and destructuring expressions are
syntactically very similar. In some cases (when using
a destructuring expression as the lhs of an assigment),
the parser needs to convert the literal into a destructuring
expression.
To support these, use the same data structures for both in
the AST. Those Patterns can be converted with little
additional work from a Literal to an AssignmentPattern and
be used in all places where we need destructuring in addition
to literals.
Change-Id: I177599b46eab0f6e8cb2a40c3b3b11ed00a07d6a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To get a consistent representation in the AST, we need to unify
the AST that is generated by theObjectLiterals, ObjectBindingPattern
and ObjectAssignmentPattern rules in the grammar. Like this we
can avoid having to reparse part of the source code, and instead
replace this with consistency checks once we know which of the
three grammars are supposed to apply.
Change-Id: Ib90f521f9595db6bcad446e40de9b912bab3da7c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Idf8ea5263fc4b013f4aafa40fef9bc622c1a5a91
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I2a9e8fb847dfa45ca77ee43e14f39f2b2def5792
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Some smaller changes to the codegen are included as well to ensure
that we catch all uses of generators and properly throw an unimplemented
error on them for now.
Change-Id: Ib915a0e862e128644ff00dfe989507783c912c66
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
The VariableDeclaration constructor shouldn't specify the scope
of the declared variable.
Change-Id: I1368cec7c5cb8535e169c0fc20d3be4e69368b47
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
No support in the codegen yet.
Change-Id: I9998d7abae086660fc0457c65b6d9050933a428f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
The codegen still throws a syntax error for now.
Change-Id: I8134b27d6153f6d6df81a9bafc7ae9d573085b73
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I82cb787f068dbcc1e5410432f462eceaa3273457
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
In some valid cases, the lexer would add an automatic semicolon
before the ++/-- operators even if it shouldn't.
Change-Id: I2935259fd98a4c7f3f929cc1cecea85f7dde8016
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
Change-Id: I280d42b8926c0cada1f35d322b80aaf2b0ef0a73
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QQuickPointerTouchEvent::m_event is 0 when calling
QQuickPointerTouchEvent::isPressEvent(). Add a convenience function
with a check returning the Qt::TouchPointStates.
Task-number: QTBUG-44976
Change-Id: I2433ec3c56adeda2de190ca46aed8413a1357c55
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We were leaking an instance of MyNetworkAccessManagerFactory in the
"NetworkAccessManagerFactory"-example. To add to this the documentation
around QQmlEngine::setNetworkAccessManagerFactory did not specify
whether or not it took ownership, causing confusion.
Change-Id: Ic9eee2c45682c752bcb4aa98943fc0af2b630795
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
-typedef "Jump" may not be used in an elaborated type specifier
-explicit specialization of function must precede its first use
-"Value" is ambiguous
Change-Id: Ic15c196f1b33211cd3f2f25a54ba478747336fe4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This patch enables JIT on INTEGRITY s820Am and other ARM64 builds
Change-Id: I2fa130f41a6c5bc6aa86bcfd5a01c2d431300561
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
|
| |
| |
| |
| |
| |
| |
| | |
Change-Id: I472f61241d1875daf0de0a597bf27c019314f48f
Task-number: QTBUG-50119
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I58a21e70fdd040175b52465d6ba52e7fceaf6398
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Codegen will still throw a Syntax error on it though.
Change-Id: I292dd166ad8cb4a62f2bcfa9637bdc76cf95bb51
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
{ foo(args) {} } now works correctly.
Change-Id: Ibd271fe957a5259863af793ad74380473690f4ab
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Computed property names currently work in object literals
and destructuring arguments.
Change-Id: I9dc5bc61b45139ef1836072695ea2fe1ce4994ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This has been relaxed from ES5. In ES8 this is actually allowed
even in strict mode. According to the spec we are to evaluate all
rhs expressions, but assign the last one used in the object literal.
The spec probably required this relaxation to be able to handle
computed property names.
Change-Id: Ia1b02010b7541946029951b36e5457a07fdee818
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
"var x = 20; var o = {x}" works now.
Change-Id: I8dd64bea0bc6191590592c80883716810052773f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to ES6, the length property is the number of
required arguments, ie. the number of arguments until the
first arg that has adefault parameter.
Also fix a crash when parsing a parameterlist with a trailing comma.
Change-Id: I4f6b2be4feae7b513388be66b43b160bb3cc77f1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Correctly iterate over the content of FormalParameterLists.
Change-Id: Ia1c9cb94d161fb0aa5b9dfa347a00499c907e77b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|