| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This causes the updated arguments to be reported to the debugger when
they are overwritten in the function body.
Task-number: QTBUG-68534
Change-Id: I30c22d31aa97da0d58a4bbaaa032180a919669a8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code path was previously missed, leading to some AOT-compiled types
generating errors of the form:
Unable to assign [undefined] to int
[ChangeLog][QtQml] Fix QML declared enums with CONFIG+=qtquickcompiler.
Change-Id: Ib46a2b2505aa3863f091a6ccdebf8425e62fc38f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading a .js file without QQC, we scan the sources and use the
ScriptDirectivesCollector to extract things like .pragma library or
.import ahead of time. That information is passed on to the compilation
unit generator for serialization. When compiling .js files ahead of
time, we also used the same collector, but we forgot to save the data
into the right location before serialization, so we essentially lost the
imports. This patch fixes that by centralizing this code into the
ScriptDirectivesCollector itself.
[ChangeLog][QtQml] Fix regression with .import in .js files not working
when using CONFIG+=qtquickcompiler.
Change-Id: I5413c14b1b8bd3114a997011534fe55cdb7634aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Creating the callcontext for all bindings causes a 15% performance
regression in both of the moving images benchmarks of qmlbench.
But in most cases, we know that a binding can't be a signal handler,
as those always have to start with 'on'. Take this into account
and avoid creating the context for most binding expressions.
Task-number: QTBUG-67782
Task-number: QTBUG-67783
Change-Id: I9a25cb916e374c7d03693e49646ca28853c6ba54
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is only allowed for var type variables. Also fixes an
assertion we'd run into with code such as
let x; var x;
Change-Id: I2588cf37e0964c879c60b4fd292e7d7b5476e322
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
x = [y] = z
would crash because [y] is a literal and not a valid lvalue
in ES5, something our parser didn't catch correctly.
Change-Id: I0d7abd9b3f812f1de61c77dccfab5d1778dac793
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Repeatedly entering a context that was entered before would result in
leaking the previously entered context. This can happen when compiling
child objects in a QML file, which is done recursively. So before
compiling the bindings/function in the child object, first the global
context and then the QML context are entered.
The fix is to re-use the global context, as it's the same anyway for all
objects in the same module. And we can remove entering the QML context,
because nothing is in there, and we don't put anything in it ever.
Change-Id: Ib1c4259d2dec22df46e96edb65bc3d377e52e671
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't just include the "compile hash" of QtQml in the dependencies hash
of QML files but use a dedicated field in the data structure, that we
will also fill in when generating cache files ahead of time.
This ensures that AOT generated cache files are considered invalid even
when switching between different sha1s of declarative.
Task-number: QTBUG-66986
Change-Id: I3d8ee103fd1a33a5b4c4576b3a2703fcd09712dd
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We must also do version checking for QML and JS files that were compiled
ahead of time and are embedded in resources. If the lookup for the
original source code fails, then we must generate an appropriate error
message.
As an upside we get better error reporting when trying to load an empty
file and Qt.include() now reports the error message in the statusText
field.
The error reporting for imported scripts was not changed as importing an
empty script is (oddly) allowed.
Task-number: QTBUG-66986
Change-Id: Ie0ef81af371a51ecf8c66ae7954d43f5cc6c12de
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two ways to use function expressions on the right-hand side
of bindings:
property var somethingPressed
somethingPressed: function() { /* ..press something else.. */ }
signal buttonPressed
onButtonPressed: function() { /* ..handle buttonPress.. */ }
In the former case, it declares a property that holds a function. So on
initialization, the right-hand side of the binding returns a closure
that gets assigned to the property 'somethingPressed'.
In the latter case, the signal handler is explicitly marked as a
function for clarity. So, the handler should not be returning the
closure, but the handler should *be* the closure.
In general, it is not possible to detect if the left-hand side is a
property or a signal handler when generating QML cache files ahead of
time. So for this case, we mark the function as only returning a
closure. Then when instantiating the object, we check if it is a signal
handler, and if the handler is marked as only returning a closure. If
so, we set that closure to be the signal handler.
Task-number: QTBUG-57043
Task-number: QTBUG-50328
Change-Id: I3008ddd847e30b7d0adef07344a326f84d85f1ba
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We support simple object bindings such as
someProperty: Rectangle { ... }
when the type of "someProperty" is QVariant, but we produce an error
when it's QJSValue. There is no good reason for that, and the fix for
QTBUG-67118 requires this.
Change-Id: Ia5dc88749bcba0b5c781a6ab2b4a9fb92299e0ac
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given the following expression
var x = MySingleton.MyEnumValue
where MySingleton is a QML (composite) singleton and MyEnumValue comes
from a QML declared enum, we had code in place up to (and including)
5.10 to attempt to optimize that expression to a enum constant at
compile time. In 5.10 that optimization does not exist anymore. In <=
5.10 we would also skip the optimization under certain circumstances
(too many statementes, etc.). The fallback that is in place for handling
this at run-time tried to be smart by avoiding the
QQmlContextWrapper::get lookup and return straight a reference to the
singleton as QObject. That works for regular property lookups, but it
fails when trying to look up something like an enum, that isn't a
meta-object property.
Change-Id: I1819b9d8ae06a3f595e067bf5b018c4065be76bb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the QV4::Moth::BytecodeGenerator::Jump type we are relying on the
compiler doing a return value optimization. That however is not required
by the C++11 standard and the GHS compiler does indeed not do that here,
resulting in a ~Jump destructor call in the following sequence _before_
link() is called:
Jump generateJump() { ...; return Jump(...); }
...
generateJump().link();
The destructor however verifies that link() was called, which fails.
Fix this by making Jump a move-only type, which the compiler will issue
if it doesn't perform a return value optimization.
Task-number: QTBUG-66917
Change-Id: I97cc9a5d7f97d61e573ad8bc309cf48ab18eb25d
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When declaring bindings within a group property and that group property
itself is a locally declared alias, then by the time we try to determine
property caches for the group property we will fail as the aliases
haven't been resolved yet.
To fix this we can keep track of such group property declarations
(encapsulated in the QQmlInstantiatingBindingContext that has all we
need) and after we've resolved the aliases (added them to the property
caches), we can go back and fill in the entries in the propertyCaches
array for the group properties.
Task-number: QTBUG-51043
Change-Id: I5613513db3977934bcc51a3df530de47d57326f9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
| |
Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init'
-config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix
Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f
Reviewed-by: Johan Helsing <johan.helsing@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>
|
|
|
|
|
|
|
|
|
|
|
| |
While it is valid to assign an id to group properties that are QObjects,
it is not possible to support this with group properties that are value
types, as we do not have QObject instances and id references are limited
to those.
Change-Id: I7601d0fe00d1261dd711e34f45550db797773f9a
Task-number: QTBUG-51525
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assigning to a group property inside a property value source or
interceptor as part of an "on assignment" is perfectly valid. That is
because while "color" is a value type property, the on assignment means
we're actually setting easing.type (in the example and test) on the
property value source, not the color, and that one is a QObject. The
same goes for interceptors.
Change-Id: I505a658977a578894d6dfb00bf5c65b41e42b12f
Task-number: QTBUG-56600
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If it's in the command-line, it is added to the precompiled header,
which won't be regenerated if the macro changed. Instead, let's create a
header that can be #included only in the file it needs to.
Since qmldevtools compiles the file that has this new #include, we need
to ensure it was created before the module is compiled.
Change-Id: I940917d6763842499b18fffd1513b9c64cd98387
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
qv4bytecodegenerator.cpp:99:19: error: ‘instructionsAsInts[3]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
Change-Id: I940917d6763842499b18fffd1513ff143fc502bb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a function is called that is in a QML scope or a QML context, set
the 'this' object to the QML scope. This is done by introducing two new
interpreter instructions, which get the context passed in.
Note: this patch is 5.11 specific. 5.9 had a similair issue, but the
implementation is quite different, so that was fixed separately.
Task-number: QTBUG-66432
Change-Id: Ie43150cdd26360025895df28d31264985abf1c15
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONSTANT properties are by nature non-NOTIFYable.
The issue behind the regression is caused by the fact that we were
capturing a property regardless of whether or not it was const.
There were two states that captureRequired was expressing:
true: We're reading the property of a QObject, and we're not quite sure
where the QObject comes from or what it is. So, when reading that
property at run-time, make sure that we capture where we read that
property so that if it changes we can re-evaluate the entire
expression.
false: We're reading the property of a QObject, and we know that it's
the scope object or context object, which we know very well. Instead of
registering a property capture every time, we can do that ahead of time
and then register all those captures in one shot in
registerQmlDependencies().
There is a third state that is only relevant when captureRequired is
false: We're reading a property from the scope or context object, but
it's a CONSTANT property, so we don't need to register a dependency
at all.
This patch adds replaces captureRequired with the PropertyCapturePolicy
enum, which accounts for the third state and, as a bonus, makes the
code easier to understand.
Task-number: QTBUG-66361
Change-Id: I6cef1deb76538fbdacf1324b4467403dd40dd7de
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I940917d6763842499b18fffd1513b8c1308ce873
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
refs/staging/5.11
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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: I41ca9120a470a905c2f5c168c1de4cf970fa0fff
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When for the QQC code path we do QML type re-compilation, we allocate a
new QV4::CompiledData::Unit. We must make sure that this dynamically
allocated memory is released in QV4::CompiledData::CompilationUnit's
destructor, by ensuring that the StaticData flag is not set.
This isn't directly applicable to the ahead-of-time generated cache file
unit data as they will always be re-generated (and thus the unsetting of
StaticData at the end of createCompilationUnit::createUnitData()), but
I've added a test-case nevertheless to ensure the correct engine
behavior.
Change-Id: I16973d7989567892bf8bf9dd6214bf293055d260
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |\|
| | | |
| | | |
| | | | |
Change-Id: Idde38761897f078cd9957f01d34a9751217e4c53
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Create an error via QQmlCompileError and return it instead
of asserting.
Task-number: QTBUG-43567
Change-Id: I0c0741943d30516379eff5f44ed8618a0f0116a4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-58223
Change-Id: Ibc599ac2e62aa60405af0022c7f5bab6eac3e3c4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes clang develop-builds
Change-Id: If262d7038fc36bcec281be4c218b3cf3d4ae4deb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\ \ \
| | | |
| | | |
| | | | |
refs/staging/dev
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
src/qml/compiler/qqmlirbuilder.cpp
src/qml/compiler/qqmlirbuilder_p.h
src/qml/compiler/qqmltypecompiler.cpp
src/qml/compiler/qv4codegen.cpp
src/qml/compiler/qv4codegen_p.h
src/qml/compiler/qv4compileddata_p.h
src/qml/compiler/qv4compiler.cpp
src/qml/compiler/qv4compilercontext_p.h
src/qml/compiler/qv4isel_moth.cpp
src/qml/compiler/qv4jsir.cpp
src/qml/compiler/qv4jsir_p.h
src/qml/jit/qv4isel_masm.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4functionobject.cpp
src/qml/jsruntime/qv4runtimecodegen.cpp
src/qml/jsruntime/qv4script.cpp
src/qml/jsruntime/qv4script_p.h
src/qml/qml/qqmltypeloader.cpp
src/quick/items/qquickanimatedimage.cpp
src/quick/items/qquickanimatedimage_p_p.h
src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp
tests/auto/qml/qmlplugindump/qmlplugindump.pro
tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
tools/qmlcachegen/qmlcachegen.cpp
tools/qmljs/qmljs.cpp
Done-with: Shawn Rutledge <shawn.rutledge@qt.io>
Done-with: Lars Knoll <lars.knoll@qt.io>
Done-with: Ulf Hermann <ulf.hermann@qt.io>
Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
|
| | |\|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
.qmake.conf
src/qml/compiler/qv4codegen.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/debugger/qqmlprofiler_p.h
src/qml/jsruntime/qv4engine.cpp
src/qml/memory/qv4mm.cpp
src/qml/qml/qqmlcomponent.cpp
src/qml/qml/qqmlobjectcreator.cpp
src/qml/qml/qqmlobjectcreator_p.h
src/qml/types/qqmldelegatemodel.cpp
src/quick/items/qquickitem_p.h
src/quick/items/qquickwindow.cpp
tests/auto/quick/touchmouse/BLACKLIST
tests/benchmarks/qml/holistic/tst_holistic.cpp
Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Force the use of a global lookup if we know that the
property can and will be found in the global object.
This is possible, as the global object is frozen in QML
mode and can't be overwritten.
Shaves of .5% on the delegates_item_states benchmark, and
will significantly speed up all accesses to e.g. the Math
object.
Change-Id: Ia1e248781a13ebaeb8bc43652e53a6fdde336d0d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ib1a3d51a1c22d0ba0992ca98ad1e51658a871b38
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Task-number: QTBUG-64798
Change-Id: Id1eb434f83ec89c5ea1ebaa4d8ec86fce9f4428f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We generally have to pass a URL and a file name everywhere because the
logical URL might be something else than the actual file being loaded.
For example a QQmlFileSelector might modify the URL to be loaded for a
specific file. This resulting URL, however, should not be used to
resolve further URLs defined in the file loaded that way.
As we need to access QQmlTypeLoader::m_url as string more often now,
cache it and avoid frequent translations between QUrl and QString.
Furthermore, QQmlDataBlob's URLs are changed to follow the same
semantics. The finalUrl is the one that should be used to resolve
further URLs, the url is the one used to load the content, and subject
to any redirects or interceptions.
This changes the semantics of URL redirects. Previously a redirected URL
was used as the base URL for furher URL resolution. This doesn't work
because redirection occurs after interception and interception should
not influence the resolution of further URLs. We now use the original
URL as base URL for resolution of further URLs and rely on the server to
redirect those, too.
Task-number: QTBUG-61209
Change-Id: I93822f820bed2515995de3cb118099218b510ca4
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As QJSEngine's handle() method is internal, we can redefine it to return
a pointer to an ExecutionEngine. That makes many things easier.
Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since the compilation unit does not have a backend anymore, we can
create it in QtQml itself instead of in generated stub code. That
removes the last dependency to private headers in the generated code.
Change-Id: I186fc5bd679476b1a4714e4e3ba0ac00b55676cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The cache files are architecture and ABI independent, so we can remove
any associated field/code as well as the workaround for Android.
Change-Id: Ia52a5be886fc22a2105460e003e7a76af7dc1818
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ie1b18dd00705b1913572b87c6968a63438e7a90c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Properties of QML objects or alias properties to QML objects
have to know about the revision of the QML type.
If the property is used as a grouped property and a signal or property
is assigned.
Without this patch this is not working with signals that have a revision.
To get this working we store the minor version of the QML type in
QQmlPropertyData and retrieve the QQmlPropertyCache with the correct
AllowedRevisionCache using this minor version.
Task-number: QTCREATORBUG-18820
Change-Id: I1e20169e0d5a2ae11059a951aa83a5c94106accb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-65140
Change-Id: I6c6b24f081b31ef0f16fec9b2024485acec11c2d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We cannot build QML without interpreter anymore.
Change-Id: Ibc51240caa956132eef8753fa6c75939026930d5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This class is only used in one place, so there's no
point in it being a template.
Change-Id: Ibbbed8d5be1d02015339c9b39cd1b167f36b8885
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Ensure that the integer arguments for widely encoded instructions are
always encoded as little endian.
Change-Id: Iccd45aefb20b20d76fe1618d6706435142b202b9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Once we have identified that an instruction needs to be encoded in wide
format, we do not inspect the remaining arguments any further.
Change-Id: I0164acedc68b28bd95f9aab0c0fd1702a59de90d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Due to the difference of sign of the char type, byte code is encoded
differently on x86-64 than if it was on ARM and it also is decoded
differently. The problem at hand here was that negative jumps were
encoded as two-byte instructions (opcode and negative offset as byte) on
x86-64 when qmlcachegen is run. At run-time the negative offset was read
into a char type and consequently interpreted as a positive jump,
leading to crashes.
The explicit use of qint8 as signed byte type in encoding/decoding
sensitive parts avoids the decoding issue and should also result in
consistent encoding.
The added auto-test is (among other configurations) run in the CI under
qemu, which means the x86-64 host-built qmlcachegen will generate byte
code and the tst_qmlcachegen ARM binary will run under qemu and
reproduce this scenario.
Task-number: QTBUG-65521
Change-Id: I615628f53475dad38a41095c6e7ffea0c34d58ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|