Home
last modified time | relevance | path

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

12

/third_party/jerryscript/jerry-core/parser/js/
Djs-parser-expr.c87 parser_push_result (parser_context_t *context_p) /**< context */ in parser_push_result() argument
89 if (CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode)) in parser_push_result()
91 JERRY_ASSERT (CBC_SAME_ARGS (context_p->last_cbc_opcode, context_p->last_cbc_opcode + 1)); in parser_push_result()
93 if ((context_p->last_cbc_opcode == CBC_POST_INCR in parser_push_result()
94 || context_p->last_cbc_opcode == CBC_POST_DECR) in parser_push_result()
95 && context_p->stack_depth >= context_p->stack_limit) in parser_push_result()
99 JERRY_ASSERT (context_p->stack_depth == context_p->stack_limit); in parser_push_result()
101 context_p->stack_limit++; in parser_push_result()
103 if (context_p->stack_limit > PARSER_MAXIMUM_STACK_LIMIT) in parser_push_result()
105 parser_raise_error (context_p, PARSER_ERR_STACK_LIMIT_REACHED); in parser_push_result()
[all …]
Djs-parser-statm.c310 parser_stack_iterator_init (parser_context_t *context_p, /**< context */ in parser_stack_iterator_init() argument
313 iterator->current_p = context_p->stack.first_p; in parser_stack_iterator_init()
314 iterator->current_position = context_p->stack.last_position; in parser_stack_iterator_init()
333 parser_stack_change_last_uint8 (parser_context_t *context_p, /**< context */ in parser_stack_change_last_uint8() argument
336 parser_mem_page_t *page_p = context_p->stack.first_p; in parser_stack_change_last_uint8()
339 && context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]); in parser_stack_change_last_uint8()
341 page_p->bytes[context_p->stack.last_position - 1] = new_value; in parser_stack_change_last_uint8()
342 context_p->stack_top_uint8 = new_value; in parser_stack_change_last_uint8()
349 parser_parse_enclosed_expr (parser_context_t *context_p) /**< context */ in parser_parse_enclosed_expr() argument
351 lexer_next_token (context_p); in parser_parse_enclosed_expr()
[all …]
Djs-scanner.c46 #define SCANNER_IDENTIFIER_IS_OF() (lexer_token_is_identifier (context_p, "of", 2))
75 scanner_scan_primary_expression (parser_context_t *context_p, /**< context */ in scanner_scan_primary_expression() argument
87 if (scanner_try_scan_new_target (context_p)) in scanner_scan_primary_expression()
97 lexer_construct_regexp_object (context_p, true); in scanner_scan_primary_expression()
111 if (lexer_consume_generator (context_p)) in scanner_scan_primary_expression()
117 scanner_push_literal_pool (context_p, scanner_context_p, status_flags); in scanner_scan_primary_expression()
119 lexer_next_token (context_p); in scanner_scan_primary_expression()
121 if (context_p->token.type == LEXER_LITERAL in scanner_scan_primary_expression()
122 && context_p->token.lit_location.type == LEXER_IDENT_LITERAL) in scanner_scan_primary_expression()
124 lexer_next_token (context_p); in scanner_scan_primary_expression()
[all …]
Djs-lexer.c225 lexer_skip_spaces (parser_context_t *context_p) /**< context */ in lexer_skip_spaces() argument
228 const uint8_t *source_end_p = context_p->source_end_p; in lexer_skip_spaces()
230 if (context_p->token.flags & LEXER_NO_SKIP_SPACES) in lexer_skip_spaces()
232 context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES; in lexer_skip_spaces()
236 context_p->token.flags = 0; in lexer_skip_spaces()
240 if (context_p->source_p >= source_end_p) in lexer_skip_spaces()
244 parser_raise_error (context_p, PARSER_ERR_UNTERMINATED_MULTILINE_COMMENT); in lexer_skip_spaces()
249 switch (context_p->source_p[0]) in lexer_skip_spaces()
253 if (context_p->source_p + 1 < source_end_p in lexer_skip_spaces()
254 && context_p->source_p[1] == LIT_CHAR_LF) in lexer_skip_spaces()
[all …]
Djs-scanner-ops.c38 scanner_add_async_literal (parser_context_t *context_p, /**< context */ in scanner_add_async_literal() argument
43 JERRY_ASSERT (context_p->stack_top_uint8 == SCAN_STACK_USE_ASYNC); in scanner_add_async_literal()
45 parser_stack_pop_uint8 (context_p); in scanner_add_async_literal()
46 parser_stack_pop (context_p, &async_literal, sizeof (lexer_lit_location_t)); in scanner_add_async_literal()
48 lexer_lit_location_t *lit_location_p = scanner_add_custom_literal (context_p, in scanner_add_async_literal()
64 scanner_check_arrow_body (parser_context_t *context_p, /**< context */ in scanner_check_arrow_body() argument
67 lexer_next_token (context_p); in scanner_check_arrow_body()
69 if (context_p->token.type != LEXER_LEFT_BRACE) in scanner_check_arrow_body()
72 parser_stack_push_uint8 (context_p, SCAN_STACK_ARROW_EXPRESSION); in scanner_check_arrow_body()
76 lexer_next_token (context_p); in scanner_check_arrow_body()
[all …]
Djs-parser-util.c42 parser_emit_two_bytes (parser_context_t *context_p, /**< context */ in parser_emit_two_bytes() argument
46 uint32_t last_position = context_p->byte_code.last_position; in parser_emit_two_bytes()
50 parser_mem_page_t *page_p = context_p->byte_code.last_p; in parser_emit_two_bytes()
54 context_p->byte_code.last_position = last_position + 2; in parser_emit_two_bytes()
60 parser_cbc_stream_alloc_page (context_p, &context_p->byte_code); in parser_emit_two_bytes()
61 page_p = context_p->byte_code.last_p; in parser_emit_two_bytes()
64 context_p->byte_code.last_position = 2; in parser_emit_two_bytes()
68 context_p->byte_code.last_p->bytes[PARSER_CBC_STREAM_PAGE_SIZE - 1] = first_byte; in parser_emit_two_bytes()
69 parser_cbc_stream_alloc_page (context_p, &context_p->byte_code); in parser_emit_two_bytes()
70 context_p->byte_code.last_p->bytes[0] = second_byte; in parser_emit_two_bytes()
[all …]
Djs-parser-module.c44 parser_module_check_duplicate_import (parser_context_t *context_p, /**< parser context */ in parser_module_check_duplicate_import() argument
47 ecma_module_names_t *module_names_p = context_p->module_current_node_p->module_names_p; in parser_module_check_duplicate_import()
83 parser_module_append_export_name (parser_context_t *context_p) /**< parser context */ in parser_module_append_export_name() argument
85 if (!(context_p->status_flags & PARSER_MODULE_STORE_IDENT)) in parser_module_append_export_name()
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()
93context_p->lit_object.literal_p->prop.length); in parser_module_append_export_name()
95 if (parser_module_check_duplicate_export (context_p, name_p)) in parser_module_append_export_name()
98 parser_raise_error (context_p, PARSER_ERR_DUPLICATED_EXPORT_IDENTIFIER); in parser_module_append_export_name()
101 parser_module_add_names_to_node (context_p, in parser_module_append_export_name()
[all …]
Djs-parser.c55 parser_compute_indicies (parser_context_t *context_p, /**< context */ in parser_compute_indicies() argument
70 parser_list_iterator_init (&context_p->literal_pool, &literal_iterator); in parser_compute_indicies()
116 uint32_t status_flags = context_p->status_flags; in parser_compute_indicies()
121 size_t bytes_to_end = (size_t) (context_p->source_end_p - char_p); in parser_compute_indicies()
128 context_p->status_flags = status_flags; in parser_compute_indicies()
148 ident_index = context_p->register_count; in parser_compute_indicies()
153 parser_list_iterator_init (&context_p->literal_pool, &literal_iterator); in parser_compute_indicies()
194 JERRY_ASSERT (ident_index == context_p->register_count + ident_count); in parser_compute_indicies()
196 JERRY_ASSERT (literal_index <= context_p->register_count + context_p->literal_count); in parser_compute_indicies()
198 context_p->literal_count = literal_index; in parser_compute_indicies()
[all …]
Djs-parser-internal.h287 ((lexer_literal_t *) parser_list_get (&context_p->literal_pool, (literal_index)))
590 void *parser_malloc (parser_context_t *context_p, size_t size);
592 void *parser_malloc_local (parser_context_t *context_p, size_t size);
594 void parser_free_allocated_buffer (parser_context_t *context_p);
600 void parser_cbc_stream_alloc_page (parser_context_t *context_p, parser_mem_data_t *data_p);
607 void *parser_list_append (parser_context_t *context_p, parser_list_t *list_p);
615 void parser_stack_init (parser_context_t *context_p);
616 void parser_stack_free (parser_context_t *context_p);
617 void parser_stack_push_uint8 (parser_context_t *context_p, uint8_t uint8_value);
618 void parser_stack_pop_uint8 (parser_context_t *context_p);
[all …]
Djs-parser-mem.c37 parser_malloc (parser_context_t *context_p, /**< context */ in parser_malloc() argument
47 parser_raise_error (context_p, PARSER_ERR_OUT_OF_MEMORY); in parser_malloc()
68 parser_malloc_local (parser_context_t *context_p, /**< context */ in parser_malloc_local() argument
77 parser_raise_error (context_p, PARSER_ERR_OUT_OF_MEMORY); in parser_malloc_local()
96 parser_free_allocated_buffer (parser_context_t *context_p) /**< context */ in parser_free_allocated_buffer() argument
98 if (context_p->u.allocated_buffer_p != NULL) in parser_free_allocated_buffer()
100 parser_free_local (context_p->u.allocated_buffer_p, in parser_free_allocated_buffer()
101 context_p->allocated_buffer_size); in parser_free_allocated_buffer()
102 context_p->u.allocated_buffer_p = NULL; in parser_free_allocated_buffer()
167 parser_cbc_stream_alloc_page (parser_context_t *context_p, /**< context */ in parser_cbc_stream_alloc_page() argument
[all …]
Djs-scanner-util.c66 scanner_raise_error (parser_context_t *context_p) /**< context */ in scanner_raise_error() argument
68 PARSER_THROW (context_p->try_buffer); in scanner_raise_error()
79 scanner_raise_redeclaration_error (parser_context_t *context_p) /**< context */ in scanner_raise_redeclaration_error() argument
81 …scanner_info_t *info_p = scanner_insert_info (context_p, context_p->source_p, sizeof (scanner_info… in scanner_raise_redeclaration_error()
84 scanner_raise_error (context_p); in scanner_raise_redeclaration_error()
95 scanner_malloc (parser_context_t *context_p, /**< context */ in scanner_malloc() argument
105 scanner_cleanup (context_p); in scanner_malloc()
108 context_p->error = PARSER_ERR_OUT_OF_MEMORY; in scanner_malloc()
109 PARSER_THROW (context_p->try_buffer); in scanner_malloc()
192 scanner_insert_info (parser_context_t *context_p, /**< context */ in scanner_insert_info() argument
[all …]
Djs-scanner-internal.h347 void scanner_raise_error (parser_context_t *context_p);
349 void scanner_raise_redeclaration_error (parser_context_t *context_p);
352 void *scanner_malloc (parser_context_t *context_p, size_t size);
356 scanner_info_t *scanner_insert_info (parser_context_t *context_p, const uint8_t *source_p, size_t s…
357 scanner_info_t *scanner_insert_info_before (parser_context_t *context_p, const uint8_t *source_p,
359 scanner_literal_pool_t *scanner_push_literal_pool (parser_context_t *context_p, scanner_context_t *…
361 void scanner_pop_literal_pool (parser_context_t *context_p, scanner_context_t *scanner_context_p);
363 void scanner_construct_global_block (parser_context_t *context_p, scanner_context_t *scanner_contex…
365 void scanner_filter_arguments (parser_context_t *context_p, scanner_context_t *scanner_context_p);
366 lexer_lit_location_t *scanner_add_custom_literal (parser_context_t *context_p, scanner_literal_pool…
[all …]
Djs-parser-tagged-template-literal.c39 parser_tagged_template_literal_append_strings (parser_context_t *context_p, /**< parser context */ in parser_tagged_template_literal_append_strings() argument
44 lexer_lit_location_t *lit_loc_p = &context_p->token.lit_location; in parser_tagged_template_literal_append_strings()
61 const uint8_t *source_p = lexer_convert_literal_to_chars (context_p, in parser_tagged_template_literal_append_strings()
62 &context_p->token.lit_location, in parser_tagged_template_literal_append_strings()
68 parser_free_allocated_buffer (context_p); in parser_tagged_template_literal_append_strings()
72 context_p->source_p = context_p->token.lit_location.char_p - 1; in parser_tagged_template_literal_append_strings()
73 lexer_parse_string (context_p, LEXER_STRING_RAW); in parser_tagged_template_literal_append_strings()
74 source_p = lexer_convert_literal_to_chars (context_p, in parser_tagged_template_literal_append_strings()
75 &context_p->token.lit_location, in parser_tagged_template_literal_append_strings()
80 parser_free_allocated_buffer (context_p); in parser_tagged_template_literal_append_strings()
Djs-parser-tagged-template-literal.h38 parser_tagged_template_literal_append_strings (parser_context_t *context_p, ecma_object_t *template…
/third_party/jerryscript/jerry-core/ecma/builtin-objects/
Decma-builtin-json.c859 ecma_builtin_json_serialize_property (ecma_json_stringify_context_t *context_p,
870 ecma_builtin_json_serialize_object (ecma_json_stringify_context_t *context_p, /**< context*/ in ecma_builtin_json_serialize_object() argument
874 if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p)) in ecma_builtin_json_serialize_object()
881 stack_item.next_p = context_p->occurence_stack_last_p; in ecma_builtin_json_serialize_object()
883 context_p->occurence_stack_last_p = &stack_item; in ecma_builtin_json_serialize_object()
886 const lit_utf8_size_t stepback_size = ecma_stringbuilder_get_size (&context_p->indent_builder); in ecma_builtin_json_serialize_object()
887 ecma_stringbuilder_append (&context_p->indent_builder, context_p->gap_str_p); in ecma_builtin_json_serialize_object()
889 …const bool has_gap = !ecma_compare_ecma_string_to_magic_id (context_p->gap_str_p, LIT_MAGIC_STRING… in ecma_builtin_json_serialize_object()
890 const lit_utf8_size_t separator_size = ecma_stringbuilder_get_size (&context_p->indent_builder); in ecma_builtin_json_serialize_object()
894 if (context_p->property_list_p->item_count > 0) in ecma_builtin_json_serialize_object()
[all …]
/third_party/jerryscript/jerry-port/default/
Ddefault-external-context.c39 jerry_port_default_set_current_context (jerry_context_t *context_p) /**< store created context */ in jerry_port_default_set_current_context() argument
42 g_contextRecords[curTaskId].context_p = context_p; in jerry_port_default_set_current_context()
43 jerry_dynamic_global_context_p = context_p; in jerry_port_default_set_current_context()
48 jerry_dynamic_global_context_p = g_contextRecords[LOS_NextTaskIDGet()].context_p; in jerry_switch_context()
58 g_contextRecords[curTaskId].context_p = NULL; in jerry_port_default_remove_current_context_record()
77 jerry_port_default_set_current_context (jerry_context_t *context_p) /**< points to the created cont… in jerry_port_default_set_current_context() argument
79 jerry_dynamic_global_context_p = context_p; in jerry_port_default_set_current_context()
103 jerry_port_default_set_current_context (jerry_context_t *context_p) /**< points to the created cont… in jerry_port_default_set_current_context() argument
105 current_context_p = context_p; in jerry_port_default_set_current_context()
/third_party/jerryscript/jerry-core/api/
Djerry-debugger-transport.c198 jerry_debugger_transport_receive (jerry_debugger_transport_receive_context_t *context_p) /**< [out]… in jerry_debugger_transport_receive() argument
203 context_p->buffer_p = JERRY_CONTEXT (debugger_receive_buffer); in jerry_debugger_transport_receive()
204 context_p->received_length = JERRY_CONTEXT (debugger_received_length); in jerry_debugger_transport_receive()
205 context_p->message_p = NULL; in jerry_debugger_transport_receive()
206 context_p->message_length = 0; in jerry_debugger_transport_receive()
207 context_p->message_total_length = 0; in jerry_debugger_transport_receive()
211 return header_p->receive (header_p, context_p); in jerry_debugger_transport_receive()
218 jerry_debugger_transport_receive_completed (jerry_debugger_transport_receive_context_t *context_p) … in jerry_debugger_transport_receive_completed() argument
221 JERRY_ASSERT (context_p->message_p != NULL); in jerry_debugger_transport_receive_completed()
222 JERRY_ASSERT (context_p->buffer_p == JERRY_CONTEXT (debugger_receive_buffer)); in jerry_debugger_transport_receive_completed()
[all …]
Dgenerate-bytecode.h43 jerry_context_t *context_p; member
/third_party/jerryscript/jerry-core/vm/
Dvm-utils.c57 vm_get_function_name_string (vm_frame_ctx_t *context_p) in vm_get_function_name_string() argument
60 if (context_p->prev_context_p != NULL) { in vm_get_function_name_string()
61 vm_frame_ctx_t* prev_ctx_p = context_p->prev_context_p; in vm_get_function_name_string()
111 vm_frame_ctx_t *context_p = JERRY_CONTEXT (vm_top_context_p); in vm_get_backtrace() local
116 while (context_p != NULL) in vm_get_backtrace()
121 ecma_string_t* func_name = vm_get_function_name_string (context_p); in vm_get_backtrace()
132 context_p = context_p->prev_context_p; in vm_get_backtrace()
/third_party/jerryscript/jerry-core/ecma/base/
Decma-module.c178 …ecma_module_context_t *context_p = (ecma_module_context_t *) jmem_heap_alloc_block (sizeof (ecma_m… in ecma_module_create_module_context() local
179 memset (context_p, 0, sizeof (ecma_module_context_t)); in ecma_module_create_module_context()
181 return context_p; in ecma_module_create_module_context()
305 ecma_module_context_t *context_p = current_module_p->context_p; in ecma_module_resolve_export() local
344 if (context_p->local_exports_p != NULL) in ecma_module_resolve_export()
347 JERRY_ASSERT (context_p->local_exports_p->next_p == NULL); in ecma_module_resolve_export()
348 ecma_module_names_t *export_names_p = context_p->local_exports_p->module_names_p; in ecma_module_resolve_export()
380 ecma_module_node_t *indirect_export_p = context_p->indirect_exports_p; in ecma_module_resolve_export()
435 ecma_module_node_t *star_export_p = context_p->star_exports_p; in ecma_module_resolve_export()
490 module_p->context_p->parent_p = JERRY_CONTEXT (module_top_context_p); in ecma_module_evaluate()
[all …]
/third_party/jerryscript/jerry-core/include/
Djerryscript-debugger-transport.h70 … jerry_debugger_transport_receive_context_t *context_p);
95 bool jerry_debugger_transport_receive (jerry_debugger_transport_receive_context_t *context_p);
96 …jerry_debugger_transport_receive_completed (jerry_debugger_transport_receive_context_t *context_p);
/third_party/jerryscript/tests/unit-core/
Dtest-objects-foreach.cpp155 void *context_p) in find_test_object_by_data() argument
159 *((jerry_value_t *) context_p) = jerry_acquire_value (candidate); in find_test_object_by_data()
167 void *context_p) in find_test_object_by_property() argument
169 jerry_value_t *args_p = (jerry_value_t *) context_p; in find_test_object_by_property()
/third_party/jerryscript/docs/
D13.DEBUGGER-TRANSPORT.md94 … jerry_debugger_transport_receive_context_t *context_p);
185 bool jerry_debugger_transport_receive (jerry_debugger_transport_receive_context_t *context_p);
188 - `context_p`: an unused [jerry_debugger_transport_receive_context_t](#jerry_debugger_transport_rec…
201 …jerry_debugger_transport_receive_completed (jerry_debugger_transport_receive_context_t *context_p);
204 - `context_p`: a [jerry_debugger_transport_receive_context_t](#jerry_debugger_transport_receive_con…
/third_party/jerryscript/targets/nuttx-stm32f4/
Djerry_port.c215 jerry_port_default_set_current_context (jerry_context_t *context_p) /**< points to the created cont… in jerry_port_default_set_current_context() argument
217 current_context_p = context_p; in jerry_port_default_set_current_context()
/third_party/jerryscript/jerry-port/default/include/
Djerryscript-port-default.h38 void jerry_port_default_set_current_context (jerry_context_t *context_p);

12