| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The added side effect is that the QJSValueIterator is now
somewhat faster.
Change-Id: I01ba9f2a72a34224f5691130df69a91ab75b72e6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
hasProperty is now implemented by calling hasOwnProperty
on the proto chain. In addition, it should be slightly
faster and doesn't use API that returns a Property pointer
anymore.
Change-Id: I6312d83ccfed3f0a1a8ec4c72c436a426d6eab44
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Methods returning a Property pointer have to be removed, so that
we can move over to store member data requiring only one value for
the common case of data properties.
This will in the long term reduce memory consumption on 64 bit
systems quite a bit.
Change-Id: I78de3794ec7b3bc5db13aa57275d3f08fa9d470a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Split up ArrayData into two classes, one for regular
arrays, one for sparse arrays and cleanly separate
the two cases. Only create array data on demand.
Change-Id: I9ca8d0b53592174f213ba0f20caf93e77dba690a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This allows us to remove more getOwnProperty calls. This will
be required later on to extend our array handling.
Change-Id: I7b7f5887990cd443accf51891644fdfbb849cf35
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
First step of separating the array data from Object.
Change-Id: I5c857397f0ef53cff0807debdb1e405424e1046a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I4ac58e9d87506ae930c2e44e6089f4af3cd9ccb2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the type flag into the vtable to free up these
bits in the Managed class, and not have to set them
at object construction time.
As we often need to know whether a Managed object is a
Object, FunctionObject or String, add some bitflags to test
for these to the vtable.
Change-Id: I7d08ca044544debb307b55f124f34cb086ad9e84
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Encapsulate accesses to the current context, and rework
the way we push and pop this context from the context
stack.
Largely a cleanup, but simplifies the code in the long term
Change-Id: I409e378490d0ab027be6a4c01a4031b2ea35c51d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This saves one pointer per object, and willmake other optimizations
easier in the future.
Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't fully create the arguments object unless required.
In the 95% use case, we can avoid creating any array based
data structures for the arguments object and directly
manipulate the functions arguments. only create the full
data structure for the other 5%.
Speeds up the raytrace test by 50%, gives around 10% overall
on v8-bench.
Change-Id: If727d28b96585e83314f544031a6c3ca1817ea19
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Get rid of the SimpleCallContext, instead simply
use the CallContext data structure, but don't
initialize the unused variables.
Change-Id: I11b311986da180c62c815b516a2c55844156d0ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
The literals are all latin1 strings, and fromLatin1() is much faster.
Change-Id: I25af0358a0a4aa2e973349c027cfac50b7589429
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
|
|
|
|
|
|
|
|
| |
Don't write to objects if we have a pending exception to
avoid any side effects.
Change-Id: I9f93a9195a652dbae7033cc6ebb355d5d86e9b5e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want to check for exceptions after every single
line on our runtime methods. A better way to handle this
is to add the check in all methods that have direct side
effects (as e.g. writing to a property of the JS stack).
We also need to return whereever we throw an exception.
To simplify the code, ExecutionContext::throwXxx methods now
return a ReturnedValue (always undefined) for convenience.
Change-Id: Ide6c804f819c731a3f14c6c43121d08029c9fb90
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Holes in arrays should be represented by an empty
value, not by creating/setting array attributes.
Reason is that the creation is irreversable, and slows
down execution. This speeds up crypto.js by 10%
Change-Id: I2e5472575479a5f2dbe53f59ecb8ed3aeab1be7a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I889e760f75b485a28e1f2a2c26b2337ae9bfafac
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I3a9c48d53d8dbadcb9b32c00fcef1f89447c4b8c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I66c370680d7e6bee2e73a7a940aa96ab4009ec57
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
use ValueRef instead of const Value &.
Change-Id: I3fd0ca829870db27f036825d713c53dc0600be07
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
replaced with call to the GC safe ExceutionEngine::newString()
method.
Change-Id: I7258296e75ca724ff42b94a0d147bc33a05f8f68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Remove Value::fromString(String *), and make
Encode safe against encoding raw Managed * pointers.
Change-Id: Ibca4668e1cbeaf85c78169d14386281659d33ef6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This will simplify finding the remaining direct usages of
QV4::Value that need fixing.
Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Fix the remaining usages of raw pointers into the GC heap.
Change-Id: I3654a6f74fe6b59e25ed65a79ff02c29cc2cdecc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While objects are being constructed, we don't have a reference to them
on the JS stack yet. So the constructor needs to protect itself against
being collected by putting the this object onto the JS stack.
Added an environment switch MM_EXACT_GC to test exact garbage
collection.
Change-Id: Ie37665a954de800359c272ffbebbe1488e7a8ace
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I168f24ac12715fc65abe230b2bd0f86f777eea00
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I679d1833609c41d71e8436ec0ba8a4624f0c4dd0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
also store "toString" and "valueOf" as identifiers
in the engine and fix two places where we compared
strings the wrong way.
Change-Id: I70612221e72d43ed0e3c496e4209681bf254cded
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I8e2dad0e9e34c5a549952bc0765cd57f6aa8aadf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
The class denotes objects that are stored safely
in areas controlled by the GC. These we can convert
fast to a StringRef etc.
Change-Id: I6b154eccaefddc42d4fafca55b7ee9e77179830c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Added some convenience typedefs (StringRef, ObjectRef, ReturnedString,
ScopedString, ...)
Used StringRef in newBuiltinFunction() for testing.
Cleaned up the duplicated code for thrower functions.
Change-Id: I7b7676690cbe70d9eabb0a5afd0d922f0be3aefd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
And change the return type to be GC safe
Change-Id: I6d7513962370fea4072a3d8c6b2c6f2d1705992e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add some more convenience in the helper classes
in qscopedvalue_p.h
Make accesses to CallData safer, and change
ExecutionEngine::newObject() to return a safe
pointer.
Change-Id: I980909754ce9681cf6faa1355bab3a1e5d6dd186
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: If294c9c4f574824c308b63a11da1337226180105
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: If8b0c3b91be50678693868c10fefc3678008834d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
We need to encode a bool, but the extensible flag
in Object is a bitfield (ie uint).
Change-Id: I2461c8ae90e92840da737c0c7ee88b9a2cee21e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ia8f35d227b69d32e1f6a041283abbbd083aa34ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I9e702d60c4e1b7ba19a699ff7a8d53876d6cd5f7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
The class is going to be used all over the place, so let's
give it a short name :)
Change-Id: If61543cb2c885e7fbb95c8fc4d0e870097c352ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This brings things more in line with ScopedValue, and
also simplifies cleanup of Scoped values.
Change-Id: If5f1466b4e13c629d56c1e7c638937f61ba48f77
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ief2d75e9789dd367c603d90dc0fe5316a0d055e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
ReturnedValue is used to return values from runtime methods
The type has to be a primitive type (no struct or union), so that
the compiler will return it in a register on all platforms.
They will be returned in rax on x64, [eax,edx] on x86 and [r0,r1] on arm.
Change-Id: I38433e6fad252370dda5dc335d9c5be8f22e8c76
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Also rename Value::toQString() to Value::toQStringNoThrow(),
and add a throwing toQString() method for JS use.
Change-Id: I821b33fc61abb7d08839df965fd337685f61a545
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This converts all methods in qv4runtime_p.h to not
use raw values in arguments anymore.
The conversion of return values will be done in a separate
commit.
Change-Id: Ie6e8f3bed459d09cb831f7f87920b7eada161502
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I5467aadba083e4b01fb0a7170946695207033680
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I22e853acfd2da337344b581bb0412c5f9930c510
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|