Commit Graph

94 Commits

Author SHA1 Message Date
Simon Hausmann 24d0266ee4 Merge remote-tracking branch 'origin/5.9' into HEAD
Conflicts:
	src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
	src/qml/jit/qv4assembler.cpp
	src/qml/jit/qv4assembler_p.h
	src/qml/jit/qv4isel_masm.cpp
	src/qml/jsruntime/qv4context.cpp
	src/qml/jsruntime/qv4context_p.h
	src/qml/jsruntime/qv4engine.cpp
	src/qml/jsruntime/qv4vme_moth.cpp
	src/qml/memory/qv4mmdefs_p.h

Change-Id: I9966750b7cd9106b78e4c4779f12b95a481cca40
2017-03-23 14:43:46 +01:00
Marc Mutz 047af77623 Codegen: do not assume QStringRef(const QString *) is implicit
It won't be for very much longer.

Change-Id: I90fae21b621f104053b776296fc9f6525e8baf52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-22 12:33:30 +00:00
Liang Qi 12e82111ab Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I0ec164ce6e8099e6e4d6b40a3c7340737473ef4b
2017-03-14 10:49:51 +01:00
Ulf Hermann d5d12e1d6f Set source location for all loop body-to-front jumps
Task-number: QTBUG-59204
Change-Id: Id1a73b228cd3386c7fcc7712c2485f387238b65e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-03-07 10:54:46 +00:00
Ulf Hermann c67d33db5b Add a source location to the final Jump in a for loop
Otherwise it will assume the last statement as the location of the
jump, and that might be a statement that is never hit.

Task-number: QTBUG-59204
Change-Id: I66019a284b061358939b23e649ca0832b5442388
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-28 16:33:05 +00:00
Liang Qi afec9016d0 Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I92b13a9c1727644d63e125c1e6f1fdac72720ad7
2017-02-28 13:04:17 +01:00
Erik Verbruggen 72ccc49e66 Remove unnecessary assignment of binop results to temporaries
In many cases, the result can be directly assigned to the left-hand
side. So leave it to the place where the binop is used to decide when
to assign it to a temporary.

Change-Id: I9a88a71a77aa73afe88007eca744d3782fca34ac
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-02-15 10:12:52 +00:00
Robin Burchell bc5cdd23f1 parser: Add "let" keyword (& T_LET)
We also tie this up to the existing skeletal "const" support so that they
are also checked for duplicate declarations.

While we do that, change from using a boolean to an enum so we make the scope of
a declaration a little more easily comprehensible.

Change-Id: I6a6e08aed4e16a53690d6f6bafb55632807b6024
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-03 15:10:25 +00:00
Robin Burchell f36337359c compiler: Rename _env to _variableEnvironment
More in keeping with the spec's terminology, and allows us to introduce
a LexicalEnvironment for ES6.

Change-Id: I1d98387a0ad6372317cf1036f814ac0c6063c1bf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-03 15:10:22 +00:00
Robin Burchell 5f807a6276 Codegen: Disallow duplicate declarations of const properties
Spec 13.3.1.1 (Static Semantics: Early Errors) says:

    It is a Syntax Error if the BoundNames of BindingList contains any
    duplicate entries.

Only let/const are supposed to be treated in this way, so we ensure that
one of them has been marked read-only (since we don't support "let"
yet).

There's still no runtime check on assigning to a constant-declared variable.

[ChangeLog][QtQml] "const" variable declarations now throw a SyntaxError if
multiple attempts to declare the same variable name are found. Note that
"const" is still not fully spec-compliant (i.e. reassignment at runtime is
not disallowed).

Task-number: QTBUG-58493
Change-Id: I31fd5f2bf3e79d48734e8ecb714c4e7f47e31d2a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-03 15:10:18 +00:00
Robin Burchell b63393c7aa Codegen: Disallow const declaration without an initializer expression
This seems to match up with the spec behavior. 13.3.1.1 (Static Semantics:
Early Errors) says:

    It is a Syntax Error if Initializer is not present and IsConstantDeclaration
    of the LexicalDeclaration containing this production is true.

In addition, we also allow "const" to be used in JS mode too. We don't
yet fully support the semantics, but as it's there, why not let it work.

