|
Ruby 4.1.0dev (2026-05-15 revision 4d87d43b01dbb312eb1ff5fbbc6c9f33218d91a2)
|
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 |
| 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 97 of file prism_compile.h.
| pm_node_t* pm_scope_node::ast_node |
Definition at line 100 of file prism_compile.h.
| pm_node_t pm_scope_node::base |
Definition at line 98 of file prism_compile.h.
| pm_node_t* pm_scope_node::body |
Definition at line 102 of file prism_compile.h.
| ID* pm_scope_node::constants |
Definition at line 132 of file prism_compile.h.
| int pm_scope_node::coverage_enabled |
Definition at line 143 of file prism_compile.h.
| rb_encoding* pm_scope_node::encoding |
Definition at line 109 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 126 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 140 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 156 of file prism_compile.h.
| const pm_line_offset_list_t* pm_scope_node::line_offsets |
Definition at line 107 of file prism_compile.h.
| int pm_scope_node::local_table_for_iseq_size |
Definition at line 130 of file prism_compile.h.
| pm_constant_id_list_t pm_scope_node::locals |
Definition at line 103 of file prism_compile.h.
| const pm_options_t* pm_scope_node::options |
Definition at line 106 of file prism_compile.h.
| pm_node_t* pm_scope_node::parameters |
Definition at line 101 of file prism_compile.h.
| const pm_parser_t* pm_scope_node::parser |
Definition at line 105 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 149 of file prism_compile.h.
| struct pm_scope_node* pm_scope_node::previous |
Definition at line 99 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 119 of file prism_compile.h.
| int32_t pm_scope_node::start_line |
Definition at line 108 of file prism_compile.h.