platform/upstream/qtdeclarative.git
11 years agoSpeed up object literal construction
Simon Hausmann [Tue, 23 Apr 2013 05:31:02 +0000 (07:31 +0200)]
Speed up object literal construction

Define the internal class at compile (isel) time, so that creation
of the object at run-time is very fast.

Change-Id: Ie153cda695cefde9d7118a7a65f1ff7e78f120cc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix various memory leaks
Simon Hausmann [Mon, 22 Apr 2013 18:00:14 +0000 (20:00 +0200)]
Fix various memory leaks

* Remember to delete the statement's extra data in the dead assignment
  removal optimization as well as in the dead block elimination
* Delete the identifier cache in the engine

Change-Id: Ida79c05f12f4ffc4f17e3198c42da0603a51f815
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoImplement lookup calls inline
Simon Hausmann [Mon, 22 Apr 2013 13:39:37 +0000 (15:39 +0200)]
Implement lookup calls inline

Instead of going through two-liner lookup helper methods to fetch and
call the virtual lookup method, do it all inline in the generated
assembly.

Change-Id: I25307177eaa8848c54fec7745f6f36d1788410dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoCorrect number of parameters for call to __qmljs_foreach_iterator_object
Simon Hausmann [Sat, 27 Apr 2013 13:23:10 +0000 (15:23 +0200)]
Correct number of parameters for call to __qmljs_foreach_iterator_object

The context is already passed as first parameter, so there's no need
to also pass it as the last parameter again.

Change-Id: Icc7e318ddad9fb79b3a636384777acf8263f0882
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix return type for C linkage.
Erik Verbruggen [Wed, 24 Apr 2013 12:28:52 +0000 (14:28 +0200)]
Fix return type for C linkage.

warning:
      '__qmljs_numberToString' has C-linkage specified, but returns user-defined type 'QString' which is incompatible with C [-Wreturn-type-c-linkage]
QString __qmljs_numberToString(double num, int radix = 10);
        ^

Change-Id: I1537b0e5f6c61915f4bd3c4d4607846b74e7a6d9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix class export.
Erik Verbruggen [Wed, 24 Apr 2013 12:28:00 +0000 (14:28 +0200)]
Fix class export.

The method QQmlV4Handle::fromValue is used in QQuickXmlListModel::get.

Change-Id: Ia5ae8e0b5aaa3e3873fbc3caacdd73f97c94a987
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix struct v.s. class forward declarations.
Erik Verbruggen [Wed, 24 Apr 2013 12:26:38 +0000 (14:26 +0200)]
Fix struct v.s. class forward declarations.

Change-Id: I8f7f6282339ca798661e59cef256c305c95f7fe1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSuppress unused parameter warning.
Erik Verbruggen [Wed, 24 Apr 2013 12:25:45 +0000 (14:25 +0200)]
Suppress unused parameter warning.

Change-Id: I1dcc3f2c5ee85f3c21035e5c93188c841c727727
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoRemove some unused methods
Lars Knoll [Sun, 21 Apr 2013 20:50:26 +0000 (22:50 +0200)]
Remove some unused methods

And get rid of qv8engine_impl_p.h

Change-Id: I676532acd2fa24f4d2bab282055b7a83254a0e75
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoChange variant conversion methods to use V4 API
Lars Knoll [Sun, 21 Apr 2013 20:42:44 +0000 (22:42 +0200)]
Change variant conversion methods to use V4 API

Change-Id: Ic1a18e71592baf5e5babde250f77c4a60e613041
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAdd missing return values
Andrew Knight [Fri, 19 Apr 2013 14:45:47 +0000 (17:45 +0300)]
Add missing return values

This is a compiler error condition under MSVC.

Change-Id: I86ded06f3c1663499cfef35d727d0c82c4f6a320
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert a few more things to v4
Lars Knoll [Fri, 19 Apr 2013 21:18:43 +0000 (23:18 +0200)]
Convert a few more things to v4

Change-Id: Ia6186fbd352f78433204dcf628d4e0071f12a389
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDisable the old v4 engine by default
Lars Knoll [Fri, 19 Apr 2013 20:45:05 +0000 (22:45 +0200)]
Disable the old v4 engine by default

Left the code in there, as a reference for how we might want to
build up binding evaluation in the new v4.

