Commit Graph

10 Commits

Author SHA1 Message Date
Lars Knoll feafa10498 Implement Object.keys and obj.proto.propertyIsEnumerable
Change-Id: I30df135ad95f24246e43553b2711ad1008319d56
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-11-29 08:03:20 +01:00
Erik Verbruggen 721f2156a6 Introduce a simple string pool to speed up lookups.
This change uniques string pointers, so the String::isEqualTo will more
often succeed in the pointer-equality case.

Change-Id: I1d4f1a70147c48bc75359642a56a0446b5fbf199
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-28 14:06:06 +01:00
Erik Verbruggen 4bd20c2ac3 Throw a SyntaxError instead of printing an error message.
Change-Id: I94ef8a4f2bea80bc3689b104e381a9dc134439fa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-28 12:31:20 +01:00
Erik Verbruggen 7704d8b3b6 Keep the EvalISelFactory in the ExecutionEngine.
Also corrected the class name cApiTaliSatiOn.

Change-Id: I131566e904c8ee575686a469f16d098dd512d865
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 15:47:14 +01:00
Erik Verbruggen 1dab0e5904 Use an isel factory instead of MASM in FunctionCTor.
Change-Id: I070f056411f16d837ff5eac191fac11cd0bd3c47
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-20 13:31:05 +01:00
Lars Knoll 79753b8fe5 return results directly instead of using the context
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>
2012-11-20 09:40:14 +01:00
Erik Verbruggen e1bbbb6cf9 Fix isel for eval and a whole bunch of other warnings.
A factory is now passed along to do the codegen for eval().

Change-Id: If15b1f28c9c0a8f8b6d18b56d6e7bc5d942927e5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-19 14:02:58 +01:00
Erik Verbruggen b072fd9317 Added isNaN and isFinite to the global context.
Change-Id: Ia85d27a6ac82fd5dbf6b0f706747afa6418626b1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-19 13:57:51 +01:00
Lars Knoll a267688480 Better handling of contexts and environments
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>
2012-11-19 10:33:35 +01:00
Lars Knoll 65724ce3e7 Move the engine and context classes into their own files
Change-Id: Ie20138990908a921ca3d7475618275ed82d9cb5c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-11-19 10:29:07 +01:00