Improve split method to gain memory (#1893)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -1482,135 +1482,6 @@ ecma_builtin_string_prototype_object_slice (ecma_value_t this_arg, /**< this arg
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_slice */
|
||||
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
|
||||
/**
|
||||
* The abstract SplitMatch routine for String.prototype.split()
|
||||
*
|
||||
* See also:
|
||||
* ECMA-262 v5, 15.5.4.14
|
||||
*
|
||||
* Used by:
|
||||
* - The String.prototype.split routine.
|
||||
*
|
||||
* @return ecma value - contains the value of the match
|
||||
* - the index property of the completion value indicates the position of the
|
||||
* first character in the input_string that matched
|
||||
*
|
||||
* Returned value must be freed with ecma_free_value.
|
||||
*/
|
||||
static ecma_value_t
|
||||
ecma_builtin_helper_split_match (ecma_value_t input_string, /**< first argument */
|
||||
ecma_length_t start_idx, /**< second argument */
|
||||
ecma_value_t separator) /**< third argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
/* 1. */
|
||||
if (ecma_is_value_object (separator)
|
||||
&& ecma_object_class_is (ecma_get_object_from_value (separator), LIT_MAGIC_STRING_REGEXP_UL))
|
||||
{
|
||||
ecma_value_t regexp_value = ecma_copy_value_if_not_object (separator);
|
||||
|
||||
ECMA_TRY_CATCH (to_string_val,
|
||||
ecma_op_to_string (input_string),
|
||||
ret_value);
|
||||
|
||||
ecma_string_t *input_str_p = ecma_get_string_from_value (to_string_val);
|
||||
ecma_string_t *substr_str_p = ecma_string_substr (input_str_p, start_idx, ecma_string_get_length (input_str_p));
|
||||
|
||||
ret_value = ecma_regexp_exec_helper (regexp_value, ecma_make_string_value (substr_str_p), true);
|
||||
|
||||
if (!ECMA_IS_VALUE_ERROR (ret_value)
|
||||
&& !ecma_is_value_null (ret_value))
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (ret_value);
|
||||
ecma_string_t *magic_index_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_INDEX);
|
||||
ecma_property_value_t *index_prop_value_p = ecma_get_named_data_property (obj_p, magic_index_str_p);
|
||||
|
||||
ecma_number_t index_num = ecma_get_number_from_value (index_prop_value_p->value);
|
||||
ecma_value_assign_number (&index_prop_value_p->value, index_num + (ecma_number_t) start_idx);
|
||||
|
||||
ecma_deref_ecma_string (magic_index_str_p);
|
||||
}
|
||||
|
||||
ecma_deref_ecma_string (substr_str_p);
|
||||
ECMA_FINALIZE (to_string_val);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 2. */
|
||||
JERRY_ASSERT (ecma_is_value_string (input_string) && ecma_is_value_string (separator));
|
||||
|
||||
ecma_string_t *string_str_p = ecma_get_string_from_value (input_string);
|
||||
ecma_string_t *separator_str_p = ecma_get_string_from_value (separator);
|
||||
|
||||
/* 3. */
|
||||
ecma_length_t string_length = ecma_string_get_length (string_str_p);
|
||||
ecma_length_t separator_length = ecma_string_get_length (separator_str_p);
|
||||
|
||||
/* 4. */
|
||||
if (start_idx + separator_length > string_length)
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool is_different = false;
|
||||
|
||||
/* 5. */
|
||||
for (ecma_length_t i = 0; i < separator_length && !is_different; i++)
|
||||
{
|
||||
ecma_char_t char_from_string = ecma_string_get_char_at_pos (string_str_p, start_idx + i);
|
||||
ecma_char_t char_from_separator = ecma_string_get_char_at_pos (separator_str_p, i);
|
||||
|
||||
if (char_from_string != char_from_separator)
|
||||
{
|
||||
is_different = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_different)
|
||||
{
|
||||
/* 6-7. */
|
||||
ecma_value_t match_array = ecma_op_create_array_object (0, 0, false);
|
||||
ecma_object_t *match_array_p = ecma_get_object_from_value (match_array);
|
||||
ecma_string_t *zero_str_p = ecma_new_ecma_string_from_number (ECMA_NUMBER_ZERO);
|
||||
|
||||
ecma_value_t put_comp = ecma_builtin_helper_def_prop (match_array_p,
|
||||
zero_str_p,
|
||||
ecma_make_string_value (separator_str_p),
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true);
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
|
||||
ecma_string_t *magic_index_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_INDEX);
|
||||
ecma_property_value_t *index_prop_value_p;
|
||||
index_prop_value_p = ecma_create_named_data_property (match_array_p,
|
||||
magic_index_str_p,
|
||||
ECMA_PROPERTY_FLAG_WRITABLE,
|
||||
NULL);
|
||||
ecma_deref_ecma_string (magic_index_str_p);
|
||||
|
||||
ecma_named_data_property_assign_value (match_array_p,
|
||||
index_prop_value_p,
|
||||
ecma_make_uint32_value (start_idx));
|
||||
|
||||
ret_value = match_array;
|
||||
|
||||
ecma_deref_ecma_string (zero_str_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
} /* ecma_builtin_helper_split_match */
|
||||
|
||||
/**
|
||||
* The String.prototype object's 'split' routine
|
||||
@@ -1657,18 +1528,9 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
ECMA_OP_TO_NUMBER_FINALIZE (limit_num);
|
||||
}
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
if (ecma_is_value_empty (ret_value) && limit != 0)
|
||||
{
|
||||
/* This variable indicates that we should return with the current array, to avoid another operation. */
|
||||
bool should_return = false;
|
||||
|
||||
/* 9. */
|
||||
if (limit == 0)
|
||||
{
|
||||
should_return = true;
|
||||
}
|
||||
else /* if (limit != 0) */
|
||||
{
|
||||
ecma_object_t *new_array_p = ecma_get_object_from_value (new_array);
|
||||
|
||||
/* 10. */
|
||||
@@ -1686,8 +1548,6 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
|
||||
should_return = true;
|
||||
|
||||
ecma_deref_ecma_string (zero_str_p);
|
||||
}
|
||||
else /* if (!ecma_is_value_undefined (arg1)) */
|
||||
@@ -1695,9 +1555,12 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
/* 8. */
|
||||
ecma_value_t separator = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
|
||||
bool separator_is_regexp = false;
|
||||
|
||||
if (ecma_is_value_object (arg1)
|
||||
&& ecma_object_class_is (ecma_get_object_from_value (arg1), LIT_MAGIC_STRING_REGEXP_UL))
|
||||
{
|
||||
separator_is_regexp = true;
|
||||
separator = ecma_copy_value (arg1);
|
||||
}
|
||||
else
|
||||
@@ -1714,20 +1577,36 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
const ecma_string_t *this_to_string_p = ecma_get_string_from_value (this_to_string_val);
|
||||
|
||||
/* 11. */
|
||||
if (ecma_string_is_empty (this_to_string_p)
|
||||
&& ecma_is_value_empty (ret_value))
|
||||
if (ecma_string_is_empty (this_to_string_p) && ecma_is_value_empty (ret_value))
|
||||
{
|
||||
/* 11.a */
|
||||
ecma_value_t match_result = ecma_builtin_helper_split_match (this_to_string_val,
|
||||
0,
|
||||
separator);
|
||||
bool should_return = false;
|
||||
|
||||
/* 11.b */
|
||||
if (!ecma_is_value_null (match_result))
|
||||
if (separator_is_regexp)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
ecma_value_t regexp_value = ecma_copy_value_if_not_object (separator);
|
||||
ecma_string_t *substr_str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY);
|
||||
ecma_value_t match_result;
|
||||
match_result = ecma_regexp_exec_helper (regexp_value, ecma_make_string_value (substr_str_p), true);
|
||||
should_return = !ecma_is_value_null (match_result);
|
||||
|
||||
ecma_deref_ecma_string (substr_str_p);
|
||||
ecma_free_value (match_result);
|
||||
#else
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("REGEXP separator is disabled in split method."));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_string_t *separator_str_p = ecma_get_string_from_value (separator);
|
||||
|
||||
if (ecma_string_get_length (separator_str_p) == 0)
|
||||
{
|
||||
should_return = true;
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if (!should_return)
|
||||
{
|
||||
/* 11.c */
|
||||
ecma_string_t *zero_str_p = ecma_new_ecma_string_from_number (ECMA_NUMBER_ZERO);
|
||||
@@ -1741,16 +1620,10 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
false);
|
||||
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
|
||||
/* 11.d */
|
||||
should_return = true;
|
||||
|
||||
ecma_deref_ecma_string (zero_str_p);
|
||||
}
|
||||
|
||||
ecma_free_value (match_result);
|
||||
}
|
||||
else /* if (string_length != 0) || !ecma_is_value_empty (ret_value) */
|
||||
else
|
||||
{
|
||||
/* 4. */
|
||||
ecma_length_t new_array_length = 0;
|
||||
@@ -1762,30 +1635,93 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
ecma_length_t curr_pos = start_pos;
|
||||
|
||||
bool separator_is_empty = false;
|
||||
bool should_return = false;
|
||||
|
||||
/* 6. */
|
||||
const ecma_length_t string_length = ecma_string_get_length (this_to_string_p);
|
||||
|
||||
/* 13. */
|
||||
while (curr_pos < string_length && !should_return && ecma_is_value_empty (ret_value))
|
||||
{
|
||||
ecma_value_t match_result = ecma_builtin_helper_split_match (this_to_string_val,
|
||||
curr_pos,
|
||||
separator);
|
||||
ecma_value_t match_result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
|
||||
/* 13.b */
|
||||
if (ecma_is_value_null (match_result)
|
||||
|| ECMA_IS_VALUE_ERROR (match_result))
|
||||
if (separator_is_regexp)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
ecma_value_t regexp_value = ecma_copy_value_if_not_object (separator);
|
||||
ecma_string_t *substr_str_p = ecma_string_substr (this_to_string_p, curr_pos, string_length);
|
||||
match_result = ecma_regexp_exec_helper (regexp_value, ecma_make_string_value (substr_str_p), true);
|
||||
ecma_deref_ecma_string (substr_str_p);
|
||||
#else
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("REGEXP separator is disabled in split method."));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_string_t *separator_str_p = ecma_get_string_from_value (separator);
|
||||
ecma_length_t separator_length = ecma_string_get_length (separator_str_p);
|
||||
|
||||
if (curr_pos + separator_length <= string_length)
|
||||
{
|
||||
bool is_different = false;
|
||||
for (ecma_length_t i = 0; i < separator_length && !is_different; i++)
|
||||
{
|
||||
ecma_char_t char_from_string = ecma_string_get_char_at_pos (this_to_string_p, curr_pos + i);
|
||||
ecma_char_t char_from_separator = ecma_string_get_char_at_pos (separator_str_p, i);
|
||||
is_different = (char_from_string != char_from_separator);
|
||||
}
|
||||
|
||||
if (!is_different)
|
||||
{
|
||||
/* 6-7. */
|
||||
match_result = ecma_op_create_array_object (0, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ecma_is_value_null (match_result) || ECMA_IS_VALUE_ERROR (match_result))
|
||||
{
|
||||
curr_pos++;
|
||||
}
|
||||
else /* if (!ecma_is_value_null (match_result)) */
|
||||
else
|
||||
{
|
||||
ecma_object_t *match_array_obj_p = ecma_get_object_from_value (match_result);
|
||||
|
||||
ecma_object_t *match_obj_p = ecma_get_object_from_value (match_result);
|
||||
ecma_string_t *zero_str_p = ecma_new_ecma_string_from_number (ECMA_NUMBER_ZERO);
|
||||
ecma_value_t match_comp_value = ecma_op_object_get (match_array_obj_p, zero_str_p);
|
||||
ecma_string_t *magic_index_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_INDEX);
|
||||
ecma_property_value_t *index_prop_value_p;
|
||||
|
||||
|
||||
if (separator_is_regexp)
|
||||
{
|
||||
index_prop_value_p = ecma_get_named_data_property (match_obj_p, magic_index_str_p);
|
||||
ecma_number_t index_num = ecma_get_number_from_value (index_prop_value_p->value);
|
||||
ecma_value_assign_number (&index_prop_value_p->value, index_num + (ecma_number_t) curr_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_string_t *separator_str_p = ecma_get_string_from_value (separator);
|
||||
|
||||
ecma_value_t put_comp = ecma_builtin_helper_def_prop (match_obj_p,
|
||||
zero_str_p,
|
||||
ecma_make_string_value (separator_str_p),
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true);
|
||||
JERRY_ASSERT (ecma_is_value_true (put_comp));
|
||||
|
||||
index_prop_value_p = ecma_create_named_data_property (match_obj_p,
|
||||
magic_index_str_p,
|
||||
ECMA_PROPERTY_FLAG_WRITABLE,
|
||||
NULL);
|
||||
ecma_named_data_property_assign_value (match_obj_p,
|
||||
index_prop_value_p,
|
||||
ecma_make_uint32_value (curr_pos));
|
||||
|
||||
}
|
||||
|
||||
ecma_deref_ecma_string (magic_index_str_p);
|
||||
|
||||
ecma_value_t match_comp_value = ecma_op_object_get (match_obj_p, zero_str_p);
|
||||
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (match_comp_value));
|
||||
|
||||
ecma_string_t *match_str_p = ecma_get_string_from_value (match_comp_value);
|
||||
@@ -1798,13 +1734,10 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
ecma_free_value (match_comp_value);
|
||||
ecma_deref_ecma_string (zero_str_p);
|
||||
|
||||
ecma_string_t *magic_index_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_INDEX);
|
||||
ecma_property_value_t *index_prop_value_p = ecma_get_named_data_property (match_array_obj_p,
|
||||
magic_index_str_p);
|
||||
|
||||
ecma_number_t index_num = ecma_get_number_from_value (index_prop_value_p->value);
|
||||
JERRY_ASSERT (index_num >= 0);
|
||||
|
||||
|
||||
uint32_t end_pos = ecma_number_to_uint32 (index_num);
|
||||
|
||||
if (separator_is_empty)
|
||||
@@ -1813,7 +1746,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
}
|
||||
|
||||
/* 13.c.iii.1-2 */
|
||||
ecma_string_t *substr_str_p = ecma_string_substr (ecma_get_string_from_value (this_to_string_val),
|
||||
ecma_string_t *substr_str_p = ecma_string_substr (this_to_string_p,
|
||||
start_pos,
|
||||
end_pos);
|
||||
|
||||
@@ -1840,11 +1773,10 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
|
||||
/* 13.c.iii.5 */
|
||||
start_pos = end_pos + match_str_length;
|
||||
|
||||
ecma_string_t *magic_length_str_p = ecma_new_ecma_length_string ();
|
||||
|
||||
ECMA_TRY_CATCH (array_length_val,
|
||||
ecma_op_object_get (match_array_obj_p, magic_length_str_p),
|
||||
ecma_op_object_get (match_obj_p, magic_length_str_p),
|
||||
ret_value);
|
||||
|
||||
ECMA_OP_TO_NUMBER_TRY_CATCH (array_length_num, array_length_val, ret_value);
|
||||
@@ -1863,7 +1795,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
ecma_string_t *idx_str_p = ecma_new_ecma_string_from_uint32 (i);
|
||||
ecma_string_t *new_array_idx_str_p = ecma_new_ecma_string_from_uint32 (new_array_length);
|
||||
|
||||
match_comp_value = ecma_op_object_get (match_array_obj_p, idx_str_p);
|
||||
match_comp_value = ecma_op_object_get (match_obj_p, idx_str_p);
|
||||
|
||||
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (match_comp_value));
|
||||
|
||||
@@ -1900,18 +1832,17 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
ecma_deref_ecma_string (magic_length_str_p);
|
||||
ecma_deref_ecma_string (array_length_str_p);
|
||||
ecma_deref_ecma_string (substr_str_p);
|
||||
ecma_deref_ecma_string (magic_index_str_p);
|
||||
} /* if (!ecma_is_value_null (match_result)) */
|
||||
}
|
||||
|
||||
ecma_free_value (match_result);
|
||||
|
||||
} /* while (curr_pos < string_length && !should_return && ecma_is_value_empty (ret_value)) */
|
||||
}
|
||||
|
||||
if (!should_return && !separator_is_empty && ecma_is_value_empty (ret_value))
|
||||
{
|
||||
/* 14. */
|
||||
ecma_string_t *substr_str_p;
|
||||
substr_str_p = ecma_string_substr (ecma_get_string_from_value (this_to_string_val),
|
||||
substr_str_p = ecma_string_substr (this_to_string_p,
|
||||
start_pos,
|
||||
string_length);
|
||||
|
||||
@@ -1931,12 +1862,11 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
ecma_deref_ecma_string (array_length_string_p);
|
||||
ecma_deref_ecma_string (substr_str_p);
|
||||
}
|
||||
} /* if (string_length != 0) || !ecma_is_value_empty (ret_value) */
|
||||
}
|
||||
|
||||
ecma_free_value (separator);
|
||||
} /* if (!ecma_is_value_undefined (arg1)) */
|
||||
} /* if (limit != 0) */
|
||||
} /* if (ecma_is_value_empty (ret_value)) */
|
||||
}
|
||||
}
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
@@ -1953,8 +1883,6 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
return ret_value;
|
||||
} /* ecma_builtin_string_prototype_object_split */
|
||||
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
/**
|
||||
* The String.prototype object's 'substring' routine
|
||||
*
|
||||
|
||||
@@ -53,9 +53,9 @@ ROUTINE (LIT_MAGIC_STRING_LOCALE_COMPARE_UL, ecma_builtin_string_prototype_objec
|
||||
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_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
ROUTINE (LIT_MAGIC_STRING_SPLIT, ecma_builtin_string_prototype_object_split, 2, 2)
|
||||
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)
|
||||
ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_LOWER_CASE_UL, ecma_builtin_string_prototype_object_to_locale_lower_case, 0, 0)
|
||||
|
||||
@@ -180,8 +180,11 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FALSE, "false")
|
||||
#if !defined (CONFIG_DISABLE_MATH_BUILTIN)
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_FLOOR, "floor")
|
||||
#endif
|
||||
#if !defined (CONFIG_DISABLE_REGEXP_BUILTIN)
|
||||
#if !defined (CONFIG_DISABLE_REGEXP_BUILTIN) \
|
||||
|| !defined (CONFIG_DISABLE_STRING_BUILTIN)
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INDEX, "index")
|
||||
#endif
|
||||
#if !defined (CONFIG_DISABLE_REGEXP_BUILTIN)
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_INPUT, "input")
|
||||
#endif
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_IS_NAN, "isNaN")
|
||||
@@ -203,7 +206,7 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SHIFT, "shift")
|
||||
|| !defined (CONFIG_DISABLE_STRING_BUILTIN)
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SLICE, "slice")
|
||||
#endif
|
||||
#if !defined (CONFIG_DISABLE_REGEXP_BUILTIN) && !defined (CONFIG_DISABLE_STRING_BUILTIN)
|
||||
#if !defined (CONFIG_DISABLE_STRING_BUILTIN)
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SPLIT, "split")
|
||||
#endif
|
||||
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_VALUE, "value")
|
||||
|
||||
Reference in New Issue
Block a user