Change-Id: I5c81ea986d642b524fb02087d819b39c4e3fb257
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmall cleanup in __qmljs_equal
Lars Knoll [Fri, 19 Apr 2013 19:53:08 +0000 (21:53 +0200)]
Small cleanup in __qmljs_equal

Change-Id: I984c1c0e7255d995866c9c4436b5f4f23a0dfa72
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSet up the Lookup callbacks through the Managed vtable
Lars Knoll [Fri, 19 Apr 2013 18:25:41 +0000 (20:25 +0200)]
Set up the Lookup callbacks through the Managed vtable

This will allow us to fully support lookups for non JS objects
(e.g. the QObject wrapper).

Change-Id: Id26e31e9f7666c97d49999e578c62f0102c62924
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoCleanups to QV4::Lookup
Lars Knoll [Fri, 19 Apr 2013 13:37:33 +0000 (15:37 +0200)]
Cleanups to QV4::Lookup

Better naming for the methods, deinline some code, add a generic
path for setters and prepare for moving parts of it into the
Managed's vtable.

Change-Id: Ide8d32181fdabdf34c910db20b28fb8f87167570
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDe-inline the call, as __qmljs_convert_to_string wasn't exported by the linker anymore
Lars Knoll [Fri, 19 Apr 2013 13:36:30 +0000 (15:36 +0200)]
De-inline the call, as __qmljs_convert_to_string wasn't exported by the linker anymore

For some weird reason the linker refused to export the symbol from
libQt5Qml for me.

Change-Id: Ic5ff0f6ac9665f3bd652c76503cb1d5201d2952b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMore build fixes.
Erik Verbruggen [Fri, 19 Apr 2013 19:26:44 +0000 (21:26 +0200)]
More build fixes.

Change-Id: I5421af856e68d8eb0f32ed12cf210b367b5279f9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSome build-fixes for pedantic compilers.
Erik Verbruggen [Fri, 19 Apr 2013 19:24:46 +0000 (21:24 +0200)]
Some build-fixes for pedantic compilers.

Most of the change comes down to just one issue. If you write:

extern "C" { void something(); }
namespace Nowhere { extern "C" { void something() {} } }

.. then any use of something might be considered ambigous by some
compilers. This seems to be an edge-case that is not clear in the spec.

Change-Id: I90e32539d6bd35b6ecca7816349f18d7573cbd2f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agov8::Handle::IsEmpty() is not the same as containing a null value.
Lars Knoll [Fri, 19 Apr 2013 12:32:40 +0000 (14:32 +0200)]
v8::Handle::IsEmpty() is not the same as containing a null value.

Change-Id: Ia9a55ef403074f7813f6c6fcceb61cc41c1d1183
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove V8 dependencies from the JSON wrapper
Lars Knoll [Fri, 19 Apr 2013 11:43:08 +0000 (13:43 +0200)]
Remove V8 dependencies from the JSON wrapper

Change-Id: I0ac3cc83ba4482107402d7482a7777fd9c53b9da
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRename QQmlJS::VM namespace to QV4
Lars Knoll [Fri, 19 Apr 2013 11:03:42 +0000 (13:03 +0200)]
Rename QQmlJS::VM namespace to QV4

Simplifies writing code against it (less stuff to type).

Change-Id: I8ac03ca2519375a204a3245e82c4be4cf1e793eb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove wtf dependencies from the v4 headers
Lars Knoll [Fri, 19 Apr 2013 09:47:50 +0000 (11:47 +0200)]
Remove wtf dependencies from the v4 headers

Change-Id: I94a326a333067657319a8edeff76b3411c66856d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRename QQmlV8Handle to QQmlV4Handle
Lars Knoll [Fri, 19 Apr 2013 08:59:41 +0000 (10:59 +0200)]
Rename QQmlV8Handle to QQmlV4Handle

The handle wraps a V4 Value, so this is the better name for it.
Also added some accessor methods to convert to and from V4
Values.

Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoGet rid of qv8stringwrapper
Lars Knoll [Fri, 19 Apr 2013 08:32:42 +0000 (10:32 +0200)]
Get rid of qv8stringwrapper

Change-Id: I07762a0b0662604b9263775346145cf86acddc61
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove more code over to use v4.
Lars Knoll [Fri, 19 Apr 2013 08:13:39 +0000 (10:13 +0200)]
Move more code over to use v4.

