Home
last modified time | relevance | path

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

12

/third_party/jerryscript/jerry-core/lit/
Dlit-strings.h87 bool lit_is_valid_utf8_string (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t buf_size);
88 bool lit_is_valid_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_size_t buf_size);
95 lit_utf8_size_t lit_zt_utf8_string_size (const lit_utf8_byte_t *utf8_str_p);
96 lit_utf8_size_t lit_get_utf8_size_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_siz…
99 ecma_length_t lit_utf8_string_length (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_buf_s…
100 …get_utf8_length_of_cesu8_string (const lit_utf8_byte_t *cesu8_buf_p, lit_utf8_size_t cesu8_buf_siz…
103 lit_string_hash_t lit_utf8_string_calc_hash (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf…
105 lit_utf8_size_t utf8_buf_size);
108 ecma_char_t lit_utf8_string_code_unit_at (const lit_utf8_byte_t *utf8_buf_p, lit_utf8_size_t utf8_b…
110 lit_utf8_size_t lit_get_unicode_char_size_by_utf8_first_byte (const lit_utf8_byte_t first_byte);
[all …]
Dlit-magic-strings.c67 lit_utf8_size_t
94 lit_get_magic_string_size_block_start (lit_utf8_size_t size) /**< magic string size */ in lit_get_magic_string_size_block_start()
132 lit_utf8_size_t
145 const lit_utf8_size_t *ex_str_sizes) /**< sizes of the strings */ in lit_magic_strings_ex_set()
171 lit_utf8_size_t string_size = JERRY_CONTEXT (lit_magic_string_ex_sizes)[id]; in lit_magic_strings_ex_set()
180 const lit_utf8_size_t prev_string_size = lit_get_magic_string_ex_size (prev_id); in lit_magic_strings_ex_set()
204 lit_utf8_size_t string_size) /**< string size in bytes */ in lit_is_utf8_string_magic()
212 lit_utf8_size_t first = lit_get_magic_string_size_block_start (string_size); in lit_is_utf8_string_magic()
213 lit_utf8_size_t last = lit_get_magic_string_size_block_start (string_size + 1); in lit_is_utf8_string_magic()
217 lit_utf8_size_t middle = ((first + last) / 2); /**< mid point of search */ in lit_is_utf8_string_magic()
[all …]
Dlit-strings.c32 lit_utf8_size_t buf_size) /**< string size */ in lit_is_valid_utf8_string()
34 lit_utf8_size_t idx = 0; in lit_is_valid_utf8_string()
48 lit_utf8_size_t extra_bytes_count; in lit_is_valid_utf8_string()
79 for (lit_utf8_size_t offset = 0; offset < extra_bytes_count; ++offset) in lit_is_valid_utf8_string()
129 lit_utf8_size_t buf_size) /**< string size */ in lit_is_valid_cesu8_string()
131 lit_utf8_size_t idx = 0; in lit_is_valid_cesu8_string()
143 lit_utf8_size_t extra_bytes_count; in lit_is_valid_cesu8_string()
167 for (lit_utf8_size_t offset = 0; offset < extra_bytes_count; ++offset) in lit_is_valid_cesu8_string()
278 lit_utf8_size_t
282 return (lit_utf8_size_t) strlen ((const char *) utf8_str_p); in lit_zt_utf8_string_size()
[all …]
Dlit-magic-strings.h86 lit_utf8_size_t lit_get_magic_string_size (uint32_t id);
89 lit_utf8_size_t lit_get_magic_string_ex_size (uint32_t id);
93 const lit_utf8_size_t *ex_str_sizes);
95 lit_magic_string_id_t lit_is_utf8_string_magic (const lit_utf8_byte_t *string_p, lit_utf8_size_t st…
96 …id_t lit_is_utf8_string_pair_magic (const lit_utf8_byte_t *string1_p, lit_utf8_size_t string1_size,
97 … const lit_utf8_byte_t *string2_p, lit_utf8_size_t string2_size);
99 …ex_id_t lit_is_ex_utf8_string_magic (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);
101 lit_utf8_size_t string1_size,
103 lit_utf8_size_t string2_size);
106 lit_utf8_size_t buffer_size);
Dlit-globals.h109 typedef uint32_t lit_utf8_size_t; typedef
/third_party/jerryscript/jerry-core/ecma/builtin-objects/
Decma-builtin-number-prototype.c74 static lit_utf8_size_t
76lit_utf8_size_t num_digits, /**< length of the string representation */ in ecma_builtin_number_prototype_helper_to_string()
79lit_utf8_size_t to_num_digits) /**< requested number of digits */ in ecma_builtin_number_prototype_helper_to_string()
104 lit_utf8_size_t to_copy = JERRY_MIN (num_digits, to_num_digits); in ecma_builtin_number_prototype_helper_to_string()
105 to_copy = JERRY_MIN (to_copy, (lit_utf8_size_t) exponent); in ecma_builtin_number_prototype_helper_to_string()
131 lit_utf8_size_t to_copy = JERRY_MIN (num_digits, to_num_digits); in ecma_builtin_number_prototype_helper_to_string()
144 return (lit_utf8_size_t) (p - to_digits_p); in ecma_builtin_number_prototype_helper_to_string()
152 static inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE
157lit_utf8_size_t to_num_digits) /**< requested number of digits */ in ecma_builtin_binary_floating_number_to_string()
183 return (lit_utf8_size_t) (p - to_digits_p); in ecma_builtin_binary_floating_number_to_string()
[all …]
Decma-builtin-global.c200lit_utf8_size_t input_size, /**< routine's first argument's in ecma_builtin_global_object_decode_uri_helper()
206 lit_utf8_size_t output_size = 0; in ecma_builtin_global_object_decode_uri_helper()
421lit_utf8_size_t input_size, /**< routine's first argument's in ecma_builtin_global_object_encode_uri_helper()
432 lit_utf8_size_t output_length = 0; in ecma_builtin_global_object_encode_uri_helper()
458 lit_utf8_size_t read_size = lit_read_code_unit_from_utf8 (input_char_p, &next_ch); in ecma_builtin_global_object_encode_uri_helper()
471 lit_utf8_size_t utf_size = lit_code_point_to_utf8 (cp, octets); in ecma_builtin_global_object_encode_uri_helper()
508 lit_utf8_size_t read_size = lit_read_code_unit_from_utf8 (input_char_p, &next_ch); in ecma_builtin_global_object_encode_uri_helper()
517 lit_utf8_size_t utf_size = lit_code_point_to_utf8 (cp, octets); in ecma_builtin_global_object_encode_uri_helper()
588 lit_utf8_size_t input_size) /**< routine's first argument's in ecma_builtin_global_object_escape()
597 lit_utf8_size_t output_length = 0; in ecma_builtin_global_object_escape()
[all …]
Decma-builtin-helpers.c61 const lit_utf8_size_t buffer_size = 9 + ecma_string_get_size (tag_str_p); in ecma_builtin_helper_object_to_string_tag_helper()
77 … (lit_utf8_size_t) ((str_buffer + buffer_size) - buffer_ptr)); in ecma_builtin_helper_object_to_string_tag_helper()
84 … (lit_utf8_size_t) ((str_buffer + buffer_size) - buffer_ptr)); in ecma_builtin_helper_object_to_string_tag_helper()
90 … (lit_utf8_size_t) ((str_buffer + buffer_size) - buffer_ptr)); in ecma_builtin_helper_object_to_string_tag_helper()
94 …ret_string_p = ecma_new_ecma_string_from_utf8 (str_buffer, (lit_utf8_size_t) (buffer_ptr - str_buf… in ecma_builtin_helper_object_to_string_tag_helper()
171 const lit_utf8_size_t buffer_size = 27; in ecma_builtin_helper_object_to_string()
188 … (lit_utf8_size_t) ((str_buffer + buffer_size) - buffer_ptr)); in ecma_builtin_helper_object_to_string()
192 …ret_string_p = ecma_new_ecma_string_from_utf8 (str_buffer, (lit_utf8_size_t) (buffer_ptr - str_buf… in ecma_builtin_helper_object_to_string()
850 lit_utf8_size_t replace_size; in ecma_builtin_replace_substitute()
868 (lit_utf8_size_t) (curr_p - last_inserted_end_p - 1)); in ecma_builtin_replace_substitute()
[all …]
Decma-builtin-json.c124 (lit_utf8_size_t) (current_p - unappended_p)); in ecma_builtin_json_parse_string()
202 (lit_utf8_size_t) (current_p - unappended_p)); in ecma_builtin_json_parse_string()
290 token_p->u.number = ecma_utf8_string_to_number (start_p, (lit_utf8_size_t) (current_p - start_p)); in ecma_builtin_json_parse_number()
373 lit_utf8_size_t size = lit_get_magic_string_size (LIT_MAGIC_STRING_NULL); in ecma_builtin_json_parse_next_token()
389 lit_utf8_size_t size = lit_get_magic_string_size (LIT_MAGIC_STRING_TRUE); in ecma_builtin_json_parse_next_token()
405 lit_utf8_size_t size = lit_get_magic_string_size (LIT_MAGIC_STRING_FALSE); in ecma_builtin_json_parse_next_token()
696 lit_utf8_size_t string_size) /**< size of the string */ in ecma_builtin_json_parse_buffer()
791 (lit_utf8_size_t) (str_p - regular_str_start_p - 1)); in ecma_builtin_json_quote()
800 (lit_utf8_size_t) (str_p - regular_str_start_p - 1)); in ecma_builtin_json_quote()
852 (lit_utf8_size_t) (str_end_p - regular_str_start_p)); in ecma_builtin_json_quote()
[all …]
Decma-builtin-string-prototype.c462 lit_utf8_size_t search_size; in ecma_builtin_string_prototype_object_replace()
485 const lit_utf8_size_t byte_offset = (lit_utf8_size_t) (curr_p - replace_ctx.string_p); in ecma_builtin_string_prototype_object_replace()
534 (lit_utf8_size_t) (input_end_p - match_end_p)); in ecma_builtin_string_prototype_object_replace()
851 lit_utf8_size_t string_size; in ecma_builtin_string_prototype_object_split()
858 lit_utf8_size_t separator_size; in ecma_builtin_string_prototype_object_split()
878 … (lit_utf8_size_t) (current_p - last_str_begin_p)); in ecma_builtin_string_prototype_object_split()
900 … (lit_utf8_size_t) (string_end_p - last_str_begin_p)); in ecma_builtin_string_prototype_object_split()
1016 lit_utf8_size_t output_length = 0; in ecma_builtin_string_prototype_object_conversion_helper()
1152 lit_utf8_size_t size = ecma_string_get_size (original_string_p); in ecma_builtin_string_prototype_object_repeat()
1164 lit_utf8_size_t total_size = size * (lit_utf8_size_t) repeat_count; in ecma_builtin_string_prototype_object_repeat()
[all …]
Decma-builtin-helpers.h75 lit_utf8_size_t string_size; /**< source string size */
77 lit_utf8_size_t matched_size; /**< matcehd string size */
78 lit_utf8_size_t match_byte_pos; /**< byte position of the match in the source string */
216 lit_utf8_size_t string_size);
Decma-builtin-string.c74 lit_utf8_size_t utf8_buf_size = args_number * LIT_CESU8_MAX_BYTES_IN_CODE_UNIT; in ecma_builtin_string_object_from_char_code()
80 lit_utf8_size_t utf8_buf_used = 0; in ecma_builtin_string_object_from_char_code()
/third_party/jerryscript/jerry-core/ecma/base/
Decma-helpers.h105 lit_utf8_size_t utf8_str_size; \
294 ecma_string_t *ecma_new_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t str…
295 …ma_new_nonref_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);
296 ecma_string_t *ecma_find_special_string (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_si…
299 lit_utf8_size_t string_size);
311 lit_utf8_size_t cesu8_string2_size,
312 lit_utf8_size_t cesu8_string2_length);
320 lit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT
323 lit_utf8_size_t buffer_size);
324 lit_utf8_size_t JERRY_ATTR_WARN_UNUSED_RESULT
[all …]
Decma-helpers-string.c65 lit_utf8_size_t string_size, /**< string size */ in ecma_string_to_array_index()
131 lit_utf8_size_t *size_p) /**< [out] size of the ecma string */ in ecma_string_get_chars_fast()
249 ecma_new_ecma_string_from_utf8_buffer (lit_utf8_size_t length, /**< length of the buffer */ in ecma_new_ecma_string_from_utf8_buffer()
250 lit_utf8_size_t size, /**< size of the buffer */ in ecma_new_ecma_string_from_utf8_buffer()
298 lit_utf8_size_t string_size) /**< string size */ in ecma_find_special_string()
340 lit_utf8_size_t string_size) /**< string size */ in ecma_new_ecma_string_from_utf8()
365 …g_t * ecma_new_nonref_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t size) in ecma_new_nonref_ecma_string_from_utf8()
411lit_utf8_size_t string_size) /**< utf-8 string size */ in ecma_new_ecma_string_from_utf8_converted_to_cesu8()
416 lit_utf8_size_t converted_string_size = 0; in ecma_new_ecma_string_from_utf8_converted_to_cesu8()
417 lit_utf8_size_t pos = 0; in ecma_new_ecma_string_from_utf8_converted_to_cesu8()
[all …]
Decma-helpers-conversion.c367 lit_utf8_size_t str_size) /**< string size */ in ecma_utf8_string_to_number()
722 lit_utf8_size_t
725 lit_utf8_size_t buffer_size) /**< size of buffer */ in ecma_uint32_to_utf8_string()
741 lit_utf8_size_t bytes_copied = (lit_utf8_size_t) (out_buffer_p + buffer_size - buf_p); in ecma_uint32_to_utf8_string()
867 lit_utf8_size_t
937 static inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE
989 return (lit_utf8_size_t) (char_cnt - *exp_p); in ecma_double_to_binary_floating_point()
1003 lit_utf8_size_t
1025 lit_utf8_size_t
1028 lit_utf8_size_t buffer_size) /**< size of buffer */ in ecma_number_to_utf8_string()
[all …]
Decma-module.c50 lit_utf8_size_t utf8_size; in ecma_module_create_normalized_path()
58 lit_utf8_size_t module_path_size = 0; in ecma_module_create_normalized_path()
68 lit_utf8_size_t module_utf8_size; in ecma_module_create_normalized_path()
85 …ret_p = ecma_new_ecma_string_from_utf8_converted_to_cesu8 (normalized_out_p, (lit_utf8_size_t) (no… in ecma_module_create_normalized_path()
857 lit_utf8_size_t module_path_size = ecma_string_get_size (module_p->path_p); in ecma_module_parse()
860 lit_utf8_size_t module_path_utf8_size; in ecma_module_parse()
Decma-helpers-errol.c136 inline lit_utf8_size_t JERRY_ATTR_ALWAYS_INLINE
235 return (lit_utf8_size_t) (dst_p - buffer_p); in ecma_errol0_dtoa()
Decma-helpers-number.c723 lit_utf8_size_t string_buff_size, /**< routine's first argument's in ecma_number_parse_int()
901 lit_utf8_size_t string_buff_size) /**< routine's first argument's in ecma_number_parse_float()
939 const lit_utf8_size_t infinity_length = lit_get_magic_string_size (LIT_MAGIC_STRING_INFINITY_UL); in ecma_number_parse_float()
1066 ecma_number_t ret_num = ecma_utf8_string_to_number (start_p, (lit_utf8_size_t) (end_p - start_p)); in ecma_number_parse_float()
Decma-globals.h1595 lit_utf8_size_t size; /**< size of this long utf-8 string in bytes */
1596 lit_utf8_size_t length; /**< length of this long utf-8 string in bytes */
1636 lit_utf8_size_t current_size; /**< size of the data in the buffer */
1649 ((lit_utf8_size_t) (header_p->current_size - sizeof (ecma_ascii_string_t)))
Decma-literal-storage.h43 ecma_value_t ecma_find_or_create_literal_string (const lit_utf8_byte_t *chars_p, lit_utf8_size_t si…
/third_party/jerryscript/jerry-core/api/
Djerry-snapshot.c1380 const lit_utf8_size_t lit1_size = ecma_string_get_size (literal1); in jerry_save_literals_compare()
1381 const lit_utf8_size_t lit2_size = ecma_string_get_size (literal2); in jerry_save_literals_compare()
1396 static lit_utf8_size_t
1398 lit_utf8_size_t num_of_nodes, /**< number of nodes */ in jerry_save_literals_heap_max()
1399 lit_utf8_size_t node_idx, /**< index of parent node */ in jerry_save_literals_heap_max()
1400 lit_utf8_size_t child_idx1, /**< index of the first child */ in jerry_save_literals_heap_max()
1401 lit_utf8_size_t child_idx2) /**< index of the second child */ in jerry_save_literals_heap_max()
1403 lit_utf8_size_t max_idx = node_idx; in jerry_save_literals_heap_max()
1425 lit_utf8_size_t num_of_nodes, /**< number of nodes */ in jerry_save_literals_down_heap()
1426 lit_utf8_size_t node_idx) /**< index of parent node */ in jerry_save_literals_down_heap()
[all …]
/third_party/jerryscript/jerry-core/ecma/operations/
Decma-regexp-object.c1211 … const lit_utf8_size_t capture_size = (lit_utf8_size_t) (capture_p->end_p - capture_p->begin_p); in ecma_regexp_run()
1568 const lit_utf8_size_t capture_size = (lit_utf8_size_t) (capture_p->end_p - capture_p->begin_p); in ecma_regexp_get_capture_value()
1683 lit_utf8_size_t input_size; in ecma_regexp_exec_helper()
1684 lit_utf8_size_t input_length; in ecma_regexp_exec_helper()
1849 lit_utf8_size_t match_length; in ecma_regexp_exec_helper()
1855 match_length = (lit_utf8_size_t) (match_end_p - match_begin_p); in ecma_regexp_exec_helper()
1860 (lit_utf8_size_t) (match_end_p - match_begin_p)); in ecma_regexp_exec_helper()
2053 lit_utf8_size_t flags_size; in ecma_regexp_split_helper()
2132 const lit_utf8_size_t string_length = ecma_string_get_length (string_p); in ecma_regexp_split_helper()
2352 lit_utf8_size_t string_size; in ecma_regexp_split_helper()
[all …]
Decma-exceptions.c276 …ecma_stringbuilder_append_raw (&builder, (lit_utf8_byte_t *) start_p, (lit_utf8_size_t) (end_p - s… in ecma_raise_standard_error_with_format()
318 …ecma_stringbuilder_append_raw (&builder, (lit_utf8_byte_t *) start_p, (lit_utf8_size_t) (end_p - s… in ecma_raise_standard_error_with_format()
/third_party/jerryscript/tests/unit-core/
Dtest-number-to-string.cpp83 lit_utf8_size_t str_size = ecma_number_to_utf8_string (nums[i], str, sizeof (str));
/third_party/jerryscript/jerry-core/parser/js/
Dcommon.c75 lit_utf8_size_t str_size = ecma_number_to_utf8_string (num_p, str_buf, sizeof (str_buf)); in util_print_number()

12