| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This was missing from f21e8c641af6b2d10f0d7e7e0fc6a755dab3673c.
Task-number: QTBUG-48524
Change-Id: I5cc6a979d965a1ef6b7fbc916a7ca9df868b459a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-48594
Change-Id: Ifc207938de7f0c8995fc712df92665f222612647
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
|
|
| |
This brings us one step closer to getting rid of the
QQmlContextWrapper.
Change-Id: Ied57f4c174c2ebd95096310a4ad4c0c28787e7a4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
And get rid of another temp in the IR.
Change-Id: I039393e020e5141f1986aee276246c30fd8057f3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Add some runtime methods to access properties of the scope
object directly (using the QmlContext), and generate proper
code to call those.
Change-Id: I0b29357c9a3b9ad53ba568ec6cb763e8ecb10f21
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our generated code (JIT and interpreter) should operate on the
QML context to retrieve QML related things. That's better than
operating on 4 different temps.
So this commit introduces the QML context as a temp in the
code we generate for QML. The next commits will move things over
to use that context with specialized runtime methods instead of
using generic subscript/get calls on the different subobjects.
Change-Id: Ia05cf339de9cdd23003f35cf78ede17d2590f8de
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
| |
Change-Id: Icbdf06a077014db5dd57cba42f84591433ec4196
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Move all our runtime methods into the QV4::Runtime
struct and give them nicer names without underscores.
Sort them logically and remove a few unused methods.
Change-Id: Ib69b71764ff194d0ba211aac581f9a99734d8180
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
This unifies the way we handle line numbers in the
JIT and Interpreter.
Remove the now unused lineNumberMapping code and data.
Change-Id: I1d60b1fbb77e70b531fa73d93410683e84dd1e3c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only store a Hash of break points in the debugger,
instead of the involved logic that currently adds and
removes break points. Add the current line number to
the Debug statements in the interpreter, and pass them
on to the debugger for checking whether we should really
break.
This adds a slight additional overhead to running inside the
debugger, but greatly simplifies the logic and doesn't require
modifying the bytecode anymore. This in turn opens up the
possibility to run the debugger on JIT generated code later on.
Change-Id: If2a3ae8f8d08b69a3a704cbbe0a84000f917a32e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
compile time
Change-Id: Ieb7f6ee97a4f251f1e2369850ebb9e2931f84ac1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
| |
QQmlJS::MASM -> QV4::JIT
QQmlJS::V4IR -> QV4::IR
Change-Id: I707e8990459114a699c200fe3c22cec3c8df1afc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
See 612785f39e325b0578be89e09b0e32d7d08d471e for details. The warning is
exactly the same as before, with the exact same solution as before.
Change-Id: I2f6cbc64234696f1d240611f376ab5daf8d0f89c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
These instructions did hurt more than help, as they converted
ints to doubles. Since the regular add/sub/mul runtime methods
have fast paths for both ints and doubles, we're better off
using those instead.
Change-Id: I0b7a6f95818943bfc8a0669c1c56f7db4e7246e0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This avoids the bool invert in the instruction
stream, and some additional code in the VME.
Change-Id: I0ea675a2e3d07c1b8c5234b888d8d9683bcee330
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
These give a measurable speedup as the critical code
paths are now inline.
Change-Id: I3cee8a432fbe96d66ba1e6bd277a38e624a50c14
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
This simplifies and speeds up loading of constants
Change-Id: I05b4f7a34abd4ed6416fa800a31debbb28b37104
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoid having to check for the debugger at every instruction
we execute. Instead we only add debug instructions at the beginning
of every line and every basic block when we have a debugger.
This still allows interrupting the JS execution at any time (as we
can't loop inside a basic block), and single stepping through lines.
But it has no overhead when the debugger is not running and a lot
less when it is running.
Change-Id: Ib17170b42944b608fc6caa1891082205dd2b2763
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
| |
Significantly speeds up crypto.js
Change-Id: Icd3d59bea3fe4427e93e9e10e3526178e8de859c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename qv4value_def_p.h -> qv4value_p.h and qv4value_p.h to
qv4value_inl_p.h.
It makes more sense to have the class definition in the file
that is named after the class and move the inline methods into
a _inl file. Doing this now, as I expect we'll be needing a few
more _inl files soon.
Change-Id: Ib59e9380e9e976254c6b4369574157f39b1b5f51
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
remove trailing spaces and expand tabs
Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* Resolve lookups in namespaces at compile time and instruct the SSA optimizer
to eliminate reads from the namespace (QQmlTypeWrapper) if possible. For example
access to attached properties of types (i.e. MyNameSpace.ListView.isCurrentItem)
requires neither reading the namespace nor the type.
* Add support for accelerated lookup of attached properties
Change-Id: Ib0b66404ed7e70e1d4a46a1ac8218743a4cc8608
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
With this patch we determine the meta-object of singletons, propagate it into
the IR and load them separately using a dedicated run-time function. In
addition enums in singletons and QML types are resolved at compile time.
Change-Id: I01ce1288391b476d1c9af669cb2987a44c885703
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
...instead of a special MEMBER type. This allows removing the
type member from V4IR::Member altogether (and thus unshadow from
V4IR::Expr::type). By not requiring the base of a id lookup
member expression to be a NAME, we can also speed up repeated
id lookups by fetching the id object array wrapper only once
per function.
Change-Id: I3e9b8f498d32ace4a0cc2254f49e02ecc124f79c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
This is not used that often, but it removes one more place
where we do lookups by name.
Change-Id: I9f798b8b4a64be3fdf3e53090e4288724c9d2b22
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous approach of collecting the dependencies through an IR visitor
doesn't work, because it relies on a fixed structure - for example MEMBER(NAME,
prop) - which we can't guarantee (it's usually MEMBER(TEMP, prop)). But it
turns out that we can only pre-calculate dependencies for context, scope or id
properties, so we can do that right away in the QML specific JS codegen, store
that information in the IR function and use it from there in the data structure
generator as well as in the isel as a parameter to getQObjectProperty to tell
the run-time whether capture is required or not.
Change-Id: I33711c3420d6534c653c2a6a4284f0fc12e941cf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a non strict mode function uses the this object, we
need to make sure it's being correctly converted into a
object before being accessed. So far this was being done
by ScriptFunction::call. Move this into the generated code to
avoid overhead for methods not using 'this', and simplify our
ScriptFunction::call() implementation.
Change-Id: I739f4a89d29ed8082ce59e48d1523776224fc29d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
The QQmlContextData stores the JS objects of imported scripts in a
QList<PersistentValue>. Instead of indexing into that list, this patch changes
ctxt->importedScripts to be a JavaScript array, that in the IR we can index via
subscript.
Change-Id: Ie2c35fb5294a20a0b7084bb51d19671a27195fec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
We can resolve the use of names that refer to imported scripts at compile
time and load them at run-time by index through context->importedScripts.
Change-Id: I681b19e7d68dbf3b9a68af00b4cea2a9254c2d78
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
After the resolution of a property, we can set it by index at run-time instead
of via name resolution.
Change-Id: I479599dabe343cf9e6582dcda12291aebfcce418
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
objects at QML compile time
This avoids having to do a string lookup for ids and in the import cache at
run-time, before we can do a string hash lookup in the property cache. Instead
we resolve final properties in the context and scope object at compile time and
look them up at run-time using their index instead. The dependencies to these
properties are also tracked separately and recorded in the compiled data.
This is merely the initial patch. There's a lot left to do, such as having
specialized getter and setters for specific property types. Setters are missing
altogether right now and will fall back to name lookup.
Change-Id: If3cb4e7c9454ef4850a615f0935b311c9395b165
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement lookup calls for the interpreter. This
significantly reduces overhead by avoiding repeated
name lookups on the same object type.
This doubles the speed of quite a few of the v8
benchmarks, and brings the interpreter up to close
to 40% of the speed of the JIT.
Change-Id: Ie8c2f5b1ca71a7329bc643c3d2158a6301a392ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Optimize unops for ints/bools and add some
special binops where one side is constant.
Change-Id: I4f5639e36458560e5614371733abaafd94909ab1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
This gives another 10-15% for v8-bench
Change-Id: Iaea90402179813af23008c35d344fa7f5353cf5f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can resolve lookups for objects referenced by id at QML compile time
and use a run-time helper to extract the id object out of the QML context
data by index instead of name.
Dependencies to id objects are also tracked at compile time and registered
separately before entering the generated function code.
The lookup of id objects is encoded in the IR as special member lookups.
Members will also then in the future be used to for property lookups in context
and scope properties, as well as any other property lookups in QObjects where
we can determine the meta-object.
Change-Id: I36cf3ceb11b51a983da6cad5b61c3bf574acc20a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I6e141a425c2b4cc0cd64c7f0011e7028b9147f69
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Get rid of the parameter type, and only store a
scope, that is an index into a SafeValue ** array.
This significantly speeds up loading and saving of
parameters.
Change-Id: I185145f1afd0b8cea461c7ca732ada3ebe39c34c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
With the constant table this is exactly the same as a move.
Also renamed MoveTemp to Move, as it not only moves Temps
but also other variables.
Change-Id: I1fccc04314661954179d903519adbc39777395e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
This makes it possible to remove the Value stored as
part of the instruction stream. Reduces the size of the
instruction stream and will allow to optimize Param lookup.
Change-Id: I23dab5dbed76bf8d62df7042934064d4676bc43d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Add the required instructions and check for
exceptions in the engine before storing any
results.
Change-Id: Ibfaf904d659859e8012920270825211ba202c63d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start the work to remove c++ exceptions from our JS
exception handling. Rather rely on engine->hasException.
Check the flag after we return from any runtime call in the
JIT.
Implement new try/catch handling code in qv4codegen and
for the JIT that doesn't rely on exceptions. As an added
bonus, we can remove the Try statement in the IR.
Change-Id: Ic95addd6ae03371c43c47e04cac26afdce23a061
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I5044acd4263b71734e4eb5d7e74b1a4a8414741e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I889e760f75b485a28e1f2a2c26b2337ae9bfafac
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Inplace operations are expanded when building the IR, so the neither the
IR, nor the instruction selection backends or runtime need to handle
them.
Change-Id: Id01f9544e137dd52364cf2ed2c10931c31ddfff3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Add scheduling for moves generated by removing phi nodes by re-using the
MoveMapping class from the register allocator. This change applies to
both the JIT when no register allocator is used, and the interpreter.
Change-Id: I38eac5b13759c7790132d1ef07fa17fcb53187e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
We generate lower level code in codegen and don't use these
runtime methods anymore.
Change-Id: If1023ce5295431305f4528839bcf2a3031fa7ad2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Like this we can hand the CallData through the runtime methods
without any need to modify them. This simplifies the code in there,
and should also speed them up to some degree.
Change-Id: Ibd92ff4a8f279a5c4a054c5678646f658cfed5ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|