Change-Id: Iebafca215877b4f64a55054d6ee42e5f591082b2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert SQL errors to use v4 API
Lars Knoll [Fri, 19 Apr 2013 07:46:09 +0000 (09:46 +0200)]
Convert SQL errors to use v4 API

Change-Id: Iae1a89dbb24f3e585e5d7d2398053ae111ef9afb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove DOM errors over to use v4 directly
Lars Knoll [Fri, 19 Apr 2013 06:56:25 +0000 (08:56 +0200)]
Move DOM errors over to use v4 directly

Change-Id: Id5187520ff81c1f1773481791d06f60d40a72a98
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmall fixes to auto test
Lars Knoll [Fri, 19 Apr 2013 06:48:02 +0000 (08:48 +0200)]
Small fixes to auto test

Change-Id: Ie18a15601b27c551a2baf13d0f57f72d711dcef2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoImplement most of QJSEngine against V4
Lars Knoll [Thu, 18 Apr 2013 10:41:59 +0000 (12:41 +0200)]
Implement most of QJSEngine against V4

Also do various fixes in other places, so more of
the QJS* autotests pass

Change-Id: I39662a2ca1441f778595d260860375c5c628bf8e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoImplement QJSValueIterator
Lars Knoll [Thu, 18 Apr 2013 13:33:37 +0000 (15:33 +0200)]
Implement QJSValueIterator

Change-Id: I1aa5b3de0b68555359baf575c68424e1c16257a0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoCleanup lots of V8 dependencies in QJS* classes
Lars Knoll [Wed, 17 Apr 2013 16:17:30 +0000 (18:17 +0200)]
Cleanup lots of V8 dependencies in QJS* classes

Implement a good part of QJSValue using V4.
Keep the QV8Engine for now (as it is used everywhere),
but add an ExecutionEngine pointer to it so other parts
can more easily be ported to V4.
Remove a lot of other stuff that's not required anymore.

Change-Id: Ibe2c9ab10f0ee977e0e3d05a42f526206d7b22b5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix VM::Value return value passing on Windows
Simon Hausmann [Thu, 18 Apr 2013 09:28:12 +0000 (11:28 +0200)]
Fix VM::Value return value passing on Windows

Windows doesn't require allocating a return memory slot for the 64-bit value
but instead allows for returning it in EAX:EDX

Change-Id: I3d8b16a5c07ca405edadbed64c9cb462a7581b1c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoBetter implementation of persistent values
Lars Knoll [Tue, 16 Apr 2013 09:36:56 +0000 (11:36 +0200)]
Better implementation of persistent values

The old code never reset values when the engine got deleted.
This is however required if we want to offer a public API
that is safe to use (with QJSValue).

Change-Id: I9754b07b35922a824733dfb8488f3d4998905da7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFixes to exception handling in the v8 API
Lars Knoll [Tue, 16 Apr 2013 07:17:22 +0000 (09:17 +0200)]
Fixes to exception handling in the v8 API

Change-Id: I4e8c3165497c183041ad674b2bcd7a057dce984d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse 'template' keyword to treat 'vector' as a dependent template name
Tor Arne Vestbø [Wed, 17 Apr 2013 12:36:46 +0000 (14:36 +0200)]
Use 'template' keyword to treat 'vector' as a dependent template name

Change-Id: I736c0ef531eb302276dc763584da75e44579e643
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoiOS: Don't enable PROT_WRITE and PROT_EXEC at the same time
Tor Arne Vestbø [Mon, 15 Apr 2013 14:31:34 +0000 (16:31 +0200)]
iOS: Don't enable PROT_WRITE and PROT_EXEC at the same time

We define ENABLE_ASSEMBLER_WX_EXCLUSIVE, which we use to limit
the page flags to either RW or RX.

Change-Id: I253648ea98610438a533c7a7ccbf5c27c3b8230a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMake fields of QQmlJS::JS::Managed public, they are used all over the place
Tor Arne Vestbø [Mon, 15 Apr 2013 14:50:20 +0000 (16:50 +0200)]
Make fields of QQmlJS::JS::Managed public, they are used all over the place

