The method was always throwing in strict mode, due to
a missing return statement.
Change-Id: I85e44f8067d1f2aea76d03e42abf31a0d5a2d180
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Tested with eval() which now obeys strict mode
semantics.
Change-Id: Ib3c7f31047e43c1ef0fa74261f23ec4f2ea4244f
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>
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>
A factory is now passed along to do the codegen for eval().
Change-Id: If15b1f28c9c0a8f8b6d18b56d6e7bc5d942927e5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make the ExecutionContext standard compliant.
Move most of it's members into a new
DeclarativeEnvironment data structure that
contains locals and arguments.
Change-Id: I094f559168810dbd3717d677fe28750076015976
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>
Still doesn't work correctly, as we can't modify
the global context there.
Change-Id: Ifd0ab217c3cf2d0c1b86f09907b440ea31c29ac8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Only the instruction pointer and targetTempIndex are needed.
Change-Id: I21279d68e74dac42d875e3ced9004e9d3c42c29d
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>
The stack frame of the interpreting function is restored, but all the
datastructures live on the heap. So, save them out on handler creation,
and restore them afterwards.
Change-Id: I84b84007cc9944b56926bf0387c2798f7841cd2a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Also tweak the bucket size calculation to be prime for just a bit
longer than.
Change-Id: I9fc6779956693301eb01a6558d4c20d8e39d8bad
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Remove a lot of duplicated code, and make it a lot
easier to implement JS compliant semantics.
Change-Id: Ic5ecb58d34a5df8fe05e86c5f906d70c50c51b54
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>
Implement proper call() and construct()
methods in FunctionObject, and remove
some duplicated initialization code.
Change-Id: I5c86f9f2cf6e4b65d23d000149db2b79c35538c4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Also now check for enumerable in for/in statements.
Change-Id: I03a9968fc3d7f8f5e4eaf26591040acd9cc8ced1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
See section 8.12 of the standard. This implements
8.12.1 - 8.12.7 and 8.12.9
Also gave these methods standard conformant names.
They are marked as [[foo]] in the standard, which
translates to __foo__ in our code.
Change-Id: I1990d6c6dd24e929c23d5c51d36f1e2e0a0a3b63
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>
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>