Home
last modified time | relevance | path

Searched refs:str_p (Results 1 – 25 of 25) sorted by relevance

/third_party/jerryscript/jerry-core/ecma/base/
Decma-helpers-conversion.c294 ecma_utf8_string_to_number_by_radix (const lit_utf8_byte_t *str_p, /**< utf-8 string */ in ecma_utf8_string_to_number_by_radix() argument
306 for (const lit_utf8_byte_t * iter_p = str_p; iter_p <= end_p; iter_p++) in ecma_utf8_string_to_number_by_radix()
326 for (const lit_utf8_byte_t * iter_p = str_p; iter_p <= end_p; iter_p++) in ecma_utf8_string_to_number_by_radix()
366 ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */ in ecma_utf8_string_to_number() argument
376 ecma_string_trim_helper (&str_p, &str_size); in ecma_utf8_string_to_number()
377 const lit_utf8_byte_t *end_p = str_p + (str_size - 1); in ecma_utf8_string_to_number()
384 if (end_p >= str_p + 2 in ecma_utf8_string_to_number()
385 && str_p[0] == LIT_CHAR_0) in ecma_utf8_string_to_number()
387 switch (LEXER_TO_ASCII_LOWERCASE (str_p[1])) in ecma_utf8_string_to_number()
391 return ecma_utf8_string_to_number_by_radix (str_p + 2, end_p, 16); in ecma_utf8_string_to_number()
[all …]
Decma-helpers.h288 uint32_t ecma_op_advance_string_index (ecma_string_t *str_p, uint32_t index, bool is_unicode);
317 ecma_number_t ecma_string_to_number (const ecma_string_t *str_p);
318 uint32_t ecma_string_get_array_index (const ecma_string_t *str_p);
507 ecma_number_t ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, lit_utf8_size_t str_size);
Decma-helpers-string.c950 ecma_string_get_array_index (const ecma_string_t *str_p) /**< ecma-string */ in ecma_string_get_array_index() argument
952 if (ECMA_IS_DIRECT_STRING (str_p)) in ecma_string_get_array_index()
954 if (ECMA_IS_DIRECT_STRING_WITH_TYPE (str_p, ECMA_DIRECT_STRING_UINT)) in ecma_string_get_array_index()
957 return (uint32_t) ECMA_GET_DIRECT_STRING_VALUE (str_p); in ecma_string_get_array_index()
963 if (ECMA_STRING_GET_CONTAINER (str_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC) in ecma_string_get_array_index()
968 return str_p->u.uint32_number; in ecma_string_get_array_index()
2870 ecma_op_advance_string_index (ecma_string_t *str_p, /**< input string */ in ecma_op_advance_string_index() argument
2887 ecma_length_t str_len = ecma_string_get_length (str_p); in ecma_op_advance_string_index()
2894 ecma_char_t first = ecma_string_get_char_at_pos (str_p, index); in ecma_op_advance_string_index()
2901 ecma_char_t second = ecma_string_get_char_at_pos (str_p, next_index); in ecma_op_advance_string_index()
/third_party/jerryscript/jerry-core/ecma/builtin-objects/
Decma-builtin-date.c55 ecma_date_parse_date_chars (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */ in ecma_date_parse_date_chars() argument
62 const lit_utf8_byte_t *str_start_p = *str_p; in ecma_date_parse_date_chars()
66 if (*str_p >= str_end_p || !lit_char_is_decimal_digit (lit_cesu8_read_next (str_p))) in ecma_date_parse_date_chars()
72 …ecma_number_t parsed_number = ecma_utf8_string_to_number (str_start_p, (lit_utf8_size_t) (*str_p -… in ecma_date_parse_date_chars()
88 ecma_date_parse_special_char (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */ in ecma_date_parse_special_char() argument
92 if ((*str_p < str_end_p) && (**str_p == expected_char)) in ecma_date_parse_special_char()
94 (*str_p)++; in ecma_date_parse_special_char()
110 ecma_date_parse_year (const lit_utf8_byte_t **str_p, /**< pointer to the cesu8 string */ in ecma_date_parse_year() argument
113 bool is_year_sign_negative = ecma_date_parse_special_char (str_p, str_end_p, '-'); in ecma_date_parse_year()
114 const lit_utf8_byte_t *str_start_p = *str_p; in ecma_date_parse_year()
[all …]
Decma-builtin-intrinsic.c109 ecma_string_t *str_p = ecma_op_to_string (routine_arg_1); in ecma_builtin_intrinsic_dispatch_routine() local
111 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_builtin_intrinsic_dispatch_routine()
116 ECMA_STRING_TO_UTF8_STRING (str_p, string_buff, string_buff_size); in ecma_builtin_intrinsic_dispatch_routine()
131 ecma_deref_ecma_string (str_p); in ecma_builtin_intrinsic_dispatch_routine()
Decma-builtin-json.c777 const lit_utf8_byte_t *str_p = string_buff; in ecma_builtin_json_quote() local
779 const lit_utf8_byte_t *str_end_p = str_p + string_buff_size; in ecma_builtin_json_quote()
783 while (str_p < str_end_p) in ecma_builtin_json_quote()
785 lit_utf8_byte_t c = *str_p++; in ecma_builtin_json_quote()
791 (lit_utf8_size_t) (str_p - regular_str_start_p - 1)); in ecma_builtin_json_quote()
792 regular_str_start_p = str_p; in ecma_builtin_json_quote()
800 (lit_utf8_size_t) (str_p - regular_str_start_p - 1)); in ecma_builtin_json_quote()
801 regular_str_start_p = str_p; in ecma_builtin_json_quote()
1203 ecma_string_t *str_p = ecma_op_to_string (value); in ecma_builtin_json_serialize_property() local
1206 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_builtin_json_serialize_property()
[all …]
Decma-builtin-global.c816 ecma_string_t *str_p = ecma_op_to_string (routine_arg_1); in ecma_builtin_global_dispatch_routine() local
818 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_builtin_global_dispatch_routine()
827 ECMA_STRING_TO_UTF8_STRING (str_p, string_buff, string_buff_size); in ecma_builtin_global_dispatch_routine()
843 ecma_deref_ecma_string (str_p); in ecma_builtin_global_dispatch_routine()
847 lit_utf8_size_t input_size = ecma_string_get_size (str_p); in ecma_builtin_global_dispatch_routine()
853 ecma_string_to_utf8_bytes (str_p, input_start_p, input_size); in ecma_builtin_global_dispatch_routine()
895 ecma_deref_ecma_string (str_p); in ecma_builtin_global_dispatch_routine()
Decma-builtin-helpers-date.c611 const char *str_p = NULL; in ecma_date_to_string_format() local
654 str_p = month_names_p[month]; in ecma_date_to_string_format()
678 str_p = day_names_p[day]; in ecma_date_to_string_format()
742 if (str_p != NULL) in ecma_date_to_string_format()
745 memcpy (dest_p, str_p, 3); in ecma_date_to_string_format()
Decma-builtin-string.c369 ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]); in ecma_builtin_string_dispatch_call() local
370 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_builtin_string_dispatch_call()
375 ret_value = ecma_make_string_value (str_p); in ecma_builtin_string_dispatch_call()
Decma-builtin-number-prototype.c525 ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (buff, (lit_utf8_size_t) buff_index); in ecma_builtin_number_prototype_object_to_string() local
526 ret_value = ecma_make_string_value (str_p); in ecma_builtin_number_prototype_object_to_string()
960 …ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (buff, (lit_utf8_size_t) (actual_char_p - bu… in ecma_builtin_number_prototype_object_to_precision() local
962 ret_value = ecma_make_string_value (str_p); in ecma_builtin_number_prototype_object_to_precision()
/third_party/jerryscript/jerry-core/vm/
Dvm-utils.c118 ecma_string_t *str_p = ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY); in vm_get_backtrace() local
122 func_name = ecma_concat_ecma_strings (func_name, str_p); in vm_get_backtrace()
125 ecma_deref_ecma_string(str_p); in vm_get_backtrace()
128 ecma_fast_array_set_property (array_p, index, ecma_make_string_value (str_p)); in vm_get_backtrace()
129 ecma_deref_ecma_string (str_p); in vm_get_backtrace()
/third_party/jerryscript/jerry-core/ecma/operations/
Decma-regexp-object.c512 const lit_utf8_byte_t **str_p) /**< reference to string pointer */ in ecma_regexp_advance() argument
514 JERRY_ASSERT (str_p != NULL); in ecma_regexp_advance()
515 lit_code_point_t cp = lit_cesu8_read_next (str_p); in ecma_regexp_advance()
520 && *str_p < re_ctx_p->input_end_p) in ecma_regexp_advance()
522 const ecma_char_t next_ch = lit_cesu8_peek_next (*str_p); in ecma_regexp_advance()
526 *str_p += LIT_UTF8_MAX_BYTES_IN_CODE_UNIT; in ecma_regexp_advance()
541 ecma_regexp_unicode_advance (const lit_utf8_byte_t **str_p, /**< reference to string pointer */ in ecma_regexp_unicode_advance() argument
544 JERRY_ASSERT (str_p != NULL); in ecma_regexp_unicode_advance()
545 const lit_utf8_byte_t *current_p = *str_p; in ecma_regexp_unicode_advance()
559 *str_p = current_p; in ecma_regexp_unicode_advance()
[all …]
Decma-string-object.c53 ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]); in ecma_op_create_string_object() local
55 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_op_create_string_object()
60 prim_value = ecma_make_string_value (str_p); in ecma_op_create_string_object()
Decma-symbol-object.c59 ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]); in ecma_op_create_symbol() local
62 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_op_create_symbol()
67 string_desc = ecma_make_string_value (str_p); in ecma_op_create_symbol()
Decma-function-object.c178 ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]); in ecma_op_create_dynamic_function_arguments_helper() local
180 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_op_create_dynamic_function_arguments_helper()
182 return str_p; in ecma_op_create_dynamic_function_arguments_helper()
187 return str_p; in ecma_op_create_dynamic_function_arguments_helper()
190 ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (str_p); in ecma_op_create_dynamic_function_arguments_helper()
191 ecma_deref_ecma_string (str_p); in ecma_op_create_dynamic_function_arguments_helper()
195 str_p = ecma_op_to_string (arguments_list_p[idx]); in ecma_op_create_dynamic_function_arguments_helper()
197 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_op_create_dynamic_function_arguments_helper()
200 return str_p; in ecma_op_create_dynamic_function_arguments_helper()
204 ecma_stringbuilder_append (&builder, str_p); in ecma_op_create_dynamic_function_arguments_helper()
[all …]
Decma-conversion.c244 ecma_string_t *str_p = ecma_get_string_from_value (value); in ecma_op_to_boolean() local
246 return !ecma_string_is_empty (str_p); in ecma_op_to_boolean()
280 ecma_string_t *str_p = ecma_get_string_from_value (value); in ecma_op_to_number() local
281 return ecma_make_number_value (ecma_string_to_number (str_p)); in ecma_op_to_number()
353 ecma_string_t *str_p = ecma_get_string_from_value (value); in ecma_get_number() local
354 *number_p = ecma_string_to_number (str_p); in ecma_get_number()
Decma-regexp-object.h152 lit_code_point_t ecma_regexp_unicode_advance (const lit_utf8_byte_t **str_p, const lit_utf8_byte_t …
169 ecma_value_t ecma_op_regexp_exec (ecma_value_t this_arg, ecma_string_t *str_p);
/third_party/jerryscript/jerry-core/api/
Djerry.c1392 ecma_string_t *str_p = ecma_op_to_string (value); in jerry_value_to_string() local
1393 if (JERRY_UNLIKELY (str_p == NULL)) in jerry_value_to_string()
1398 return jerry_return (ecma_make_string_value (str_p)); in jerry_value_to_string()
1708 jerry_create_string_from_utf8 (const jerry_char_t *str_p) /**< pointer to string */ in jerry_create_string_from_utf8() argument
1710 …return jerry_create_string_sz_from_utf8 (str_p, lit_zt_utf8_string_size ((lit_utf8_byte_t *) str_p in jerry_create_string_from_utf8()
1722 jerry_create_string_sz_from_utf8 (const jerry_char_t *str_p, /**< pointer to string */ in jerry_create_string_sz_from_utf8() argument
1727 …tring_t *ecma_str_p = ecma_new_ecma_string_from_utf8_converted_to_cesu8 ((lit_utf8_byte_t *) str_p, in jerry_create_string_sz_from_utf8()
1742 jerry_create_string (const jerry_char_t *str_p) /**< pointer to string */ in jerry_create_string() argument
1744 return jerry_create_string_sz (str_p, lit_zt_utf8_string_size ((lit_utf8_byte_t *) str_p)); in jerry_create_string()
1756 jerry_create_string_sz (const jerry_char_t *str_p, /**< pointer to string */ in jerry_create_string_sz() argument
[all …]
Djerry-snapshot.c298 lit_utf8_byte_t *str_p = (lit_utf8_byte_t *) "Unsupported static snapshot literal: "; in static_snapshot_error_unsupported_literal() local
299 ecma_stringbuilder_t builder = ecma_stringbuilder_create_raw (str_p, 37); in static_snapshot_error_unsupported_literal()
/third_party/jerryscript/jerry-core/debugger/
Ddebugger.c518 ecma_string_t *str_p = ecma_op_to_string (prop_value_p.value); in jerry_debugger_send_scope_variables() local
519 JERRY_ASSERT (str_p != NULL); in jerry_debugger_send_scope_variables()
522 str_p, in jerry_debugger_send_scope_variables()
526 ecma_deref_ecma_string (str_p); in jerry_debugger_send_scope_variables()
530 ecma_deref_ecma_string (str_p); in jerry_debugger_send_scope_variables()
582 ecma_string_t *str_p = ecma_op_to_string (result); in jerry_debugger_send_eval() local
583 ecma_value_t to_string_value = ecma_make_string_value (str_p); in jerry_debugger_send_eval()
621 ecma_string_t *str_p = ecma_op_to_string (result); in jerry_debugger_send_eval() local
622 JERRY_ASSERT (str_p != NULL); in jerry_debugger_send_eval()
624 message = ecma_make_string_value (str_p); in jerry_debugger_send_eval()
/third_party/jerryscript/jerry-core/include/
Djerryscript-core.h511 jerry_value_t jerry_create_string_from_utf8 (const jerry_char_t *str_p);
512 jerry_value_t jerry_create_string_sz_from_utf8 (const jerry_char_t *str_p, jerry_size_t str_size);
513 jerry_value_t jerry_create_string (const jerry_char_t *str_p);
514 jerry_value_t jerry_create_string_sz (const jerry_char_t *str_p, jerry_size_t str_size);
/third_party/jerryscript/tests/unit-core/
Dtest-api-set-and-clear-error-flag.cpp23 compare_str (jerry_value_t value, const jerry_char_t *str_p, size_t str_len) in compare_str() argument
29 TEST_ASSERT (!memcmp (str_p, str_buff, str_len)); in compare_str()
Dtest-api.cpp315 const char *str_p) /**< property name */ in get_property() argument
317 jerry_value_t prop_name_val = jerry_create_string ((const jerry_char_t *) str_p); in get_property()
325 const char *str_p, /**< property name */ in set_property() argument
328 jerry_value_t prop_name_val = jerry_create_string ((const jerry_char_t *) str_p); in set_property()
/third_party/jerryscript/jerry-core/ecma/builtin-objects/typedarray/
Decma-builtin-typedarray-prototype.c2053 ecma_string_t *str_p = ecma_op_to_string (call_value); in ecma_builtin_typedarray_prototype_to_locale_string_helper() local
2055 if (JERRY_UNLIKELY (str_p == NULL)) in ecma_builtin_typedarray_prototype_to_locale_string_helper()
2062 ret_value = ecma_make_string_value (str_p); in ecma_builtin_typedarray_prototype_to_locale_string_helper()
2063 ecma_deref_ecma_string (str_p); in ecma_builtin_typedarray_prototype_to_locale_string_helper()
/third_party/jerryscript/docs/
D02.API-REFERENCE.md4412 jerry_create_string (const jerry_char_t *str_p);
4415 - `str_p` - non-null pointer to string
4450 jerry_create_string_sz (const jerry_char_t *str_p,
4454 - `str_p` - non-null pointer to string
4494 jerry_create_string_from_utf8 (const jerry_char_t *str_p);
4497 - `str_p` - non-null pointer to string
4536 jerry_create_string_sz_from_utf8 (const jerry_char_t *str_p,
4540 - `str_p` - non-null pointer to string