Add missing return statement

Fixes crypto.js

Change-Id: If3b2d182b8e6a93acd2c32904e5b9a9fd49181cf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Faster marking of objects in the GC

Change-Id: I4ccbf7fc50758fc176bfdb2f0382a7ec1f18d6ba
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Remove a bunch of virtuals in Object

This should speed up casting to the derived types, and
simplify things in the longer term.

Change-Id: I7362c86e5e2724d5b7e245695f9fe29144999715
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Inline casting of Value to objects

Change-Id: Ic5538b8a0a1f430a265399bced0ce9fc0a79696e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Remove the isString and isArray flags in Managed

These are not needed anymore, as we have the type stored
in the object.

Change-Id: I86594f4c3b3669ee0576e1ca141a64494e82a176
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Suppress a linker warning for unused flag.

Change-Id: I53aaf5f7bc7ec63e92e02d18010b2f1d53c40a00
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix more tests with the delete operator

Delete on non-reference types should return true. Delete on our
temporaries should evaluate to false.

Change-Id: Ic6b39a0cf5833900f2a492ac8b37386fc2963ab3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix remaining issues with the delete operator

Delete on known temps should return true and false on known local variables.

Change-Id: I71be8361306eb825b975a3aee294665eb8561366
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix empty return statement in eval

It should throw a syntax error even inside eval it seems.

Change-Id: I4de6d96f9ba61569d7d7e723ecb5f2d946c8f4ad
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix a bug in the evaluation of &&

Change-Id: Ia446bd05dcca3fc146719284e5ac96d4c7d61c06
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
test function names for eval or arguments in strict mode

using these as function names should trigger a syntax error
in strict mode.

Change-Id: I8d83fda72db856b692c8f6f1454c762255bcaef1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The function prototype has a length property

Change-Id: I1ef4d7c86ac5c5a8e7ed08081a86c4f826527c0d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Number/Boolean.prototype.toString() also accept matching primitive values

These methods also accept matching (ie. booleans or numbers) primitives
as this argument.

Change-Id: Ib31cadd46d327381abf02847ae35e7be05715f84
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix constness of Value::toXXX functions.

Change-Id: I66d622555b2cca4e6aa546745fd0e46373dee919
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix call expressions with a subscript

Call expressions such as foo[bar]() where wrongly converted to a
temporary and then called by value. This made the call have the
wrong this argument, as the reference was resolved in the assignment
to the temporary.

Change-Id: Id6044f833dfcf9ee8fa4f9ec0602a929abdc2c48
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Properly set the length of the eval function

Change-Id: I88a483f5c9a758c4983d5d3b2c684f6bc7e8cf55
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Most statements don't return a value

In eval mode, we need to write the result of statements
into the return value. But most statements don't return
a value, so the statement shouldn't write a return value.

Change-Id: I9ce24fe6689bd2bb2aee6241ca84a25f9a266f5c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Set the prototype for FunctionObject in it's constructor

This avoids a few test failures where the prototype for
eval wasn't set up correctly.

Change-Id: I5a5c1dafe4a6328bf1bbc95901ff22df10083a86
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Add a mechanism to protect managed objects from deletion

Change-Id: I6700dc94ad481e12ee7f00c04c0c37261e22a715
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
new eval() should throw a type error

Change-Id: I487a11a060657ac1eeae4c51085ce907711b51c8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>