/third_party/jerryscript/jerry-core/parser/js/ |
D | common.c | 35 util_free_literal (lexer_literal_t *literal_p) /**< literal */ in util_free_literal() argument 37 if (literal_p->type == LEXER_IDENT_LITERAL in util_free_literal() 38 || literal_p->type == LEXER_STRING_LITERAL) in util_free_literal() 40 if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR)) in util_free_literal() 42 jmem_heap_free_block ((void *) literal_p->u.char_p, literal_p->prop.length); in util_free_literal() 45 else if ((literal_p->type == LEXER_FUNCTION_LITERAL) in util_free_literal() 46 || (literal_p->type == LEXER_REGEXP_LITERAL)) in util_free_literal() 48 ecma_bytecode_deref (literal_p->u.bytecode_p); in util_free_literal() 84 util_print_literal (lexer_literal_t *literal_p) /**< literal */ in util_print_literal() argument 86 if (literal_p->type == LEXER_IDENT_LITERAL) in util_print_literal() [all …]
|
D | js-scanner-util.c | 463 scanner_literal_is_arguments (lexer_lit_location_t *literal_p) /**< literal */ in scanner_literal_is_arguments() argument 465 return lexer_compare_identifier_to_string (literal_p, (const uint8_t *) "arguments", 9); in scanner_literal_is_arguments() 490 lexer_lit_location_t *literal_p; in scanner_pop_literal_pool() local 523 …while ((literal_p = (lexer_lit_location_t *) parser_list_iterator_next (&literal_iterator)) != NUL… in scanner_pop_literal_pool() 525 uint8_t type = literal_p->type; in scanner_pop_literal_pool() 532 …f (!(status_flags & SCANNER_LITERAL_POOL_NO_ARGUMENTS) && scanner_literal_is_arguments (literal_p)) in scanner_pop_literal_pool() 542 literal_p->type = 0; in scanner_pop_literal_pool() 554 && scanner_scope_find_let_declaration (context_p, literal_p)) in scanner_pop_literal_pool() 556 literal_p->type = 0; in scanner_pop_literal_pool() 566 literal_p->type = type; in scanner_pop_literal_pool() [all …]
|
D | js-parser.c | 60 lexer_literal_t *literal_p; in parser_compute_indicies() local 71 while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator))) in parser_compute_indicies() 73 switch (literal_p->type) in parser_compute_indicies() 77 if (literal_p->status_flags & LEXER_FLAG_USED) in parser_compute_indicies() 83 else if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR)) in parser_compute_indicies() 85 jmem_heap_free_block ((void *) literal_p->u.char_p, literal_p->prop.length); in parser_compute_indicies() 87 literal_p->status_flags |= LEXER_FLAG_SOURCE_PTR; in parser_compute_indicies() 109 JERRY_ASSERT (literal_p->type == LEXER_UNUSED_LITERAL); in parser_compute_indicies() 115 const uint8_t *char_p = literal_p->u.char_p; in parser_compute_indicies() 118 if ((literal_p->status_flags & LEXER_FLAG_SOURCE_PTR) in parser_compute_indicies() [all …]
|
D | js-scanner.c | 569 if (item_p->literal_p->type & SCANNER_LITERAL_IS_USED) in scanner_scan_primary_expression_end() 571 item_p->literal_p->type |= SCANNER_LITERAL_EARLY_CREATE; in scanner_scan_primary_expression_end() 599 if (binding_literal.literal_p->type & SCANNER_LITERAL_IS_USED) in scanner_scan_primary_expression_end() 601 binding_literal.literal_p->type |= SCANNER_LITERAL_EARLY_CREATE; in scanner_scan_primary_expression_end() 888 item_p->literal_p->type &= (uint8_t) ~SCANNER_LITERAL_IS_USED; in scanner_scan_primary_expression_end() 1399 lexer_lit_location_t *literal_p = scanner_add_literal (context_p, scanner_context_p); in scanner_scan_statement() local 1404 if ((literal_p->type & SCANNER_LITERAL_IS_LOCAL) in scanner_scan_statement() 1405 … && (literal_p->type & mask) != (SCANNER_LITERAL_IS_ARG | SCANNER_LITERAL_IS_DESTRUCTURED_ARG) in scanner_scan_statement() 1406 … && (literal_p->type & mask) != (SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_FUNC_DECLARATION)) in scanner_scan_statement() 1411 literal_p->type |= SCANNER_LITERAL_IS_FUNC | SCANNER_LITERAL_IS_FUNC_DECLARATION; in scanner_scan_statement() [all …]
|
D | js-lexer.c | 2098 const lexer_lit_location_t *literal_p, /**< literal location */ in lexer_convert_literal_to_chars() argument 2104 if (!literal_p->has_escape) in lexer_convert_literal_to_chars() 2106 return literal_p->char_p; in lexer_convert_literal_to_chars() 2110 if (literal_p->length > LEXER_MAX_LITERAL_LOCAL_BUFFER_SIZE) in lexer_convert_literal_to_chars() 2112 … context_p->u.allocated_buffer_p = (uint8_t *) parser_malloc_local (context_p, literal_p->length); in lexer_convert_literal_to_chars() 2113 context_p->allocated_buffer_size = literal_p->length; in lexer_convert_literal_to_chars() 2121 if (literal_p->type == LEXER_IDENT_LITERAL) in lexer_convert_literal_to_chars() 2123 lexer_convert_ident_to_cesu8 (destination_start_p, literal_p->char_p, literal_p->length); in lexer_convert_literal_to_chars() 2127 const uint8_t *source_p = literal_p->char_p; in lexer_convert_literal_to_chars() 2330 JERRY_ASSERT (destination_p == destination_start_p + literal_p->length); in lexer_convert_literal_to_chars() [all …]
|
D | js-parser-module.c | 90 context_p->module_identifier_lit_p = context_p->lit_object.literal_p; in parser_module_append_export_name() 92 ecma_string_t *name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_object.literal_p->u.char_p, in parser_module_append_export_name() 93 … context_p->lit_object.literal_p->prop.length); in parser_module_append_export_name() 401 lexer_literal_t *literal_p = PARSER_GET_LITERAL (local_name_index); in parser_module_parse_export_clause() local 402 local_name_p = ecma_new_ecma_string_from_utf8 (literal_p->u.char_p, literal_p->prop.length); in parser_module_parse_export_clause() 508 lexer_literal_t *literal_p = PARSER_GET_LITERAL (import_name_index); in parser_module_parse_import_clause() local 509 import_name_p = ecma_new_ecma_string_from_utf8 (literal_p->u.char_p, literal_p->prop.length); in parser_module_parse_import_clause() 581 ecma_string_t *name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_object.literal_p->u.char_p, in parser_module_handle_module_specifier() 582 … context_p->lit_object.literal_p->prop.length); in parser_module_handle_module_specifier() 603 …ecma_string_t *path_p = ecma_module_create_normalized_path (context_p->lit_object.literal_p->u.cha… in parser_module_handle_module_specifier() [all …]
|
D | js-scanner-internal.h | 154 lexer_lit_location_t *literal_p; /**< binding literal */ member 253 lexer_lit_location_t *literal_p; /**< binding literal */ member
|
D | common.h | 118 void util_free_literal (lexer_literal_t *literal_p);
|
D | js-parser-statm.c | 735 lexer_literal_t *name_p = context_p->lit_object.literal_p; in parser_parse_function_statement() 814 lexer_literal_t *literal_p = PARSER_GET_LITERAL ((size_t) scope_stack_p[1].map_to); in parser_parse_function_statement() local 816 …JERRY_ASSERT ((literal_p->type == LEXER_UNUSED_LITERAL || literal_p->type == LEXER_FUNCTION_LITERA… in parser_parse_function_statement() 817 && literal_p->status_flags == 0); in parser_parse_function_statement() 821 if (literal_p->type == LEXER_FUNCTION_LITERAL) in parser_parse_function_statement() 823 ecma_bytecode_deref (literal_p->u.bytecode_p); in parser_parse_function_statement() 826 literal_p->u.bytecode_p = compiled_code_p; in parser_parse_function_statement() 827 literal_p->type = LEXER_FUNCTION_LITERAL; in parser_parse_function_statement() 2342 …ecma_string_t *local_name_p = ecma_new_ecma_string_from_utf8 (context_p->lit_object.literal_p->u.c… in parser_parse_import_statement() 2343 … context_p->lit_object.literal_p->prop.length); in parser_parse_import_statement() [all …]
|
D | js-parser-util.c | 123 lexer_literal_t *literal_p = PARSER_GET_LITERAL (literal_index); in parser_print_literal() local 124 util_print_literal (literal_p); in parser_print_literal() 136 lexer_literal_t *literal_p = PARSER_GET_LITERAL (scope_stack_end_p->map_from); in parser_print_literal() local 137 util_print_literal (literal_p); in parser_print_literal()
|
D | js-parser-expr.c | 1063 …const lexer_lit_location_t *literal_p = (const lexer_lit_location_t *) context_p->lit_object.liter… in parser_parse_object_literal() local 1066 … && lexer_compare_identifier_to_string (literal_p, (uint8_t *) "__proto__", 9) in parser_parse_object_literal() 1234 context_p->lit_object.literal_p->u.char_p, in parser_parse_function_expression() 1235 context_p->lit_object.literal_p->prop.length); in parser_parse_function_expression() 1666 context_p->module_identifier_lit_p = context_p->lit_object.literal_p; in parser_parse_unary_expression() 1939 && context_p->lit_object.literal_p->type == LEXER_STRING_LITERAL); in parser_process_unary_expression() 2951 if (context_p->lit_object.literal_p->status_flags & LEXER_FLAG_FUNCTION_ARGUMENT) in parser_pattern_process_assignment() 2955 context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_FUNCTION_ARGUMENT; in parser_pattern_process_assignment() 3110 if (context_p->lit_object.literal_p->status_flags & LEXER_FLAG_FUNCTION_ARGUMENT) in parser_parse_object_initializer() 3114 context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_FUNCTION_ARGUMENT; in parser_parse_object_initializer()
|
D | js-lexer.h | 311 lexer_literal_t *literal_p; /**< pointer to the literal object */ member
|
D | js-parser-internal.h | 704 …exer_convert_literal_to_chars (parser_context_t *context_p, const lexer_lit_location_t *literal_p, 764 … scanner_scope_find_let_declaration (parser_context_t *context_p, lexer_lit_location_t *literal_p);
|
D | js-scanner-ops.c | 211 binding_literal.literal_p = argument_literal_p; in scanner_check_arrow_arg()
|
/third_party/jerryscript/jerry-core/ecma/base/ |
D | ecma-literal-storage.c | 364 ecma_value_t *literal_p; in ecma_save_literals_add_compiled_code() local 377 literal_p = (ecma_value_t *) (byte_p + sizeof (cbc_uint16_arguments_t)); in ecma_save_literals_add_compiled_code() 392 literal_p = (ecma_value_t *) (byte_p + sizeof (cbc_uint8_arguments_t)); in ecma_save_literals_add_compiled_code() 405 ecma_save_literals_append_value (literal_p[i], lit_pool_p); in ecma_save_literals_add_compiled_code() 410 ecma_save_literals_append_value (literal_p[i], lit_pool_p); in ecma_save_literals_add_compiled_code() 416 literal_p[i]); in ecma_save_literals_add_compiled_code() 429 literal_p = ((ecma_value_t *) byte_p) - argument_end; in ecma_save_literals_add_compiled_code() 433 ecma_save_literals_append_value (literal_p[i], lit_pool_p); in ecma_save_literals_add_compiled_code() 568 const uint8_t *literal_p = literal_base_p + (literal_value >> JERRY_SNAPSHOT_LITERAL_SHIFT); in ecma_snapshot_get_literal() local 573 memcpy (&num, literal_p, sizeof (ecma_number_t)); in ecma_snapshot_get_literal() [all …]
|
/third_party/jerryscript/jerry-core/api/ |
D | jerry-snapshot.c | 1607 ecma_string_t *literal_p = ecma_get_string_from_value (buffer_p[i]); in jerry_get_literals_from_snapshot() local 1609 if (ecma_get_string_magic (literal_p) == LIT_MAGIC_STRING__COUNT) in jerry_get_literals_from_snapshot() 1635 ecma_string_t *literal_p = ecma_get_string_from_value (buffer_p[i]); in jerry_get_literals_from_snapshot() local 1637 if (ecma_get_string_magic (literal_p) == LIT_MAGIC_STRING__COUNT) in jerry_get_literals_from_snapshot() 1639 literal_array[literal_idx++] = literal_p; in jerry_get_literals_from_snapshot()
|
/third_party/jerryscript/jerry-core/vm/ |
D | vm.c | 4275 ecma_value_t *literal_p; in vm_init_exec() local 4284 literal_p = (ecma_value_t *) ((uint8_t *) bytecode_header_p + sizeof (cbc_uint16_arguments_t)); in vm_init_exec() 4285 literal_p -= register_end; in vm_init_exec() 4286 frame_ctx_p->literal_start_p = literal_p; in vm_init_exec() 4287 literal_p += args_p->literal_end; in vm_init_exec() 4296 literal_p = (ecma_value_t *) ((uint8_t *) bytecode_header_p + sizeof (cbc_uint8_arguments_t)); in vm_init_exec() 4297 literal_p -= register_end; in vm_init_exec() 4298 frame_ctx_p->literal_start_p = literal_p; in vm_init_exec() 4299 literal_p += args_p->literal_end; in vm_init_exec() 4302 frame_ctx_p->byte_code_p = (uint8_t *) literal_p; in vm_init_exec() [all …]
|