Rework arguments object. (#1401)
Instead of allocating a helper object, argument names are appended right after the arguments objects. This reduces memory consumption and improve performance as well. In the future this could be further improved by a bitfield, but that would require a reference to the byte code which might increase memory consumption in a few corner cases. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -197,9 +197,6 @@ typedef uintptr_t ecma_external_pointer_t;
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ECMA_INTERNAL_PROPERTY_SCOPE, /**< [[Scope]] */
|
||||
ECMA_INTERNAL_PROPERTY_PARAMETERS_MAP, /**< [[ParametersMap]] */
|
||||
|
||||
ECMA_INTERNAL_PROPERTY_NATIVE_HANDLE, /**< native handle associated with an object */
|
||||
ECMA_INTERNAL_PROPERTY_FREE_CALLBACK, /**< object's native free callback */
|
||||
|
||||
@@ -606,6 +603,15 @@ typedef struct
|
||||
ecma_value_t bytecode_cp; /**< function byte code */
|
||||
} function;
|
||||
|
||||
/*
|
||||
* Description of arguments objects.
|
||||
*/
|
||||
struct
|
||||
{
|
||||
ecma_value_t lex_env_cp; /**< lexical environment */
|
||||
uint32_t length; /**< length of names */
|
||||
} arguments;
|
||||
|
||||
ecma_external_pointer_t external_function; /**< external function */
|
||||
} u;
|
||||
} ecma_extended_object_t;
|
||||
|
||||
Reference in New Issue
Block a user