Change JERRY_ES2015_BUILTIN to JERRY_ES2015. (#3377)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Robert Fancsik
parent
f41afeb89f
commit
1b01bb034f
@@ -2096,7 +2096,8 @@ ecma_builtin_array_reduce_from (ecma_value_t callbackfn, /**< routine's 1st argu
|
||||
return accumulator;
|
||||
} /* ecma_builtin_array_reduce_from */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* The Array.prototype object's 'fill' routine
|
||||
*
|
||||
@@ -2394,9 +2395,6 @@ ecma_builtin_array_prototype_object_copy_within (const ecma_value_t args[], /**<
|
||||
|
||||
return ecma_copy_value (ecma_make_object_value (obj_p));
|
||||
} /* ecma_builtin_array_prototype_object_copy_within */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* Helper function for Array.prototype object's {'keys', 'values', 'entries', '@@iterator'}
|
||||
@@ -2625,7 +2623,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
|
||||
length);
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_ARRAY_PROTOTYPE_COPY_WITHIN:
|
||||
{
|
||||
ret_value = ecma_builtin_array_prototype_object_copy_within (arguments_list_p,
|
||||
@@ -2653,7 +2651,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
|
||||
length);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_FILTER);
|
||||
|
||||
@@ -62,13 +62,11 @@ ROUTINE (LIT_MAGIC_STRING_FILTER, ECMA_ARRAY_PROTOTYPE_FILTER, 2, 1)
|
||||
/* Note these 2 routines must be in this order */
|
||||
ROUTINE (LIT_MAGIC_STRING_REDUCE, ECMA_ARRAY_PROTOTYPE_REDUCE, NON_FIXED, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT, NON_FIXED, 1)
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_MAGIC_STRING_FIND, ECMA_ARRAY_PROTOTYPE_FIND, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_FIND_INDEX, ECMA_ARRAY_PROTOTYPE_FIND_INDEX, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_FILL, ECMA_ARRAY_PROTOTYPE_FILL, 3, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_COPY_WITHIN, ECMA_ARRAY_PROTOTYPE_COPY_WITHIN, NON_FIXED, 2)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_MAGIC_STRING_ENTRIES, ECMA_ARRAY_PROTOTYPE_ENTRIES, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_VALUES, ECMA_ARRAY_PROTOTYPE_VALUES, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_ARRAY_PROTOTYPE_KEYS, 0, 0)
|
||||
|
||||
@@ -45,9 +45,9 @@ enum
|
||||
ECMA_FUNCTION_PROTOTYPE_CALL,
|
||||
ECMA_FUNCTION_PROTOTYPE_APPLY,
|
||||
ECMA_FUNCTION_PROTOTYPE_BIND,
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE,
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
};
|
||||
|
||||
#define BUILTIN_INC_HEADER_NAME "ecma-builtin-function-prototype.inc.h"
|
||||
@@ -340,12 +340,12 @@ ecma_builtin_function_prototype_dispatch_routine (uint16_t builtin_routine_id, /
|
||||
{
|
||||
return ecma_builtin_function_prototype_object_bind (func_obj_p, arguments_list_p, arguments_number);
|
||||
}
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE:
|
||||
{
|
||||
return ecma_op_object_has_instance (func_obj_p, arguments_list_p[0]);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
default:
|
||||
{
|
||||
JERRY_UNREACHABLE ();
|
||||
|
||||
@@ -42,12 +42,12 @@ ROUTINE (LIT_MAGIC_STRING_APPLY, ECMA_FUNCTION_PROTOTYPE_APPLY, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_CALL, ECMA_FUNCTION_PROTOTYPE_CALL, NON_FIXED, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_BIND, ECMA_FUNCTION_PROTOTYPE_BIND, NON_FIXED, 1)
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
/**
|
||||
* ECMA-262 v6.0 19.2.3.6 @@hasInstance
|
||||
* the property attributes are: { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
|
||||
*/
|
||||
ROUTINE_WITH_FLAGS (LIT_GLOBAL_SYMBOL_HAS_INSTANCE, ECMA_FUNCTION_PROTOTYPE_SYMBOL_HAS_INSTANCE, 1, 1, 0 /* flags */)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -567,7 +567,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
/* 5 (indexOf) -- 6 (lastIndexOf) */
|
||||
const ecma_length_t original_len = ecma_string_get_length (original_str_p);
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
/* 4, 6 (startsWith, includes, endsWith) */
|
||||
if (mode >= ECMA_STRING_STARTS_WITH)
|
||||
{
|
||||
@@ -584,7 +584,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Search string can't be of type: RegExp"));
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/* 7, 8 */
|
||||
ecma_string_t *search_str_p = ecma_op_to_string (arg1);
|
||||
@@ -618,7 +618,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_STRING_STARTS_WITH:
|
||||
{
|
||||
if (pos_num + start > original_len)
|
||||
@@ -669,7 +669,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
case ECMA_STRING_INDEX_OF:
|
||||
case ECMA_STRING_LAST_INDEX_OF:
|
||||
|
||||
@@ -55,10 +55,10 @@ enum
|
||||
ECMA_MATH_OBJECT_EXP, /* ECMA-262 v5, 15.8.2.8 */
|
||||
ECMA_MATH_OBJECT_FLOOR, /* ECMA-262 v5, 15.8.2.9 */
|
||||
ECMA_MATH_OBJECT_LOG, /* ECMA-262 v5, 15.8.2.10 */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ECMA_MATH_OBJECT_TRUNC, /* ECMA-262 v6, 20.2.2.35 */
|
||||
ECMA_MATH_OBJECT_SIGN, /* ECMA-262 v6, 20.2.2.29 */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
ECMA_MATH_OBJECT_ROUND, /* ECMA-262 v5, 15.8.2.15 */
|
||||
ECMA_MATH_OBJECT_SIN, /* ECMA-262 v5, 15.8.2.16 */
|
||||
ECMA_MATH_OBJECT_SQRT, /* ECMA-262 v5, 15.8.2.17 */
|
||||
@@ -157,7 +157,8 @@ ecma_builtin_math_object_max_min (bool is_max, /**< 'max' or 'min' operation */
|
||||
return ecma_make_number_value (result_num);
|
||||
} /* ecma_builtin_math_object_max_min */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* The Math object's 'trunc' routine
|
||||
*
|
||||
@@ -210,7 +211,8 @@ ecma_builtin_math_object_sign (ecma_number_t arg)
|
||||
|
||||
return (ecma_number_t) 1.0;
|
||||
} /* ecma_builtin_math_object_sign */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
* The Math object's 'random' routine.
|
||||
@@ -341,7 +343,7 @@ ecma_builtin_math_dispatch_routine (uint16_t builtin_routine_id, /**< built-in w
|
||||
x = DOUBLE_TO_ECMA_NUMBER_T (log (x));
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_MATH_OBJECT_TRUNC:
|
||||
{
|
||||
x = ecma_builtin_math_object_trunc (x);
|
||||
@@ -352,7 +354,7 @@ ecma_builtin_math_dispatch_routine (uint16_t builtin_routine_id, /**< built-in w
|
||||
x = ecma_builtin_math_object_sign (x);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
case ECMA_MATH_OBJECT_ROUND:
|
||||
{
|
||||
if (ecma_number_is_nan (x)
|
||||
|
||||
@@ -91,10 +91,10 @@ ROUTINE (LIT_MAGIC_STRING_ROUND, ECMA_MATH_OBJECT_ROUND, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_SIN, ECMA_MATH_OBJECT_SIN, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_SQRT, ECMA_MATH_OBJECT_SQRT, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_TAN, ECMA_MATH_OBJECT_TAN, 1, 1)
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_MAGIC_STRING_SIGN, ECMA_MATH_OBJECT_SIGN, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_TRUNC, ECMA_MATH_OBJECT_TRUNC, 1, 1)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MATH) */
|
||||
|
||||
|
||||
@@ -93,7 +93,8 @@ ecma_builtin_number_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
}
|
||||
} /* ecma_builtin_number_dispatch_construct */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* The Number object 'isFinite' routine
|
||||
*
|
||||
@@ -219,7 +220,8 @@ ecma_builtin_number_object_is_safe_integer (ecma_value_t this_arg, /**< this arg
|
||||
|
||||
return ECMA_VALUE_FALSE;
|
||||
} /* ecma_builtin_number_object_is_safe_integer */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -54,7 +54,8 @@ NUMBER_VALUE (LIT_MAGIC_STRING_NEGATIVE_INFINITY_U,
|
||||
ECMA_BUILTIN_NUMBER_NEGATIVE_INFINITY,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/* ECMA-262 v6, 20.1.2.1 */
|
||||
NUMBER_VALUE (LIT_MAGIC_STRING_EPSILON_U,
|
||||
ECMA_BUILTIN_NUMBER_EPSILON,
|
||||
@@ -69,7 +70,8 @@ NUMBER_VALUE (LIT_MAGIC_STRING_MAX_SAFE_INTEGER_U,
|
||||
NUMBER_VALUE (LIT_MAGIC_STRING_MIN_SAFE_INTEGER_U,
|
||||
ECMA_BUILTIN_NUMBER_MIN_SAFE_INTEGER,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/* Object properties:
|
||||
* (property name, object pointer getter) */
|
||||
@@ -83,10 +85,10 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
|
||||
/* Routine properties:
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_MAGIC_STRING_IS_FINITE, ecma_builtin_number_object_is_finite, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_IS_NAN, ecma_builtin_number_object_is_nan, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_IS_INTEGER, ecma_builtin_number_object_is_integer, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_IS_SAFE_INTEGER, ecma_builtin_number_object_is_safe_integer, 1, 1)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -148,7 +148,8 @@ ecma_builtin_object_object_get_prototype_of (ecma_object_t *obj_p) /**< routine'
|
||||
return ECMA_VALUE_NULL;
|
||||
} /* ecma_builtin_object_object_get_prototype_of */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* [[SetPrototypeOf]]
|
||||
*
|
||||
@@ -257,7 +258,8 @@ ecma_builtin_object_object_set_prototype_of (ecma_value_t arg1, /**< routine's f
|
||||
/* 5-8. */
|
||||
return ecma_set_prototype_of (arg1, arg2);
|
||||
} /* ecma_builtin_object_object_set_prototype_of */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
* The Object object's 'getOwnPropertyNames' routine
|
||||
@@ -275,6 +277,7 @@ ecma_builtin_object_object_get_own_property_names (ecma_object_t *obj_p) /**< ro
|
||||
} /* ecma_builtin_object_object_get_own_property_names */
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* The Object object's 'getOwnPropertySymbols' routine
|
||||
*
|
||||
@@ -289,6 +292,7 @@ ecma_builtin_object_object_get_own_property_symbols (ecma_object_t *obj_p) /**<
|
||||
{
|
||||
return ecma_builtin_helper_object_get_properties (obj_p, ECMA_LIST_SYMBOLS);
|
||||
} /* ecma_builtin_object_object_get_own_property_symbols */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
@@ -740,8 +744,8 @@ ecma_builtin_object_object_define_property (ecma_object_t *obj_p, /**< routine's
|
||||
return ecma_make_object_value (obj_p);
|
||||
} /* ecma_builtin_object_object_define_property */
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
/**
|
||||
* The Object object's 'assign' routine
|
||||
*
|
||||
@@ -838,9 +842,7 @@ ecma_builtin_object_object_assign (ecma_object_t *target_p, /**< target object *
|
||||
|
||||
return ret_value;
|
||||
} /* ecma_builtin_object_object_assign */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
/**
|
||||
* The Object object's 'is' routine
|
||||
*
|
||||
@@ -856,8 +858,8 @@ ecma_builtin_object_object_is (ecma_value_t arg1, /**< routine's first argument
|
||||
{
|
||||
return ecma_op_same_value (arg1, arg2) ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
} /* ecma_builtin_object_object_is */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
* Dispatcher of the built-in's routines
|
||||
@@ -887,7 +889,7 @@ ecma_builtin_object_dispatch_routine (uint16_t builtin_routine_id, /**< built-in
|
||||
{
|
||||
return ecma_builtin_object_object_create (arg1, arg2);
|
||||
}
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_OBJECT_ROUTINE_SET_PROTOTYPE_OF:
|
||||
{
|
||||
return ecma_builtin_object_object_set_prototype_of (arg1, arg2);
|
||||
@@ -896,7 +898,7 @@ ecma_builtin_object_dispatch_routine (uint16_t builtin_routine_id, /**< built-in
|
||||
{
|
||||
return ecma_builtin_object_object_is (arg1, arg2);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
||||
@@ -54,10 +54,10 @@ ROUTINE (LIT_MAGIC_STRING_CREATE, ECMA_OBJECT_ROUTINE_CREATE, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL, ECMA_OBJECT_ROUTINE_DEFINE_PROPERTIES, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTY_UL, ECMA_OBJECT_ROUTINE_DEFINE_PROPERTY, 3, 3)
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL, ECMA_OBJECT_ROUTINE_SET_PROTOTYPE_OF, 2, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_ASSIGN, ECMA_OBJECT_ROUTINE_ASSIGN, NON_FIXED, 2)
|
||||
ROUTINE (LIT_MAGIC_STRING_IS, ECMA_OBJECT_ROUTINE_IS, 2, 2)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
#include "ecma-builtin-helpers-macro-undefs.inc.h"
|
||||
|
||||
@@ -1333,7 +1333,7 @@ ecma_builtin_string_prototype_object_trim (ecma_string_t *original_string_p) /**
|
||||
return ecma_make_string_value (trimmed_string_p);
|
||||
} /* ecma_builtin_string_prototype_object_trim */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* The String.prototype object's 'repeat' routine
|
||||
@@ -1448,7 +1448,8 @@ ecma_builtin_string_prototype_object_code_point_at (ecma_string_t *this_string_p
|
||||
|
||||
return ecma_make_uint32_value (lit_convert_surrogate_pair_to_code_point (first, second));
|
||||
} /* ecma_builtin_string_prototype_object_code_point_at */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_ANNEXB)
|
||||
|
||||
@@ -1594,11 +1595,11 @@ ecma_builtin_string_prototype_dispatch_routine (uint16_t builtin_routine_id, /**
|
||||
}
|
||||
case ECMA_STRING_PROTOTYPE_INDEX_OF:
|
||||
case ECMA_STRING_PROTOTYPE_LAST_INDEX_OF:
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_STRING_PROTOTYPE_STARTS_WITH:
|
||||
case ECMA_STRING_PROTOTYPE_INCLUDES:
|
||||
case ECMA_STRING_PROTOTYPE_ENDS_WITH:
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
{
|
||||
ecma_string_index_of_mode_t mode;
|
||||
mode = (ecma_string_index_of_mode_t) (builtin_routine_id - ECMA_STRING_PROTOTYPE_INDEX_OF);
|
||||
@@ -1658,7 +1659,7 @@ ecma_builtin_string_prototype_dispatch_routine (uint16_t builtin_routine_id, /**
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_STRING_PROTOTYPE_REPEAT:
|
||||
{
|
||||
ret_value = ecma_builtin_string_prototype_object_repeat (string_p, arg1);
|
||||
@@ -1669,8 +1670,6 @@ ecma_builtin_string_prototype_dispatch_routine (uint16_t builtin_routine_id, /**
|
||||
ret_value = ecma_builtin_string_prototype_object_code_point_at (string_p, arg1);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case ECMA_STRING_PROTOTYPE_ITERATOR:
|
||||
{
|
||||
ret_value = ecma_builtin_string_prototype_object_iterator (to_string_val);
|
||||
|
||||
@@ -67,15 +67,12 @@ ROUTINE (LIT_MAGIC_STRING_TRIM, ECMA_STRING_PROTOTYPE_TRIM, 0, 0)
|
||||
ROUTINE (LIT_MAGIC_STRING_SUBSTR, ECMA_STRING_PROTOTYPE_SUBSTR, 2, 2)
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_MAGIC_STRING_REPEAT, ECMA_STRING_PROTOTYPE_REPEAT, 1, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_STARTS_WITH, ECMA_STRING_PROTOTYPE_STARTS_WITH, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_INCLUDES, ECMA_STRING_PROTOTYPE_INCLUDES, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_ENDS_WITH, ECMA_STRING_PROTOTYPE_ENDS_WITH, 2, 1)
|
||||
ROUTINE (LIT_MAGIC_STRING_CODE_POINT_AT, ECMA_STRING_PROTOTYPE_CODE_POINT_AT, 1, 1)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ECMA_STRING_PROTOTYPE_ITERATOR, 0, 0)
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
|
||||
@@ -110,7 +110,8 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg, /**< 'this' ar
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_object_from_char_code */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
|
||||
/**
|
||||
* The String object's 'fromCodePoint' routine
|
||||
*
|
||||
@@ -177,7 +178,8 @@ ecma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' a
|
||||
|
||||
return ecma_make_string_value (ret_str_p);
|
||||
} /* ecma_builtin_string_object_from_code_point */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
* Handle calling [[Call]] of built-in String object
|
||||
|
||||
@@ -41,9 +41,9 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
|
||||
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
|
||||
ROUTINE (LIT_MAGIC_STRING_FROM_CHAR_CODE_UL, ecma_builtin_string_object_from_char_code, NON_FIXED, 1)
|
||||
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ROUTINE (LIT_MAGIC_STRING_FROM_CODE_POINT_UL, ecma_builtin_string_object_from_code_point, NON_FIXED, 1)
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@ typedef enum
|
||||
{
|
||||
ECMA_BUILTIN_NUMBER_MAX = 256, /**< value of ECMA_NUMBER_MAX_VALUE */
|
||||
ECMA_BUILTIN_NUMBER_MIN, /**< value of ECMA_NUMBER_MIN_VALUE */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ECMA_BUILTIN_NUMBER_EPSILON, /**< value of ECMA_NUMBER_EPSILON */
|
||||
ECMA_BUILTIN_NUMBER_MAX_SAFE_INTEGER, /**< value of ECMA_NUMBER_MAX_SAFE_INTEGER */
|
||||
ECMA_BUILTIN_NUMBER_MIN_SAFE_INTEGER, /**< value of ECMA_NUMBER_MIN_SAFE_INTEGER */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
ECMA_BUILTIN_NUMBER_E, /**< value of ECMA_NUMBER_E */
|
||||
ECMA_BUILTIN_NUMBER_PI, /**< value of ECMA_NUMBER_PI */
|
||||
ECMA_BUILTIN_NUMBER_LN10, /**< value of ECMA_NUMBER_LN10 */
|
||||
|
||||
@@ -741,11 +741,11 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
|
||||
{
|
||||
ECMA_NUMBER_MAX_VALUE,
|
||||
ECMA_NUMBER_MIN_VALUE,
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ECMA_NUMBER_EPSILON,
|
||||
ECMA_NUMBER_MAX_SAFE_INTEGER,
|
||||
ECMA_NUMBER_MIN_SAFE_INTEGER,
|
||||
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
ECMA_NUMBER_E,
|
||||
ECMA_NUMBER_PI,
|
||||
ECMA_NUMBER_LN10,
|
||||
|
||||
Reference in New Issue
Block a user