| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
We don't want min and max to be macros.
Change-Id: Ifa79eaecf00c9f8b9c61494aa9d883eebfdabc65
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
It is shorter and encapsulates the exception handling a bit.
Change-Id: I8e2dc0eb3b930e222b8cb4852b73d99ca18a0379
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This patch removes a workaround for old versions of MSVC; we should be
able to rely on the standard library nowadays.
Original-patch-by: Alexander Neumann
Fixes: QTBUG-89203
Change-Id: I8047565000fc7e4e3b8ac28584ff4a479b648274
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Assigning a plain char to QChar is deprecated. What we want here is the
special Null character, though.
Change-Id: I0f3cd56c8820fdf5afa40cf608e738e04163680a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QString does this for us in any case, and writing
there was always undefined behavior. This is
causing problems after an optimization in QString,
where creating a QString with size 0 will avoid any
memory allocation and simply point to the (readonly)
_empty member in QString.
Change-Id: I0516dc2e8672b8290efa891bd9b5486dac8021b6
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-84319
Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
| |
Amends commit 4c5ed04e64ea9ac0038ae30e1189cfe745b29bd9
Task-number: QTBUG-83384
Pick-to: 5.15 5.12
Change-Id: I0918c27dfa73dff83cbf0f58b41ce8620dff8a0a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
If the call resulted in an exception the return value is undefined.
Task-number: QTBUG-81581
Change-Id: Ibfdd5e1229cf5437f270232d3b1a91308adeec72
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Provide different export macros and different top level headers for
each, don't include runtime headers from compiler sources.
Change-Id: I7dc3f8c95839a00a871ba045ec65af87123154be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/qqmlimport.cpp
Change-Id: I6add6267297ea50a646d43d212027a168dca8916
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we have a theoretically valid capture reference that just didn't
capture anything in this match, we don't want to treat it as literal.
Only capture references that clearly are outside the range of things we
can possibly capture with this expression should be treated as literal
strings.
Change-Id: Iab0bf329d11a6b9e172aa662f11751d86cfc26a6
Fixes: QTBUG-75121
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
| |
Technically UINT_MAX is actually a valid array index, although that is
an academic problem right now. However, we do have a method
isArrayIndex() and should just use that to determine if a PropertyKey is
an array index.
Fixes: QTBUG-73893
Change-Id: I302e7894331ed2ab4717f7d8d6cc7d8974dabb4e
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The nodes are owned by the SparseArrayData and will be freed whenever an
item is deleted from the array. Therefore, we have to look up the node
for each iteration. This is slightly slower, but at least it doesn't
crash.
Fixes: QTBUG-74188
Change-Id: Id24324a8c83b00b3ad1212cdaabccabd6c8a999f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"x".replace("x", "$1") gives "$1" in both JSC and V8, as there are
no captures that could be used as a replacement for $1. Implement
the same behavior as it's the most logical thing to do (even though
it's undefined according to the spec).
Two digit captures ($nm) work in a way that they get applied if
$nm captures exist. If there are less than nm but more than n captures
available $n is replaced by the n'th capture and m is copied over
verbatim.
Change-Id: I8b5f576f2c42c8334859ab7854dcdf07104dd35b
Fixes: QTBUG-73152
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Respect the newTarget passed into those constructors and make
sure we set up the proto chain correctly.
Change-Id: I3d12c7dbef4b33660a6715d73e9fb0f89105167a
Fixes: QTBUG-71138
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: I44a90dec16dc1421a32a7770b353a4df14c057f9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Object::getOwnProperty never modifies the object,
so make it a const member function.
Change-Id: I175bb45d61a66a1d9f577c087129562d44d62e17
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of Primitive and move the corresponding methods
directly into Value. Mark many methods in Value as
constexpr and turn Value into a POD type again.
Keep Primitive as a pure alias to Value for source
compatibility of other modules that might be using it.
Change-Id: Icb47458947dd3482c8852e95782123ea4346f5ec
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I045a4844c06df9232cc8b04485ab0a39bb990e3f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: If9f7c07ea657ba8503b9188a7b77e301f23423ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
The implementation is supposed to call arg[Symbol.match].
Change-Id: Ia8028d259e152b1e65eb6b0e817ef60bdc0d37e2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I331fd4d114f68fb5cb71186813f851af25539ffa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
And with that get rid of the old advanceIterator methods.
Change-Id: I969fa89d25df8992a4b08c8c081b91c92ffdfddd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old advanceIterator schema was extremely ugly and in addition
not flexible enough to support the requirements for Proxy.ownKeys
and some of the methods in Object
Implemented a new scheme through a OwnPropertyKeys method in the
Object VTable that creates and returns an iterator object. Ported
QJSValueIterator and for-in to use the new mechanism.
There's still many places where we use the old ObjectIterator (that
relies on advanceIterator). Those will be ported in subsequent
commits.
Change-Id: I091a9bea9ff6b2b63630cc336814700757a718be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Support the new.target meta property in the codegen, and
add support for passing the newtarget into the constructor
vtable methods and the execution context.
Change-Id: I62ea58e5e92d894035a76e35776203e9837c383b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Turns out that the overloading of vtable methods and regular
ones is problematic in some cases. So let's rather make it explicit
which methods are part of the vtable, and which aren't.
Change-Id: Ifee32a26104d30f3c82bca8b5a9cdea2d4f4f526
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Change all uses of Identifier to use the new PropertyKey class
and get rid of Identifier.
Change-Id: Ib7e83b06a3c923235e145b6e083fe980dc240452
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I25245818c6ff2104642594476cb9684bac824f29
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Move the code into a virtual method of StringObject, bringing us closer
in line with the ES7 spec.
Change-Id: Iaf460f5a5517fe059a30be8c403d71625453b80a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I4e9e1635f404082b0e8b333dc13a33d27e4f4b50
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is required to support Proxy properly, and at the
same time fixes a couple of test failures.
The new interface also replaces the old query and
queryIndexed virtual interfaces, as those where doing
a subset of what getOwnProperty does.
Change-Id: I750e366b475ce971d6d9edf35fa17b7a2b07f771
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I3ff082fd2d7764f87dd079901750fe668f553521
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ic018606ddb92772705bbb06aaed07722827737ea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
And add a zero termination in String.fromCharCode.
Change-Id: Id86b9e35bfbf2e41f3a461d7b8f4c108df30f741
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I30f19d750ee4cde767912c87bbc53d3abc0f6bb5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Get rid of a circular dependency when initializing
StringObject.prototype, by setting it's string value
later during the initialization process.
Change-Id: I5bdaff3936c1f8af12c4d53f95747b8aa43f4ef6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Add support for String.prototype[Symbol.iterator] and the
StringIterator object.
Change-Id: I72c4f988e4f363be1af51f9cc5f8e83af43cd151
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I0990e9610a3200502719191fa0a4174ba9ee1903
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Added basic infrastructure to create symbols and convert them
back to strings. In addition, storing and retrieving of symbol
based properties in Objects works.
Change-Id: I185f7aa46e7afa19db5a801102142892e03b7bf1
Reviewed-by: Simon Hausmann <simon.hausmann@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.
Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).
Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Make sure all our JS objects are referenced from the JS
stack before calling into the memory manager.
Change-Id: I88d622d37b9d6cfc19db4045ebd3fadc5bb4cabe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Use it in regexp matching. There's probably other places where
we should use this as well.
Change-Id: Ie2774acff0a5ec7b1c26c564fa40e65fecea29d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Saves some memory for many cases, and will allow re-using the
String itself as an identifier
Change-Id: I462d63bc6f113dff1dce0de28ee4eea3949a4b95
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I6de932817fc26c7a35b004926cd3ca84e42272ad
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: Ie364357b5e1ecf09eb264181e11b0247b07fad6c
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: I159b57acc7a2133ef1ad545aa84e792c63449a57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
| |
To make it consistent with the rest of the engine.
Change-Id: I57b98fa26134f9864c663f47371ef3e9ca16ac9c
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
| |
Avoid allocations on the JS stack if possible
Change-Id: I344cd6dceb6264314f9d22c94db22b22d1d24d14
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|