| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main feature that needs to be implemented in order to enable lookups
in QML files is to respect that the QObject wrapper has its own storage
layer (meta-object properties). Lookups need to be able to index those
when the base is a QObject. This is done by caching the property data
and guarding the validity by comparing property cache pointers.
The same lookup logic is also implemented for value type wrappers.
OVerall there's more that can be done with lookups in meta-objects, for
constant properties for example.
For "global" lookups we have a safeguard in place that generates a
LoadName instruction for property access that should end up in the qml
context wrapper. So no changes are needed here at first, but the lookup
in the QML context can be optimized in the future.
The way of storing the property cache in the lookup itself trades
ugliness on destruction against the creation of less internal classes.
Another option would be to store the property cache in the internal
class and let QObjectWrapper always transition via the property cache.
Task-number: QTBUG-69898
Change-Id: I9c378c071acc6d7d4a34a2a76616f9594119d515
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-71862
Change-Id: I836756d004753420bfb7a00013ade0229bd5946e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@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: I07db2df7eec2bdbeb84bd576d9e4f7912f79fc78
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Make sure we check for detached buffers after all other calls
that could execute code have happened. To do that convert the
values to numbers before calling the write() methods of the
specific typed array.
Change-Id: I091e41400f740dfc1d0826657e285443c9336c40
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
So now Math.max(array1.length, array2.length) won't return a double
anymore.
This improves the score in the crypto benchmark by ~10%
Change-Id: I8453a671d28d7f2a39ba74b18b3155f031d9b12f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It was only used in a few places now, that can be replaced by
either using a PropertyKey, or by limiting the fast path
optimization in the runtime to array indices smaller than
INT_MAX. Since there are less branches this should even be
faster for pretty much all use cases.
Change-Id: Ib4f2f2f3e27f14ad180b810546e82ac83170b106
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This will replace Identifier over the next few commits.
The advantage of PropertyKey is that it can be stored on
the JS stack, so that a GC run won't accidentally clean
up the string/symbol referenced by the key.
Change-Id: Ib4daa4616bcfa537e6d371ef7c7740bc7727a50d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our method to create object literals wasn't compliant with the
ES7 spec, as we would in some cases re-order the properties.
This violated the spec which required properties to be created
in order, so that for-of would also iterate over them in creation
order.
As a nice side effect, this simplifies the code and gets a couple
of test cases using computed property names to pass.
Task-number: QTBUG-62512
Change-Id: I6dfe004357c5d46a0890027f4fd9e2d1e1a2a17a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
and use it where required.
Change-Id: I309ca61e0360b26428fc2ea5a2eea47c8e0632a0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We also add a sameValueZero helper, to make life easier.
Remaining failures:
built-ins/Array/prototype/includes/get-prop.js fails (due to missing Proxy)
built-ins/Array/prototype/includes/length-boundaries.js fails
length-boundaries failure is due to strange treatment of edge number values in
Value, I think, I haven't yet been able to rectify that one.
Change-Id: Idacca528d88fb052d19a5d244662927f502f20d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simply encode them as integers. That works just as well, and
allows removing the indexed empty values.
This is helpful, to swap the internal representations of undefined
and empty values, which in turn will simplify an implementation of
correct handling of uninitialized variables (through let/const).
Change-Id: I299f975d665309611d1b561f6a0c86b5ca15782a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Don't call asReturnedValue() on something that might be null.
Change-Id: I31ab7df7e353dee0718957ec0d5b4edcc72f7a56
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: Ic83314fc2a5bb80f88c1616e7d3179fe6573a0e9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Don't try to allocate an array buffer with negative length.
Change-Id: Ie95b9bcf7a3108b47df27ef813b7922e9da42b17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Do some more bounds checking to avoid crashes.
Change-Id: I44e838c3577a9176628aa5e382d712eac9800203
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>
|
|
|
|
|
|
|
| |
This is needed for symbol support.
Change-Id: I83db21f232168710d18999fd97d912016e86d630
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>
|
|
|
|
|
|
|
|
| |
This is required to be able to turn the internal class into
something that lives on the GC heap.
Change-Id: Ie4318588d420743b1e1ab1cd596a1c9d153eb793
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Because no, that can't be represented as an 32bit integer.
Change-Id: I83e5e74fdfbd9b13ac04a49311619d8939c7b093
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/imports/shapes/qquickshape.cpp
src/imports/shapes/qquickshape_p_p.h
src/qml/compiler/qqmlpropertycachecreator_p.h
src/qml/jsruntime/qv4value_p.h
src/quick/items/qquickloader_p.h
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
tools/qmlprofiler/qmlprofilerapplication.cpp
Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
|
| |\
| | |
| | |
| | | |
Change-Id: I3b250545e334f50dcef1a75acdef51820d34079a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The idea of NaN boxing is to use one single NaN as a "true" NaN, and all
others as a boxed value. So when encoding some NaN, be sure to use that
one "true" NaN. Otherwise, it will be interpreted as an encoded value.
Task-number: QTBUG-65998
Change-Id: Ia6e4641be180f3d626c40a57b473f181358e04db
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The write barrier header should have minimal dependencies.
Change-Id: I071718c2fafe5020d1093ca3b363844f7a9b7b35
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove code for older versions and streamline #ifdefs.
Remove the helpers macros Q_STATIC_ASSERT_FOR_SANE_COMPILERS
and V4_ASSERT_IS_TRIVIAL.
Task-number: QTBUG-40658
Task-number: QTBUG-51673
Change-Id: Ifa4fab653b10ce7858739adef08364cddc6507cf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0eb3300ac2e3e29b5311f9b7599d85eab7f775c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Iccfe50c967560deee9e2903bbe3a293b13fe8b48
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The encoding will end up being the same as undefined.
Change-Id: I2427e96f98d410c291234615969791de6bf4f833
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Doing the marking of objects in a function instead of
using the table seems to be somewhat faster.
Change-Id: I9ec00cc0264f9a15c69b285db493bee31d99bf96
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ibefac50246045066c90c4c2dbc36d2776c5dab0e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/qml/compiler/qv4codegen.cpp
src/qml/compiler/qv4compileddata.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/compiler/qv4isel_moth_p.h
src/qml/compiler/qv4ssa.cpp
src/qml/jit/qv4assembler_p.h
src/qml/jit/qv4isel_masm_p.h
src/qml/jit/qv4regalloc.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4qmlcontext_p.h
src/qml/jsruntime/qv4regexp.cpp
src/qml/jsruntime/qv4regexp_p.h
src/qml/jsruntime/qv4regexpobject.cpp
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4vme_moth.cpp
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
tests/auto/qml/qml.pro
tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
tools/qmlcachegen/qmlcachegen.cpp
Change-Id: I1577e195c736f3414089036b957a01cb91a3ca23
|
| |/ /
| | |
| | |
| | |
| | | |
Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now that we use the xor-NaN boxing on all platforms, the 32bit checks
are not valid anymore. We do need to check if we still want specialized
32bit versions to prevent bad code generation for the 64bit stored
value.
Task-number: QTBUG-63194
Change-Id: Ic58a174194bfd343c09b78076ecbf8f2816d5749
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is just as fast as isObject(), and allows for
some smaller optimizations.
Change-Id: Icc2117941a2851e56e9ef2baf87ba3bca9538581
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Calling a non inline memberfunction does force the this argument
onto the stack. Replacing those functions with static member
functions taking the object by Value avoids that problem and
allows the QV4::Value to be passed in registers.
Change-Id: I9cf1c220e1dc0f958b416a7216d9ba1ae79a4b3e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Switch to a more efficient encoding of Values. This makes
the type() determination easier and faster than before, and
should allow us to optimize comparison operations better.
Change-Id: I22106262cea052ae1887f42a957860ee00b450e6
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And with this there is no need to special case integers
in the BitXxx binops anymore.
Change-Id: I9f94651d776f4e31ff8152fe7ce00dc5b1fa706e
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow for faster calling of builtins, and completely avoid
scope creation in many cases.
Change-Id: I0f1681e19e9908db10def85a74e134a87fc2e44c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change those back again to return a value. This will be required
to avoid creation of Scope objects between JS function calls.
Change-Id: I05cb5cf8fd0c13dcefa60d213ccd5983fab57ea3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Icc8a05b9a04d98e6e7c29f1d5b2cea32ce75ad24
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|/ /
| |
| |
| |
| | |
Change-Id: I5ecc406f06a193b470eb9ac376da6b9f752d01cb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jit/qv4assembler.cpp
src/qml/jit/qv4assembler_p.h
src/qml/jit/qv4isel_masm.cpp
src/qml/jsruntime/qv4vme_moth.cpp
Change-Id: I865d794e550a263387a39ca8d051ebf48b70cbc0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our two value encodings use different masks for the upper 4 bytes.
Depending on the target architecture we must use different values when
generating code that uses these masks.
This patch replaces the #ifdef'ed ValueTypeInternal_* enum values with
two C++11 scoped enums that allows for the co-existence of both
throughout the code base as well as selective use in the code
generators.
Change-Id: I380c8c28b84df2874cca521b78bfe7f9388ed228
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is required to be able to implement concurrent or
incremental garbage collection.
Change-Id: Ib3c5eee3779ca2ee08a57cd3961dbcb0537bbb54
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
src/qml/jit/qv4assembler.cpp
src/qml/jit/qv4assembler_p.h
src/qml/jit/qv4isel_masm.cpp
src/qml/jsruntime/qv4context.cpp
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4vme_moth.cpp
src/qml/memory/qv4mmdefs_p.h
Change-Id: I9966750b7cd9106b78e4c4779f12b95a481cca40
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the Runtime function pointer array into EngineBase so that
we can eliminate the last use of qOffsetOf.
For improved cache locality the memory manager point is now also
located in the EngineBase.
Change-Id: I0b3cf44c726aa4fb8db1206cc414a56c2f522a84
Task-number: QTBUG-58666
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
All stores into the Heap from C++ and Moth should now go through
the write barrier.
Change-Id: Iae9347754b90d68c10fade9f345842e86ec460cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I56b1dab62ff432273ee8549b0496bd0f3fc655ea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|