[ChangeLog][QtQml] "const" variable declarations are now available in JS
as well as QML mode.

[ChangeLog][QtQml] "const" variable declarations now require an
initializer, bringing them closer to the required spec behavior.

Task-number: QTBUG-58493
Change-Id: Ife5d5979b3e7a5d7340bf04f43605f847ee25ee2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-02 15:49:13 +00:00
Erik Verbruggen 898f67ca3b Directly assign initializers to variables in variable declarations
.. instead of first assigning to a temporary and then assigning the
temporary to the argument/local.

Change-Id: I15a6c2073b78c5cfc829c7edef07c6bf48be7886
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:47:22 +00:00
Erik Verbruggen 3ca8c880c1 Allow constants in IR as binop operands
There is no reason not to do this, plus it only takes up memory (for
assignment to temporaries) and makes SSA transformation more costly.

Change-Id: I09edbabe6ed50ab1a61b29ebd2ab541bccc95fad
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 12:00:33 +00:00
Erik Verbruggen b07a6cf8c5 Allow more expressions as base/index in IR subscripts
Arguments and locals can be used directly as the base of a subscript,
so they do not need to be assigned to a temporary first. For indices,
arguments, locals, and constants, can be used just fine for subscripts.

This reduces a whole lot of assignments to temporaries when generating
the IR. Although they will be removed in an optimization pass, they do
consume memory for no good reason, and make SSA transformation take more
time.

Change-Id: Ie2af65b66fecee3e140228a9532c9fab08474f5b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-25 09:19:07 +00:00
Liang Qi 79349119c6 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
2016-08-19 21:22:10 +02:00
Liang Qi 5df9fb29e1 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
2016-08-18 09:47:21 +02:00
Simon Hausmann 8b8492d3ff Fix throwing an exception inside a finally block with a return in catch
When exiting a catch block with a return statement, we'll unwind the
exception handling manually and emit finally statements right before
jumping to the exit block. If we throw an exception in the final block,
we'll end up using the exception handler of the catch block that
contains the return statement, which means we'll end up popping the
exception scope one too many times, once through
ScopeAndFinally::CatchScope in unwindException() and then when executing
the exception handler block. The latter we should not be executing,
instead we should jump straight to the exit block. Therefore any
statements emitted as part of the manual exception unwinding (finally
block here) need to be part of a new basic block with no exception
handler.

This bug became visible in debug builds where the Scope destructor
compares the scope mark against the engine stack top to ensure correct
cleanup order (which was wrong). However that in turn was hidden in
debug builds again due to an accidental = instead of == in a Q_ASSERT.

With the Q_ASSERT fixed this use-case is covered by
ch12/12.14/S12.14_A13_T3

Change-Id: Id74a1b2bb3e063871b89cc05353b601dd60df08e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-16 09:18:10 +00:00
Edward Welbourne 74f0d15e08 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/quick/items/qquickshadereffect.cpp
5.7 had a bug-fix in code dev has replaced wholesale.

	src/quick/items/qquickwindow.cpp
	src/quick/items/qquickwindow_p.h
One side changed a method's signature; the other side renamed a method
declared adjacent to it and changed some code using it, moving some
from the public class to its private partner.

	tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
One side added a blank line before a comment the other re-wrote.
Kept the re-write, killed the stray blank.

	.qmake.conf
Ignore 5.7's change to MODULE_VERSION.

	src/qml/compiler/qqmltypecompiler.cpp
	src/qml/compiler/qqmlpropertyvalidator.cpp
5.7 changed code in the former that dev moved to the latter.
Reflect 5.7's changes there, adapted to dev's form.

	src/qml/qml/qqmlobjectcreator.cpp
One side added new QVariant types; the other changed how it handled
each type of QVariant (without git seeing any conflict); adapted the
new stanzas to work the same as the transformed ones.

	tests/manual/v4/test262
dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e

Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
2016-08-02 18:34:30 +02:00
Liang Qi 6839f03051 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
	tests/auto/quick/qquickitem/tst_qquickitem.cpp

Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
2016-08-01 13:14:04 +02:00
Erik Verbruggen 06ed1ad17a JS: Check for errors before using sub-expression results
Specifically: don't de-reference a result and assume that it's not-null.

