| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't emit any Line instructions anymore, and instead store
the info in a side table in the compiled data, where it can
be looked up on demand.
Change-Id: Idcaf3bf4ee4129fd62f9e717bf1277dc6a34fe19
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: Iff06429f948ac6cdec77a9e5bb8c5375c56fe705
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ibb24b0a55dd94e03fea3104e8af5ddb266004300
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
src/quick/doc/src/qmltypereference.qdoc
Change-Id: Ia58f1c5a98309c32ef8d8e5c893faf261215f19f
|
| | |\
| | | |
| | | |
| | | | |
Change-Id: I3fc699beeb45e01abc644018db53f3c75d396f7c
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Commit be491913c036b148 changed QV4::CompiledData::Unit to use LEUInt32
structures internally, rather than native uints, however the generators
were not updated at that time and still wrote native uints.
Also initialize constants field of CompilationUnit to prevent crashes
in unlink() where operator delete[] is called.
Change-Id: Id6c6e6ad519c9927ba6027479689ecfde9ea86de
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As analyzed in the bug report, it appears that we may get
QV4::CompiledData::Function pointers for writing that are not aligned
for the 64-bit fields at the beginning.
[ChangeLog][QtQml] Fix crash due to misaligned data structures on ARMv7
Task-number: QTBUG-61552
Change-Id: I6b2c166b725496150c8850475577628ccd811d65
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The indexed getters and setters haven't been used for a while and
don't offer any performance benefits currently.
Change-Id: Ifd5e1fab934e6e9940c4f1ad67f8850f04597504
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All escaping arguments will still be loaded/stored from/to the CallData,
but this is not the common case. In a subsequent patch we can make the
caller prepare the stack frame, and for the common case we don't even
need to copy arguments around.
Change-Id: I3fbb6fe575a564d05a9fd5dcc0c8f4129eac3bc2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I9f4a5a8470c1abc6b07a28c71fdad0d208e1fea1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And changed the namespace of those classes to
QV4::Compiler.
ScanFunctions should over time also move into its
own file.
Change-Id: If084acea4a9a20b9c79ad47dac19e02dc720e098
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove all files from the old compiler pipeline that are now
unused. This includes the whole IR, JIT code generation,
and the old Moth Isel.
Change-Id: I50d06abfbcf0e9755a54ed94638f8bb74f9512b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fold the stuff from IR::Function into QQmlJS::Context, and
add a QQmlJS::Module class to replace the last pieces of the old
IR.
Change-Id: Ic02a6738a4f1db67a0ddf97b6c93ca32be81789d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move the code that generates the CompilationUnit over to Codegen,
and don't use the ISel's at all anymore when compiling JS/QML.
Change-Id: Iba89082c386c3d3fd58ac25a4651c5d39178cc5c
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I02d57d2cbb4ae56c0c4626d96cbdf9935b366579
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I7fc4565044caf23bec239561be4fbc020ccc2468
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And some cleanups to the output of the bytecode
dumper.
Change-Id: I62fa5fbf87319118a4ba5f641652f8556cc16e07
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Allow registering all the required data to generate the
proper compilationunit already in the codegenerator.
Change-Id: I36345cc01927b3f8dc3ba6d91da175bd6abe124a
Reviewed-by: Erik Verbruggen <erik.verbruggen@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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The target ABI is something that we must include correctly at cache
generation time. The corresponding qmake variable is available in qtbase
now, so we can use that and embed it in the generated data.
Change-Id: Icd6e44824f5151535ce9ddac27687b7877288725
Reviewed-by: Lars Knoll <lars.knoll@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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For timestamp comparison it is not necessary to create another
QFileInfo() object and call exists() and lastModified(), when we can
pass that information through from the type loader.
Change-Id: I225cd36e672f1f390bddb4e6ebfafa3fc1269795
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|/
|
|
|
|
|
|
|
| |
All required information is already available when creating the
CompiledData::Function, so determine at that point whether we
use a Simple or full CallContext.
Change-Id: Ife489ca2ca6eaf2ffc7843544a56e8bd86590e9d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Define Q_ALLOCA_VAR macro to be used instead of #ifdeffing
the occurrences of alloca() in case it's not supported.
Q_ALLOCA_DECLARE and Q_ALLOCA_ASSIGN macros separate
memory allocation from the declaration and RAII.
Change-Id: Idc7551642c48a968a44bcade14d84800a3a1270e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| | |
Change-Id: I171c7dbb6a74fe743c2eec63e86e9c0bef7c7dfd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We use an MD5 checksum over the meta-object data to verify that the
types a QML file depends on haven't changed since the cache was
generated. However when the dependent types are QML types, then the
meta-object data contains dynamically generated type names such as
QMLTYPE_1234, which is non-deterministic. To address this, we resort to
the checksum over the meta-object data only for C++ types (if those
change it's likely an incompatible change) and for QML types use the
fact that all the information about the QML declared types comes from
the QML file only, which means we can in that case simply use a checksum
over the QV4::CompiledData memory chunk.
In addition we need to ensure that the generated CompiledData memory chunk
is deterministic by avoiding any uninitialized bytes (memset) and using
a map instead of a hash for the mapping of object index to object id.
Task-number: QTBUG-55926
Change-Id: I27c840b1960ad36b486198e504b70989c22a3972
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qv4isel_moth_p.h
Change-Id: I8e86a649d1ef8ad27dc66cc8c290093b2faabc69
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The packing for a the compiled data is 1 byte, but integers clearly
need 4 byte alignment. This worked before by accident, but broke when a
single quint8 was added to the Function.
Change-Id: Ia7954423d5a7b4a0e6ef177fc3ee350889f43154
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/
|
|
|
|
|
| |
... and with 'index-based for' in one place.
Change-Id: I4df75bd5921f9ee8b5744067adbaafbc46452f87
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
If we generate byte code, then we can mmap without the executable flags,
otherwise we need them. This should make things work out of the box on
platforms where special rights are needed before executable mappings are
allowed.
Change-Id: I24e663f85d661bc51cd3bf2463547b1d1590ea32
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
| |
When running on a big-endian system, we need to convert the constant values
into big-endian once and then it's possible to access them directly.
Change-Id: I655bad7b7734e3b95e79e5f688f0b4041d0c41c4
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
On 32-bit architectures we were encoding the absolute address of generated
constants in memory into the load instruction. In order to make the code
reloctable, this patch changes the JIT over to use the constant table in the
compilation unit. This means two additional loads per constant. On
architectures that support instruction pointer relative addressing, we can try
to fix this in the future (arm32 for example).
Change-Id: I8ed7aa7c67711696d6c46c72b3b642d610ff2cbc
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: Icd5b1d805059981cbbb4c0eb2a5c842d59223839
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Perform various basic checks before proceeding to load an existing cache file,
including the qt version, architecture, data structure version and others.
Change-Id: Ie822b056e944ac120643aad260e97f62616688bf
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of relying on two time stamps in the file system (source file and cache
file), make the determination on whether the source file is newer than the
cache solely depend on the time stamp of only the source file. This means that
when cache files are stored in archives for example their modification date
does not need to be preserved upon extraction.
Change-Id: I0b4362663868c6fb9bd7e106028161b2d67274d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are currently two places where we calculate the total size of a
CompiledData::Unit including all of its data, once in its calculateSize()
function and then when constructing the Unit itself. This is error prone when
trying to do changes to the layout, as two places need to be adjusted. Instead
we can centralize the populating of the entire CompiledData::Unit header, the
calculation of the various offsets as well as the entire size in one shot in a
new generateHeader function. Afterwards we can allocate the final amount of
memory and copy the remaining bytes across and assemble the final data
structure.
Change-Id: Ic26d7812e59d2bee2f45cd72742e3195a56950df
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
We can replace the intermediate hash with a vector of the final little-endian
encoded function offsets.
Change-Id: If3f970330ab232a672f7c75b4d32f8ef4d246714
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
It's necessary to consistently use LEUInt32 when writing the offset tables, as
that's also what we're using when reading from them.
Change-Id: Idbef310bd6b28a0e6b6b0dff516e0ef178f04999
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
We can serialize the compiled JS class data right when we collect it from the
IR. That makes the assembly of the compilation a little simpler later on.
Change-Id: I36d7dd2cc74241338fb1c236ce7778405066c8b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
The table for referencing the inner functions is not needed. This also allows
making the function offsets table a local variable.
Change-Id: I3f1a1d6ab8c4f417edeafdc174e5b41d2d2b611b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal is to make the compiled data structures persistent on disk. In order
to make it possible to create these data structures on a "host" system that may
have a different endianness than the target system, we now make all the word
sized fields little-endian. The template wrappers from QJson provide
zero-overhead access for little-endian machines (the vast majority) while
maintaining a large degree of source compatibility.
Change-Id: I3d30da1fcf3bffb98dbe9337d3a35482fb7b57c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
The number of id objects referenced from a function or binding is
often very small. So using a QSet that allocates hash nodes takes more
memory, and is actually slower than using an array.
Change-Id: Id9fa60a860314790284f66318593b3ef938e6eef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Hidden behind a QML_DISK_CACHE=1 environment variable we will now attempt to
save a binary representation of the type compilation for Foo.qml next to it called
Foo.qmlc.
Change-Id: I27e800b50cdb186669256fd277578ea1f1e70513
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
* We don't need 64 bits for the flags, for now 8 bits are sufficient.
* Removed the unused index member. It's symmetric to the index of the
function object in the function table anyway.
Change-Id: I18248e8ed79b3c3af87e17689dadf7323d5d9bb3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I866eeba45e30fd5e38541b2de4a2fda5549104a9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
This is much more efficient than a QHash.
Change-Id: I84752eecb6a456402ae222c4d6543bbb67cbcf63
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4engine_p.h
src/quick/items/qquickitemsmodule.cpp
src/quick/items/qquicktext.cpp
src/quick/util/qquickpixmapcache.cpp
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Initialize the indexOfRootObject member
* When creating the QV4::CompiledData::String objects,
don't include the one ushort _beyond_ the QString, which
is random data.
Change-Id: I8fe8a465e2713a385504f217b367a62b70ee5fdf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|