|
Ruby 4.1.0dev (2026-10-26 revision b861e2ba1043fa71b418d41bdc7c509aa2ff2177)
|
Data Fields | |
| pm_node_t | base |
| struct pm_scope_node * | previous |
| pm_node_t * | ast_node |
| pm_node_t * | parameters |
| pm_node_t * | body |
| pm_constant_id_list_t | locals |
| const pm_parser_t * | parser |
| uint64_t | source_hash |
| The source hash of the parsed source, propagated to every iseq. | |
| const pm_options_t * | options |
| const pm_line_offset_list_t * | line_offsets |
| int32_t | start_line |
| rb_encoding * | encoding |
| VALUE * | script_lines |
| This is a pointer to the list of script lines for the ISEQs that will be associated with this scope node. | |
| rb_encoding * | filepath_encoding |
| This is the encoding of the actual filepath object that will be used when a FILE node is compiled or when the path has to be set on a syntax error. | |
| int | local_table_for_iseq_size |
| ID * | constants |
| pm_index_lookup_table_t | index_lookup_table |
| A flat lookup table mapping constant IDs (or special IDs) to local variable indices. | |
| int | coverage_enabled |
| struct iseq_link_anchor * | pre_execution_anchor |
| This will only be set on the top-level scope node. | |
| size_t | last_line |
| Cached line hint for line offset list lookups. | |
Definition at line 99 of file prism_compile.h.
| pm_node_t* pm_scope_node::ast_node |
Definition at line 102 of file prism_compile.h.
| pm_node_t pm_scope_node::base |
Definition at line 100 of file prism_compile.h.
| pm_node_t* pm_scope_node::body |
Definition at line 104 of file prism_compile.h.
| ID* pm_scope_node::constants |
Definition at line 137 of file prism_compile.h.
| int pm_scope_node::coverage_enabled |
Definition at line 148 of file prism_compile.h.
| rb_encoding* pm_scope_node::encoding |
Definition at line 114 of file prism_compile.h.
| rb_encoding* pm_scope_node::filepath_encoding |
This is the encoding of the actual filepath object that will be used when a FILE node is compiled or when the path has to be set on a syntax error.
Definition at line 131 of file prism_compile.h.
| pm_index_lookup_table_t pm_scope_node::index_lookup_table |
A flat lookup table mapping constant IDs (or special IDs) to local variable indices.
When allocated from the compile data arena (child scopes), no explicit free is needed. When heap-allocated (top-level scope in pm_parse_process), owned is set to true so destroy can free it.
Definition at line 145 of file prism_compile.h.
| size_t pm_scope_node::last_line |
Cached line hint for line offset list lookups.
Since the compiler walks the AST roughly in source order, consecutive lookups tend to be for nearby byte offsets. This avoids repeated binary searches.
Definition at line 161 of file prism_compile.h.
| const pm_line_offset_list_t* pm_scope_node::line_offsets |
Definition at line 112 of file prism_compile.h.
| int pm_scope_node::local_table_for_iseq_size |
Definition at line 135 of file prism_compile.h.
| pm_constant_id_list_t pm_scope_node::locals |
Definition at line 105 of file prism_compile.h.
| const pm_options_t* pm_scope_node::options |
Definition at line 111 of file prism_compile.h.
| pm_node_t* pm_scope_node::parameters |
Definition at line 103 of file prism_compile.h.
| const pm_parser_t* pm_scope_node::parser |
Definition at line 107 of file prism_compile.h.
| struct iseq_link_anchor* pm_scope_node::pre_execution_anchor |
This will only be set on the top-level scope node.
It will contain all of the instructions pertaining to BEGIN{} nodes.
Definition at line 154 of file prism_compile.h.
| struct pm_scope_node* pm_scope_node::previous |
Definition at line 101 of file prism_compile.h.
| VALUE* pm_scope_node::script_lines |
This is a pointer to the list of script lines for the ISEQs that will be associated with this scope node.
It is only set if RubyVM.keep_script_lines is true. If it is set, it will be set to a pointer to an array that is always stack allocated (so no GC marking is needed by this struct). If it is not set, it will be NULL. It is inherited by all child scopes.
Definition at line 124 of file prism_compile.h.
| uint64_t pm_scope_node::source_hash |
The source hash of the parsed source, propagated to every iseq.
Definition at line 110 of file prism_compile.h.
| int32_t pm_scope_node::start_line |
Definition at line 113 of file prism_compile.h.