As this number is not a valid array index, setting it on an
object will store it in the property table.
Avoids a crash in tst_qjsengine.
Change-Id: Idfacde241609e4818d9da79c35705219c733e50d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Hashing on the pointer value of an identifier doesn't
really make sense. We already have a good hash value
for the identifier, so let's re-use it. In addition, this
allows to look up strings that aren't identifiers.
Change-Id: I9bdb4aa89ae36410f24b3e58c641339e115e4c5f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Make it a template based class, so we can store
more then just integers here and replace more
StringHash'es with it.
Change-Id: I21442d13c6260f184bc7b63a8a58e826699f0c83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Use a hand written hash table for the identifiers. This
saves quite some memory, speeds up the table, and allows
converting 8bit strings into identifiers.
Change-Id: Id289764097b50bf6c1fc83b1b8c930b5e62a7538
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Identifier are now (opaque) pointers. They contain the
string and it's hash value making conversion from Identifier
back to it's string value a no-op.
Change-Id: Ied7e845a981514890ff6a686e0e3e3057e6b6fbf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This was required while we were using V8, but now
we can simply pass QV4::String pointers.
Change-Id: If6338e4a455d6132fe14e5e603e4fe9e477d1ffb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The code could fail in case the hashing would happen to return
the same value for both strings.
Change-Id: I7c256754b38aafd8c49b9fbbd2f01b9cc0346a2b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simplify the code, so we can move over to identifiers later.
Change-Id: I42cb164840ecfd3f765049ab9fa46746a0d4a85b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Let's simplify this code. The goal is to replace most of the
code in qhashedstring with an identifier based hash table.
Change-Id: I2f9a38ad0bb2f43a2b2b87914823c23ed231f48c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The class is only used on the stack and critical to
performance in a couple of places. This speeds up
some QML benchmarks quite a bit.
Change-Id: Id36682487396d42ddacdc71f7a32792a09318cf9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
the old code used QHash to store the id to index
mapping, which got detached whenever a new internal
class gets created.
Replace this with a much cheaper custom made hash table.
The new hash table actually doesn't require a detach for
the first transition to a new internal class. This saves
significant memory and time esp. for very large objects
such as the Qt object.
Change-Id: Id1e3af4db59cff39d44ff1c211d46f37ff117ea6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reverted the previous change, the local timezone adjustment should not include
the daylight savings, because in a long running program that runs across the
DST boundary, the timezone doesn't change, but the DST adjustment does. That
is why LocalTZA is always used in conjunction with a call to DaylightSavingTA,
which unfortunately had a silly bug on Windows:
It was assumed that _localtime64_s returns zero on failure, similar to
localtime_r on Unix. However it is exactly the opposite, zero is returned
on success and an error code is returned on failure.
Change-Id: Ib324f09f290870630b66793882c5b121de445f05
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Take the daylight bias into account if GetTimeZoneInformation reports that the system is in a dayligh savings aware time zone
Change-Id: I4af7d284aa9147651c246b873c6f9d613b414832
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Try to avoid derefencing an empty vector, even when the result is not used.
Change-Id: I8a8d8363f42dc3cea8ee702dc8555494b67a165d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We've been using URLs instead of strings for some time now, just
forgot to change the docs until now.
Task-number: QTBUG-31847
Change-Id: I49a42282aeefb95e4d367397e2f290f4af65687e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Add a default constructor to DefUse to ensure that the pointer members are
properly initialized to zero.
Change-Id: I80a1858be2662c246f0f1ecd2fa6f795bbdabf87
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Allows us to drop the qdebug.h include in a public and frequently used
header.
Change-Id: I2cb05fbec6298ba600020db684e9eea4093ce663
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
The QNX/gcc behaves the same as Linux when it comes to ARM unwinding
tables. Use the same support as on ARM. It may not work flawlessly yet,
but at least it fixes one of the QNX compilation issues.
Change-Id: I1592a18d62fd8d8738c5254a75c73e3608b3d38b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
When returning _to_ tryWrapper we pass the address on where to continue
execution in r0. So in our leaveStackFrame() we shouldn't clobber r0
and in fact there's little value in restoring r0-r3 given that they're
used to pass arguments and don't require save/restore.
Change-Id: Iba0091e19eb74347472e698ffc7687e647a5e5be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Otherwise for every scene the canvas is simply not painted anymore in the
designer. For example if you change the parent.
Change-Id: I4883eab44d73a59381230755f7caa596f2b6569f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Also updating the copyright year to 2013
Change-Id: I743d93d13d1841e13600f7353c4fe3e05bbd7c32
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We re-implemented Vector::begin() and end() by means of dereferencing the return
value from std::begin() and then taking the address of it. That causes a failing
assertion in MSVC's STL (rightly so!). We did this only to avoid modifying
the original YarrJIT.cpp code.
This patch instead simplifies our Vector.h stub again and just fixes the two
small occurrences in YarrJIT.cpp where it expects vector->begin() to return a
pointer instead of an iterator.
Change-Id: I2ad137be91ea969ccb310333dffa8d98e5825f8f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We can use the same win32 functions here to get the stack base address.
Change-Id: I7f26434b2c479772eaee94b8a9f7e1eba7f0721f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
ArrayPrototype.sort allows specifying a compare function implemented in JS,
which we "wrap" and then pass on to std::sort. std::sort with MSVC has
an assertion verifying that the less-than compare function provided is
perfectly consistent in its return values. We don't want JS to easily crash
the entire application and therefore resort to qSort().
Change-Id: Id2c758a7d2bee60f31a7a3971172bca9b3c69af6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
When returning a struct like QV4::Value from a function, the compiler can
either place the return value into the stack by expecting the caller
to provide a hidden first argument (pointer to where to store the value)
or pass it in eax:edx. The choice of which approach to pick depends on
whether the type is known at function declaration time. In this case we
had a mismatch where qv4serialize.cpp had a function that returned a value
and it is implemented by calling another function that would return the value.
QV4::Value was forward-declared, and so when compiling the function, the
compiler would assume that the caller provided an invisible first argument
for return value storage. The caller (in qquickworkerscript.cpp) however
had fully visibility of QV4::Value at call time and therefore assumed that
the value is returned in eax:edx. This mismatch caused naturally all sorts
of funny crashes.
The approach chosen is to eliminate any forward declarations of QV4::Value
and instead include the definition where appropriate.
Change-Id: I33303d86964239d3be30d1096806c605cddb7bbc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
It cannot map a function pointer that returns a structure that isn't known
at declaration time.
Done with Lars.
Change-Id: I02a241695a6f6a94883507eb2c4988852cc9b912
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix processor #defines in stack trace generation code
* Fix return type of doEdgeSplitting. It doesn't actually return anything.
* Work around internal compiler error in the array construction in qquickworkerscript.cpp
Change-Id: I8fac4bc2e8ca7447f4eeff260d8502d70ff6faf6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change-Id: I4293c3a75e6a98cafd8f41a68012102628416610
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This also moves the extern "C" symbols back into the QV4 namespace
Change-Id: Id6d137df8610010588554bf0660228b357477823
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-for the navigation bar
Change-Id: I0971406e531e515b6afebacc0fe847c51f175d3b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Creator refuses to build it for Android otherwise, and this is a good
demo for tablets. Also added a button to re-open the FileDialog.
Task-number: QTBUG-31898
Change-Id: I9f90de316fcaa2679484f8a875737ffafa774f31
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Platforms like Android and EGL don't support multiple top-level
windows, so we have to avoid trying to use widget-based dialogs
(because a widget dialog on top of a scene graph will result in a
second window), allow the QML dialog to be an Item, and decorate it
to look like a window.
Task-number: QTBUG-31898
Change-Id: I9af049f3265188e8be677a05a8bc6d1699b4cd00
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>