Commit Graph

14 Commits

Author SHA1 Message Date
Lars Knoll bed14ea268 Remove another virtual and de-inline a call method
Change-Id: Ia7cc0bf9f4024a65020fef75666ae13d3691bc54
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-14 14:51:15 +01:00
Simon Hausmann b09bb08d74 Convert run-time functions that take a Value * for arguments to use a Value reference
This keeps the C++ implementation code simpler while still providing the same
(pointer based) calling convention.

Change-Id: Ib72acf1dfdf4638f6d109a0771fdafc921a544d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-14 12:33:02 +01:00
Lars Knoll 2ce17e2aa9 Remove the virtual call(ctx) method
This is better handled in ScriptFunction and BuiltinFunctionOld.

Change-Id: Id896b1ddac47a9ce52e86abff901c87b7e627271
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-14 12:04:35 +01:00
Lars Knoll 03026421af Move the generic construct() implementation into ScriptFunction
This is the only place we really need it, as the generic
construct method defined by the spec mainly applies to
functions defined in script.

Change-Id: I4fe4219715a4a9393900db6a2532e42fafaea2db
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-14 12:03:37 +01:00
Lars Knoll 2b59eda830 Remove the virtual contruct(ctx) method
The more general and faster construct method taking
more arguments is now used in all cases.

Change-Id: I183e4279526e5a937938a72d494a537faf4bc825
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-14 12:02:33 +01:00
Lars Knoll 6a23171e04 Use faster call/construct methods
Change-Id: I3e3c2ab42f20d9d5f38d3f9681d05de9487d80bd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-14 12:01:07 +01:00
Lars Knoll 9c1e46ee67 Implement hasInstance through the new 'vtable'
Change-Id: I59aea0f64e7ac955c3f1243936d77f2c12103621
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-14 11:57:33 +01:00
Lars Knoll afb743d72a Add a C style vtable to Managed and use it for markObjects
We need to replace the C++ vtable with a home made one for additional
flexibility. This will help us deal properly with primitive this
values, and allow us to enable certain optimisations where we can
change behavior at runtime (e.g. use optimised lookups as long as
we don't have any accessor properties defined).

Change-Id: I6a3852692bdc5c4f0bde05f6ff2b296013ba47e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-14 10:44:15 +01:00
Lars Knoll beda28a856 Also lookup properties in the prototype by index
We can only do this when getting properties, as setting
values will always happen on the main object.

Change-Id: I0336dd393bf78144d54ed8b6008011a7046e325d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-12 22:49:40 +01:00
Lars Knoll 4be3e75734 Implement a first iteration of the fast property lookup scheme
Fast lookups still require a function call, and will only work
for properties defined on the object itself. Properties of the
prototype will still be slow.

Change-Id: I07c601998d312b1bd8e9977708d3375bf72df3e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-12 22:48:19 +01:00
Lars Knoll b5333bdcf1 Use internal classes to store the layout of members
Add an internal class structure to Object that will allow
us to do much more efficient property lookups in the future.

Change-Id: I9ee72f6d73113a489f00ad7a31a20e91fbba18ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-12 14:54:16 +01:00
Lars Knoll b18b6ecbfd Rename qv4array.* to qv4sparsearray.*
Change-Id: I2c5a683145a4a8e4b243a7f2fe4274dfe2b5abe4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-04 15:48:06 +01:00
Jędrzej Nowacki ea553dc9fa Cleanup namespaces.
QT_BEGIN_NAMESPACE and QT_END_NAMESPACE was added in header
files. Namespace coding convention got unified.

Change-Id: I971c9a9179d5cd512f8214457609f40992a8ca66
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-31 10:36:00 +01:00
Jędrzej Nowacki 74fba4d806 Say hello to QtV4 module.
Change-Id: I507cd5707b7d7223a0d901cf939896fb2649b684
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-30 13:20:40 +01:00