Change-Id: I509a6653e64413b4c24ceb5dde98c80031b09329
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoiOS: Don't generate exception tables
Tor Arne Vestbø [Mon, 15 Apr 2013 14:42:49 +0000 (16:42 +0200)]
iOS: Don't generate exception tables

The platform uses setjmp/longjmp.

Change-Id: I1a272ee35d02506e6e2ccde7c6b779061ba06e5b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoDon't use std::vector::shrink_to_fit(), it's C++11, and not enabled on iOS
Tor Arne Vestbø [Mon, 15 Apr 2013 14:25:30 +0000 (16:25 +0200)]
Don't use std::vector::shrink_to_fit(), it's C++11, and not enabled on iOS

Change-Id: I547df5bcf09837ebac9d64d66a4171ed87627b1a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix build on iOS
Tor Arne Vestbø [Mon, 15 Apr 2013 14:05:43 +0000 (16:05 +0200)]
Fix build on iOS

Add missing include for sys_cache_control, and make sure we don't
define PLATFORM(IOS) or PLATFORM(IOS_SIMULATOR), since we're
PLATFORM(QT).

Intentionally squashed both changes for easier rebasing against
upstream.

Change-Id: I2e010aec76d1f1863d177af8a70091cc88bbc999
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix build with MSVC
Simon Hausmann [Tue, 16 Apr 2013 15:03:00 +0000 (17:03 +0200)]
Fix build with MSVC

* Replace Q_V4_EXPORT with the correct Q_QML_EXPORT macro, now that we're part of QtQml
* isnan and friends are back in std:: after the MathExtras. update
* Some missing includes for MSVC

Change-Id: Id3bcfae4cca7835d5b53012a3a4d06feee78ba28
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSpeed up regular expression matching
Simon Hausmann [Sun, 14 Apr 2013 14:14:31 +0000 (16:14 +0200)]
Speed up regular expression matching

Use the Yarr JIT back-end if possible. Speeds up the RegExp v8 benchmark by a
factor of 3.

Change-Id: I7c6c8086d1d07dcd13400e3cc8bbae408ea67198
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix a ### in Regexp.toString
Lars Knoll [Tue, 16 Apr 2013 07:15:56 +0000 (09:15 +0200)]
Fix a ### in Regexp.toString

The global flag wasn't converted back

Change-Id: I50a5518f6abf6315dee057ce5a4fe97550748cbb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix two more corner cases in the v8 API
Lars Knoll [Tue, 16 Apr 2013 07:05:47 +0000 (09:05 +0200)]
Fix two more corner cases in the v8 API

if Script::Run() catches an exception return an empty Handle.
Don't try to set the array length to negative numbers.

Change-Id: Icefa3bc66d0359c0d3cffcf7c6650c8db34cc9aa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoImplement v8::LowMemoryNotification and IdleNotification
Lars Knoll [Mon, 15 Apr 2013 20:49:54 +0000 (22:49 +0200)]
Implement v8::LowMemoryNotification and IdleNotification

Avoids some failed assertions when explicitly triggering a gc().

Change-Id: I60345f7b971e0a756229931c8162039f3d0f72a2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix a bug in the v8 API wrapper
Lars Knoll [Mon, 15 Apr 2013 20:45:21 +0000 (22:45 +0200)]
Fix a bug in the v8 API wrapper

This gets us further in the qjsengine autotest.

Change-Id: I911c893b49d34b6ee2226a82dc4bb7f398f57d5a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix crash in v8 bindings
Simon Hausmann [Mon, 15 Apr 2013 10:40:04 +0000 (12:40 +0200)]
Fix crash in v8 bindings

We now exceed the maximum object size of 256 bytes, so bump it to 512
in the allocator.

Change-Id: Ifbf87b7f7681f5bcff09407a04a98b154c0bc3da
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix compilation with built-in v4vm JS engine
Simon Hausmann [Mon, 15 Apr 2013 09:50:16 +0000 (11:50 +0200)]
Fix compilation with built-in v4vm JS engine

Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoAdjust to API changes after eliminating Handle<T>::operator* for safety reasons
Simon Hausmann [Fri, 8 Mar 2013 09:32:35 +0000 (10:32 +0100)]
Adjust to API changes after eliminating Handle<T>::operator* for safety reasons

