Simon Hausmann [Fri, 16 Aug 2013 16:35:29 +0000 (18:35 +0200)]
Get rid of the functions list in QV4::ExecutionEngine
Change-Id: I97067dbb2819936a1b2029c9f63f0627cb6b8bd2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 15:25:58 +0000 (17:25 +0200)]
Refcount the compilation unit and remove refcount from runtime function
Change-Id: Iaa2f96a6814f1b39589ffcfe3c84e3c229e25f1f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 14:53:36 +0000 (16:53 +0200)]
Reduce ExecutionEngine dependencies in the moth and masm isel
Change-Id: Ic3d0287e15c404c5527fa6fe0dfa759631b66dd4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 14:43:14 +0000 (16:43 +0200)]
Get rid of QV4::Function::lineNumberMappings by porting moth to the new mapping
Change-Id: Ib79489ac4c6c93042143be1f512d29c13d4cd3c6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 14:40:21 +0000 (16:40 +0200)]
Get rid of QV4::Function::generatedValues by porting moths' regexps to runtime expressions
Change-Id: Iaae3c4855016948952159596d2528fca73341b72
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 14:35:05 +0000 (16:35 +0200)]
Ported identifiers in moth to use runtime strings
Change-Id: I09f04994a2ebe631b12fa76b77a622711de31926
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 13:57:50 +0000 (15:57 +0200)]
Initial port of moth to the new compile data structures
Change-Id: I2ead40c5c8c9b12b29c48c387ea424838d1f7d9e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 13:24:35 +0000 (15:24 +0200)]
Get rid of the QV4::Function in the masm isel
Change-Id: Ide70ca5a3f3dcc793fb96fd64f8b8df6b07d1168
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 11:21:31 +0000 (13:21 +0200)]
Ported the compile-time class setup for object literals to be run-time based
Change-Id: I21225e4bf0f66914229cf64fa29ce870548c0e93
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 10:36:13 +0000 (12:36 +0200)]
Cleanup: Store lookup tables inside the CompilationUnit
The size of each lookup is fixed, so it's easier to include in the unit itself.
Change-Id: I66135efe4056eb0b4d7ff312eaa347fe98d8887f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 16 Aug 2013 06:57:58 +0000 (08:57 +0200)]
Store line number mappings in the compiled function
Change-Id: I4e37aac3618b20ccd52ce4833098781374a3daf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 13:54:36 +0000 (15:54 +0200)]
Ported regular expressions over to be run-time generated data
Change-Id: I04e693d4923c97c3d869a5beb17011f6aad85f03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 12:16:10 +0000 (14:16 +0200)]
Remove identifier() from masm isel
It isn't needed anymore.
Change-Id: Ia9977db4d247c35d170e74f68a602cecde096165
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 12:11:19 +0000 (14:11 +0200)]
Fix crashes with unmarked runtime strings
Runtime strings are identifiers, but they still require to be marked. Keep
track of all compilation units in the engine (one per file) and mark its
run-time strings.
Change-Id: Ie70b00dfa373c4567279591de2f717e8103c288f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 11:57:06 +0000 (13:57 +0200)]
Fix valgrind errors in strings in compiled data
Make sure to include the zero terminator in the QString data.
Change-Id: Ie3c3b6a135b012a12a1d4de8bfb16cb8cf7d4615
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 10:48:05 +0000 (12:48 +0200)]
Ported lookups to use the compiled data infrastructure
Change-Id: Idf75cd51087ea825f22aabda59661be461fd3b86
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 08:49:23 +0000 (10:49 +0200)]
Convert more of the masm backend to generate code for run-time strings
Change-Id: Ib560f86b2b32162a9344487f4cde03e76231b089
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 08:36:41 +0000 (10:36 +0200)]
Prepare MASM for better runtime string handling
Keep the run-time functions as-is by taking String pointers and use a little
bit of inline assembly to resolve the string ids to string pointers, by
adding a runtimeStrings array pointer next to the lookups in the context
(similar mechanism).
Change-Id: Ib5a70bdf47fef7c447d646ccfe03f3dc30d39f20
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 07:41:09 +0000 (09:41 +0200)]
Initialize formals and locals from the compiled function data instead of in the isel
Change-Id: I9db976df310a5986ceca66d21efeeae536dbede4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 15 Aug 2013 07:23:42 +0000 (09:23 +0200)]
Store the file name per compilation unit, not per compiled function
Change-Id: Id699897b241a9ff6495689e5685092d311acb8c2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 14 Aug 2013 18:06:03 +0000 (20:06 +0200)]
Move codeRef out of QV4::Function
Change-Id: I65700b9cc4907aaa28623a95204e88f87fccfd49
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 14 Aug 2013 14:35:18 +0000 (16:35 +0200)]
Move the masm compilation unit entirely into qv4isel_masm
Change-Id: If24b6a761dc2f2443520b31b5130ab44b739cdf3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 14 Aug 2013 14:02:56 +0000 (16:02 +0200)]
Move QV4::Function::sourceFile to CompiledFunction
Change-Id: Iacf907c475070bab4a5a1583280f110c089141c4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 14 Aug 2013 13:58:54 +0000 (15:58 +0200)]
Get rid of flags in QV4::Function and use CompiledFunction::flags instead
Change-Id: Iffe72ff6dd0311d7548d1ea41164a400fd3a7600
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 14 Aug 2013 13:44:53 +0000 (15:44 +0200)]
Fix writing the function offset table and initialize the pointer to the compiled function in the runtime function
Change-Id: I9aed9f394fedc4a4ea334f6ab1b72fe749c64c72
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 14 Aug 2013 08:17:37 +0000 (10:17 +0200)]
Begin using the compiled data structures for runtime strings
Change-Id: Idbf278a96624bf101df35de40577b38e593f22be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 14 Aug 2013 08:17:31 +0000 (10:17 +0200)]
Initial version of generator for new data structures
Change-Id: I172a504f8b4f8284967a4a02e207bf4c0a04c2a4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 13 Aug 2013 10:07:40 +0000 (12:07 +0200)]
Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4
Change-Id: I85b23c90f5bc9261dcaf54a360d68b89bc847f70
Simon Hausmann [Mon, 12 Aug 2013 11:47:34 +0000 (13:47 +0200)]
Fix leaks in Phi nodes in the V4 IR
The phi nodes store a QVector, but as the destructors of the IR nodes aren't
called, the QVector internal data is leaked. This patch re-uses the existing
Stmt::Data mechanism that was introduced to serve exactly that purpose. It
replaces the now unused QVectors there with the Phi::incoming vector and
adjusts usage accordingly.
Change-Id: I22f351a17c1983637b54fa73a93dd40d64fec46c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 12 Aug 2013 11:30:19 +0000 (13:30 +0200)]
Fix leak of QString in V4 IR
The destructors of the IR nodes won't be called because they come out of
a memory pool. Therefore we must store strings by pointer from the function's
string pool.
Change-Id: I841e801b81c871e8d08cf63ee1e053744c0bf4dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Thu, 1 Aug 2013 14:19:00 +0000 (16:19 +0200)]
Don't set opacity when we are not told
Change-Id: I8addc16f37ad9ce431a3b7b2fd1a4884693d7e38
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Fri, 2 Aug 2013 13:18:32 +0000 (15:18 +0200)]
Public API for creating atlas textures, when available.
Atlas textures are currently only used when scenegraph is
combined with the customcontext from the playground/scenegraph
module.
Change-Id: I42f62abdad42e97cc1dcdc05bfb16ecf2839dc0e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Sat, 3 Aug 2013 18:42:44 +0000 (20:42 +0200)]
Fix QSGSimpleTextureNode's dirty signals for atlas textures
When used in an atlas, changing the texture also changes the
geometry.
Change-Id: I744eb0ef58aed9f3a5e51ea89c4da1fad5824633
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Simon Hausmann [Mon, 12 Aug 2013 14:45:47 +0000 (16:45 +0200)]
Re-enable JIT
Ooops, an earlier commit accidentally disabled it.
Change-Id: I7b732e0addba8b6403e0d6818d784f267711af42
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Simon Hausmann [Mon, 12 Aug 2013 10:45:24 +0000 (12:45 +0200)]
Fix build on QNX
There is std::isnan and friends, but math.h also defines isnan as macro,
so std::isnan expands to std::whateverthemacrois and that fails to build.
So include math.h early on, get rid of the macros and then we can continue
to use std::isnan throughout the code base safely.
Change-Id: Ifee580fa2adff396eb6d6f064d4c095a896fb022
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Frederik Gladhorn [Mon, 12 Aug 2013 10:51:49 +0000 (12:51 +0200)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Alex Blasche [Fri, 9 Aug 2013 11:28:02 +0000 (13:28 +0200)]
Export V4::PersistentValuePrivate
Indirectly required by QtLocation and its use of QJSValuePrivate
Change-Id: Iea5bca47af8195e344d17fe2b82118141656d997
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 9 Aug 2013 14:45:02 +0000 (16:45 +0200)]
Add reference counting to the VM functions
This reduces memory pressure, keep engine->functions small and thus makes back
trace lookup faster. It became visible for example in the QtQuickControls
auto-tests that use plenty of loaders and we ended up with 30k+ functions.
Change-Id: Iaa5981f44e1e49ad9417a50c1e6a74946090dd28
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 12 Aug 2013 09:55:53 +0000 (11:55 +0200)]
Improve reliability of tst_qqmlcomponent::onDestructionLookup auto test on Windows
The test relies on exact garbage collection, which we can't offer anymore.
But we can use the same tricks as in qqmlecmascript to improve the changes
of a successful collect significantly.
Change-Id: I7b3d7eca7a9bdb551a01a5a3da80549196c45f23
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Frederik Gladhorn [Mon, 12 Aug 2013 10:28:12 +0000 (12:28 +0200)]
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ibb584a2d7975996cd26514b82d1da2d447fcbebf
Gunnar Sletta [Fri, 2 Aug 2013 19:04:44 +0000 (21:04 +0200)]
Support opt-in QSGNode descriptions without breaking binary compat.
This define is quite useful for debugging scene graph internals, but
it is disabled by default to conserve memory.
For clarity, I renamed the define to QSG_RUNTIME_DESCRIPTION.
Change-Id: Ie5ff44d67af38adc65d0d09255d8533dc7a33bff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Tue, 6 Aug 2013 12:18:19 +0000 (13:18 +0100)]
Introduce QSGMaterial::CustomCompileStep
Nobody reimplements the virtual QSGMaterialShader::compile()
function, so we disable that code path and make it opt-in for
compatibility.
We do this, because opens up for that the renderer can do something
different, including changing the source code to allow for better
optimization.
Change-Id: Ia72f9eda7d6428e26878158ab03349f753a35c66
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Simon Hausmann [Fri, 9 Aug 2013 08:41:35 +0000 (10:41 +0200)]
Get rid of unused outer function pointer of QV4::Function
Change-Id: I3ea88d3c259447081d1ac5f85d7da95fed8f02f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Tomasz Siekierda (sierdzio) [Sun, 4 Aug 2013 10:12:26 +0000 (12:12 +0200)]
Document parenting behaviour of delegates in QML ListView and Component.
ListView:
As delegates are instantiated in ListView, they are parented to views
contentItem. This is now explicitly stated in the documentation.
Component:
Components are not derived from Items, so they cannot hook to anchors.
Task-number: QTBUG-24822
Change-Id: I09e04fbcc01b2858c039d22f9600ef201a9a91ab
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Sergio Ahumada [Fri, 9 Aug 2013 11:16:28 +0000 (13:16 +0200)]
test: Adapt to Qt.platform.os rename ("mac" -> "osx")
Marking this test as QSKIP and also updating the JIRA task
Task-number: QTBUG-32650
Change-Id: I9e98024bf50c43f96269c39d779803ae9c46168d
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Lars Knoll [Fri, 9 Aug 2013 12:26:39 +0000 (14:26 +0200)]
Add initial draft of the compiled data structures for JS and QML
To be able to cleanly separate the compilation stage from the runtime,
the compiler will create a read-only data structure, that is described
in this file.
This will later on also allow us to fully compile JS and QML in separate
threads, and longer term replace the qqmlcompiler/vme infrastructure.
Change-Id: Iafe6d527c0994c3bc17ba1630959ffd32cc74067
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 9 Aug 2013 11:59:22 +0000 (13:59 +0200)]
Merge branch 'dev' of git://gitorious.org/qt/qtdeclarative into wip/v4
Change-Id: Iaf5c134e8c6fa27ef17dcf85d8bd5ccd896c7b9d
Simon Hausmann [Fri, 9 Aug 2013 08:06:10 +0000 (10:06 +0200)]
Fix binop related crashes in the interpreter
if (foo instanceof blah) would crash because we generated a BinOp instruction
with a null aluop pointer. Instanceof, in and add are binops that now require
a context, and thus require a different instruction (BinOpContext). This was
already handled by the traditional binop() of the isel, but not by the binop
expression that can be in a cjump. Centralize the code by calling a common
binop helper from isel binop as well as cjump.
Change-Id: I793ee3eebe56db4c86d5399a783a84be3093fd35
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Fri, 9 Aug 2013 10:18:29 +0000 (12:18 +0200)]
Fix invalid condition in comparisson.
Thanks to clang (top-of-trunk) pointing out that the unary not operator
only applies to the left-hand side of the equality expression.
Change-Id: I093b447d55995a4122aeac042a506eb56f8b2442
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Jerome Pasion [Thu, 8 Aug 2013 15:42:48 +0000 (17:42 +0200)]
Doc: Moved QML "plugins" example to "qmlextensionplugins"
The example generates a plugins.html which collides with the
plugins.html from qtbase repository.
Task-number: QTBUG-32580
Change-Id: I47ce9e00378738f7696672e6e47dd3337bb4fafc
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Kai Koehne [Wed, 7 Aug 2013 09:07:40 +0000 (11:07 +0200)]
Fix needless conversion from char * to QString
Converting the strings to UTF-16 unconditionally whenever the library is
loaded is overkill. Anyhow, the literals are only passed to methods also
accepting a QLatin1String, so we don't have to convert at all.
Change-Id: I84e813ac989344bc2e359f340696423766392c93
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Kai Koehne [Wed, 7 Aug 2013 08:43:10 +0000 (10:43 +0200)]
Remove unused local variables
Change-Id: I910c47cd404c0c5c1c324e956927966e834b488e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Simon Hausmann [Thu, 8 Aug 2013 13:30:58 +0000 (15:30 +0200)]
Trivial compile fix for tools/v4/v4
Change-Id: Idc17c13630d3684d9ae280632da1d1403700838e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 8 Aug 2013 12:57:36 +0000 (14:57 +0200)]
Fix tst_qqmlecmascript::scope() and behavioural compatibility with v8 based qml
In the V8 based QML the global object would come _before_ the "QML global object",
which is the QML context (wrapper). We had a bunch of tests that verify the exact
scope chain and with this "compatibility" fix we can re-enable them.
Also fix missing prototype setup for the console object.
Change-Id: Ib3886f2d86472eb752a6ad1a2d8d89709548c5b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Alex Blasche [Thu, 8 Aug 2013 11:41:33 +0000 (13:41 +0200)]
Export QJSValuePrivate
Declarative components of QtLocation require it.
Change-Id: Ie520d3131718c15c0908c784d9486a5674570a54
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 8 Aug 2013 12:17:53 +0000 (14:17 +0200)]
Fix another bug with automatic semicolon insertion
Avoid empty statements after else.
Change-Id: Ia7782a3371bc79c7e93857aa252309d2824a5a9e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 8 Aug 2013 10:52:56 +0000 (12:52 +0200)]
Fix hasOwnProperty on various types wrapped in QML
* Change semantics of Object::query to not walk the prototype chain but let the
caller do that where needed (__hasProperty__)
* Re-implement query in various places
* Implement method_hasOwnProperty to fall back to query() if getOwnProperty failed
* Fix missing prototype initialization in some qml wrappers, as well as missing base
class calls to ::get()
Change-Id: Ic2a702fd5ff3be2ff3c8317a8a24f99940a9594f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Thu, 8 Aug 2013 11:35:17 +0000 (13:35 +0200)]
Clean up some header dependencies
The compiler should have as little dependencies onto
the runtime as possible.
Change-Id: I3e16a55a4920299945ed405926a6851ed947f42d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 8 Aug 2013 11:27:38 +0000 (13:27 +0200)]
The Moth VME is actually part of the runtime, not the compiler
Change-Id: Idcb7a6b6157c58e33192f86750ded487c0e75b9f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 8 Aug 2013 11:17:32 +0000 (13:17 +0200)]
Move the parser folder from src/qml/qml to src/qml
Change-Id: I5e5684f5b98b00f791ade99c4cb6bc2ed880ad6a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 8 Aug 2013 11:02:40 +0000 (13:02 +0200)]
Move the JS Api into it's own folder
Change-Id: I7ef371ff929387097862121b73a7a5863b51ccf1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 8 Aug 2013 10:59:29 +0000 (12:59 +0200)]
Remove outdated notes file
Change-Id: I612e6703616247c754935e43204718ebce7f1cd8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Wed, 7 Aug 2013 11:18:10 +0000 (13:18 +0200)]
Avoid redundant state changes in distancefield text shader
Change-Id: I7efdd167192017acefb4745d433b77b6d0ff85e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Lars Knoll [Thu, 8 Aug 2013 07:58:18 +0000 (09:58 +0200)]
Disable the udis86 disassembler by default
It's only required for debugging the JIT, and thus
shouldn't be included in a regular build. Enable it
with CONFIG+=disassembler
Change-Id: I71264da0be00e8618f120ac9d3d06e6cb4b6dfae
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 8 Aug 2013 07:31:39 +0000 (09:31 +0200)]
Remove the now unused rewriter directory
The qml rewriter is not needed anymore with the
new JS engine
Change-Id: I87fe92eff6e28f6699df6377c1aca5a5b1c92ddd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 8 Aug 2013 07:20:52 +0000 (09:20 +0200)]
Restructure source code
Move the v4 engine classes from a subdir of qml/qml into
two subdirs (compiler and jsruntime) of the qml module
Remove an unsued qv4syntaxchecker class, and move
the moth code directly into compiler.
Change-Id: I6929bede1f25098e6cb2e68087e779fac16b0c68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 8 Aug 2013 06:58:48 +0000 (08:58 +0200)]
Remove the llvm isel backend
This code never worked.
Change-Id: I0fd7421ae983f3ad43e84e5d7579cdbb610ab2b2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 6 Aug 2013 20:55:09 +0000 (22:55 +0200)]
Optimize the JS == operator
Implement the isEqualTo vtable method for
String, and use that to compare strings and
objects in the == implementation in one go.
Change-Id: I823ae5c4ed0683105e7a6fc5b414db92d1766fc4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 5 Aug 2013 21:41:42 +0000 (23:41 +0200)]
Remove context argument from most binops
Change-Id: I4fa2636f1b2c8e8426b64d6e16bc7c223e6f327a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 5 Aug 2013 20:48:35 +0000 (22:48 +0200)]
Speed up JS comparison operations
Remove the not used context parameter where possible, and
simplify the NaN != NaN case.
Change-Id: I05e9639f7bac4bb1db2f33d70f063c71561ffd34
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Richard Moe Gustavsen [Wed, 7 Aug 2013 07:54:07 +0000 (09:54 +0200)]
Enable QtDeclarative for iOS
Change-Id: I44fce954fbe2abd1903991464c0e7f74e840b719
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 7 Aug 2013 08:20:13 +0000 (10:20 +0200)]
Prospective fix for builds in the CI system on Windows machines
Don't check out the test262 module by default, it isn't strictly necessary
at this point and is causing issues on some Windows machines.
Change-Id: I633404f1c00d83dcbdca06a1d287623190323028
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Wed, 7 Aug 2013 08:07:34 +0000 (10:07 +0200)]
Stop the update timer when no windows are visible
Change-Id: Ib9758a99891829d9bec81996687373d08ecfa055
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Sergio Ahumada [Tue, 6 Aug 2013 18:23:59 +0000 (20:23 +0200)]
sync.profile: Point dependencies to an empty string again
Change-Id: Ia39c708722ad99b43d3aa2541eb22524ff819ebb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Sergio Ahumada [Tue, 6 Aug 2013 14:07:23 +0000 (16:07 +0200)]
Merge "Merge branch 'stable' into dev" into refs/staging/dev
Thiago Macieira [Tue, 6 Aug 2013 05:12:40 +0000 (22:12 -0700)]
Remove C-style casts from public headers.
Task-number: QTBUG-32735
Change-Id: I14c313d17b80dce1826290ddd634f449b315190e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Simon Hausmann [Tue, 6 Aug 2013 13:57:54 +0000 (15:57 +0200)]
Merge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative into dev
Change-Id: I278524d0f43d2237201d9cf78c1c36a5ecc83d84
Nico Vertriest [Thu, 4 Jul 2013 12:13:44 +0000 (14:13 +0200)]
Doc: createObject: adapted description of example
Plus language/style edits
Restored brief statement QQmlComponent.cpp
Task-number: QTBUG-32222
Change-Id: I07da54bad3e13f163475ed2a0760e66d50795f6f
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Simon Hausmann [Tue, 6 Aug 2013 09:57:42 +0000 (11:57 +0200)]
Fix some GC related tests to work with MSVC
Using alloca instead of memset we can convince even MSVC to allocate memory on the
stack, to overwrite any previous dead V4 pointers.
Change-Id: Ic01bebfc6368e9c3ce1f6155a0f0ea206b90764c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Michael Brasser [Thu, 1 Aug 2013 17:38:36 +0000 (12:38 -0500)]
Improve memory usage of QQuickTextNode.
The typical number of BinaryTreeNodes needed for a text line should be
much lower than 256.
Task-number: QTBUG-32770
Change-Id: I85aa161eb7cb6e55657213304b7577a0a33f1b67
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Simon Hausmann [Mon, 5 Aug 2013 14:17:09 +0000 (16:17 +0200)]
Skip the date time conversion tests on Windows
There's an issue in QDateTime, now that we're using that in our ECMAScript
date implementation...
Change-Id: I7599900a670097623d1b7e5b9bb086ef43d6e7e6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 5 Aug 2013 14:06:20 +0000 (16:06 +0200)]
Disable some GC sensitive tests with MSVC
We can't get these tests to work reliably with MSVC because it depends on
how MSVC optimizes away memory stores that are "dead" stores for the compiler
but not for our conservative collector.
Change-Id: Ia5ca197573a09358c220d926deccaaf0bacc3a0b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 5 Aug 2013 13:55:45 +0000 (15:55 +0200)]
Fix integer preserving arithmetics with the interpreter
This fixes qqmllanguage and some other auto-tests with the interpreter
When adding numbers, make sure to preserve them as integer if left and
right hand side are integers. We do this now consistently throughout
the runtime by providing fallback implementations of mul/sub/add_int32.
Change-Id: I37e24ce14dc676bb072571b57289965ec59999c1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 5 Aug 2013 13:20:08 +0000 (15:20 +0200)]
Fix line number resolution with the interpreter and try {} catch {}
When re-entering the interpreter for a try block, we use a different code
pointer and therefore need to set context->interpreterInstructionPointer
accordingly. We do that now at the beginning of run(), before we start
interpreting the instructions. When returning from a try block, we continue
using the old "code" pointer and therefore need to set
context->interpreterInstructionPointer back.
Change-Id: I607aef104d5f74bb0c44c6635619c99a6b397bce
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Duncan Cunningham [Wed, 31 Jul 2013 22:12:24 +0000 (17:12 -0500)]
Fix crash in QQmlDebugService::objectForLocationInfo()
Fixed crash in QQmlDebugService::objectForLocationInfo() where it
was using QObject pointers in the object reference id hash
table that had been deleted. Now objectForLocationInfo() checks if
the QObject has been deleted and removes it from the object
reference hash before trying to look up the filename, line number,
and column number.
Change-Id: Iba7be7c490e97a2e7685685b0c6e501cfe1e833e
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Lars Knoll [Mon, 5 Aug 2013 10:38:43 +0000 (12:38 +0200)]
Optimize lookups in the property cache
Change-Id: I0df182a18ab35ad8744fd23243286c7c501cd4a9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Mitch Curtis [Thu, 1 Aug 2013 18:16:58 +0000 (20:16 +0200)]
Support multiple quoted font families in Context2D font property.
Currently, it's not possible to specify more than one font family in
Context2D's font property. Also, any family with spaces in its name will
fail to be read, and quoting the name will also fail.
This patch makes it possible to specify several font families as per
the CSS shorthand font property spec, as well as quoting of font
families with spaces in their names.
Task-number: QTBUG-32727
Change-Id: I2bc1f1d2b7f5f8f0519e73f4001b4a8242bb039c
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Simon Hausmann [Mon, 5 Aug 2013 10:22:27 +0000 (12:22 +0200)]
Fix stack traces into interpreter code
Make sure to initialize the interpreter instruction pointer pointer
before executing byte code.
Change-Id: I57115699923eeeea627d83536b464f29926d443c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 5 Aug 2013 09:13:07 +0000 (11:13 +0200)]
Fix race condition in tst_QQuickFolderListModel::basicProperties
The FLM updates its contents asynchronously using a thread, so before
we query for the new properties after changing the folder, make sure the
thread finished updating.
Change-Id: Icbd72801f639f9dffdc0dd85fbbd8b3ee53fedda
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Jerome Pasion [Thu, 1 Aug 2013 10:36:45 +0000 (12:36 +0200)]
Doc: Updated Qt QML and Qt Quick module pages.
-added \qtvariable
-added Qt QML to the modules group
Change-Id: I524bbcea501b7ab5ea49482de0119e3e6d630065
Reviewed-by: Martin Smith <martin.smith@digia.com>
Albert Astals Cid [Fri, 2 Aug 2013 10:44:32 +0000 (12:44 +0200)]
Allow passing a message to tryCompare
Also adds a check to make sure timeout is a number, for people
that are moving from compare() to tryCompare() and forget of the extra
timeout parameter
Change-Id: I54e56e2014c022e06622edebca1fd36172c75009
Reviewed-by: Yunqiao Yin <charles@mazymind.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Sergio Ahumada [Mon, 5 Aug 2013 08:42:21 +0000 (10:42 +0200)]
Merge branch 'stable' into dev
Conflicts:
.qmake.conf
Change-Id: I06f79bcbde13c7b12905492a17dbcbb4a594e557
Wesley Ceraso Prudencio [Fri, 2 Aug 2013 01:28:41 +0000 (22:28 -0300)]
Fixed wrong Context2d text baseline offset ajust
Fixed wrong Context2d text baseline offset ajust for "middle" and
"hanging" options.
Task-number: QTBUG-32463
Change-Id: Iad0b49bfc2129e008025ea7c6eb9e7d99ac7483d
Signed-off-by: Wesley Ceraso Prudencio <wesleyceraso@gmail.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Yunqiao Yin <charles@mazymind.com>
Rafael Roquetto [Tue, 30 Jul 2013 20:07:48 +0000 (17:07 -0300)]
Fix tst_qquickpath not to use fuzzy compare
On arm platforms, qreal == float. QPointF stores its coordinates internally on
qreal variables (float on arm). When QPointF comparison takes place, a call to
qFuzzyIsNull(float) will ultimately be triggered, causing the test to fail for
some values, because the epsilon of 0.00001f is too small.
In the particular case regarding BB10, the comparison between QPointF(100,
150) and QPointF(99.9999771, 150) is failing because of that.
Change-Id: I53c8cfe7f8a975f6a015e7690702d3e5f05bc2f2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Rafael Roquetto [Mon, 22 Jul 2013 20:40:22 +0000 (17:40 -0300)]
Fix tst_qquicktextedit
- Use showNormal() instead of show() to keep expected window sizes on
fullscreen platforms.
- Use consistent point size for hAlignVisual
- Do not query for QQmlComponent::Loading on remoteCursorDelegate: when a new
connection is established to the test http server, it will setup a single
shot QTimer with a 500ms timeout that will trigger the reply to be sent
back, making the call to sendDelayedItem() obsolete and reduntant. Also, it
means that in some platforms, data will arrive back to the component before
the check for QQmlComponent::Loading is executed, causing the test to fail
since at this point the status will already be QQmlComponent::Ready instead.
Change-Id: I6508c28fa55a1aa2ae5861922701a8c322342380
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Gunnar Sletta [Thu, 1 Aug 2013 14:19:15 +0000 (16:19 +0200)]
avoid redundant calls to glActiveTexture
Change-Id: I00b5c82d76473a10f64f5a3aa0cd19ef88319ed6
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Gunnar Sletta [Thu, 1 Aug 2013 11:34:48 +0000 (13:34 +0200)]
Remove redundant calls...
Geometry ownership only matters when the node is or the entire
geometry object is replaced. Accessing the bits in it can be
done without any issues.
Change-Id: I6da636bc5cdbda03039e00922e599932f4117d1a
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Michael Brasser [Thu, 1 Aug 2013 13:44:27 +0000 (08:44 -0500)]
Avoid using connect in QQuickImplicitSizeItem.
In the past connect has shown up as a noticeable cost in item
creation. Avoid the use here by refactoring to call base class
implementation and emit override signal as well.
Task-number: QTBUG-32764
Change-Id: If3e5a1cc55c113d812705fcfdc7a17aee9d6f51c
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Michael Brasser [Fri, 19 Jul 2013 19:32:17 +0000 (14:32 -0500)]
Fix crash when changing non-cached source of image during animation
Ensure deferred deletions are handled while syncing, otherwise texture
might be deleted after sync but before deferred deletion is processed.
Task-number: QTBUG-32513
Change-Id: Id276f536a5722a36baae815b7b550b574eeeb483
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Gunnar Sletta [Thu, 1 Aug 2013 06:34:20 +0000 (08:34 +0200)]
Remove comment that QQuickPaintedItem is only useful for porting.
Change-Id: I5d4a7917baa7c8f8dd7cfe3f49c6cf4fe5532ac0
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>