| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of emitting
GetException
MoveReg <returnvaluetemp>, <returnaddress>
StoreReg <exceptiontemp>
...
LoadReg <exceptionTemp>
MoveReg <returnvaluetemp>, <returnaddress>
SetException
and implicitly relying on MoveReg to not clobber the accumulator, it's
cleaner to produce
MoveReg <returnvaluetemp>, <returnaddress>
GetException
StoreReg <exceptiontemp>
...
MoveReg <returnvaluetemp>, <returnaddress>
LoadReg <exceptionTemp>
SetException
Change-Id: I3c392ba5fb75aa2ad3ef32aa776fa7acbc25317c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f44782d0cdbdb800d9c31d5aff712fbf29d52edc fixed the missing call
context creation that would lead to
language/statements/break/S12.8_A2.js failing. It wouldn't always fail
as the invalid cast from the global context to a call context would
access memory that happens to be available just for the test. An
assertion however will not require us to rely on memory setup.
Change-Id: I131a2242004cd5e4d518e58cc9f6a79037f962d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The codegen generates code like this for the unwind handling:
GetException
MoveReg <somereg>, <return value reg>
SetException
In the interpreter, MoveReg doesn't clobber the accumulator, but in the
JIT it did.
Change-Id: I7a9c8200468115ca37403ec8a0d511210e2b25fd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
Use the same method for comparing values for the JIT as well as the
interpreter, so that the test passes with interpreter as well as the
JIT.
Change-Id: I2e0249d8e915c816a64adc922839cb71f0e065db
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
When comparing values we may end up calling user-defined conversion
functions, which in turn may accidentally end up triggering the GC. So
any intermediate managed values we fetch, we must save on the JS stack.
Change-Id: I810a46f740f22f8fd71a83ed362301cfc822190d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
We cannot set the plugin key to a new value if we've already instantiated
the plugin. Setting the same value again, is a noop, though.
Change-Id: Ib2d2cb3dc20d8d3d7f1673957970f5235e3aeccc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This is controlled by a environment variable, so the code won't be
executed if not explicitly asked for.
Change-Id: Iec7be17ae1f21f604064e12f35ffe24be0407760
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Avoid a crash below if the toObject call failed and threw
an exception.
Change-Id: I82a12c5cd8892c176d345d7f4b0cf3297357f272
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Added: acosh, asinh, atanh, cbrt, clz32, cosh, expm1, fround, hypot,
imul, sinh, tanh and trunc. Some needed hand-coding for android,
whose std:: is defective. Fixed some buglets in existing asin and
round in the process.
Change-Id: I0858d45430dc0f5944c53723545717ca1ffa6ef7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Implemented all methods in Reflect, only some smaller
bugs left in there.
Change-Id: I53d2304d0e59566aec64e200cd995e02afcfc33e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Function calls with thread are modelled by pushing
an empty value in front of every argument that
requires spreading. The runtime methods callWithSpread
and constructWithSpread then take care of spreading
out the arguments.
Change-Id: Ie877c59d3d9d08fc5f20d7befb7153c7b716bf30
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Always use the overload where the value is in the accumulator.
Change-Id: I6a3d81fea7aae957e0cf6efd123d7739f8880c95
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
The delete operator is rarely used, so it's simpler to
unify these into one DeleteProperty instruction.
Change-Id: I8c0d4455b35efb03db2ab0010df70030d774a6ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I117687939e0f02d801dbad8de7761b4c799f2035
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I613d853dbb34d86ebedd871e9676d3206f1e3349
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds allows C++ code to retrieve the instance of a registered
singleton type. Until now this required a deturn via QML expression.
Two methods are added to QQmlEngine: A generic one that encapsulates all
singleton objects in a QJSValue and a template function for QObject-derived
singleton types.
An additional convenience function is added to query the QML type id. This
function may also be used for other purposes in the future.
[ChangeLog][QtQml][QQmlEngine] Added API to access singletons associated with
a QQmlEngine.
Task-number: QTBUG-39970
Change-Id: I67c132ede35f80b9aaf1c5e5456715cf4f1b0848
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
eval() calls in strict mode code create their own context, so
even though we don't have a parent context, those variables
do not escape, and can be allocated on the stack.
Change-Id: Iea1853452fe1f792468fd6108851f04a1acf9b66
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 2f9afadd5d9b4899397dca, we introduced a change in QQmlAdaptorModel
so that a QAIM model report that it contains "rows * cols" number of
model items, and not just "rows". This was needed, otherwise TableView
would only display the first column of such models.
It turns out, however, that also ListView will now detect that a
QAIM contain more items than just the items in the first column.
The result will be that it ends up adding all the other columns
underneath the first column in the view.
To avoid this unforseen change, this patch will revert this logic, and
instead add a private variable that can be set if the new behavior
is wanted (e.g by TableView).
Change-Id: I8c13da99f05e2f922362e498d1fa1779cdbd0d72
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Don't throw a syntax error when encountering a destructuring
pattern.
Change-Id: I93250a2963d2d50ff61d725229e1b51be17689e9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I3a8c15fe221bff04a3b9b21ed8c0b06c04770a3d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Fix destructuring targets that are complex lhs expressions.
There are still some failures remaining, but this fixes
another larger chunk of test cases.
Change-Id: Icf08f42d7c70d4e81be5d5d2e27ebe6249d25467
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
maxNumberOfArguments isn't used anymore.
Change-Id: Ibb891101b971b4b0b01be7897e6d1490e1dde62c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
We need to iterator over elisions at the end, as those could
trigger side effects by calling iterator.next()
Change-Id: Ieb5fa3562b6e60fdf179fa228510b2eeaaf9da30
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Fix parsing of
var { x = function(){} } = ...
Change-Id: I524e39c7a556c392a5359eafc445b59020ccadf2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
If the anonymous function is bound to an identifier, set the
name to the identifier.
Change-Id: Idbb3170210e6f91cca3c9bd36b2b6ddcb3a50c7b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This got changed in ES8, but let's already take this in now,
as there are quite a few tests checking this behavior.
Change-Id: I73f86b8fd8a681881bcc9cc3132bef1589d5194f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
JS completion records have some finer details that can only be
seen when using eval(), where the value of the completion record
becomes important.
Fix most of those cases to be compliant with the spec.
Change-Id: I0c8105a8e778de7be3aea151d1bd64243aea067c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch eliminates the annoying behavior of the QML compiler that .qmlc cache
files are stored alongside the sources. When cache files are generated at
run-time, then they are always stored in the application's local cache directory
defined by QStandardPaths::CacheLocation (qmlcache subfolder). The application's
uninstaller is responsible for cleaning up the cache directory during removal.
If explicitly precompiled QML files exist at the source location, then they are
loaded from there and no cache file is being generated.
Storing cache files in the source directory is as problematic as an in-tree
build. The cache files pollute the source directory and create unnecessary
inconvenience with version control systems.
[ChangeLog][QtQml][QQmlEngine] QML cache files are now always stored in the
application's cache directory when being generated at run-time. If precompiled
QML files exist at the source location, then they are loaded and no cache file
is being generated. The application's uninstaller is responsible for cleaning up
the cache during removal.
Task-number: QTBUG-56150
Change-Id: I5a64b7f958e782e03c71873a82cef4b07011cbf1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old code was rather convoluted and expanded to quite
a bit of bytecode. It was also very hard to fix some
of the remaining issues with unwinding in there.
The new code handles unwinding a bit differently. Basically,
we now have three instructions to do what the spec requires.
SetUnwindHandler is the same as the old SetExceptionHandler
instruction. It basically tells the runtime where to jump to
to handle any abrupt completion (ie. throw/break/continue/return)
that requires unwinding.
UnwindToLabel is a new instruction that is used for unwinding
break/continue/return statements. It takes two arguments, one
telling the runtime how many levels to unwind and the second
a target label to jump to when unwinding is done.
UnwindDispatch is the third instruction and is invoked at
the end of each unwind block to dispatch the the parent
unwind handler if required and thus implement the support
for the levelled unwinding.
Change-Id: I079a39d0d897b3ecc2f0dc631ca29b25eae05250
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp
src/qml/compiler/qv4codegen.cpp
tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
Change-Id: I010505326d76ee728ffe5fbd4c7879f28adadb12
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The method updating the internal class for a CallContext messed
up the order between locals and formals, leading to wrong name
lookups for signal handlers taking implicit arguments
Task-number: QTBUG-68522
Change-Id: I36d55b3b0cfe9af6397455782551498b7ddb940a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
INT_MIN % -1 crashes in C++ with an arithmetic exception, so
avoid passing negative numbers into the integer operation, use
fmod() instead.
Task-number: QTBUG-68513
Change-Id: Ib5a37b55a0f9d41a84c7e6c00ea3f87622155de5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Once upon a time, calling stat directly on Unix-alike systems gave a
significant speed-up compared to calling QFile::exists. These days not
so much. It also breaks any use of custom subclasses of
QAbstractFileEngine.
Task-number: QTBUG-68463
Change-Id: Icae8a16880723dee13c460cfdb15b03dc63c1371
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also global variables declared in a .pragma library script
should not be saved in the global object, as the script has
it's on context where those variables live.
[ChangeLog][QtQml] Properties of the JS global object will now
be looked up after local properties in the QML object. This
can lead to runtime incompatibilities if your qml file is named
the same as a property of the global object (e.g. Date.qml).
Task-number: QTBUG-51581
Change-Id: I108aea4c76d088ca8c2124700f91e8eac3fc19f3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change 8c33c70 injected row and column (alongside index) into
the QML context of a delegate when the view had a
QAbstractItemModel as model.
Rather than only inject those properties when using QAIM, this patch
will move the code to the base class. This way, if a view uses e.g
a javascript list as model, row and column is still be available. This
is useful, since then the delegate can bind to both row and column
regardless of what kind of model the view uses. In the case of a
list model, the column property will always be 0.
Change-Id: I1d9f11c0b7d7a5beb83198184ba12cc1e48cd100
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the structure a bit, so it becomes a little
less nested, and to make some "clean" space for the
patch that handles recycling if items, which will
add an extra section into this function in a
subsequent patch.
Change-Id: Ib94142827373d6894b508718f58e9f5e61e8c8e1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Singleton types defined in C++ have no QML context. Therefore, both
qmlContext(obj) and qmlEngine(obj) return zero. Although documented,
this behavior is surprising and inconsistent with singleton types defined
in QML. The current behavior was decided upon in QTBUG-23116.
This patch puts C++ singleton types into a sub-context of the root context
by default, just like it is the case for QML-defined singleton types. This
doesn't cause any harm, but avoids surprises. It also fixes a bug in
QmlTypeWrapper that returned an invalid QVariant for QJSValue singletons.
Task-number: QTBUG-38583
Change-Id: Id1d48ecdc49f0e22714857a1b49b457885889e5e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When we in subsequent patches start to recycle items, we'll
somtimes need to reset m_currentIndex after construction time.
This patch will not change any logic, but just move the code
that calculates m_currentIndex into a separate function.
Change-Id: Ic61825e9cf4b6c0fdb2dfcab1ad9b582ef4413ac
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code for adding an item to the cache will also be needed
in subsequent patches for recycling items, so factor it out
into a function alongside removeCacheItem(). This patch will
not change any logic, it will just move the code out into a
separate function.
Change-Id: I199a4e1c823ded29c576afba12cddfa27a543431
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ide31c25444e4ced23c024400d34022d3b1f4ff00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ic78a38200959e39375753624af13c6edebe4e1f1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's being used for more than just exception handling,
unwinding for return or break/continue statements also
goes through those handlers.
Change-Id: I145c7909540a1adca431de6a98d9c115ddf23612
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Id161269329d3cd34357580730999e4dee5b0135f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our method to create object literals wasn't compliant with the
ES7 spec, as we would in some cases re-order the properties.
This violated the spec which required properties to be created
in order, so that for-of would also iterate over them in creation
order.
As a nice side effect, this simplifies the code and gets a couple
of test cases using computed property names to pass.
Task-number: QTBUG-62512
Change-Id: I6dfe004357c5d46a0890027f4fd9e2d1e1a2a17a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
and use it where required.
Change-Id: I309ca61e0360b26428fc2ea5a2eea47c8e0632a0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I98da5b552747d6d0b363d83ecb4c408c66a2667b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie19dc556d13081a1b750695e81d6b4e5a6b3afac
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Those two properties are supposed to point to the same function object
according to ES7 spec.
Change-Id: Ic0917aa28836ad8d665d2177f2f5c2a8d8ad3f6d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Create setter and getter functions with proper names and make
the property configurable to be compliant with the ES7 spec.
Change-Id: I13b24f540fdd3261cf29b660aa3393d661acacfd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|