| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Marking mmap'ed memory as unneeded, leads to it being zeroed out on
both Linux and Windows. Unfortunately that behavior is not defined by
POSIX, so BSD based OSes (and possible others as well) do not do this.
We do however rely on getting zeroed out memory whenever we allocate a
new Chunk for the garbage collector. To work around this, zero out memory
we deallocate on those platforms.
Task-number: QTBUG-59278
Task-number: QTBUG-59977
Change-Id: Idde812db8537b63b9e9df7de41620ce0df09b6de
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
|
|
|
|
| |
Change-Id: I5f9c00541c27377e8310d32bf045c2860eeffcb4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only deals with Qt code. MASM has a lot of those left. We should
just update from upstream instead to get the fixes.
qv4regalloc.cpp:660:52: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (leftSource->type == DoubleType || rightSource->type == DoubleType) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qv4regalloc.cpp:666:13: note: here
case OpBitAnd:
^~~~
Change-Id: I7814054a102a407d876ffffd14b6b0e2d6b03689
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an external QObject is exposed to an engine through a QObjectWrapper,
make sure to deref and clear the propertyCache reference in the object's
declarative data when the QObjectWrapper is destroyed. This makes sure
that there is no dangling propertyCache pointer when the object is
subsequently exposed to another engine.
Task-number: QTBUG-57633
Change-Id: I37f6793d8be65b23b4e81bb4ed91db18271261b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This rarely happens - only seen with Delegates - when
- an object is created during incubation
- some error occurs in this object
- the object gets deleted before the incubation run finishes
Because the errors are delivered after the incubation run finished, the
object() pointer of QQmlError is now a dangling pointer that will crash
your application if accessed.
Change-Id: Idd9fccbc58e4ada67bde3ca1aeec736aa9374789
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QObject's members declarativeData and currentChildBeingDeleted share
the same memory because they are inside a union.
This leads to a problem when destructing mixed Widgets and QML objects.
Then in QObjectPrivate::deleteChildren the member currentChildBeingDeleted
is set. But unfortunatley QObjectWrapper::destroyObject retrieves
the same pointer via declarativeData.
This patch should avoid this by disallowing retrieval of declarativeData
when isDeletingChildren is set (or at least adds a Q_ASSERT).
Task-number: QTBUG-57714
Change-Id: I9ee02f79be3e8226c30076c24859b49b8dcfaecf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Don't define QML_PARSER_EXPORT to dllimport when doing static builds.
Task-number: QTBUG-59767
Change-Id: I24acb2c51f54a0cde8d2e50a935ede876e5eb5b7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The use of sha1 to determine if there were any changes in the Qml
library in developer builds (for cache invalidation) works well, but it
results in timeouts when running tests on ARM as type compilation takes
too long. This is a developer feature and we might as well use a faster
hash such as Md5 that is sufficiently reliable for our purposes.
Change-Id: I917ae619c73a9cc821d888f16bfcccafeb8ebacc
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
r11 needs to be saved :). This ammends
ecda87091f290daec34bee6b55dd9cf920ffdcff
Change-Id: Ib69712527e04b9bcec4c9e74dea43a915e2bd0f9
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Similar to the Qt Quick Compiler we need to do the expression
simplification pass at cache generation time to extract translation
calls in list elements.
Change-Id: I267fc9647ab82bc83d6b087c06c0036df38238ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't use QV4_USE_64_BIT_VALUE_ENCODING for deciding how generate
code for checking if the tag of a value contains the necessary mask to
detect doubles.
Change-Id: Id5a5c1b136313aa4dfd2c997898e97cd4ebaeb83
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Both MIPS and X86-64 on Windows reserve space for four registers on the
stack, that the called function may use to spill the parameters passed
in registers.
This needs to be handled without #ifdefs in order to support
cross-compilation and from the looks of it it was also wrong on MIPS.
Change-Id: If65a6a0f6f64b8536703d32e7678e30ad807f7c8
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We pass essentially the values of QSysInfo::buildCpuArchitecture() to
qmlcachgen as command line parameters, so our factory function must be
aligned with the values returned (and documented) there. That means arm
instead of armv7, arm64 instead of armv8 and i386 instead of x86.
Change-Id: I89c196b6585f9ba9550c0deb17e8b529980aa448
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We currently use addressForArgument() only to access the incoming
functions parameters in JIT generated code, which is the engine
parameter. While not currently supported by the current set of
cross-compiling assemblers, the use of sizeof(Type*) may become an issue
in the future, so let's use the correct value right away.
Change-Id: I3e44279257f595a8be2c61bcfe15070a90038eb7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The use of sizeof(Type*) is not allowed when calculating indices into
pointer arrays.
Change-Id: I5531efc80d0267eaceade76ad2b96d454eab9392
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QV4::Function::sourceFile() actually malloc's a new string each
time it's being called. Let's not call it unless we need its
return value.
Change-Id: I4e47422860549df5e1b5b19f3a68f027ff74f05a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Iaa4138610834f87b2a9379e707025d2e8a0fd59c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The function cannot be const, as QQmlListProperty's constructor
expects a non-const reference. Errors can result from following
the docs:
'<function-style-cast>': cannot convert from 'initializer list' to
'QQmlListProperty<QObject>'
Change-Id: I2268ab08a130181857c21340604a2251ba66967e
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
qv4isel_masm.cpp:285:44: warning: instantiation of variable 'QV4::JIT::Assembler<QV4::JIT::AssemblerTargetConfiguration<JSC::MacroAssemblerX86_64,
QV4::JIT::TargetOperatingSystemSpecialization::NoOperatingSystemSpecialization>>::Void' required here, but no definition is available [-Wundefined-var-template]
Depending on qv4assembler.cpp instantiating the same template that
q4isel_masm.pp required is fragile. So move the definition to the
header, next to the class.
Change-Id: I27b55fdf514247549455fffd14b178ec9d4b508d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ie45a2f01def64941a323973ea27446e3fc85a72b
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We always want to place the jump on the last line of the conditionally
executed statement, unless we might never execute the last line.
In the latter case, that is if the inner statement is again a
conditional, we use some token of the outer condition. This works fine
with loops, as the loop condition is actually checked after each
iteration, and it's plausible to the user that we jump there.
With "if" statements, it's not so great. We cannot really explain why we
jump back to the "if" token after executing the conditional statement.
However, we have to add some source location to the jump instruction as
otherwise it uses the source location of the last statement that had
one, which is rather random.
Task-number: QTBUG-59204
Task-number: QTBUG-59774
Change-Id: I48e331ce1c1830f236e16b75c9201a2f490d2092
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QV4::Primitive is using host value encoding, which can differ from the
target. The source of QV4::Primitive in the code generator is usually
IR::Const, transformed via convertToValue(). That function becomes a
template that converts to a simple target primitive type.
Change-Id: If028aea9551d77d81eec306f60fd995c25b76710
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
On 32-bit architectures we usually use an external constants table,
which we need to make visible in the context.
Change-Id: I0f7d813da1c6c893b8dd641dab5685a6db7fa9fa
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace the use of size(void*) with target assembler specific values for
the pointer size, when calculating offsets into the stack for
poke/peek/push/pop and placing arguments onto the stack before calling
functions.
Change-Id: I3aff540f0083967e75b61e0c29dbeb4d9ecfa433
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We don't have to do a engine->current->engine dance to get hold of the
engine pointer, in order to update jsStackTop. We have a dedicated
engine register :)
Change-Id: I187ea67bf9f3e43b0048dca3cd6ee35f70d8737c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie8d0c7b360ff120f381e33439037cf7b01257456
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Let's assume that we always generate thumb2 code. I'm not even sure
that we still support plain ARM anyway.
Change-Id: Ie7ec4d1de8f9f6cb86d80193990e492782ff2cf2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I6199d624a23e2e1b67bcbb841f0bc999880a3993
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I7c215db87552c63291e6c82d7b962ee17ec2f610
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\ \ |
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qqmltypecompiler.cpp
src/qml/compiler/qqmltypecompiler_p.h
src/qml/qml/qqmltypeloader.cpp
src/qml/qml/qqmltypeloader_p.h
Change-Id: I4894555ab7a0879b56bbda7a46d16d1c40c19e7c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
An invalid iterator was being dereferenced.
Task-number: QTBUG-59268
Change-Id: I58635667ab4591c06f1d7644243b83fd0172e74f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When a QML file depends on a QML singleton, we failed to include it in
the dependency hash. Thus changes to the QML singleton did not result in
a re-creation of the caches of files that use it.
The list of singletons comes from random-ordered hashes in the qml
import handling. We provide an order to the direct dependencies by
sorting by the singleton type names.
Task-number: QTBUG-58486
Change-Id: Ie7e9d006f9bf3a60af1f819ee439c29bc234bd8a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of passing the engine parameter all the way through the data
structure generator, along with the dependent type data structure that
is unused otherwise, let's simply provide a function object for the
dependency hashing.
This is also in preparation for adding singleton types to the dependency
hash.
Task-number: QTBUG-58486
Change-Id: I5bb5e5c06b7b5c77195cec3da13141333cfea7a8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I5b63697c0607f4300b7f203eeac74914f3fb43af
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The double representation of 0 and -0 are different in the sign bit, so
the raw values are not the same. However, neither is managed, so
non-strict equality comparison erroneously returned false.
Task-number: QTBUG-56808
Change-Id: If966ddbc9f1a1c006dc5901aecafca063f71e404
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit 180decaf11ea6fb1147825a78a95c455400f7c7e regressed
ch15/15.3/15.3.5/S15.3.5.3_A2_T6 in the sense that when a non-object was
set for the prototype property, the protoProperty() helper function
would perform an unsafe cast to Object * and return a non-null pointer,
which however instanceof() does not expect.
Change-Id: I134fd41f6b2d3349ebe7d9e91c6b6e5788f599b6
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It won't be for very much longer.
Change-Id: I90fae21b621f104053b776296fc9f6525e8baf52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since we always convert the source code of .qml/.js/qmldir files from
utf-8 to utf-16, we always end up copying bytes around. That means
instead of allocating memory on the C++ heap and copying bytes from
kernel space to user space and then a few times through QIODevice
buffers until we reach QString::fromUtf8, we might as well mmap() the
file directly - if possible.
Change-Id: I54c88d4d9f03f9967130d65a7b53cfec93734018
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allocating a MemorySegment larger than 4M was not working
correctly. We would in this case reserve the right amount of
memory, but where not able to use it, leading to an assertion
in the HugeItemAllocator.
Fix this by ensuring we can properly allocate the memory that
was reserved in the Segment.
Change-Id: I1e3d2b3beebdde0a509fd123ad2aa8b1bc35a26b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
By making SourceCodeData copyable we can delay the reading of the source
file until we really need to. This also allows persisting the QFileInfo
object and therefore having only one stat() call to check if the file
exists, what its size is and what the last modification time is.
Change-Id: Ic7e4d5f566d870f3b1fa8302227417fa813cb139
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All call sites of QQmlDataBlob::Data immediately convert the data to
UTf-8 - for .qml, .js and qmldir files. We can simplify the code by
reflecting that in the API and that also opens up the possibility for
future optimizations.
This means that the bi-pointer has to go, but at the moment the Data
object is stack-allocated anyway.
Since the "Data" class always represents source code, it is now called
SourceCodeData.
Change-Id: Icd262ed1e35f9edd64945ba6c16d80f9917eae72
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Ensure the offsets we're taking from ExecutionContext members in the JIT
code generator can be translated from host architecture sizes to target
architecture, using assertions and a memory layout that we already have
in the dev branch with commit 4de7e48ab160dacc7a09360e80264eac4945a8f4.
Change-Id: I1b26ef265234b05a6e5c8688a8aad2f33cd28783
Task-number: QTBUG-58666
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This duplicate of qOffsetOf is not used in this file.
Change-Id: I8a5ddfe18202501605a06f65c952b58e557dbfac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Ensure the offsets we're taking from ExecutionContext members in the JIT
code generator can be translated from host architecture sizes to target
architecture, using assertions and a memory layout that we already have
in the dev branch with commit 4de7e48ab160dacc7a09360e80264eac4945a8f4.
Task-number: QTBUG-58666
Change-Id: I26cdbd1ddb995b116624fab16f7caba5d21c13b5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|