Task-number: QTBUG-54687
Change-Id: If07d3250a95a7815ab7a3262b88e0227965ef8e7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-07-20 10:36:58 +00:00
Erik Verbruggen 9ab8b9e4bd QML: Do not register static QML dependencies on every call.
QML objects can be re-parented on the fly, resulting in different
dependencies for expressions like 'parent.width'. So, because of this,
dependencies are cleared and re-calculated after every binding
evaluation.

However, dependencies on properties of the scope and context objects
cannot change, because these objects do not get changed for the
life-time of a binding. So we can permanently register them. This is
only done for bindings, not for functions, because those might be
conditionally executed.

According to valgrind, this is a reduction of ~186 instructions on x86
for every evaluation of:
Item {
    height: width
}

Change-Id: Ib095497323d4f08caf712d480007e2627a176369
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-06-24 07:51:08 +00:00
Liang Qi 4d2f743baa Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp

Change-Id: I26d6435a29cac3840bb567ade5149c2562a94bf9
2016-06-13 19:06:06 +02:00
Liang Qi 0932a59971 Merge remote-tracking branch 'origin/5.6' into 5.7
Part of 0e053528 was reverted in the merge, about lastTimestamp. It
will be applied later in separate commit.

qmltest::shadersource-dynamic-sourceobject::test_endresult() was
blacklisted on linux.

Conflicts:
	.qmake.conf
	tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
	tests/auto/qmltest/BLACKLIST
	tests/auto/qmltest/qmltest.pro

Task-number: QTBUG-53590
Task-number: QTBUG-53971
Change-Id: I48af90b49a3c7b29de16f4178a04807f8bc05130
2016-06-10 10:06:39 +02:00
Simon Hausmann 6d54a59bd7 Fix crash when using with statement with an expression that throws
We need to evaluate the expression for the "with" statement that is supposed to
define the new scope _before_ opening up the scope, otherwise - when the
evaluation of the expression throws an exception - we'll try to pop the "with"
scope we couldn't open in the first place.

[ChangeLog][QtQml] Fix crash when using the "with" statement with an expression
that throws an exception.

Task-number: QTBUG-53794
Change-Id: I7733f5a4c5d844916302b9a91c789a0f6b421e8a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-07 07:07:15 +00:00
Erik Verbruggen 12462cf55a V4: Replace foreach loops with range-based for loops.
Change-Id: I8b3b33af1f01f1f2559e82e210375935b5fee00e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-05-31 15:26:59 +00:00
Anton Kudryavtsev 71888aa3a4 Qml: replace QStringLiteral with QLatin1String
... in string comparisons. It's more efficient.

Change-Id: I3be5a2be9ba5d55546472eac28f5f639a496bf3b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-02-10 11:17:37 +00:00
Jani Heikkinen 45bd04ba73 Updated license headers
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)

Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-19 14:53:18 +00:00
Simon Hausmann 9556f6d075 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/qml/jsruntime/qv4engine_p.h
	src/quick/items/qquickitemsmodule.cpp
	src/quick/items/qquicktext.cpp
	src/quick/util/qquickpixmapcache.cpp
	tests/auto/quick/qquickwindow/tst_qquickwindow.cpp

Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
2015-06-04 10:28:48 +02:00
Simon Hausmann 1648c166db Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: Ie8ea118ed0a1a9a1c3d81e1e34d85c03c695c9a4
2015-05-04 10:20:49 +02:00
Simon Hausmann 2fdb6eba0a Fix passing of locals as function arguments with side-effects
Commit 75c22465cf regressed in allowing
locals and arguments to be passed directly as further arguments to function
calls, but that's incorrect when considering

    var i = 2;
    testFunction(i, i += 2)

where it is instrumental to place the first argument into a temp (making a
copy) instead of passing it directly.

