Remove several internal property types for primitive objects. (#1399)

Class and value internal properties are always exists for primitive
types (e.g. Boolean, Regex) so they can be stored right after the
object. This improve property access (since internal properties are
searched by a slow linear algorithm) and reduces memory consumption,
since only 8 byte is allocated for these two properties instead of
16 which is the size of a property pair.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-10-19 15:36:15 +02:00
committed by GitHub
parent 2ef89eafbf
commit fd98d649b6
29 changed files with 487 additions and 419 deletions
@@ -53,7 +53,7 @@ BUILTIN (ECMA_BUILTIN_ID_ARRAY,
#ifndef CONFIG_DISABLE_STRING_BUILTIN
/* The String.prototype object (15.5.4) */
BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_OBJECT_TYPE_CLASS,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
true,
@@ -71,7 +71,7 @@ BUILTIN (ECMA_BUILTIN_ID_STRING,
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
/* The Boolean.prototype object (15.6.4) */
BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_OBJECT_TYPE_CLASS,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
true,
@@ -89,7 +89,7 @@ BUILTIN (ECMA_BUILTIN_ID_BOOLEAN,
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
/* The Number.prototype object (15.7.4) */
BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_OBJECT_TYPE_CLASS,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
true,
@@ -143,7 +143,7 @@ BUILTIN (ECMA_BUILTIN_ID_JSON,
#ifndef CONFIG_DISABLE_DATE_BUILTIN
/* The Date.prototype object (15.9.4) */
BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_OBJECT_TYPE_CLASS,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
true,
@@ -161,7 +161,7 @@ BUILTIN (ECMA_BUILTIN_ID_DATE,
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
/* The RegExp.prototype object (15.10.6) */
BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_OBJECT_TYPE_CLASS,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
true,