| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qv4compilercontext.cpp
src/qml/qml/qqmlmetatype.cpp
Change-Id: I02e0216961b92ff68a3f91a70edc33fe9e8db147
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 2beb77c81a1f3585c15099a09ba8b2192c6da824.
To optimize lookup in case of heapObject we cast its value to Object.
This unfortunately does not work well when the value type of heap object
is actually a string.
Task-number: QTBUG-75335
Change-Id: I55d7c9e0d41f3be617ca7141a4121de3a56f8eef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qv4compileddata_p.h
src/qml/jit/qv4baselinejit.cpp
src/qml/jit/qv4jithelpers.cpp
src/qml/jsruntime/qv4lookup.cpp
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4runtimeapi_p.h
src/qml/jsruntime/qv4vme_moth.cpp
src/qml/qml/qqmltypemodule_p.h
Change-Id: If28793e9e08418457a11fc2c5832f03cab2fcc76
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Suppose we have
function foo(x) { return x.constructor; }
and we call it first with
foo("hello")
then the lookup will be initialized with a primitive getter from the
prototype.
When we subsequently call
foo(new String("world"))
then the primitiveGetterProto() will check that the provided object is
of the same type as last time, which erroneously succeeds. Indeed, both
are of Managed type. However now we're passing a full-fledged object,
which is not a primitive anymore - hence the additional check to ensure
that we fall back to the generic getter.
Task-number: QTBUG-69898
Change-Id: I3c7a8384bfdf0e31b7c6247cce80fe7448b627b3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows sub-classes of Object to have their own lookup resolution
and verification logic, instead of squeezing it all into qv4lookup.cpp.
The typical fallbacks are still in qv4lookup.cpp though.
Task-number: QTBUG-69898
Change-Id: I32a8884982b37e2065090666a7bf05b198f5b7fd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The setter0Inline would do the index to offset calculation each time
it was called, while getter0Inline would do it once when creating the
lookup. Same for setter0Memberdata. Both setters now mirror the behavior
of their getter counterparts.
However, getterTwoClasses is more sophisticated than setterTwoClasses,
so there we still use the existing setter0setter0, but restore the
uncorrected index back into the two-class-lookup.
Change-Id: Ide29d0304e840b2e09d65bdfc216fa8da08d69dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
This is required, so we can get rid of the requirement that
getter and setter live next to each other in the member data.
Change-Id: I2ed57a171628af4dfecd1836d00e958c6bed9d4f
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
| |
Specialize find() into several methods for different purposes.
Prepares for further cleanups and being able to split up
getter and setter for accessor properties.
Change-Id: Id4ec5509ac1a1361e2170bbfc2347b89b520c782
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: Ia8dfe95d6a51a8645ece983e050bf27d868715f8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
In strict mode, this should throw a type error and not do
an implicit toObject conversion.
Change-Id: I7b8cdf1125978b9d9a047d9da84f23b547cb4a75
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
identifier -> asPropertyKey
Change-Id: I4e6f33bdad12e901303ec6101dd2b8d6b0e99ac4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of makeIdentifier(), as toPropertyKey() will take
care of it.
Rename identifier() to propertyKey() and check that the
key is valid.
Remove String/StringOrSymbol::asArrayIndex(), we don't need it
anymore.
Change-Id: I3c490fabc1475c9ea288b49b1638b6fa1bc237b7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Change all uses of Identifier to use the new PropertyKey class
and get rid of Identifier.
Change-Id: Ib7e83b06a3c923235e145b6e083fe980dc240452
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This finalizes the refactoring of Object's vtable API. Also added
the receiver argument to the method as required by the ES7 spec.
Change-Id: I36f9989211c47458788fe9f7e929862bcfe7b845
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
These can now happen through destructuring expressions, so add
proper support for those.
Change-Id: I3fdd4e9903ab851a5c4f5c1b64ab4e991ba7d8c1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Added basic infrastructure to create symbols and convert them
back to strings. In addition, storing and retrieving of symbol
based properties in Objects works.
Change-Id: I185f7aa46e7afa19db5a801102142892e03b7bf1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This is required, so we can also use Symbols in
the internal classes.
Change-Id: I630e7aa7b8b16d5a94041f8d18515fd582f94264
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ib25c08027013217657beb2675dafa9a8c85cbaf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Do this by always using odd numbers for protoId's, and
putting those into the same place as the InternalClass
pointers. That makes it possible to quickly check whether
the lookup contains a pointer to a valid heap object.
Change-Id: I330017b26c090b4dcbbcce1a127dca7ba7e148d1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
It really identifies the 'revision' of the prototype chain
that is being used with this internal class.
Change-Id: Id5829c055cde2c1a2ca1032a7e831b3f0428774e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Internal classes are now allocated and collected through
the GC. As they are important to the deletion of other
objects (because of the vtable pointer living inside the
internal class), they need to get destroyed after regular
objects have been sweeped. Achieve this by using a separate
block allocator for internal class objects.
Our lookups do often contain pointers to internal classes,
so those need to be marked as well, so we don't accidentally
collect them.
Change-Id: I4762b054361c70c31f79f920f669ea0e8551601f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ifd3fbc128f0ff30458912c65429bcf6f577204a0
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: I7f3acf96e998a41d60d33f98b243089b9ee40ff0
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: Id443245ee9f02af48abbf5ba4811ac69ad409059
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: I1c2c3242f2a48e4e75b66b187127fcd362cd61c6
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Use the new id of InternalClass to simplify out lookup code
for getters. Now all lookups in the prototype chain can be
done at the same speed independent of the depth within the
prototype chain with only two checks.
Change-Id: I7d8451cc54c0ac50c1bcb4ae3bf386fd5f2a84aa
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
| |
Precalculate the offset inside the object.
Change-Id: I61faf463677fe9602fe235a39dcf9e16c5d013cd
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
| |
Avoid allocations on the JS stack if possible
Change-Id: I344cd6dceb6264314f9d22c94db22b22d1d24d14
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: Ic53532edae9a209aa7125af6f00a9d993d74f1a3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
| |
Change-Id: I6b99e9a7102b3dcb6a7699f54b6456eba6248699
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
| |
As, this is going to change in a simple stack based structure
to keep pointers to the data to pass to calls.
Change-Id: Ia9aa3f81ee3eeba36affd16aac7b2fe97d59aea9
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
| |
Renamed ScopedCallData to JSCall, enforced passing a JS
FunctionObject to it, and added call() and callAsConstructor()
methods to it.
Change-Id: I30db65c9765c2896b5909fe2105c0934c6dad861
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I9ae42aa7a811aa93fe0950725e9d253a0c5e8dba
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
Change-Id: Iff06429f948ac6cdec77a9e5bb8c5375c56fe705
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qqmltypecompiler.cpp
src/qml/jsruntime/qv4qmlcontext.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqmlcustomparser.cpp
src/qml/qml/qqmlimport.cpp
src/qml/qml/qqmlimport_p.h
src/qml/qml/qqmlmetatype.cpp
src/qml/qml/qqmlmetatype_p.h
src/qml/qml/qqmltypenamecache.cpp
src/qml/qml/qqmltypenamecache_p.h
src/qml/qml/qqmltypewrapper.cpp
src/qml/qml/qqmltypewrapper_p.h
src/qml/qml/qqmlvmemetaobject.cpp
src/qml/util/qqmladaptormodel.cpp
Change-Id: Ic959d03e6f9c328fb02710d9abbb0f27cddde131
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allocate the strings in the compilation unit as regular strings, not as
identifiers. We mark the runtimeStrings in the compilation unit, so when
the unit is released as part of component cache trimming, those strings
can also be collected. The JS object literal class keys have to remain
identifiers though.
However this is just a stop-gap as the real problem is that the
identifier table can be triggered to grow without bounds.
Task-number: QTBUG-61536
Change-Id: I7a2854b7fa9c9953348b5e34a31833f7be67cfbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This cuts out quite a bit of overhead when entering
and leaving functions.
Change-Id: I32670c98a4087ea3b2d45853d9cabff9066399e8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead do it in the VME, where we can then easily separate
into throwing and non throwing versions by bytecode.
Change-Id: Ie63bd5b3610bb85f26fb8979179b2e239876cd97
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The indexed getters and setters haven't been used for a while and
don't offer any performance benefits currently.
Change-Id: Ifd5e1fab934e6e9940c4f1ad67f8850f04597504
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change those back again to return a value. This will be required
to avoid creation of Scope objects between JS function calls.
Change-Id: I05cb5cf8fd0c13dcefa60d213ccd5983fab57ea3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
And change the signature for VME::exec to take the QV4::Function
that should be executed. This is in preparation to being able
to run functions that will not need to allocate an execution
context on their own.
Change-Id: I34538a8723006f4ec24583805e88a66e750100c3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/qml/jsruntime/qv4argumentsobject.cpp
src/qml/jsruntime/qv4arraydata.cpp
src/qml/jsruntime/qv4context.cpp
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4errorobject.cpp
src/qml/jsruntime/qv4functionobject.cpp
src/qml/jsruntime/qv4internalclass.cpp
src/qml/jsruntime/qv4lookup.cpp
src/qml/jsruntime/qv4managed.cpp
src/qml/jsruntime/qv4managed_p.h
src/qml/jsruntime/qv4object.cpp
src/qml/jsruntime/qv4object_p.h
src/qml/jsruntime/qv4qmlcontext.cpp
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4vme_moth.cpp
src/qml/memory/qv4heap_p.h
src/qml/memory/qv4mm.cpp
src/qml/memory/qv4mm_p.h
src/qml/memory/qv4mmdefs_p.h
src/quick/scenegraph/util/qsgdistancefieldutil.cpp
src/quick/scenegraph/util/qsgdistancefieldutil_p.h
tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
Change-Id: I7ed925d4f5d308f872a58ddf51fdce0c8494ec9c
|
| |
| |
| |
| |
| | |
Change-Id: I1f4f4aaad0c8194bce2ebde4503df38cab0990a2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This saves another pointer on all Objects.
Currently introduces a slight performance regression
on some of the v8 benchmarks, that needs addressing.
Change-Id: I87de8e1d198d2683f4e903c467ce2a60ba542243
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I3f6ae59d01c7b6c898e98d3b6f65b84a19b8851a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add some more optimized lookups for accessing
properties stored inline or in the memberData.
Change-Id: Id74901d1dd91fd60933bf164c2bf90fed86232e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It turns out that not using any inline property storage
comes at a relatively high price in terms of memory
consumption, as we always need to also create a
memberData for any object.
This avoids the memberData creation in quite a few
cases, as we use the additional padding we have up
to the 32 byte boundary given by the memory manager
to store some property data.
This complicates property access somewhat. To avoid
performance regressions because of this, add specialized
QV4::Lookup functions that optimize for properties that
are inline or in the memberData struct.
Change seems to be performance neutral on v8-bench on
x86_64, but reduces peak memory usage when running the
benchmark by around 20%.
Change-Id: I0127d31a2d6038aaa540c4c4a1156f45ca3b7464
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement a Steel write barrier for our objects. The barrier is
interesting as it can also be used for incremental GC runs by
simply turning the barrier on and leaving old objects marked as
black.
Change-Id: I0b273974d94a990dee3cd9298089b8b202c75bf2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I2e46100fe72fd83b36b3195130eefce5289d1627
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is required, so we only have to add the write barrier
in one place.
Change-Id: I4e8bde823b30ad18f043312ac3f1ed46597b91a7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|