Change-Id: I44661963044dedaf31e149768ebd2422959f15a6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix compilation with v4vm's v8 compatibility headers
Simon Hausmann [Tue, 5 Mar 2013 12:07:23 +0000 (13:07 +0100)]
Fix compilation with v4vm's v8 compatibility headers

Some code is also commented out - it will disappear during the removal of the
v8 code later.

Change-Id: I46e07be47ed7d4bc12423a6348d674d2fca489f7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMerge branch 'master' of ssh://codereview.qt-project.org:29418/playground/v4vm into v4
Simon Hausmann [Mon, 15 Apr 2013 09:34:00 +0000 (11:34 +0200)]
Merge branch 'master' of ssh://codereview.qt-project.org:29418/playground/v4vm into v4

This is the initial merge of the v4vm JS engine, designed specifically for QML.

The engine is tested on Linux and Mac OS X, works on x86, x86-64 and ARM.

Change-Id: I826b72cfa3d3575007b70d78604080582db568db

Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoFix loading of this value on 32-bit
Simon Hausmann [Mon, 15 Apr 2013 09:25:09 +0000 (11:25 +0200)]
Fix loading of this value on 32-bit

Make sure to copy all 64-bits out of ctx->thisObject

Change-Id: I9984f83f5f238177e75e469c574ef49ee5bb0665
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoTiny optimisation
Lars Knoll [Mon, 15 Apr 2013 08:58:53 +0000 (10:58 +0200)]
Tiny optimisation

Change-Id: Iba4355e547c6f0d18bb31a977448bf433021c9f9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAdd some inline property data to Object
Lars Knoll [Mon, 15 Apr 2013 08:31:35 +0000 (10:31 +0200)]
Add some inline property data to Object

This avoids malloc'ing the memberData array in most cases, and
speed up the V8 benchmark by another 10%

Change-Id: Id5976a9f9b389ee2d1568211b486c2896d818dd3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmaller cleanups
Lars Knoll [Mon, 15 Apr 2013 08:12:52 +0000 (10:12 +0200)]
Smaller cleanups

Change-Id: I47e0211536ca7bae2f38aca04cb5e338759caa68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context argument for increment/decrement value
Lars Knoll [Mon, 15 Apr 2013 07:46:45 +0000 (09:46 +0200)]
Remove context argument for increment/decrement value

Change-Id: I35c87190527a9eebd596aba8c4b100be77f552cd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix compilation in release mode
Lars Knoll [Mon, 15 Apr 2013 07:19:58 +0000 (09:19 +0200)]
Fix compilation in release mode

Change-Id: I02a41aa5336c8aaad8584c1b8a857ee6cecc2370
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSpecialized lookups for accessor properties
Lars Knoll [Sun, 14 Apr 2013 21:38:46 +0000 (23:38 +0200)]
Specialized lookups for accessor properties

Change-Id: Ic4afb5b2b73b3311077d3d64ddc03fa6da842e82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoImplement fast lookup for constructor calls to the global object
Lars Knoll [Sun, 14 Apr 2013 21:08:01 +0000 (23:08 +0200)]
Implement fast lookup for constructor calls to the global object

Change-Id: I8a03089032aabdd7cf07c3dd197f6f47dabd66ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove unused method
Lars Knoll [Sun, 14 Apr 2013 20:52:25 +0000 (22:52 +0200)]
Remove unused method

Change-Id: I6961116e0b973d46e497d96d97203cb6046a06bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmall fix for qmljs_delete_subscript
Lars Knoll [Sun, 14 Apr 2013 20:52:00 +0000 (22:52 +0200)]
Small fix for qmljs_delete_subscript

Change-Id: I19f5ae0bb0a138756bb3396ebda6300eb8958b16
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the context pointer from unary operations
Lars Knoll [Sun, 14 Apr 2013 20:45:22 +0000 (22:45 +0200)]
Remove the context pointer from unary operations

Change-Id: Idaf67f719402666e11676983d6bc99952f48a72d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoGet rid of qmljs_get_this_object
Lars Knoll [Sun, 14 Apr 2013 20:37:54 +0000 (22:37 +0200)]
Get rid of qmljs_get_this_object

This is trivial to inline.

Change-Id: Idccfc3c39d19e85768ec1be4b3b62b67abf00325
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove the ExecutionContext parameter from some methods
Lars Knoll [Sun, 14 Apr 2013 20:01:20 +0000 (22:01 +0200)]
Remove the ExecutionContext parameter from some methods

