Lars Knoll [Fri, 21 Jun 2013 12:14:37 +0000 (14:14 +0200)]
Fix conversion of variantlists to ArrayObjects
Fixes a crash in the qquickmultipointtoucharea test
Change-Id: Ic1ca5220e5e7a569e3cc499ba120296fb885d6c0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 21 Jun 2013 12:07:31 +0000 (14:07 +0200)]
Fix expected test output for one list model test
There's no reason to disallow calling model.set() with
an ArrayObject as argument.
Change-Id: I44baad677ca34e1fb4188b89f0a548af84580b4f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Fri, 21 Jun 2013 12:01:21 +0000 (14:01 +0200)]
Remove XFAILs that was due to strict mode
In non-strict mode we can use with() and eval() again, and so these tests pass.
Change-Id: I66b16653a28b1d7e420e53c012d7908c8fc6c29a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 21 Jun 2013 11:56:52 +0000 (13:56 +0200)]
Mark test as xfail that assumes writability of the global object
As discussed, this needs to be fixed post merge
Change-Id: Iebdc06da4977158b5d6190b3f093f8962459e109
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Fri, 21 Jun 2013 11:11:37 +0000 (13:11 +0200)]
Disable the v8profiler, not the qml profiler
Change-Id: I6113ef5cefa5be8d53e45857ab76c23deb6fe805
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 21 Jun 2013 10:58:49 +0000 (12:58 +0200)]
Skip some tests that are failing because of our date time parser
The parser needs to be fixed to better parse localized dates, times
and timezone fields
Change-Id: I6542ee459e7135b6f845fb5fc89685cb8c2d67c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 21 Jun 2013 10:38:01 +0000 (12:38 +0200)]
Disable some debugger tests until we have a reimplementation for v4
Change-Id: I273fba969c72299e84c091afd7d4a43f9dbd1bf8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 21 Jun 2013 10:28:34 +0000 (12:28 +0200)]
Revert to non strict mode for qml expressions etc.
Forcing them to strict lead to too many incompatibilites
to 5.1, so let's rather leave them non strict
Change-Id: I7c3bafc9a840daa565add7abbad0d0042cdae332
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 21 Jun 2013 08:39:03 +0000 (10:39 +0200)]
Fix scope chain for eval in strict mode
Change-Id: Ie00046f98a126cd46cd79758a78be1d0e1d17c61
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Thu, 20 Jun 2013 09:32:45 +0000 (11:32 +0200)]
Fix qqmlvaluetypewrapper auto-tests
QQmlValueTypeWrapper stores its prototype in a global variable
(PersistentValue), which doesn't work when using multiple engines. Instead
this patch introduces the QML extensions structure to hold things like
prototypes for type extensions to JS that are specific to QML.
Change-Id: I41a71029edb6ce895eb80db7aa0809aab86b31db
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 20 Jun 2013 06:01:58 +0000 (08:01 +0200)]
Fix instanceStateValues xhr test
Writing to a read-only property or trying to deleting will throw an exception
in strict mode and thus abort the execution. Make the test work in strict and
non-strict mode by surrounding the offending statements with individual
try/catch pairs.
Change-Id: I25f803b6ffd7ef721ac874f53a37b3208b5c05ab
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Tue, 11 Jun 2013 10:18:44 +0000 (12:18 +0200)]
Prevent generating jumps to blocks following the current block.
Copied the JIT logic for it.
Change-Id: I4a11f4c8ede1d093f367b714d92b393c810b4fb5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Mon, 10 Jun 2013 15:59:41 +0000 (17:59 +0200)]
Remove the index magic from the temp.
Change-Id: If746ebdd6f29d7140781869af6d589cc4c5b8c9e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 18 Jun 2013 12:15:19 +0000 (14:15 +0200)]
Fix tst_qqmlecmascript::functionAssignmentfromJS_invalid
Remove the column number from the expected output, as we generate those
QQmlBinding objects from within a v4 callback and produce the line number
and column number from the stack trace of the engine, which currently
doesn't produce column numbers.
Change-Id: I9840f0ab571d4261570dd079436aaa9f81e27abf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 18 Jun 2013 13:07:24 +0000 (15:07 +0200)]
Fix tst_qqmlecmascript::functionAssignment_afterBinding
When calling Qt.binding(f), don't modify f and set the bindingKeyFlag
there, but instead we must return a _new_ function that acts as proxy
and has the bindingKeyFlag set to true, similar to how the V8 based
implementation created a clone.
Change-Id: I4998359869c02e32c89e929793bf74a4adafcb72
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 18 Jun 2013 12:01:52 +0000 (14:01 +0200)]
Fix tst_qqmlecmascript::functionAssignment_fromJS
Make the test-case compile with strict mode, where function declarations
are not allowed within blocks. An alternative would be to use function
expressions here.
Change-Id: If7e1cc23ef4a0c6a83e4ba8ae03dc9c6b678730d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 18 Jun 2013 11:47:33 +0000 (13:47 +0200)]
Fix tst_qqmlecmascript::functionAssignment_fromBinding
Function declarations in QML mode should be similar to function expressions and
therefore need to go to the return value of the function..
Change-Id: Ib1dd8a970a967f2456d0558be74edf5d74d288e5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Tue, 18 Jun 2013 11:17:01 +0000 (13:17 +0200)]
Fix two more errors in the worker script auto test
Change-Id: Ib1359a985efae18cd4fc8344b81092af57f1a9d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 18 Jun 2013 10:48:08 +0000 (12:48 +0200)]
Fix parts of workerscript
The worker script creates a special QmlContextWrapper
that doesn't contain many things found in the main thread.
However we still need to be able to cast to it, so it
should be the same class as the regular context wrapper.
Fixes parts of the worker script auto tests.
Change-Id: I3697b2b0080dc4ac967eb447e2efd0f28fbab465
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 18 Jun 2013 10:59:51 +0000 (12:59 +0200)]
Fix inifite loop when running ecmascript tests
Revert the initialization part of
42825af048ab2724e0d434178dcef1b23b4850ff in
the IR, apparently it is needed.
Change-Id: Ia415133ee2fb6cd060fa5a0e5da7b711ac98ddd1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Lars Knoll [Mon, 17 Jun 2013 20:44:49 +0000 (22:44 +0200)]
Fix the first half of qqmllocale auto tests
Change-Id: I0f37208eaefcb668d3b61d294129134cfaa7c8f4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Mon, 17 Jun 2013 12:27:55 +0000 (14:27 +0200)]
Fix url test in qqmllanguage
In V4 URLs were mapped to strings, with V8 they were mapped to opaque
variants, which is also what we do with v4 at the moment. In the future
we want to provide a real JS API for URLs, but that is a feature that
should be discussed in a wider scope and developed on the dev branch.
Change-Id: I17660066b2797239eddebad03f49ffa424f86f78
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 17 Jun 2013 11:36:21 +0000 (13:36 +0200)]
Make it possible to evaluate JS with the v4 tool the QML way
Change-Id: I2a40e82612c2da1b52a37cbff2507951e4ac0349
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Mon, 17 Jun 2013 12:27:06 +0000 (14:27 +0200)]
Fix the console autotests
Change-Id: I8936c6baa274e673c23c65637fa199a6140e0a15
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 17 Jun 2013 11:52:38 +0000 (13:52 +0200)]
Fix qmlmin test
Exclude the test262 test suite, as qmlmin can't deal with
all of the test cases there.
Change-Id: Ie56c0d9adecc6b1ae0ddcbcd3edd5b0eaf30cd4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 17 Jun 2013 11:47:24 +0000 (13:47 +0200)]
Fix the remaining test failures in the jsonbinding autotest
Skip properties that are function objects when converting a V4 Object to a
QJsonObject. For arrays the function object gets replaced with null.
Fix the test case for arrays to have the correct expected output.
Change-Id: I3ee63935d038e0922e33ac6e64e9c31ecfbd4a7e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 17 Jun 2013 11:35:07 +0000 (13:35 +0200)]
Fix memory corruption in qjsvalueprivate
When converting to a memory managed string, we need to add
the PersistentValuePrivate to the chain of persistent objects.
Otherwise the string stored in the JSValue can get garbage
collected.
Change-Id: I159fd77a7ae6f29e4121969cac962bd12b0f9bc7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 17 Jun 2013 07:55:40 +0000 (09:55 +0200)]
Fix and enable the qmldirparser autotest
Change-Id: I2e9b64e5df63dbd9fffc204b7058d3c77255b09c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 17 Jun 2013 07:18:19 +0000 (09:18 +0200)]
Fix most qjsonbinding auto tests
Change-Id: I67476bc7e931e2f4790e859d4a3c00c050752271
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Mon, 17 Jun 2013 05:31:41 +0000 (07:31 +0200)]
Mark the eval() test as xfail
eval() works differently in strict mode, and it's nicely covered by
test262
Change-Id: I9bb84753032d5106c94d78afe765680f3d85348d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 16 Jun 2013 20:42:47 +0000 (22:42 +0200)]
Revert "Local initialisation is now done in codegen."
This reverts commit
2bd6e240a3c2b3dc7a2c81c639d4f30e4dfd685f.
This doesn't work properly as the code generator will not keep those
initializations at the beginning of the function, resulting in
uninitialized values in ctx->locals[], which gives valgrind warnings
when they're marked.
Change-Id: I81501e0ea80e7f76b7d9112fea261e406084b69b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 16 Jun 2013 20:42:34 +0000 (22:42 +0200)]
Revert "Local initialization is now done in codegen"
This reverts commit
01526deb814cf53a9dc80014960da2f4e8def3e2.
This doesn't work properly as the code generator will not keep those
initializations at the beginning of the function, resulting in
uninitialized values in ctx->locals[], which gives valgrind warnings
when they're marked.
Change-Id: I8f671c85b6744c80b6fe11b628bf6b6de125a6bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sat, 15 Jun 2013 20:43:58 +0000 (22:43 +0200)]
Adjust expected error message for qqmlecmascript::qtbug_22843
Change-Id: Ib6f58c2d7ee5e4f03fcc755d2290bdf204e3aa61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 14 Jun 2013 20:12:04 +0000 (22:12 +0200)]
Re-enable two disabled var property tests and make them pass
When marking the var properties of a VME-metaobject (we decided to keep its
QObject alive), then we must also mark the var properties of the parent
VME-metaobject. The two property var inheritance tests verify that.
Change-Id: If1f0d4f3daef78d42adb7052cc1ce7bbdd6da585
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 14 Jun 2013 06:07:01 +0000 (08:07 +0200)]
Fix qqmlproperty::warnOnInvalidBinding
* Add column to expected warning message
* Get rid of eval that doesn't make sense with only one JS engine
and doesn't work in strict mode
Change-Id: I63cd3784cd8c255af8832ea5ca1e6e5e2d48431e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 14 Jun 2013 14:08:48 +0000 (16:08 +0200)]
Fix QVariantObject destruction
Make sure to call the VariantObject destructor from its destroy method,
in order to ensure that the ExecutionEngine::ScarceResourceData destructor
we inherit from is also called, which ensures that the refcount in the
QVariant it holds also drops correctly.
Fixes tst_qqmlecmascript::propertyVarCircular
Change-Id: I14df8e2f0d5be6f3049a295a527afa09e19f0ef2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 14 Jun 2013 10:21:45 +0000 (12:21 +0200)]
Fix JS ownership of children of marked but floating QObjects
This patch fixes four qqmlecmascript tests: propertyVarImplicitOwnership,
propertyVarReparent, propertyVarReparentNullContext, propertyVarCircular2
Usually QObjects wrapped in JS are kept alive because the GC knows about their
weak values stored in the QQmlData, and so it has to do few steps only to
locate those and mark them.
A slightly less common case is a QObject that's wrapped in JS, without a parent
and is stored in a var or variant property. It's visible to the GC, but the
only strong reference to it is through that var property. So when such an
object gets marked (it's without parent), we also have to mark the child
QObjects's JS wrappers (if existent), all recursively.
Change-Id: Ice347a37a841212c145b6d7a58216e449e5cce08
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Fri, 14 Jun 2013 11:58:07 +0000 (13:58 +0200)]
Reset the persistent values to undefined on destruction
This is what we expect the JSValue to return after
engine destruction.
Change-Id: I448b7987fa46f0e31711fa0c30561712bab5eca5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 14 Jun 2013 11:54:36 +0000 (13:54 +0200)]
Fix some bugs related to QJSValue
Give PersistentValuePrivate a virtual destructor. This makes
sure we properly delete things as QJSValuePrivate inherits from
it.
Also always access the QV4::Value through getValue() before passing
it off into the JS engine, so that we properly convert a QString
based JSValue into a QV4::String.
Change-Id: I4c6cb8d0e043e0d7f66fa545abe898e189051049
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 14 Jun 2013 11:09:19 +0000 (13:09 +0200)]
Comment out test of octal numbers
We don't currently support octal numbers in v4
Change-Id: Icb31d399a199eb573068b431954a22d169de9b9e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 14 Jun 2013 11:08:13 +0000 (13:08 +0200)]
Implement error.fileName and error.lineNumber
Useful extensions to the error object. This also helped
track down a few places in the parser where we wouldn't give
correct error information.
Change-Id: Id03653e096216e097c13a7a6e698ca142d92da13
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 14 Jun 2013 09:18:12 +0000 (11:18 +0200)]
Check for duplicated label statements as to 12.12 of the spec
Change-Id: Ia2ccddef08a2b3dedd46c509a8693d52dc472982
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 14 Jun 2013 08:17:30 +0000 (10:17 +0200)]
Fixes to __defineGetter__ and __defineSetter__
Makes the qjsengine test for them pass.
Change-Id: I7bc45665d35b87db8500dc0544c8f7a9872b7014
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 13 Jun 2013 16:27:06 +0000 (18:27 +0200)]
fix deleteProperty on a string objects
For array indices that are part of the string,
deleteProperty should fail.
Change-Id: Ib253ddd5b3b04d2edc9b744a9407451c2a9778fd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 13 Jun 2013 16:14:28 +0000 (18:14 +0200)]
Remove test case that violates the ecma spec
It's actually also hard for us to support this properly, so
let's simply not do it.
Change-Id: I107e1c1f482d64c9d4d58c805e0446e76e85d840
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 13 Jun 2013 15:44:44 +0000 (17:44 +0200)]
Fix test case
The for..in statements behavior is actually undefined when
it comes to inserting values into the object being iterated
over. Simply adjust the test case to the v4 behavior.
Change-Id: I85774ae98810d8c14ee457138ccc54082de47802
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 15:10:35 +0000 (17:10 +0200)]
Fix ownership of JS value returned by QJSEngine::newQObject
As documented, the ownership should be JavaScriptOwned, which means:
Keep the QObject alive if there's a parent or some other JS object is
referencing it.
Fixes three QJSEngine auto-tests
Change-Id: I75503273b34e78355b08526da591b8d307a1c6e6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 14:49:34 +0000 (16:49 +0200)]
Fix qqmlecmascript::propertyVarOwnership
Don't rely on o = new Date in the test-case to really clear the last "reference"
on the stack. As it turns out, in v4, we sometimes allocate the result of "new Date"
in a different slot and the old slot is still around (and thus the object is
visible and marked).
Instead work with separate scopes, which requires a little helper function in JS.
Change-Id: I5f318feaccfc7d83dbe28be043a0ee83e0c16355
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 13:27:00 +0000 (15:27 +0200)]
Rework QObject deletion mechanism
Instead of the qv4mm knowing about different ways of deleting the QObjects
of the QObject JS wrappers (and their timing!), provide an interface between
the two.
Before destroying a managed object, we allow for the object to register a
Deletable instance in a singly linked list of deletable objects that will be
deleted right after the sweep, but before the gc returns to application.
This allows for a behavior that is identical with V8: When GC runs, the
QML Component.onDestruction callbacks are called _after_ the sweep but
before returning to the application. The QObject however is deleted later,
unless this is the very last run of the GC (as indicated by the lastCall
property).
Change-Id: I1a2f127f4634c7ecc8c89b45e8b0a575c0ef772e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 12:36:32 +0000 (14:36 +0200)]
Don't allow for a QJSValue to be taken from one engine to another through QVariant
Change-Id: I21127d22f595b0ff88f6073bddf617423ad17867
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 12:22:49 +0000 (14:22 +0200)]
Fix Array.prototype.splice to not require the instance to be a true array
Use putIndexed instead of arraySet, so that it also works with "host" arrays.
Fixes tst_qqmlecmascript::sequenceConversionArray, which calls splice on a
JS-wrapped QList<QString>
Change-Id: Ic9cbf12d625adf7c3c47ce4a7996d2623f843601
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Thu, 13 Jun 2013 15:15:57 +0000 (17:15 +0200)]
Fix for..in with duplicated properties
Properties that already appeared earlier in the
proto chain should get skipped by for..in (as they
are inaccessible from JS).
Change-Id: Ia0d9cc8582f96df4b2aaaa409d884f206456fe89
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 13 Jun 2013 14:13:10 +0000 (16:13 +0200)]
Fix a few spec compliance issues with Number.toExponential/Precision
Fixes an autotest in qjsengine as well.
Change-Id: I6f30d360d4f43ec50a11bed669ff84d84db59589
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 13 Jun 2013 13:36:53 +0000 (15:36 +0200)]
Fix test case. QDateTime actually writes milliseconds since 5.2
Change-Id: I21a7b63175b173a5036892dd932614a299d519c3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:46:48 +0000 (13:46 +0200)]
Revert "Simplify JS bindings generation"
This reverts commit
f227c3392beda68beb2792eb9fec467d9a0794da.
Conflicts:
src/qml/qml/v4/qv4object_p.h
src/qml/qml/v4/v4.pri
src/qml/qml/v4/v4classgen
Change-Id: I8aba402878a460ac612c853d14650efc6cb21761
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:45:23 +0000 (13:45 +0200)]
Port the QVariant wrapper away from v4classgen
Replaced with four new lines of code :)
Change-Id: Ie48608d332f8eb0c5ab6615aa62e5865d307c7bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:43:09 +0000 (13:43 +0200)]
Port the sequence (QList) wrapper away from v4classgen
This also gets rid of the QQmlSequenceBase base class.
Change-Id: I8cccc6c8924843ae37a4ee4ea95807f2b459d55b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Thu, 13 Jun 2013 12:11:23 +0000 (14:11 +0200)]
Properly implement Object.prototype.__proto__
Change-Id: I5c3247f46cd86020425f6df8674f8bda7410757b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:20:22 +0000 (13:20 +0200)]
Port ErrorObject away from v4classgen
Not worth it for one single line :)
Change-Id: I67fa8d222f1a382c4304c7d86cae98cf7842eb6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:17:45 +0000 (13:17 +0200)]
Revert "Ported string object over to the class generator"
This reverts commit
678417bd473b68834747684edb6fd2b9628050b9.
Conflicts:
src/qml/qml/v4/v4.pri
Change-Id: I927514f20ec5417dd0280a3868f3a0b71b752eca
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:17:20 +0000 (13:17 +0200)]
Revert "Ported boolean prototype over to class generator"
This reverts commit
b6263687dd876959379022090eb8d43a0dbcdd08.
Conflicts:
src/qml/qml/v4/v4.pri
Change-Id: Iebaad46adea26c788b541a111e881af3d305e46a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:14:59 +0000 (13:14 +0200)]
Revert "Ported RegExp object to class generator"
This reverts commit
551282c220a554f269ada23bf842d8d023c7395c.
Conflicts:
src/qml/qml/v4/qv4regexpobject.cpp
src/qml/qml/v4/v4.pri
Change-Id: Ib853de8427fff3c75feb11d1b4d1db91acb26b8a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:10:15 +0000 (13:10 +0200)]
Stop using v4classgen in the context2d bindings
Change-Id: Ib117468f2755495eab13f39d72682780a68305c0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 11:01:14 +0000 (13:01 +0200)]
Stop using v4classgen for QQmlLocale
It's easy enough now to just define the properties by hand.
Change-Id: I6a053bf22f606280d21e9985928d7c69252611d4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 10:52:41 +0000 (12:52 +0200)]
Get rid of memberAccessorGetter
The new defineAccessorProperty is much simpler, so change v4classgen
to generate that.
Change-Id: I5578ef33c2e1735933ec6f10a23e3a69db9b1984
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 08:17:07 +0000 (10:17 +0200)]
Cosmetic: Silence the with statement warnings, in addition to the XFAIL
Change-Id: I8a89acc93f1446a5ef6cb8441a8ad9b48c4fb752
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 06:53:34 +0000 (08:53 +0200)]
Fix tst_qqmlecmascript::callQtInvokables
Make sure to set inheritContext to true, to run the sample scripts the
same way as we run QML right now: with lookups disabled. Lookups with
custom get() don't work right now and cause the tests to fail lookup
properties in QObject.
Change-Id: I22a1133d5d568935c64fc5162445a438665713b8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 06:24:25 +0000 (08:24 +0200)]
Fix exception type when trying to assign to read-only QObject properties
[[Put]] throws a type error, and so should the put operation on a QObject
Change-Id: I8fad91f3969c1889381d67d8d0ff751a91f8239e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Jun 2013 05:46:26 +0000 (07:46 +0200)]
Fix diagnostic error message when put fails because of a read-only property
Change-Id: I9310c160386e9610d76ae0a8b3228b22757d5a02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 18:43:45 +0000 (20:43 +0200)]
Fix toString lookups on QObject bindings (And thus qqmlecmascript::toObjectString)
Change-Id: I20e5788e8810d9354ca51245ee05181c9f4648ae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 15:03:01 +0000 (17:03 +0200)]
Fix syntax error propagation
For syntax errors we use the DiagnosticMessage type in qv4context.cpp,
that contains detailed information about the error. We must catch that
error correctly in QQmlVME::run and report it to the engine.
Change-Id: I8f53c7db8dbdc6afa72396f3c25537690a6f5841
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 13:58:04 +0000 (15:58 +0200)]
Mark test using with statement as expected failure
We run QML bindings in JS strict mode now, where with is not supported
Change-Id: I7e1b2747c50f9affdb6b7cfa80287f1f198ad930
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 13:36:52 +0000 (15:36 +0200)]
Fix build errors with intptr_t
Simply use qintptr
Change-Id: Ic99d3ea67cc95c5d15bae7080262d997cef9558e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 13:25:20 +0000 (15:25 +0200)]
Remove last traces of v8 API and v8 compatibility layer
The debugger and profiler service remain as bigger parts that need to
be ported properly to v4.
Change-Id: I68e72d6db66fe497eb58ed60df417ffe4662d115
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 13:02:42 +0000 (15:02 +0200)]
Convert v8::Array usage in particles to V4
Change-Id: Ib3c39903bf8f8507d68f94baea81b3bf642ce8f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Wed, 12 Jun 2013 12:43:59 +0000 (14:43 +0200)]
Remove some more v8 leftovers
Change-Id: Ie025cf45444bdf42936c588997c2baa3b0d4fd05
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 12 Jun 2013 12:39:48 +0000 (14:39 +0200)]
Finally get rid of qv8objectresource
Change-Id: I3f157148a71cc2f36e51eb8007bfb03cfb5d08af
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 12 Jun 2013 12:33:11 +0000 (14:33 +0200)]
Remove the remaining v8 usage from the xmlhttprequest implementation
Change-Id: Id1b9e125627a1289e8e855be3ac594139f21cf0c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 10:36:08 +0000 (12:36 +0200)]
Port ParticleData to V4
Change-Id: Ifc48b73a2fbfda22d3c4419cb34dd5307107f688
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Wed, 12 Jun 2013 09:04:35 +0000 (11:04 +0200)]
Convert most getter methods over to v4
Change-Id: I92677cb47a89319fd69ca708b1b88cf573a150ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 12 Jun 2013 07:32:06 +0000 (09:32 +0200)]
Convert NodeList and NamedNodeMap to v4
Change-Id: I7d5d02e5c7b895a748e27566b1f7a9c153b976db
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 07:19:54 +0000 (09:19 +0200)]
Small fix in tst_qqmlecmascript
EVALUATE_ERROR is supposed to return true if an exception was caught
Change-Id: I8371206e4a4e9d0c3d40ef09cf61d28ed19e40aa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 07:19:37 +0000 (09:19 +0200)]
Implement iteration on QObject properties
Change-Id: I036e3d835f1c0375460acf142738123c1728279e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 08:41:07 +0000 (10:41 +0200)]
Fix prototype chain in XHR
Fix variable typo that caused Node::prototype to always return a null value.
Change-Id: I453685952a870c7b7ba4607a151d5b7834f553b9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 08:26:37 +0000 (10:26 +0200)]
Fix various xhr auto-test failures
In the v8 compatibility layer accessor wrappers, forward v4 exceptions
instead of silently eating them. We don't use the v8 TryCatch layer anymore.
Change-Id: I43596c58b6f51a481a11e33a87d5294f1336471b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 08:18:21 +0000 (10:18 +0200)]
Fix this object in constructor callbacks through the v8 compatibility layer
Make sure that the thisObject is set, so that the XHR constructor can
set an external resource correctly.
Change-Id: Id217247cafcee42806dd75b5f461df87c296b81b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Wed, 12 Jun 2013 07:10:59 +0000 (09:10 +0200)]
Remove v8 usage in two places
Change-Id: I26343f3aaa89ea956a890955ce84894f96ebd67d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 12 Jun 2013 05:27:51 +0000 (07:27 +0200)]
Implement query (aka hasProperty) in QObject bindings
Fixes tst_qqmlecmascript::in() auto-test.
Change-Id: Ic42cc566f6ed8077f7aa7d75c0c92236c34c91b8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Tue, 11 Jun 2013 14:17:34 +0000 (16:17 +0200)]
Remove unused stuff from qv8objectresource.
Change-Id: Idb24297ff2b518cc3d928c0cf01ee9feb8223eee
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 11 Jun 2013 13:47:17 +0000 (15:47 +0200)]
Regression: Fix various failures in test262
The stack property added to Error objects must not be enumerable.
Change-Id: Ie163cff2d9c41997e95afa6dd32275be6b4b310d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Jun 2013 15:11:52 +0000 (17:11 +0200)]
Implement objectiterator on top of an iterator method in the vtbl
This makes it easier to implement the array-like wrapper classes
for qml lists and qt lists.
Change-Id: I169025a3e9c76951c0778bcda4bbb1f9a8afc8a0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Tue, 11 Jun 2013 13:54:56 +0000 (15:54 +0200)]
Remove the last bits of v8 usage in context2d
Change-Id: Ie1c5adf0db1eabf36a30bcb61e353a3477533f2b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 11 Jun 2013 13:20:11 +0000 (15:20 +0200)]
Remove debug output
Change-Id: Ic2011366d7606761f4327f1b4e92c9741a5f30ef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 11 Jun 2013 12:58:43 +0000 (14:58 +0200)]
Convert the prototype method of context2d to v4
Change-Id: Id00238adc3ecca8f5008ee1a1015d6b25eb29d6a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Mon, 10 Jun 2013 14:35:43 +0000 (16:35 +0200)]
Clean-up the linearize function.
Change-Id: I75982638dd90ceb776064b3cd0153b96523a70e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Mon, 10 Jun 2013 14:32:48 +0000 (16:32 +0200)]
Add type conversion nodes to the IR.
Change-Id: I5a5a69ccd2e2f2f3c9f8592c4b04455d6a567e83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 11 Jun 2013 11:42:18 +0000 (13:42 +0200)]
Convert the instance methods of context2d to v4
Change-Id: Ic2b80ab828a0f96a72850b0672f5c085a4cfae0a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 10 Jun 2013 21:38:55 +0000 (23:38 +0200)]
Convert some of the subobjects of context2d to v4
Change-Id: I0ad5b466e65da41a7acf8a0a89e7cf26ce2df76d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 10 Jun 2013 14:44:04 +0000 (16:44 +0200)]
Convert the first canvas subobject over to v4 style
Change-Id: Idb99d4081358b46df6a0b5340c9b4fa220d48e80
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 10 Jun 2013 14:16:40 +0000 (16:16 +0200)]
Add convenience method for creating accessor properties
Change-Id: I982cd16e6069e444a9311fe7695a56b7fbdfb161
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>