Change-Id: Iffcf6c6eda92a8fb665982cda1db0b96359cd092
Task-number: QTBUG-45879
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-30 15:57:19 +00:00
Lars Knoll 0a499043fb Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.h
This is a cleaner separation and further reduces include dependencies
in the definitions of our basic data structured.

Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-24 15:20:43 +00:00
Lars Knoll 3dd0a2328c More cleanups in qv4value_p.h
Change-Id: Ie48dc8f95daa4738e690902b5d33010afa7b974f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-24 15:20:28 +00:00
Lars Knoll d1c5f134bd Don't evaluate the expression in switch() multiple times
The old code would evaluate the expression in the switch
statement once for every case label. This is not only slower
than it should be, but can also lead to unexpected results in
case the expression doesn't always evaluate to the same value
or has side effects.

Task-number: QTBUG-41630
Change-Id: Id93baca7e3aa09ce884967ef6524d4c4f055bcd6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-11 08:23:10 +00:00
Friedemann Kleint 5163c11952 QtQml: Micro-optimize iterator loops.
Avoid repeated instantiation of end() in loops, use variable instead.

Change-Id: I3bb1c6918cfd16a5dcefbcc03c442e99fe9bf76b
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-26 15:13:34 +00:00
Jani Heikkinen c5796292ad Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
2015-02-12 10:28:11 +00:00
Robin Burchell 42aba3076d QQmlJS::Codegen: Short circuit in qmlErrors to avoid QUrl allocation costs.
This takes the time taken in qmlErrors for my (admittedly terribly morbid)
testcase from ~104ms to ~1ms.

Change-Id: I288086caa6e6b58f67e9feb6f1761c3310f01ead
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-12-20 11:07:02 +01:00
Lars Knoll 1b97c612e6 Remove ExecutionContext from the Runtime codegenerator
Change-Id: Ic62ae1cbd24c0089e0df6bc6758d262cf49d0b91
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-15 13:16:14 +01:00
Lars Knoll 486948817b Move the throw methods from ExecutionContext to ExecutionEngine
The methods don't require a context, and thus shouldn't be
implemented there.

Change-Id: If058e0c5067093a4161f2275ac4288aa2bc500f3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-04 20:17:54 +01:00
Jani Heikkinen e7ceacda70 Update license headers and add new licenses
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-08-25 11:28:46 +02:00
Erik Verbruggen 068e360994 V4: add more line number information.
Change-Id: Ibd3e747918dc0bc939fcbd173585fb1e4d4f08fb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-08-08 10:45:21 +02:00
Erik Verbruggen 6333e0913f Add support for conditional breakpoints and evaluate.
Also centralized the context state saver and added line number saving, so that the
JS jobs for evaluation of breakpoint conditions don't change the state of the current
engine context.

Task-number: QTBUG-37119
Task-number: QTCREATORBUG-11516
Change-Id: Ia21b3d64e239e5b67f3c07e1c006d8e6748f29b6
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-08-08 10:45:12 +02:00
Erik Verbruggen 48dcabdb6f V4 IR: (natural) loop detection.
We perform loop detection to be able to assign to each block its loop,
an chain them up from inner loop to outer loop. The new algorithm works
on each basic block just once, and looks at a basic block just the
number of connections it has. As it relies on the dominator tree it is
more robust on actually finding al looping constructs and only those
rather than relying on the statements used. It assumes that a basic
block is analyzed before the one that dominate it (to guarantee finding
outer loop headers before inner loop headers), so blocks are ordered to
work on them in a way that guarantees that, using dominator tree depth,
that is trivially available.

Loop detection allows us to then schedule the loop body before the part
after the loop (the header dominates both so just domination cannot
choose between both), and can be used to optimize loops (either
unrolling the first iteration or hoisting constant parts out of it).

It also helps with generated JavaScript code: in order to simulate gotos
or other unconditional branches, nested labeled do-while(false) loops
are often used in combination with break/continue to "jump" between
"loops".

Change-Id: Idfcc74589e057b191f74880ffd309d0a9c301811
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-07-04 09:39:38 +02:00
Erik Verbruggen 75c22465cf V4: Split arguments/locals from temps.
There are a couple of reasons to split the temporaries off from the
arguments and locals:

Temporaries are invisible, and changes to them cannot be observed.
On the other hand, arguments and locals are visible, and writes to them
can be seen from other places (nested functions), or by using the
arguments array. So, in practice these correspond to memory locations.
(One could argue that if neither nested functions, nor eval(), nor
arguments[] is used, the loads/stores are invisible too. But that's an
optimization, and changing locals/arguments to temporaries can be done
in a separate pass.)