We can avoid passing the context into many methods now.

Change-Id: I3cfedd679441117c5ea3aa735d5342788d7dfac5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agouse lookups for the global scope
Lars Knoll [Sun, 14 Apr 2013 10:17:11 +0000 (12:17 +0200)]
use lookups for the global scope

Gives about 12% speed improvement for the V8 benchmark.
fact.2.js is almost twice as fast.

Change-Id: Icfa1a780b30e131b9531e12f4bd569516c404e86
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoIntroduce specialized lookup methods
Lars Knoll [Sat, 13 Apr 2013 18:58:21 +0000 (20:58 +0200)]
Introduce specialized lookup methods

Add specialized lookup methods for data properties.
Speeds up the v8 benchmark by ~10%

Change-Id: Ib61a59529b6eaba1ac5ad3020fd1ff52594b7ddf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove the lookup class into it's own file
Lars Knoll [Fri, 12 Apr 2013 15:26:44 +0000 (17:26 +0200)]
Move the lookup class into it's own file

Change-Id: Id57b23ebd6de4579f8e425bd2964b1249fb327c1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoFix build of the rest of v4vm against WTF/JSC update
Simon Hausmann [Fri, 12 Apr 2013 13:51:47 +0000 (15:51 +0200)]
Fix build of the rest of v4vm against WTF/JSC update

* Add missing functions to our WTF stubs
* Some of the math functions wrapped with MathExtras.h are back in the std:: namespace
  they belong to

Change-Id: I9da43e8344ab8c95edc8db19f44ccdbd91b4ac70
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoApply modifications on top of WTF/JSC
Simon Hausmann [Fri, 12 Apr 2013 13:49:31 +0000 (15:49 +0200)]
Apply modifications on top of WTF/JSC

* Extend FunctionPtr by another overloaded constructor that allows passing 6 arguments
* Work around STL <> WTF incompatibilities with iterators
* Remove unused printInternal functions that rely on CString/WTFString

Change-Id: Ie0cc503288871cb594716e47e03dd509b1b5ac85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoWTF/JSC update to r148273
Simon Hausmann [Fri, 12 Apr 2013 10:58:29 +0000 (12:58 +0200)]
WTF/JSC update to r148273

This brings in various bug fixes in the ARM and MIPS assemblers as well as
a Yarr crash fix and performance fix.

This change doesn't compile as-is, but the next change will
apply the modifications necessary to compile. That'll make future updates
easier as it allows for cherry-picking because the modifications are usually
always the same.

Change-Id: Iac32f62c71e8ff908deb41f28f12fbc98c0823e1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoSmaller cleanup in the lookup code
Lars Knoll [Fri, 12 Apr 2013 13:29:05 +0000 (15:29 +0200)]
Smaller cleanup in the lookup code

Change-Id: I74835d7c088b803205aa417ec2b7a2808f66f6ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRename file to reflect class name change
Lars Knoll [Fri, 12 Apr 2013 13:26:48 +0000 (15:26 +0200)]
Rename file to reflect class name change

Change-Id: Ib6d32ac61f54f2fb4325f67c54aeb01b99624ab9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove getValueChecked()
Lars Knoll [Fri, 12 Apr 2013 13:03:16 +0000 (15:03 +0200)]
Remove getValueChecked()

In the two places where we need to check, we can do it
more easily on the calling side.

Change-Id: I259d3cc798660121bba13208ef46e371e3173053
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoRemove context arguments where they aren't required
Lars Knoll [Fri, 12 Apr 2013 12:43:58 +0000 (14:43 +0200)]
Remove context arguments where they aren't required

A bunch of methods took pointers to the current execution
context even though they don't require it.

Change-Id: I2a504a72069af16bb8bdbb62be438ee1cab723b0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSimplify logic for put and putIndexed
Lars Knoll [Fri, 12 Apr 2013 12:36:41 +0000 (14:36 +0200)]
Simplify logic for put and putIndexed

Change-Id: Ia67dc06f505fdb064a22920a9786708aa6d83e6e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove property attributes out of the property arrays
Lars Knoll [Wed, 10 Apr 2013 08:46:23 +0000 (10:46 +0200)]
Move property attributes out of the property arrays

