| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Properties in object literals are defined using
defineOwnProperty, so that they get set even if
the object prototype contains a non writable
property with the same name.
This fixes all remaining test cases for 11.1.5
Change-Id: I3928a144d09c51c5bf20a25bcb1c6c3c243975ee
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Implement support for defining accessor properties
through { ... }. Implementation for moth is pending.
Change-Id: I558b6811bc5656dc0fae78c49e23155043ce9cb1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There was a bug in the implementation of unwindException(),
that caused failures when called twice from one catch statement.
Also refactor and simplify the TryStatement code further by
introducing a rethrow builtin.
Change-Id: I77bf37f1707042f402488ef2dfaf4e59bf8dc82a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Take care of some corner cases and make them pass the
test suite.
Change-Id: Ic83508859800c62681ee873968b475ef81fffb82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
These operators have semantics that are different from
(foo + 1), as they always convert the LHS to a number first.
Change-Id: I3fb4a1a328e3dfcb334875435c3cec90d01b67dd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
| |
-0 and +0 are two distinct numbers. Since integers only
have one 0 value, we need to convert the number to double
when negating a 0
Change-Id: I915c4bd7168eece947fa91c6b65137a873d4f75a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
This fixes potential leaks of IR::Functions, lowers the memory usage
of the functions that the VM needs (because the IR fields are not
present in the VM::Function), and makes both managed by the module
respectively the ExecutionEngine.
Change-Id: I6748ad98b062f994eae9dd14f1919aec5aa7c0b0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I3a71597d012b5fb7d7a2f482f4a16431c71c1c22
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I90cd2b34a25476dfee1ec01315275b6c179d11dc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Also implement __qmljs_xxx_activation_property
in a more correct way.
Change-Id: I60c330bccca21fad99930987ed78153114a80c7d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ic32fc8815704ed201a3b50eae05ff2705372210d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I1c2b9d61b6d97e3c2a8cb976fb6be8b68d51ae28
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
This fixes cases where eval() would create variables
in the wrong scope.
Change-Id: Ie93ec2d1fb125e588c1b6ffa2ca8ca4b6e3112c9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
| |
Properly implement delete operator for identifiers
and local variables.
Change-Id: I8ac55edc80c31a94d11444c9f5c78caf4b131c95
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the with object (list) to the environment, and check properties
there if it's available.
Generate IR statements implementing with() support.
Add two new builtin methods to enter and leave a with scope.
Implement support for the builtin's in masm.
Make sure exception handling works across with scopes.
Change-Id: I8257a16cfccc91a1acedfd740ade711b016b33fd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
The result variable in the context is not really
required, as we can return results directly in the
return value register.
Change-Id: I12554c228500aa24625ef82e31fd7f72989a71bb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: I0f4ac76376028081b13b1cdeaadc4c9b09c1556d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I2872d824a2016a653e64f0332f6416f416eef0e7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ie20138990908a921ca3d7475618275ed82d9cb5c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
This is so it'll map to the name used in the
ECMAScript spec once the other refactorings
are in.
Change-Id: I8dcc7ad43b457ce50e7123c57bc4c770bcda8d11
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I989c2a546b7e4d9a4fd2f7ff8b682c747d38332f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Make the initialization for call() compliant
with the standard, and add a strict mode boolean.
Change-Id: I8617af8dbfde47d8b2a8a0a7ce0ab491031ba4ba
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I02bc1cad6231988fdf453d0b4fdde55dd1ae9148
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
The activation object inside the context is always an object,
or null. This avoids some needless conversions to and from
Value's.
Change-Id: Ibbd88c83fa073a4ed3cf03742129357dd9567cec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I357f3062f58e76c1749c9818426be5c0eedf3327
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
This is useful for quick LLVM codegen testing.
Change-Id: I45778371375b903e154222c47b15411d08085ae5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I78311310c6f986bf187e3923d1fb71e09f4569fb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to use expressions such as
%x = %y + const
in the IR.
This still requires an implementation for moth.
Change-Id: I134e96ddad08bcbe4f3ea5fa27c5338a96acac80
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: Ic0d43902fec5d3b752678eadfbccb9f71e21d895
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
| |
Fix the last parts of the inplace bitops to
do the correct thing.
Change-Id: I748dde919082193c034cdc20e92cc568d8efa225
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a generic method to handle binops such as +=
to Object and use it. We can probably remove
most of the __qmljs_inplace_xxx methods later
on and call one generic method instead.
Change-Id: If7cbd2e3012ad381e29b9eec2059e17f02a0a38a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: I1415907f94d064e64bf5495b7c136355ffd866fe
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I3adc68012f7492281fe8849f58764473dcb3671e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
This doesn't quite fix all issues, as activation records
and arguments objects will still not work correctly in
all cases (esp. the inplace operators).
Change-Id: I0ebf2a08e6c61e4049d4b6f449987757bfc3f81c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I540297e83e3e297d0724c3e08e5780eee0d2fac8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Correctly handle the case where one of the two
arguments is a double and the other an integer.
Change-Id: I589ac46acc30180b025c7e377c0523cf0889f294
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
And don't dump the assemply unless SHOW_CODE is set.
Change-Id: I17ad36f002404b57c65f910048e5c82d42307976
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This implements Section 9.11 of the spec.
Also simplify __qmljs_strict_equal().
Change-Id: I99b33308c33f4d4732b4a72bd5327336b2b22257
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This brings the basic structure or accessing properties
more in line with the EcmaScript 5.1 specification.
There's however still quite some work to be done to
make things fully compliant.
Change-Id: If55afd7ae6e4f7aa5ce06afe49b1453b537ac98b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I8f3c8add78bebf92e0073348d1ecbdf3f328af6d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ic400255d0a7f6830dcb0604688d88d5020628b15
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
They differ from the isObject/isUndefined/etc. methods because they do
an extra virtual function call. And with isObject and friends being
cheap, is*Object methods could have made the same (but faulty)
impression.
Change-Id: I32f26a96e73251bd14f8198b0a1ffb5d59e53f31
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
The main change is renaming __qmljs_call_function to callFunction, and
move duplicate error checking in there. Now __qmljs_call_value does not
do its own call anymore, but calls __qmljs_call_function. All calls to
__qmljs_call_function are replaced by calls to __qmljs_call_value.
Change-Id: I7fffc2e811c43e84e7344d70e2ed521331ed710d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Implement exceptions using setjmp/longjmp. The
advantage is that this removes all exception
handling overhead from regular code, the only
code that still has a (very small) overhead
is the try{} catch() {} statement.
Change-Id: I43d6a60dfc9dfd4b7a20d2e99ab0a9315b4d8a2f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Fix undefinedValue() and nullValue() initializers.
Change-Id: I7117331137c7d76b39099b57a5dc17b15136fd26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I86c9bbe69c9ba4ae9d300b62e7d16b372f3478ea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the inheritance from ValueData and ValueBase.
Use a few ifdef's for 64 bit instead of a lot of
template magic and inheritance to get the correct
implementations for 32 and 64 bit.
Saves some code, and makes Value a real POD type.
Apparently this also helps gcc generate better code,
crypto.js runs another few percent faster now.
Change-Id: I9dac488b27e629e6ef8c096f2bee86a5d678fd49
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Add some flags to the Value's tag that allow us to
simplify type conversion from null and bool to integer.
Add a method to allow checking in one go whether two
values are "integer compatible"
Change-Id: I0a05bdf881836ad3f8286c0365dd192bf7f6e5d6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Simplify and optimise the Value::isXxx() methods
at the same time.
Change-Id: I3e8fa98cf7b91079a4450c048c6d0795d1684724
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I906a4f27bf47ae0ae088ae40a747b28ba827e10a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|