mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Remove compact profile.
The standard doesn't defines ECMAScript Compact Profile as a subset of Ecma-262 Edition 5.1. Profile modes can be added easily like the minimal profile if required. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
parent
79bc5d0220
commit
f15e7beadc
@ -42,10 +42,10 @@ python tools/build.py --debug --lto=off
|
||||
python tools/build.py --cmake-param=CMAKE_PARAM
|
||||
```
|
||||
|
||||
##### Set an ECMAScript profile mode (full|compact|minimal):
|
||||
##### Set a profile mode (full|minimal):
|
||||
|
||||
```bash
|
||||
python tools/build.py --feature=full|compact|minimal
|
||||
python tools/build.py --feature=full|minimal
|
||||
```
|
||||
|
||||
##### Use (jerry|compiler-default|external libc) libc:
|
||||
|
||||
@ -247,9 +247,8 @@ Chunk size of the pool is 8 bytes (reduces fragmentation).
|
||||
### Number
|
||||
|
||||
There are two possible representation of numbers according to standard IEEE 754:
|
||||
|
||||
* 4-byte (float, compact profile)
|
||||
* 8-byte (double, full profile)
|
||||
The default is 8-byte (double),
|
||||
but the engine supports the 4-byte (single precision) representation by setting CONFIG_ECMA_NUMBER_TYPE as well.
|
||||
|
||||

|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ set(JERRY_CORE_NAME jerry-core)
|
||||
project (${JERRY_CORE_NAME} C)
|
||||
|
||||
# Optional features
|
||||
set(FEATURE_PROFILE "full" CACHE STRING "ES5.1 profile: full, compact, minimal")
|
||||
set(FEATURE_PROFILE "full" CACHE STRING "Profile types: full, minimal")
|
||||
set(FEATURE_ERROR_MESSAGES OFF CACHE BOOL "Enable error messages?")
|
||||
set(FEATURE_LOG OFF CACHE BOOL "Enable logging?")
|
||||
set(FEATURE_VALGRIND OFF CACHE BOOL "Enable Valgrind support?")
|
||||
@ -142,30 +142,20 @@ else()
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_NDEBUG)
|
||||
endif()
|
||||
|
||||
# ES5.1 profiles
|
||||
# Compact profile
|
||||
if(FEATURE_PROFILE STREQUAL "compact")
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} CONFIG_ECMA_COMPACT_PROFILE)
|
||||
|
||||
# Minimal compact profile
|
||||
elseif(FEATURE_PROFILE STREQUAL "minimal")
|
||||
set(DEFINES_JERRY
|
||||
${DEFINES_JERRY}
|
||||
CONFIG_ECMA_COMPACT_PROFILE
|
||||
#
|
||||
# Date and RegExp built-in objects are also disabled in non-minimal compact profile build
|
||||
#
|
||||
# CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
# CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#
|
||||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
|
||||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN)
|
||||
|
||||
# Profile modes
|
||||
# Minimal profile
|
||||
if(FEATURE_PROFILE STREQUAL "minimal")
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY}
|
||||
CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
CONFIG_DISABLE_STRING_BUILTIN
|
||||
CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
CONFIG_DISABLE_ERROR_BUILTINS
|
||||
CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
CONFIG_DISABLE_MATH_BUILTIN
|
||||
CONFIG_DISABLE_JSON_BUILTIN
|
||||
CONFIG_DISABLE_DATE_BUILTIN
|
||||
CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
CONFIG_DISABLE_ANNEXB_BUILTIN)
|
||||
elseif(NOT FEATURE_PROFILE STREQUAL "full")
|
||||
message(FATAL_ERROR "FEATURE_PROFILE='${FEATURE_PROFILE}' doesn't supported")
|
||||
endif()
|
||||
|
||||
@ -147,24 +147,6 @@
|
||||
*/
|
||||
// #define CONFIG_ECMA_GLOBAL_ENVIRONMENT_DECLARATIVE
|
||||
|
||||
/**
|
||||
* Implementation should correspond to ECMA Compact Profile
|
||||
*/
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE
|
||||
|
||||
#ifdef CONFIG_ECMA_COMPACT_PROFILE
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
|
||||
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN
|
||||
#define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
|
||||
|
||||
/**
|
||||
* Number of ecma values inlined into VM stack frame
|
||||
*/
|
||||
|
||||
@ -571,10 +571,10 @@ ecma_gc_run (jmem_free_unused_memory_severity_t severity) /**< gc severity */
|
||||
|
||||
JERRY_CONTEXT (ecma_gc_visited_flip_flag) = !JERRY_CONTEXT (ecma_gc_visited_flip_flag);
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
/* Free RegExp bytecodes stored in cache */
|
||||
re_cache_gc_run ();
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
} /* ecma_gc_run */
|
||||
|
||||
/**
|
||||
|
||||
@ -1479,11 +1479,11 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
re_compiled_code_t *re_bytecode_p = (re_compiled_code_t *) bytecode_p;
|
||||
|
||||
ecma_deref_ecma_string (ECMA_GET_NON_NULL_POINTER (ecma_string_t, re_bytecode_p->pattern_cp));
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
}
|
||||
|
||||
jmem_heap_free_block (bytecode_p,
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -2768,4 +2768,4 @@ ecma_builtin_array_prototype_object_reduce_right (ecma_value_t this_arg, /**< th
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -107,4 +107,4 @@ ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -122,4 +122,4 @@ ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -97,4 +97,4 @@ ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
|
||||
@ -1,80 +0,0 @@
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ecma-alloc.h"
|
||||
#include "ecma-builtins.h"
|
||||
#include "ecma-conversion.h"
|
||||
#include "ecma-exceptions.h"
|
||||
#include "ecma-gc.h"
|
||||
#include "ecma-globals.h"
|
||||
#include "ecma-helpers.h"
|
||||
#include "ecma-objects.h"
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifdef CONFIG_ECMA_COMPACT_PROFILE
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
|
||||
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-compact-profile-error.inc.h"
|
||||
#define BUILTIN_UNDERSCORED_ID compact_profile_error
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
*
|
||||
* \addtogroup ecmabuiltins
|
||||
* @{
|
||||
*
|
||||
* \addtogroup compact_profile_error ECMA CompactProfileError object built-in
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Handle calling [[Call]] of built-in CompactProfileError object
|
||||
*
|
||||
* @return ecma value
|
||||
*/
|
||||
ecma_value_t
|
||||
ecma_builtin_compact_profile_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
return ecma_make_error_value (ecma_make_object_value (ecma_builtin_get (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR)));
|
||||
} /* ecma_builtin_compact_profile_error_dispatch_call */
|
||||
|
||||
/**
|
||||
* Handle calling [[Construct]] of built-in CompactProfileError object
|
||||
*
|
||||
* @return ecma value
|
||||
*/
|
||||
ecma_value_t
|
||||
ecma_builtin_compact_profile_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
return ecma_make_error_value (ecma_make_object_value (ecma_builtin_get (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR)));
|
||||
} /* ecma_builtin_compact_profile_error_dispatch_construct */
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
|
||||
@ -1,43 +0,0 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* CompactProfileError description
|
||||
*/
|
||||
|
||||
#ifndef OBJECT_ID
|
||||
# define OBJECT_ID(builtin_object_id)
|
||||
#endif /* !OBJECT_ID */
|
||||
|
||||
#ifndef NUMBER_VALUE
|
||||
# define NUMBER_VALUE(name, number_value, prop_attributes)
|
||||
#endif /* !NUMBER_VALUE */
|
||||
|
||||
/* Object identifier */
|
||||
OBJECT_ID (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR)
|
||||
|
||||
/* Number properties:
|
||||
* (property name, number value, writable, enumerable, configurable) */
|
||||
|
||||
NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
|
||||
0,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#undef OBJECT_ID
|
||||
#undef SIMPLE_VALUE
|
||||
#undef NUMBER_VALUE
|
||||
#undef STRING_VALUE
|
||||
#undef OBJECT_VALUE
|
||||
#undef ROUTINE
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-objects.h"
|
||||
#include "ecma-try-catch-macro.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -1225,7 +1225,7 @@ ecma_builtin_date_prototype_to_json (ecma_value_t this_arg, /**< this argument *
|
||||
return ret_value;
|
||||
} /* ecma_builtin_date_prototype_to_json */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
|
||||
/**
|
||||
* The Date.prototype object's 'getYear' routine
|
||||
@ -1321,7 +1321,7 @@ ecma_builtin_date_prototype_set_year (ecma_value_t this_arg, /**< this argument
|
||||
return ret_value;
|
||||
} /* ecma_builtin_date_prototype_set_year */
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
|
||||
/**
|
||||
* @}
|
||||
@ -1329,5 +1329,5 @@ ecma_builtin_date_prototype_set_year (ecma_value_t this_arg, /**< this argument
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
|
||||
@ -81,13 +81,13 @@ ROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ecma_builtin_date_prototype_to_utc_s
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_ISO_STRING_UL, ecma_builtin_date_prototype_to_iso_string, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_JSON_UL, ecma_builtin_date_prototype_to_json, 1, 1)
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
|
||||
ROUTINE (LIT_MAGIC_STRING_GET_YEAR_UL, ecma_builtin_date_prototype_get_year, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_YEAR_UL, ecma_builtin_date_prototype_set_year, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_GMT_STRING_UL, ecma_builtin_date_prototype_to_utc_string, 0, 0)
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
|
||||
#undef OBJECT_ID
|
||||
#undef SIMPLE_VALUE
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -574,4 +574,4 @@ ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**<
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
@ -27,8 +27,6 @@
|
||||
#include "jrt.h"
|
||||
#include "lit-magic-strings.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
|
||||
@ -195,5 +193,3 @@ ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,8 +25,6 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
|
||||
@ -73,5 +71,3 @@ ecma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -34,4 +34,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID eval_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -74,4 +74,4 @@ ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -1190,7 +1190,7 @@ ecma_builtin_global_object_encode_uri_component (ecma_value_t this_arg, /**< thi
|
||||
return ecma_builtin_global_object_encode_uri_helper (uri_component, unescaped_uri_component_set);
|
||||
} /* ecma_builtin_global_object_encode_uri_component */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
|
||||
/*
|
||||
* Maximum value of a byte.
|
||||
@ -1432,7 +1432,7 @@ ecma_builtin_global_object_unescape (ecma_value_t this_arg, /**< this argument *
|
||||
return ret_value;
|
||||
} /* ecma_builtin_global_object_unescape */
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@ -75,53 +75,54 @@ OBJECT_VALUE (LIT_MAGIC_STRING_FUNCTION_UL,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
// ECMA-262 v5, 15.1.4.3
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_UL,
|
||||
ECMA_BUILTIN_ID_ARRAY,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN*/
|
||||
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN*/
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
// ECMA-262 v5, 15.1.4.4
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_STRING_UL,
|
||||
ECMA_BUILTIN_ID_STRING,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
// ECMA-262 v5, 15.1.4.5
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_BOOLEAN_UL,
|
||||
ECMA_BUILTIN_ID_BOOLEAN,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
// ECMA-262 v5, 15.1.4.6
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_NUMBER_UL,
|
||||
ECMA_BUILTIN_ID_NUMBER,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
// ECMA-262 v5, 15.1.4.7
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_DATE_UL,
|
||||
ECMA_BUILTIN_ID_DATE,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
// ECMA-262 v5, 15.1.4.8
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_REGEXP_UL,
|
||||
ECMA_BUILTIN_ID_REGEXP,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
// ECMA-262 v5, 15.1.4.9
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_ERROR,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
// ECMA-262 v5, 15.1.4.10
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_EVAL_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_EVAL_ERROR,
|
||||
@ -151,27 +152,21 @@ OBJECT_VALUE (LIT_MAGIC_STRING_TYPE_ERROR_UL,
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_URI_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_URI_ERROR,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_MATH_BUILTIN
|
||||
// ECMA-262 v5, 15.1.5.1
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_MATH_UL,
|
||||
ECMA_BUILTIN_ID_MATH,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_JSON_BUILTIN
|
||||
// ECMA-262 v5, 15.1.5.2
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_JSON_U,
|
||||
ECMA_BUILTIN_ID_JSON,
|
||||
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN */
|
||||
|
||||
#ifdef CONFIG_ECMA_COMPACT_PROFILE
|
||||
OBJECT_VALUE (LIT_MAGIC_STRING_COMPACT_PROFILE_ERROR_UL,
|
||||
ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
|
||||
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
@ -189,10 +184,10 @@ ROUTINE (LIT_MAGIC_STRING_ENCODE_URI, ecma_builtin_global_object_encode_uri, 1,
|
||||
ROUTINE (LIT_MAGIC_STRING_ENCODE_URI_COMPONENT, ecma_builtin_global_object_encode_uri_component, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_PARSE_INT, ecma_builtin_global_object_parse_int, 2, 2)
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
ROUTINE (LIT_MAGIC_STRING_ESCAPE, ecma_builtin_global_object_escape, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_UNESCAPE, ecma_builtin_global_object_unescape, 1, 1)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
|
||||
#undef OBJECT_ID
|
||||
#undef SIMPLE_VALUE
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@ -1320,4 +1320,4 @@ ecma_date_get_primitive_value (ecma_value_t this_arg) /**< this argument */
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
@ -26,8 +26,6 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
*
|
||||
@ -78,4 +76,3 @@ ecma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, /**<
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -48,7 +48,7 @@ extern ecma_value_t
|
||||
ecma_builtin_helper_def_prop (ecma_object_t *, ecma_string_t *, ecma_value_t,
|
||||
bool, bool, bool, bool);
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
|
||||
/**
|
||||
* Time range defines for helper functions.
|
||||
@ -128,7 +128,7 @@ extern ecma_value_t ecma_date_value_to_date_string (ecma_number_t);
|
||||
extern ecma_value_t ecma_date_value_to_time_string (ecma_number_t);
|
||||
extern ecma_value_t ecma_date_get_primitive_value (ecma_value_t);
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
/* ecma-builtin-helper-json.c */
|
||||
|
||||
@ -168,13 +168,9 @@ ecma_builtin_helper_json_create_non_formatted_json (ecma_string_t *, ecma_string
|
||||
|
||||
/* ecma-builtin-helper-error.c */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
|
||||
extern ecma_value_t
|
||||
ecma_builtin_helper_error_dispatch_call (ecma_standard_error_t, const ecma_value_t *, ecma_length_t);
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#include "jrt-libc-includes.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_JSON_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -1738,4 +1738,4 @@ ecma_builtin_json_array (ecma_object_t *obj_p, /**< the array object*/
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include "jrt.h"
|
||||
#include "jrt-libc-includes.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_MATH_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -655,4 +655,4 @@ ecma_builtin_math_object_tan (ecma_value_t this_arg, /**< 'this' argument */
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
#include "jrt.h"
|
||||
#include "jrt-libc-includes.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -905,4 +905,4 @@ ecma_builtin_number_prototype_object_to_precision (ecma_value_t this_arg, /**< t
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -97,4 +97,4 @@ ecma_builtin_number_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -34,4 +34,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID range_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -74,4 +74,4 @@ ecma_builtin_range_error_dispatch_construct (const ecma_value_t *arguments_list_
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -34,4 +34,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID reference_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -74,4 +74,4 @@ ecma_builtin_reference_error_dispatch_construct (const ecma_value_t *arguments_l
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
#include "ecma-objects.h"
|
||||
#include "ecma-try-catch-macro.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
#include "ecma-regexp-object.h"
|
||||
#include "re-compiler.h"
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
|
||||
/**
|
||||
* The RegExp.prototype object's 'compile' routine
|
||||
@ -234,7 +234,7 @@ ecma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this argument
|
||||
return ret_value;
|
||||
} /* ecma_builtin_regexp_prototype_compile */
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
|
||||
/**
|
||||
* The RegExp.prototype object's 'exec' routine
|
||||
@ -433,4 +433,4 @@ ecma_builtin_regexp_prototype_to_string (ecma_value_t this_arg) /**< this argume
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
@ -75,9 +75,9 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LASTINDEX_UL,
|
||||
0,
|
||||
ECMA_PROPERTY_FLAG_WRITABLE)
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
ROUTINE (LIT_MAGIC_STRING_COMPILE, ecma_builtin_regexp_prototype_compile, 2, 1)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
ROUTINE (LIT_MAGIC_STRING_EXEC, ecma_builtin_regexp_prototype_exec, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_TEST, ecma_builtin_regexp_prototype_test, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_regexp_prototype_to_string, 0, 0)
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include "ecma-regexp-object.h"
|
||||
#include "ecma-try-catch-macro.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -157,4 +157,4 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
@ -31,11 +31,11 @@
|
||||
#include "jrt-libc-includes.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
#include "ecma-regexp-object.h"
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -378,7 +378,7 @@ ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this_arg, /**<
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_locale_compare */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
/**
|
||||
* The String.prototype object's 'match' routine
|
||||
@ -1395,7 +1395,7 @@ ecma_builtin_string_prototype_object_search (ecma_value_t this_arg, /**< this ar
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_search */
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
/**
|
||||
* The String.prototype object's 'slice' routine
|
||||
@ -1470,7 +1470,7 @@ ecma_builtin_string_prototype_object_slice (ecma_value_t this_arg, /**< this arg
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_slice */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
/**
|
||||
* The abstract SplitMatch routine for String.prototype.split()
|
||||
@ -1930,7 +1930,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_split */
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
/**
|
||||
* The String.prototype object's 'substring' routine
|
||||
@ -2224,7 +2224,7 @@ ecma_builtin_string_prototype_object_trim (ecma_value_t this_arg) /**< this argu
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_trim */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
|
||||
/**
|
||||
* The String.prototype object's 'substr' routine
|
||||
@ -2292,7 +2292,7 @@ ecma_builtin_string_prototype_object_substr (ecma_value_t this_arg, /**< this ar
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_substr */
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
|
||||
/**
|
||||
* @}
|
||||
@ -2300,4 +2300,4 @@ ecma_builtin_string_prototype_object_substr (ecma_value_t this_arg, /**< this ar
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
|
||||
@ -64,12 +64,12 @@ ROUTINE (LIT_MAGIC_STRING_CHAR_AT_UL, ecma_builtin_string_prototype_object_char_
|
||||
ROUTINE (LIT_MAGIC_STRING_CHAR_CODE_AT_UL, ecma_builtin_string_prototype_object_char_code_at, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_LOCALE_COMPARE_UL, ecma_builtin_string_prototype_object_locale_compare, 1, 1)
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
ROUTINE (LIT_MAGIC_STRING_MATCH, ecma_builtin_string_prototype_object_match, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_REPLACE, ecma_builtin_string_prototype_object_replace, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_SEARCH, ecma_builtin_string_prototype_object_search, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_SPLIT, ecma_builtin_string_prototype_object_split, 2, 2)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
ROUTINE (LIT_MAGIC_STRING_SUBSTRING, ecma_builtin_string_prototype_object_substring, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_LOWER_CASE_UL, ecma_builtin_string_prototype_object_to_lower_case, 0, 0)
|
||||
@ -78,9 +78,9 @@ ROUTINE (LIT_MAGIC_STRING_TO_UPPER_CASE_UL, ecma_builtin_string_prototype_object
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_UPPER_CASE_UL, ecma_builtin_string_prototype_object_to_locale_upper_case, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_TRIM, ecma_builtin_string_prototype_object_trim, 0, 0)
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
|
||||
ROUTINE (LIT_MAGIC_STRING_SUBSTR, ecma_builtin_string_prototype_object_substr, 2, 2)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
|
||||
|
||||
#undef OBJECT_ID
|
||||
#undef SIMPLE_VALUE
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -156,4 +156,4 @@ ecma_builtin_string_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -34,4 +34,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID syntax_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -74,4 +74,4 @@ ecma_builtin_syntax_error_dispatch_construct (const ecma_value_t *arguments_list
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -34,4 +34,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID type_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -74,4 +74,4 @@ ecma_builtin_type_error_dispatch_construct (const ecma_value_t *arguments_list_p
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -34,4 +34,4 @@
|
||||
#define BUILTIN_UNDERSCORED_ID uri_error_prototype
|
||||
#include "ecma-builtin-internal-routines-template.inc.h"
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "ecma-try-catch-macro.h"
|
||||
#include "jrt.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -74,4 +74,4 @@ ecma_builtin_uri_error_dispatch_construct (const ecma_value_t *arguments_list_p,
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
@ -122,7 +122,7 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
/** Initializing [[PrimitiveValue]] properties of built-in prototype objects */
|
||||
switch (obj_builtin_id)
|
||||
{
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
case ECMA_BUILTIN_ID_ARRAY_PROTOTYPE:
|
||||
{
|
||||
ecma_string_t *length_str_p = ecma_new_ecma_length_string ();
|
||||
@ -136,9 +136,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
ecma_deref_ecma_string (length_str_p);
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
case ECMA_BUILTIN_ID_STRING_PROTOTYPE:
|
||||
{
|
||||
ecma_string_t *prim_prop_str_value_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);
|
||||
@ -149,9 +149,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
ecma_set_internal_property_value (prim_value_prop_p, ecma_make_string_value (prim_prop_str_value_p));
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
case ECMA_BUILTIN_ID_NUMBER_PROTOTYPE:
|
||||
{
|
||||
ecma_property_t *prim_value_prop_p;
|
||||
@ -160,9 +160,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
ecma_set_internal_property_value (prim_value_prop_p, ecma_make_integer_value (0));
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
case ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE:
|
||||
{
|
||||
ecma_property_t *prim_value_prop_p;
|
||||
@ -171,9 +171,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
ecma_set_internal_property_value (prim_value_prop_p, ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE));
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
case ECMA_BUILTIN_ID_DATE_PROTOTYPE:
|
||||
{
|
||||
ecma_number_t *prim_prop_num_value_p = ecma_alloc_number ();
|
||||
@ -185,9 +185,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
ECMA_SET_INTERNAL_VALUE_POINTER (ECMA_PROPERTY_VALUE_PTR (prim_value_prop_p)->value, prim_prop_num_value_p);
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
case ECMA_BUILTIN_ID_REGEXP_PROTOTYPE:
|
||||
{
|
||||
ecma_property_t *bytecode_prop_p;
|
||||
@ -196,7 +196,7 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
ecma_set_internal_property_value (bytecode_prop_p, ECMA_NULL_POINTER);
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@ -683,11 +683,7 @@ ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id, /**< built-i
|
||||
|
||||
default:
|
||||
{
|
||||
#ifdef CONFIG_ECMA_COMPACT_PROFILE
|
||||
JERRY_UNREACHABLE ();
|
||||
#else /* !CONFIG_ECMA_COMPACT_PROFILE */
|
||||
JERRY_UNIMPLEMENTED ("The built-in is not implemented.");
|
||||
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
|
||||
}
|
||||
}
|
||||
|
||||
@ -748,11 +744,7 @@ ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
|
||||
|
||||
default:
|
||||
{
|
||||
#ifdef CONFIG_ECMA_COMPACT_PROFILE
|
||||
JERRY_UNREACHABLE ();
|
||||
#else /* !CONFIG_ECMA_COMPACT_PROFILE */
|
||||
JERRY_UNIMPLEMENTED ("The built-in is not implemented.");
|
||||
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -807,11 +799,7 @@ ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
|
||||
|
||||
default:
|
||||
{
|
||||
#ifdef CONFIG_ECMA_COMPACT_PROFILE
|
||||
JERRY_UNREACHABLE ();
|
||||
#else /* !CONFIG_ECMA_COMPACT_PROFILE */
|
||||
JERRY_UNIMPLEMENTED ("The built-in is not implemented.");
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ BUILTIN (ECMA_BUILTIN_ID_OBJECT,
|
||||
true,
|
||||
object)
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
/* The Array.prototype object (15.4.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_ARRAY,
|
||||
@ -48,9 +48,9 @@ BUILTIN (ECMA_BUILTIN_ID_ARRAY,
|
||||
true,
|
||||
true,
|
||||
array)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN*/
|
||||
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN*/
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
/* The String.prototype object (15.5.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -66,9 +66,9 @@ BUILTIN (ECMA_BUILTIN_ID_STRING,
|
||||
true,
|
||||
true,
|
||||
string)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
/* The Boolean.prototype object (15.6.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -84,9 +84,9 @@ BUILTIN (ECMA_BUILTIN_ID_BOOLEAN,
|
||||
true,
|
||||
true,
|
||||
boolean)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
/* The Number.prototype object (15.7.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -102,7 +102,7 @@ BUILTIN (ECMA_BUILTIN_ID_NUMBER,
|
||||
true,
|
||||
true,
|
||||
number)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
|
||||
/* The Function.prototype object (15.3.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
@ -120,7 +120,7 @@ BUILTIN (ECMA_BUILTIN_ID_FUNCTION,
|
||||
true,
|
||||
function)
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_MATH_BUILTIN
|
||||
/* The Math object (15.8) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_MATH,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -128,9 +128,9 @@ BUILTIN (ECMA_BUILTIN_ID_MATH,
|
||||
true,
|
||||
true,
|
||||
math)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_JSON_BUILTIN
|
||||
/* The JSON object (15.12) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_JSON,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -138,9 +138,9 @@ BUILTIN (ECMA_BUILTIN_ID_JSON,
|
||||
true,
|
||||
true,
|
||||
json)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
/* The Date.prototype object (15.9.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -156,9 +156,9 @@ BUILTIN (ECMA_BUILTIN_ID_DATE,
|
||||
true,
|
||||
true,
|
||||
date)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
/* The RegExp.prototype object (15.10.6) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -174,16 +174,7 @@ BUILTIN (ECMA_BUILTIN_ID_REGEXP,
|
||||
true,
|
||||
true,
|
||||
regexp)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
/* The Error.prototype object (15.11.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
||||
true,
|
||||
true,
|
||||
error_prototype)
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
/* The Error object (15.11.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ERROR,
|
||||
@ -193,6 +184,15 @@ BUILTIN (ECMA_BUILTIN_ID_ERROR,
|
||||
true,
|
||||
error)
|
||||
|
||||
/* The Error.prototype object (15.11.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
||||
true,
|
||||
true,
|
||||
error_prototype)
|
||||
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
/* The EvalError.prototype object (15.11.6.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@ -288,7 +288,7 @@ BUILTIN (ECMA_BUILTIN_ID_URI_ERROR,
|
||||
true,
|
||||
true,
|
||||
uri_error)
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
/**< The [[ThrowTypeError]] object (13.2.3) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
|
||||
@ -298,16 +298,6 @@ BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
|
||||
true,
|
||||
type_error_thrower)
|
||||
|
||||
#ifdef CONFIG_ECMA_COMPACT_PROFILE
|
||||
/* The CompactProfileError object defined in the Compact Profile */
|
||||
BUILTIN (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
||||
false,
|
||||
true,
|
||||
compact_profile_error)
|
||||
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
|
||||
|
||||
/* The Global object (15.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_GLOBAL,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
|
||||
@ -84,11 +84,11 @@ ecma_op_create_array_object (const ecma_value_t *arguments_list_p, /**< list of
|
||||
array_items_count = arguments_list_len;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
ecma_object_t *array_prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE);
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_ARRAY_BUILTIN */
|
||||
ecma_object_t *array_prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
|
||||
|
||||
ecma_object_t *obj_p = ecma_create_object (array_prototype_obj_p,
|
||||
false,
|
||||
|
||||
@ -43,11 +43,11 @@ ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boo
|
||||
{
|
||||
bool boolean_value = ecma_op_to_boolean (arg);
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE);
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
|
||||
ecma_object_t *obj_p = ecma_create_object (prototype_obj_p, false, true, ECMA_OBJECT_TYPE_GENERAL);
|
||||
ecma_deref_object (prototype_obj_p);
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
ecma_object_t *
|
||||
ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error type */
|
||||
{
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
ecma_builtin_id_t prototype_id = ECMA_BUILTIN_ID__COUNT;
|
||||
|
||||
switch (error_type)
|
||||
@ -84,6 +84,10 @@ ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error typ
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void) error_type;
|
||||
ecma_builtin_id_t prototype_id = ECMA_BUILTIN_ID_ERROR_PROTOTYPE;
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (prototype_id);
|
||||
|
||||
@ -99,11 +103,6 @@ ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error typ
|
||||
ECMA_PROPERTY_VALUE_PTR (class_prop_p)->value = LIT_MAGIC_STRING_ERROR_UL;
|
||||
|
||||
return new_error_obj_p;
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
(void) error_type;
|
||||
|
||||
return ecma_builtin_get (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR);
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
} /* ecma_new_standard_error */
|
||||
|
||||
/**
|
||||
|
||||
@ -612,7 +612,6 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
|
||||
else
|
||||
{
|
||||
local_env_p = ecma_create_decl_lex_env (scope_p);
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE
|
||||
if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_ARGUMENTS_NEEDED)
|
||||
{
|
||||
ecma_op_create_arguments_object (func_obj_p,
|
||||
@ -621,7 +620,6 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
|
||||
arguments_list_len,
|
||||
bytecode_data_p);
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE */
|
||||
}
|
||||
|
||||
ret_value = vm_run (bytecode_data_p,
|
||||
|
||||
@ -48,11 +48,11 @@ ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Numb
|
||||
return conv_to_num_completion;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE);
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
|
||||
ecma_object_t *obj_p = ecma_create_object (prototype_obj_p,
|
||||
false,
|
||||
|
||||
@ -876,60 +876,60 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
|
||||
{
|
||||
return LIT_MAGIC_STRING_OBJECT_UL;
|
||||
}
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
case ECMA_BUILTIN_ID_STRING_PROTOTYPE:
|
||||
{
|
||||
return LIT_MAGIC_STRING_STRING_UL;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
case ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE:
|
||||
{
|
||||
return LIT_MAGIC_STRING_BOOLEAN_UL;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
case ECMA_BUILTIN_ID_NUMBER_PROTOTYPE:
|
||||
{
|
||||
return LIT_MAGIC_STRING_NUMBER_UL;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_MATH_BUILTIN
|
||||
case ECMA_BUILTIN_ID_MATH:
|
||||
{
|
||||
return LIT_MAGIC_STRING_MATH_UL;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN
|
||||
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_JSON_BUILTIN
|
||||
case ECMA_BUILTIN_ID_JSON:
|
||||
{
|
||||
return LIT_MAGIC_STRING_JSON_U;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
|
||||
case ECMA_BUILTIN_ID_ERROR_PROTOTYPE:
|
||||
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
case ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE:
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
case ECMA_BUILTIN_ID_ERROR_PROTOTYPE:
|
||||
{
|
||||
return LIT_MAGIC_STRING_ERROR_UL;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_DATE_BUILTIN
|
||||
case ECMA_BUILTIN_ID_DATE_PROTOTYPE:
|
||||
{
|
||||
return LIT_MAGIC_STRING_DATE_UL;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
case ECMA_BUILTIN_ID_REGEXP_PROTOTYPE:
|
||||
{
|
||||
return LIT_MAGIC_STRING_REGEXP_UL;
|
||||
}
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_GLOBAL));
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
#include "lit-char-helpers.h"
|
||||
#include "re-compiler.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
#define ECMA_BUILTINS_INTERNAL
|
||||
#include "ecma-builtins-internal.h"
|
||||
@ -1473,4 +1473,4 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#ifndef ECMA_REGEXP_OBJECT_H
|
||||
#define ECMA_REGEXP_OBJECT_H
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
#include "ecma-globals.h"
|
||||
#include "re-compiler.h"
|
||||
@ -66,5 +66,5 @@ void re_initialize_props (ecma_object_t *, ecma_string_t *, uint16_t);
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !ECMA_REGEXP_OBJECT_H */
|
||||
|
||||
@ -76,11 +76,11 @@ ecma_op_create_string_object (const ecma_value_t *arguments_list_p, /**< list of
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_STRING_PROTOTYPE);
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_STRING_BUILTIN */
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
|
||||
ecma_object_t *obj_p = ecma_create_object (prototype_obj_p,
|
||||
false,
|
||||
|
||||
@ -80,10 +80,10 @@ typedef struct
|
||||
ecma_object_t *ecma_builtin_objects[ECMA_BUILTIN_ID__COUNT]; /**< pointer to instances of built-in objects */
|
||||
ecma_object_t *ecma_gc_objects_lists[ECMA_GC_COLOR__COUNT]; /**< List of marked (visited during
|
||||
* current GC session) and umarked objects */
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
const re_compiled_code_t *re_cache[RE_CACHE_SIZE]; /**< regex cache */
|
||||
uint8_t re_cache_idx; /**< evicted item index when regex cache is full (round-robin) */
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
bool ecma_gc_visited_flip_flag; /**< current state of an object's visited flag */
|
||||
bool is_direct_eval_form_call; /**< direct call from eval */
|
||||
|
||||
@ -1778,7 +1778,7 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
|
||||
if (!(compiled_code_p->status_flags & CBC_CODE_FLAGS_FUNCTION))
|
||||
{
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
/* Regular expression. */
|
||||
if (globals_p->snapshot_buffer_write_offset + sizeof (ecma_compiled_code_t) > snapshot_buffer_size)
|
||||
{
|
||||
@ -1820,9 +1820,9 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
|
||||
copied_code_p->status_flags = compiled_code_p->status_flags;
|
||||
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
JERRY_UNIMPLEMENTED ("RegExp is not supported in compact profile.");
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
JERRY_UNIMPLEMENTED ("RegExp is not supported in the selected profile.");
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
return start_offset;
|
||||
}
|
||||
|
||||
@ -2100,7 +2100,7 @@ snapshot_load_compiled_code (const uint8_t *snapshot_data_p, /**< snapshot data
|
||||
|
||||
if (!(bytecode_p->status_flags & CBC_CODE_FLAGS_FUNCTION))
|
||||
{
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
const re_compiled_code_t *re_bytecode_p = NULL;
|
||||
|
||||
const uint8_t *regex_start_p = ((const uint8_t *) bytecode_p) + sizeof (ecma_compiled_code_t);
|
||||
@ -2116,9 +2116,9 @@ snapshot_load_compiled_code (const uint8_t *snapshot_data_p, /**< snapshot data
|
||||
ecma_deref_ecma_string (pattern_str_p);
|
||||
|
||||
return (ecma_compiled_code_t *) re_bytecode_p;
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
JERRY_UNIMPLEMENTED ("RegExp is not supported in compact profile.");
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
JERRY_UNIMPLEMENTED ("RegExp is not supported in the selected profile.");
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
}
|
||||
|
||||
size_t header_size;
|
||||
|
||||
@ -218,7 +218,6 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAX_VALUE_U, "MAX_VALUE")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MIN_VALUE_U, "MIN_VALUE")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_POSITIVE_INFINITY_U, "POSITIVE_INFINITY")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NEGATIVE_INFINITY_U, "NEGATIVE_INFINITY")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_COMPACT_PROFILE_ERROR_UL, "CompactProfileError")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INVALID_DATE_UL, "Invalid Date")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_APPLY, "apply")
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_CALL, "call")
|
||||
|
||||
@ -1649,7 +1649,7 @@ void
|
||||
lexer_construct_regexp_object (parser_context_t *context_p, /**< context */
|
||||
int parse_only) /**< parse only */
|
||||
{
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
const uint8_t *source_p = context_p->source_p;
|
||||
const uint8_t *regex_start_p = context_p->source_p;
|
||||
const uint8_t *regex_end_p = regex_start_p;
|
||||
@ -1835,10 +1835,10 @@ lexer_construct_regexp_object (parser_context_t *context_p, /**< context */
|
||||
context_p->lit_object.literal_p = literal_p;
|
||||
context_p->lit_object.index = (uint16_t) (context_p->literal_count - 1);
|
||||
context_p->lit_object.type = LEXER_LITERAL_OBJECT_ANY;
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
(void) parse_only;
|
||||
parser_raise_error (context_p, PARSER_ERR_UNSUPPORTED_REGEXP);
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
} /* lexer_construct_regexp_object */
|
||||
|
||||
/**
|
||||
|
||||
@ -718,7 +718,7 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
}
|
||||
case PARSER_ERR_UNSUPPORTED_REGEXP:
|
||||
{
|
||||
return "Regexp is not supported in compact profile.";
|
||||
return "Regexp is not supported in the selected profile.";
|
||||
}
|
||||
case PARSER_ERR_IDENTIFIER_TOO_LONG:
|
||||
{
|
||||
|
||||
@ -56,7 +56,7 @@ typedef enum
|
||||
PARSER_ERR_INVALID_REGEXP, /**< invalid regular expression */
|
||||
PARSER_ERR_UNKNOWN_REGEXP_FLAG, /**< unknown regexp flag */
|
||||
PARSER_ERR_DUPLICATED_REGEXP_FLAG, /**< duplicated regexp flag */
|
||||
PARSER_ERR_UNSUPPORTED_REGEXP, /**< regular expression is not supported in compact profile */
|
||||
PARSER_ERR_UNSUPPORTED_REGEXP, /**< regular expression is not supported */
|
||||
|
||||
PARSER_ERR_IDENTIFIER_TOO_LONG, /**< too long identifier */
|
||||
PARSER_ERR_STRING_TOO_LONG, /**< too long string literal */
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#include "ecma-globals.h"
|
||||
#include "re-bytecode.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
@ -442,4 +442,4 @@ re_dump_bytecode (re_bytecode_ctx_t *bc_ctx_p) /**< RegExp bytecode context */
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#ifndef RE_BYTECODE_H
|
||||
#define RE_BYTECODE_H
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
@ -125,5 +125,5 @@ void re_dump_bytecode (re_bytecode_ctx_t *bc_ctx);
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !RE_BYTECODE_H */
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "re-compiler.h"
|
||||
#include "re-parser.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
@ -643,4 +643,4 @@ re_compile_bytecode (const re_compiled_code_t **out_bytecode_p, /**< [out] point
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#ifndef RE_COMPILER_H
|
||||
#define RE_COMPILER_H
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
#include "ecma-globals.h"
|
||||
#include "re-bytecode.h"
|
||||
@ -58,5 +58,5 @@ void re_cache_gc_run ();
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !RE_COMPILER_H */
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#include "re-compiler.h"
|
||||
#include "re-parser.h"
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
@ -917,4 +917,4 @@ re_parse_next_token (re_parser_ctx_t *parser_ctx_p, /**< RegExp parser context *
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#ifndef RE_PARSER_H
|
||||
#define RE_PARSER_H
|
||||
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
@ -113,5 +113,5 @@ re_parse_next_token (re_parser_ctx_t *, re_token_t *);
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* !RE_PARSER_H */
|
||||
|
||||
@ -289,7 +289,7 @@ vm_construct_literal_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
ecma_value_t ret_value;
|
||||
ret_value = ecma_op_create_regexp_object_from_bytecode ((re_compiled_code_t *) bytecode_p);
|
||||
|
||||
@ -300,9 +300,9 @@ vm_construct_literal_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
#else /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
JERRY_UNIMPLEMENTED ("Regular Expressions are not supported in compact profile!");
|
||||
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
|
||||
#else /* CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
JERRY_UNIMPLEMENTED ("Regular Expressions are not supported in the selected profile!");
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
}
|
||||
} /* vm_construct_literal_object */
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ def add_build_args(parser):
|
||||
parser.add_argument('--all-in-one', choices=['on', 'off'], default='off', help='All-in-one build (default: %(default)s)')
|
||||
parser.add_argument('--debug', action='store_const', const='Debug', default='Release', dest='build_type', help='Debug build')
|
||||
parser.add_argument('--lto', choices=['on', 'off'], default='on', help='Enable link-time optimizations (default: %(default)s)')
|
||||
parser.add_argument('--profile', choices=['full', 'compact', 'minimal'], default='full', help='Specify the ECMAScript profile (default: %(default)s)')
|
||||
parser.add_argument('--profile', choices=['full', 'minimal'], default='full', help='Specify the profile (default: %(default)s)')
|
||||
parser.add_argument('--error-messages', choices=['on', 'off'], default='off', help='Enable error messages (default: %(default)s)')
|
||||
parser.add_argument('--log', choices=['on', 'off'], default='off', help='Enable logging (default: %(default)s)')
|
||||
parser.add_argument('--valgrind', choices=['on', 'off'], default='off', help='Enable Valgrind support (default: %(default)s)')
|
||||
|
||||
@ -72,10 +72,10 @@ jerry_tests_options = [
|
||||
|
||||
# Test options for jerry-test-suite
|
||||
jerry_test_suite_options = jerry_tests_options[:]
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-compact', ['--profile=compact']))
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-compact-snapshot', ['--profile=compact', '--snapshot-save=on', '--snapshot-exec=on'], ['--snapshot']))
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-compact-debug', ['--debug', '--profile=compact']))
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-compact-debug-snapshot', ['--debug', '--profile=compact', '--snapshot-save=on', '--snapshot-exec=on'], ['--snapshot']))
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-minimal', ['--profile=minimal']))
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-minimal-snapshot', ['--profile=minimal', '--snapshot-save=on', '--snapshot-exec=on'], ['--snapshot']))
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-minimal-debug', ['--debug', '--profile=minimal']))
|
||||
jerry_test_suite_options.append(Options('jerry_test_suite-minimal-debug-snapshot', ['--debug', '--profile=minimal', '--snapshot-save=on', '--snapshot-exec=on'], ['--snapshot']))
|
||||
|
||||
# Test options for buildoption-test
|
||||
jerry_buildoptions = [
|
||||
@ -133,8 +133,8 @@ def run_jerry_test_suite():
|
||||
if not ret:
|
||||
test_cmd = [TEST_RUNNER_SCRIPT, get_binary_path(job.out_dir)]
|
||||
|
||||
if '--profile=compact' in job.build_args:
|
||||
test_cmd.append(JERRY_TEST_SUITE_COMPACT_LIST)
|
||||
if '--profile=minimal' in job.build_args:
|
||||
test_cmd.append(JERRY_TEST_SUITE_MINIMAL_LIST)
|
||||
else:
|
||||
test_cmd.append(JERRY_TEST_SUITE_DIR)
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ TOOLS_DIR = path.dirname(path.abspath(__file__))
|
||||
PROJECT_DIR = path.normpath(path.join(TOOLS_DIR, '..'))
|
||||
JERRY_TESTS_DIR = path.join(PROJECT_DIR, 'tests/jerry')
|
||||
JERRY_TEST_SUITE_DIR = path.join(PROJECT_DIR, 'tests/jerry-test-suite')
|
||||
JERRY_TEST_SUITE_COMPACT_LIST = path.join(PROJECT_DIR, 'tests/jerry-test-suite/compact-profile-list')
|
||||
JERRY_TEST_SUITE_MINIMAL_LIST = path.join(PROJECT_DIR, 'tests/jerry-test-suite/minimal-profile-list')
|
||||
|
||||
BUILD_SCRIPT = path.join(TOOLS_DIR, 'build.py')
|
||||
CPPCHECK_SCRIPT = path.join(TOOLS_DIR, 'check-cppcheck.sh')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user