Rather large change that fully separates the property
attributes from the property data. This saves quite some
memory. Since the property data for members is saves
in the class structure it'll also allow optimizations
to the lookup code.

Change-Id: I9ba1d372bb756695bef8188d1b86275562a1b219
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoSmall fix to PropertyAttributes
Lars Knoll [Tue, 9 Apr 2013 13:33:26 +0000 (15:33 +0200)]
Small fix to PropertyAttributes

Change-Id: I9fc8b291c434dc6552eba2a39623a4fe75291e0f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove functionality from PropertyDescriptor to Property
Lars Knoll [Tue, 9 Apr 2013 12:28:20 +0000 (14:28 +0200)]
Move functionality from PropertyDescriptor to Property

Change-Id: I37177b5287ec323f54826cce1cb307ee7f678930
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoUse PropertyAttributes in PropertyDescriptor
Lars Knoll [Tue, 9 Apr 2013 11:37:31 +0000 (13:37 +0200)]
Use PropertyAttributes in PropertyDescriptor

This further encapsulates the property attribute handling,
and will allow to separate the attributes from the
proprety data.

Change-Id: I140a6c9349cd1e871cd9fdcef51abac7ae78e517
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMake the PropertyAttributes a proper class
Lars Knoll [Tue, 9 Apr 2013 07:48:21 +0000 (09:48 +0200)]
Make the PropertyAttributes a proper class

Change-Id: Ia81236136aedcddaad303187b353cfcf03d792c6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoChange internal class when attributes of properties change
Lars Knoll [Mon, 8 Apr 2013 13:38:30 +0000 (15:38 +0200)]
Change internal class when attributes of properties change