Because of the "volatile" nature of arguments and locals, their usage
cannot be optimized. All optimizations (SSA construction, register
allocation, copy elimination, etc.) work on temporaries. Being able to
easily ignore all non-temporaries has the benefit that optimizations can
be faster.

Previously, Temps were not uniquely numbered: argument 1, local 1, and
temporary 1 all had the same number and were distinguishable by their
type. So, for any mapping from Temp to something else, a QHash was used.
Now that Temps only hold proper temporaries, the indexes do uniquely
identify them. Add to that the fact that after transforming to SSA form
all temporaries are renumbered starting from 0 and without any holes in
the numbering, many of those datastructures can be changed to simple
vectors. That change gives a noticeable performance improvement.

One implication of this change is that a number of functions that took
a Temp as their argument, now need to take Temp-or-ArgLocal, so Expr.
However, it turns out that there are very few places where that applies,
as many of those places also need to take constants or names. However,
explicitly separating memory loads/stores for arguments/locals from
temporaries adds the benefit that it's now easier to do a peep-hole
optimizer for those load/store operations in the future: when a load is
directly preceded by a store, it can be eliminated if the value is
still available in a temporary.

Change-Id: I4114006b076795d9ea9fe3649cdb3b9d7b7508f0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-05-23 12:23:32 +02:00
Frederik Gladhorn b78372c4ba Merge remote-tracking branch 'origin/release' into stable
Change-Id: I996a85744753598bb48c7e0d7954049202f4f037
2014-05-01 12:44:51 +02:00
Simon Hausmann a885d10a02 Extend the QML bootstrap library by the IR builders
This is among other things needed to fix the qml import scanner to detect
dependencies from .js files correctly.

The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT
where appropriate and corrects the wrong include path for the double conversion
code to actually be relative to the file it is included from. This worked by
accident because of other include paths present in the build.

Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-23 21:16:46 +02:00
Jani Heikkinen 7d16c2f40a Merge remote-tracking branch 'origin/release' into stable
Change-Id: I1214586499ab2876c8bc55a99367a0c938c8b919
2014-04-23 12:44:14 +03:00
Erik Verbruggen 377aeea46c V4 IR: clean up basic-block management and statement access.
BasicBlocks have an index property which points to the index of that
basic block in the container array in Function. This property can be
used to store calculated information about basic blocks in a vector,
where the vector index corresponds to the basic block index. This is
a lot cheaper than storing any information in a
QHash<BasicBlock *, ....>.

However, this numbering requires that no re-ordering or deletion of
blocks happens. This change cleans up all that handling which was
scattered over a number of places.

Change-Id: I337abd39c030b9d30c82b7bbcf2ba89e50a08e63
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-04-15 15:31:23 +02:00
Erik Verbruggen de11a78c62 V4 IR: only mark blocks after iterator calculation as loop blocks.
When the iterator calculation contains a condition, newly created
basic-blocks were marked as loop blocks. However, their parent was not
the loop header.

Task-number: QTBUG-38187
Change-Id: I9ee7a3e0bd536c2a005b91f8333931ce929245af
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-04-12 08:03:16 +02:00
Sergio Ahumada e525b727f2 Fix some typos
Change-Id: Iea540b768232ea423ea7f04e41655198931cf36d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-03-03 17:39:17 +01:00
Simon Hausmann c78d1052c2 Clean up object literal handling with integral indices
* Object literals with array indices are now created with one
  run-time call, instead of an initial one for non-integral keys
  followed by sub-sequent define_builtin_property calls.

* Cleaned up propert name retrieval. Instead of using a visitor,
  it's easier to define a virtual method on the PropertyName type.  The visitor
  doesn't buy us much as it's not possible to recurse within property names, and
  this way we can use it also from the function scanner to correctly determine
  the number of arguments needed for object literal initalizations.

* Similarly the duplicated/common name member for all property assignments
  has been moved into PropertyName, for convenient access without AST casts.

* Removed now unused builtin_define_property/settergetter functions from IR,
  run-time and moth.

Change-Id: I90d54c81ea5f3f500f4f4a9c14f7caf5135e7f9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-24 20:41:40 +01:00