| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Task-number: QTBUG-82931
Change-Id: I7b663c5f774ef3edbb19d5f2ef53cfe623a8e4cf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
The "in" operator may throw an exception.
Change-Id: I7d0b6e2212ac6ec237fbf14719349f8e23810028
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we cannot mprotect() we have to abort the JIT compilation. Delete
RepatchBuffer.h as it is unfixable in that regard. Luckily we don't use
it.
Task-number: QTBUG-89659
Pick-to: 5.15
Change-Id: Ic5ddbdf51b471db4ddeaa75aab48b24c1f7ced56
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We need the compilation unit, and a way to retrieve JavaScript metatypes
from it. Also, prepare for cases where we only have a QJSEngine, not a
QQmlEngine, and pass the scope object as part of the AOT context.
Change-Id: Ica81e92c99f3c9b6baffd04db1e0e91603fd2ac7
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We don't want to call into the engine just for adding two numbers.
This implements the most common operators on primitive JavaScript
values. More are to follow in the future.
Change-Id: Id51a5af59a3af9fec78a2d8f293e59e6567e9204
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
It allows for more natural looking generated code and there is no
downside. The arguments are specially prepared for the call anyway.
Change-Id: I8437e93adb1c67db1b53fbdb29cbea10f6ef278f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
metaTypeFromJS expects to assign the value using regular operator=. That
destructs the old value and therefore the old value has to exist.
Change-Id: Ife443b184c30d658f42b65c6717e80685f6635d5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Apparently that's not a good idea.
Change-Id: Ic49f6d40135f65e39725acd7a745d17917b64be3
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I2340f4413ae9a44c71000e840a79e904b6a0fec9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
In this case we need to pass a pointer to the return variant itself, not
to its data.
Change-Id: I86e468f106f29e1f1be8adee9882d465fd6da533
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The internal QVariant constructor taking a QMetaTypeId has been removed.
Thus, construct QMetaTypes where necessary from the id, or avoid a
QMetaType -> ID -> QMetaType roundtrip where we already have a metatype.
Also fix a few missing includse that were previously transitively
included.
Change-Id: I56ce92281d616108a4ff80fe5052b919d1282357
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
When the ahead-of-time built binding returns the same type as the
QProperty, then we can connect them directly with a small shim and pass
through the context and scope objects.
Change-Id: I9cb49d1fa35490a4ccb06965397674d5534c067d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch aligns the trace points more with the existing coverage from
the Qt QML profiler. The following things can now be traced:
- file compilation time
- binding execution
- signal handling
Change-Id: I5b7f1a495f0556482ccd5c07474391b291742ef1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the code generator would truncate the stack slots when
writing the compiled function, as that one only had a 16bit field for
them.
Also, add a debug-mode check for stack overflows to the interpreter.
Unfortunately, as it triggers a stack overflow, the test will not
reliably fail without this change.
Fixes: QTBUG-80511
Change-Id: I3019bb2de657ae4c3e1040db798a83533f854bff
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
"Value" is a globally defined type on INTEGRITY platform, which
causes the compiler to become confused about ambiguous use.
Change-Id: Ic01ce9cf3a8a2c901b3fbe1aa68b419f2778b089
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jit/qv4baselinejit.cpp
src/qml/jsruntime/qv4vme_moth.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
Change-Id: Iec7cd27ddad0281bd3b7833fb6b252f66a6ae5d6
|
| |\
| | |
| | |
| | | |
Change-Id: I6472cd72b27c69257efe54376e428274ebf68050
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We need to keep the accumulator alive across function calls. This
requires:
1, Saving the accumulator on the stack if the function might allocate, to
protect it from the garbage collector. However, we don't need to do
that if the result of the function is to be saved in the accumulator
and the function itself doesn't use the accumulator as argument. In
this case the previous value becomes unaccessible and we might as
well GC it.
2, In the JIT, restoring the accumulator from the stack after the
function call if we want to ignore the return value.
3, Therefore, also saving the accumulator on the stack before calling in
case of 2.
We assume that we don't need to keep the accumulator alive across the
jump to the exception handler. Saving the accumulator more often than
necessary is detrimental for performance. To make sure the assumption
holds, explicitly load the accumulator with undefined _before_ jumping
to any exception handler.
Change-Id: I78cbc42847b8885a0659b23f3b81655b7f1a0bc4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I see no good reason why the NaN returned when reading "nan" as a
double should be a signalling one; a quiet one should be just fine.
[ChangeLog][ES][] The NaN obtained by Math.pow(+/-1, +/-infinity) and
(+/-1)**(+/-infinity) is now quiet rather than signalling.
Change-Id: I6b5ea469c17c028328c803f54f2a6d4422a80033
Reviewed-by: Lars Knoll <lars.knoll@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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The old code used the implicit conversions from QAtomicPointer<T> to
T*, and QAtomicInteger<T> to T, and vice versa. The semantics of these
differ from the ones std::atomic uses, so we're going to deprecate
these, like we did for load() and store(), too.
This patch fixes some users of these APIs before we deprecate them.
Change-Id: I892d705c22280f1c6fdc62c1777248b44e9c4329
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QLatin1Literal is an undocumented and deprecated typedef
for QLatin1String, just use the original.
Change-Id: Ib6e2b7ac369be12aed0e455c91cf31b807eae4ed
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The static part can be used for compilation and won't resolve managed
objects. This allows us to remove all the remaining V4_BOOTSTRAP.
Change-Id: Id2f6feb64c48beb2a407697881aea8c0d791a532
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We need a CompilationUnit that only holds the data needed for
compilation and another one that is executable by the runtime.
Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qqmlirbuilder.cpp
Change-Id: I2cfda470515e2df778ad3c89105c07344af07c6d
|
| |\|
| | |
| | |
| | | |
Change-Id: I3eb5d1affe64b6ae709d1154cc37de91db3816b6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds tracepoints for LTTng/ETW at the positions that are also
used by the QML profiler within QtQml. I.e. with the tracepoints
here, you'll see which QML function is being executed which is
already quite helpful.
This will allow us to bridge the gap between C++ and QML when
tracing with LTTng/ETW. Additionally, you'll also be able to see
kernel tracepoints which bridges another gap.
Combined, this approach can give much deeper insights into what the
(embedded) system is doing compared to just looking at the QML
profiler alone.
Change-Id: Ia8f71bf6d44b7f51c3c5aaa38f032675604aeca6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add an atomic isInterrupted flag to BaseEngine and check that in
addition to the hasException flag on checkException(). Add some more
exception checks to cover all possible infinite loops. Also, remove the
writeBarrierActive member from QV4::EngineBase. It isn't used.
Fixes: QTBUG-49080
Change-Id: I86b3114e3e61aff3e5eb9b020749a908ed801c2b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The tracing JIT won't be finished. Therefore, remove the parts that have
already been integrated.
Change-Id: If72036be904bd7fc17ba9bcba0a317f8ed6cb30d
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This way you can enable or disable the JIT when configuring Qt. The
conditions for the availability of the JIT have also been cleaned up.
There is no reason anymore to artificially restrict availability on x86
and x86_64. The reason for the existence of those clauses are old
problems on windows that have been fixed by now. However, on arm and
arm64, we need a specialization of the cacheFlush() function for each OS
to be supported. Therefore, restrict to the systems for which such a
specialization exists. iOS and tvOS are technically supported and you
can enable the JIT via the feature flag now. Due to Apple's policy we
disable it by default, though.
Change-Id: I5fe2a2bf6799b2d11b7ae7c7a85962bcbf44f919
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qv4compileddata_p.h
src/qml/jit/qv4baselinejit.cpp
src/qml/jit/qv4jithelpers.cpp
src/qml/jsruntime/qv4lookup.cpp
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4runtimeapi_p.h
src/qml/jsruntime/qv4vme_moth.cpp
src/qml/qml/qqmltypemodule_p.h
Change-Id: If28793e9e08418457a11fc2c5832f03cab2fcc76
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qqmltypecompiler.cpp
src/qml/compiler/qv4bytecodehandler.cpp
src/qml/compiler/qv4codegen.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/compiler/qv4compiler.cpp
src/qml/compiler/qv4instr_moth.cpp
src/qml/compiler/qv4instr_moth_p.h
src/qml/jit/qv4baselinejit.cpp
src/qml/jit/qv4baselinejit_p.h
src/qml/jsruntime/qv4function.cpp
src/qml/jsruntime/qv4vme_moth.cpp
Change-Id: I8fb4d6f19677bcec0a4593b250f2eda5ae85e3d2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
After enabling lookups in QML files, we can remove all the code that
tries to deal with (type) compile time detection of access to id objects
and properties of the scope/context object. This also allows removing
quite a bit of run-time code paths and even byte code instructions.
Task-number: QTBUG-69898
Change-Id: I7b26d7983393594a3ef56466d3e633f1822b76f4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When resolving names in the context of QML bindings, we now direct
runtime access to QQmlContextWrapper::resolveQmlPropertyLookupGetter. At the
moment this does basically the same as Runtime::method_loadName, which
we called earlier. However this now provides the opportunity to optimize
lookups in the QML context in a central place.
When performing a call on a scope or context object property, we also
did not use a CallName() instruction - which would have gotten the
thisObject wrong - but instead we use a dedicated
CallScopeObjectProperty and CallContextObjectProperty instruction. These
rely on identifying these properties at compile time, which goes away
with lookups (and also doesn't work when using ahead-of-time
compilation). Therefore the qml context property lookup is using a
getPropertyAndBase style signature and
Runtime::method_callQmlContextPropertyLookup uses that.
For the tests to pass, some error expectations need adjusting. In
particular the compile-time detection of write attempts to id objects is
now delayed to the run-time.
The old code path is still there and will be removed separately in the
next commit (as it is massive).
Task-number: QTBUG-69898
Change-Id: Iad1ff93d3758c4db984a7c2d003beee21ed2275c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qv4codegen.cpp
Change-Id: I66b7db42bf208855889094ace0267326595ce03c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Our tests expect those exceptions to have the same message as when not
using lookups.
Task-number: QTBUG-69898
Change-Id: Iab36519844a3a49ef9e34346e9afeb2eee9f9ced
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0bb5055024e30c32b82e1555c820ea5ced8923f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the in a series of patches for a JIT that can use traced
information to generate better code. In this patch, traced information
is not used/stored yet. It allows testing the basic infrastructure
without trying to do any optimizations, therefore making it easier to
debug, test, and review.
Change-Id: I589bdadf731c36542331abe64e1b39e305b6723e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The declarations and usage of runtime functions have seen a number of
changes:
- we don't use the array of method pointers anymore because we don't use
cross-platform AOT JITting
- the check if a method can throw a JS exception was invalid, and was
not used anymore
- value-pointer vs. const-value-ref was inconsistent
This patch cleans that up. By fixing the exception checking, we can now
use it in the baseline JIT to automatically insert those checks. To make
that work correctly, all runtime methods are in a struct, which gets
annotated to indicate if that method throws. (The old way of checking
which type of engine was used is fragile: some non-throwing methods
do not take an engine parameter at all, and those got flagged as
throwing). By using a struct, we can also get rid of a bunch of
interesting macros.
The flags in the struct (as mentioned above) can later be extended to
capture more information, e.g. if a method will change the context.
Change-Id: I1e0b9ba62a0bf538eb728b4378e2678136e29a64
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collect type information about values used in a function. These include
all parameters, and the results of many bytecode instructions. For array
loads/stores, it also tracks if the access is in-bounds of a
SimpleArrayData.
Collection is only enabled when the qml-tracing feature is turned on
while configuring.
In subsequent patches this is used to generated optimized JITted code.
Change-Id: I63985c334c3fdc55fca7fb4addfe3e535989aac5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
For regular object property lookups, we correctly store the byte code
instruction pointer that allows us to determine the correct line number
in case of a reference error. We need to do the same for lookups in the
global object.
Change-Id: I0f44dd06b5f66df9626576eeaa802b18fa4a26cd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
If a tagged template gets evaluated multiple times, the
underlying template object is shared.
Change-Id: Ie2f476fbc93d5991322ce1087c42719a8d8333ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I44a90dec16dc1421a32a7770b353a4df14c057f9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
| |
So backtraces will show the correct line number.
Change-Id: I6e79f6b3f461956f7f6d98743aff684b894426cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
| |
This runtime function was the only one taking argc before arguments.
Change-Id: If0b049697f7fcc2746e8d287193a5b1230a6ea56
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: If1629109722496b3fd10b36b2376548440f2fee9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Doing the tail call in the runtime will come in a follow-up patch
Change-Id: I8224aac0edbdc765ee9b97703948edd52fd33f3e
Reviewed-by: Simon Hausmann <simon.hausmann@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: I5b054b59519ed825459a5b0b0a7cd2c6fc8a3797
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Id1bba1a729124bccb8a90dcf40252fe5c69d27a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|