This should allow us to share property attributes for different
class instances saving quite some memory. In addition, it
can be used to speed up property access (as we then know in the
lookup whether it's a data or accessor property).

Change-Id: Ide9c6168a07b5c83a1e73d075d8fc4f6594e08fd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Wed, 10 Apr 2013 08:00:34 +0000 (10:00 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I958754b1f51ecdaf465faa7700d4e57f2df926fc

11 years agoAdded more tests for activeFocusOnTab
Liang Qi [Tue, 9 Apr 2013 10:09:24 +0000 (12:09 +0200)]
Added more tests for activeFocusOnTab

The ignored key events will go to parent.

Change-Id: I5e002ee9df44d1c7865c1c50a1631e8e206c68af
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
11 years agoFix new warnings in qtdeclarative (found by GCC 4.8)
Thiago Macieira [Sat, 6 Apr 2013 18:35:00 +0000 (11:35 -0700)]
Fix new warnings in qtdeclarative (found by GCC 4.8)

qqmlproperty.cpp:1561:35: warning: typedef ‘VMEMO’ locally defined but not used [-Wunused-local-typedefs]
qquickglobal.cpp:1017:13: warning: ‘initialized’ defined but not used [-Wunused-variable]
qquicktextnode.cpp:245:6: warning: unused parameter ‘position’ [-Wunused-parameter]

Change-Id: I48c5486953278dc960249f68e0e122d108f56e07
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoVersion new property and signal
Liang Qi [Fri, 5 Apr 2013 13:39:59 +0000 (15:39 +0200)]
Version new property and signal

activeFocusOnTab and activeFocusOnTabChanged in QQuickItem.

Task-number: QTBUG-30446
Change-Id: I973df95d690b8e533b5cc108d8e083a2fed8528a
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoSimplify internal class logic
Lars Knoll [Mon, 8 Apr 2013 11:53:26 +0000 (13:53 +0200)]
Simplify internal class logic

getOrAddMember was always used for adding. Make that
explicit.

Change-Id: Iff202a83e857aefd231eadf59f310619c4338b52
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAvoid defining name twice in some error objects
Lars Knoll [Mon, 8 Apr 2013 11:42:27 +0000 (13:42 +0200)]
Avoid defining name twice in some error objects

Change-Id: I2e96718556ef5a4262816233351b71dd6a80cb9d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoStore the global object as an Object pointer in the engine
Lars Knoll [Mon, 8 Apr 2013 07:08:02 +0000 (09:08 +0200)]
Store the global object as an Object pointer in the engine

Change-Id: Ia8b010a9d9c9dd3aacb1b08ce34a42236fa73195
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoAdd change log file for Qt 5.1.0
Sergio Ahumada [Mon, 8 Apr 2013 09:21:25 +0000 (11:21 +0200)]
Add change log file for Qt 5.1.0

Change-Id: I9bd3fe3cb3897c18b08a3f9d4792f69a29d9d5f9
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agoChange the Context stack back to a singly linked list
Lars Knoll [Sun, 7 Apr 2013 15:23:36 +0000 (17:23 +0200)]
Change the Context stack back to a singly linked list

The other implementation was too complicated, and only solved
one special case (indirect eval calls), but that one can be
solved by simply creating a GlobalContext when needed.

In addition it'll make it simpler to implement context
optimisations for simple methods in the future.

Speeds up the V8 benchmark by 3%

Change-Id: I61ac7753821e0174476094f51a9a4e934563f8e0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoConvert the remaining builtin methods to use the SimpleCallContext
Lars Knoll [Fri, 5 Apr 2013 19:38:09 +0000 (21:38 +0200)]
Convert the remaining builtin methods to use the SimpleCallContext

Change-Id: Ib01bd0c15578b93829abd6fcf8df22cac12daf14
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoIntroduce a SimpleCallContext for simple functions
Lars Knoll [Fri, 5 Apr 2013 19:15:58 +0000 (21:15 +0200)]
Introduce a SimpleCallContext for simple functions

Use it for most builtin methods. Gives ~10% speed
improvement on the V8 benchmark.

Change-Id: I0039f102e561c0adbe1a9b070150ad32142a33e8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoQmlDebugging: Remove 'insignificant_test'
Aurindam Jana [Tue, 19 Mar 2013 12:41:34 +0000 (13:41 +0100)]
QmlDebugging: Remove 'insignificant_test'

The test cases used to depend on a specific port being free for
client-server communication. Since, the test cases now use a port
range, they should be more stable now. The timeout has also been
increased from 5s to 10s to ensure that the application output
is read.

Task-number: QTBUG-28263

Change-Id: I7f0670713b8a901e4da3c3d62bbb9fc18e38bd25
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoFixed distance field text when using non-opaque colors.
Yoann Lopes [Thu, 21 Mar 2013 15:34:38 +0000 (16:34 +0100)]
Fixed distance field text when using non-opaque colors.

The alpha has to be premultiplied before passing the color to the
shader.

Change-Id: If22f0e0892eb4330d5f7398bea2710fce18c4dcb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoTestLib: Add more mouseMove in mouseDrag implementation
Caroline Chao [Tue, 2 Apr 2013 16:24:46 +0000 (18:24 +0200)]
TestLib: Add more mouseMove in mouseDrag implementation

So the cursor has intermediate states while dragging instead of
jumping to the final position.

This is for example useful for testing the behavior of a control
during the drag.

Add autotest.

Change-Id: I061dd18ef7ac389aa4da4a5b60f9e128ee8c08d0
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
11 years agoUse correct alpha range for the distance field outlined text.
Yoann Lopes [Thu, 21 Mar 2013 17:22:09 +0000 (18:22 +0100)]
Use correct alpha range for the distance field outlined text.

The alpha treshold values used in the outline shader were hard-coded. It
should use the same logic as in the normal text shader, using the
ThresholdFunc and the AntialiasingSpreadFunc for calculating these
values.

Change-Id: I0e6f38644692cc7a8a4cee1e8e60622fe289d615
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
11 years agoFix scope for functions created through bind()
Lars Knoll [Fri, 5 Apr 2013 21:45:15 +0000 (23:45 +0200)]
Fix scope for functions created through bind()

Change-Id: I69718b2943259dc0f6d6bf2856e651bfb4fbe3a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove arguments out of ExecutionContext and into CallContext
Lars Knoll [Fri, 5 Apr 2013 14:23:22 +0000 (16:23 +0200)]
Move arguments out of ExecutionContext and into CallContext

Change-Id: Ic826e3e71eac9171fa113dec79db7c69982f2386
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoMove activation out of ExecutionContext
Lars Knoll [Fri, 5 Apr 2013 13:57:26 +0000 (15:57 +0200)]
Move activation out of ExecutionContext

Have an activation object (for now) in CallContext, and
a global object in the GlobalContext.

Change-Id: I02b1e6a2e976d914acfcc3d35cd8abda08dfd298
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>