Class: Rigor::Scope::DiscoveryIndex
- Inherits:
-
Data
- Object
- Data
- Rigor::Scope::DiscoveryIndex
- Defined in:
- lib/rigor/scope/discovery_index.rb,
lib/rigor/scope/discovery_index.rb
Overview
ADR-53 Track A — the seed-time discovery context every Scope snapshot carries by a single reference. Holds the tables the index-time pre-passes (‘Inference::ScopeIndexer` per file, plus the cross-file project pre-pass) populate and that no control-flow transition ever varies: `Scope#==` ignores them and `Scope#join` copies them from the receiver unexamined, which is the membership litmus the ADR fixes.
Immutable (‘Data` instances are frozen); deriving a seeded index goes through `#with(table_name: table)`. `Scope` exposes each table through its existing reader surface, so engine call sites and plugins are unaffected by the extraction.
Constant Summary collapse
- EMPTY =
The shared all-empty index ‘Scope.empty` (and every scope that never sees a seeding pass) points at — one allocation per process.
new( declared_types: EMPTY_NODE_TABLE, class_ivars: EMPTY_TABLE, class_cvars: EMPTY_TABLE, program_globals: EMPTY_TABLE, discovered_classes: EMPTY_TABLE, in_source_constants: EMPTY_TABLE, discovered_methods: EMPTY_TABLE, discovered_def_nodes: EMPTY_TABLE, discovered_singleton_def_nodes: EMPTY_TABLE, discovered_def_sources: EMPTY_TABLE, discovered_method_visibilities: EMPTY_TABLE, discovered_superclasses: EMPTY_TABLE, discovered_includes: EMPTY_TABLE, discovered_class_sources: EMPTY_TABLE, data_member_layouts: EMPTY_TABLE, struct_member_layouts: EMPTY_TABLE, # ADR-67 WD3 — the call-site parameter-inference table, keyed by # `[class_name, method_name, kind]` (the same `(class, method, kind)` # triple {Inference::ParameterInferenceCollector} records and that # `build_method_entry_scope` reconstructs from the lexical class path). # The value is a `{param_name(Symbol) => Rigor::Type}` map of the union # of resolved call-site argument types. Empty on every normal run; only # the `coverage --protection` collection pass populates it today, so a # `check` run leaves it empty and seeds nothing (byte-identical). param_inferred_types: EMPTY_TABLE )
Instance Attribute Summary collapse
-
#class_cvars ⇒ Object
readonly
Returns the value of attribute class_cvars.
-
#class_ivars ⇒ Object
readonly
Returns the value of attribute class_ivars.
-
#data_member_layouts ⇒ Object
readonly
Returns the value of attribute data_member_layouts.
-
#declared_types ⇒ Object
readonly
Returns the value of attribute declared_types.
-
#discovered_class_sources ⇒ Object
readonly
Returns the value of attribute discovered_class_sources.
-
#discovered_classes ⇒ Object
readonly
Returns the value of attribute discovered_classes.
-
#discovered_def_nodes ⇒ Object
readonly
Returns the value of attribute discovered_def_nodes.
-
#discovered_def_sources ⇒ Object
readonly
Returns the value of attribute discovered_def_sources.
-
#discovered_includes ⇒ Object
readonly
Returns the value of attribute discovered_includes.
-
#discovered_method_visibilities ⇒ Object
readonly
Returns the value of attribute discovered_method_visibilities.
-
#discovered_methods ⇒ Object
readonly
Returns the value of attribute discovered_methods.
-
#discovered_singleton_def_nodes ⇒ Object
readonly
Returns the value of attribute discovered_singleton_def_nodes.
-
#discovered_superclasses ⇒ Object
readonly
Returns the value of attribute discovered_superclasses.
-
#in_source_constants ⇒ Object
readonly
Returns the value of attribute in_source_constants.
-
#param_inferred_types ⇒ Object
readonly
Returns the value of attribute param_inferred_types.
-
#program_globals ⇒ Object
readonly
Returns the value of attribute program_globals.
-
#struct_member_layouts ⇒ Object
readonly
Returns the value of attribute struct_member_layouts.
Instance Attribute Details
#class_cvars ⇒ Object (readonly)
Returns the value of attribute class_cvars
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def class_cvars @class_cvars end |
#class_ivars ⇒ Object (readonly)
Returns the value of attribute class_ivars
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def class_ivars @class_ivars end |
#data_member_layouts ⇒ Object (readonly)
Returns the value of attribute data_member_layouts
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def data_member_layouts @data_member_layouts end |
#declared_types ⇒ Object (readonly)
Returns the value of attribute declared_types
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def declared_types @declared_types end |
#discovered_class_sources ⇒ Object (readonly)
Returns the value of attribute discovered_class_sources
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_class_sources @discovered_class_sources end |
#discovered_classes ⇒ Object (readonly)
Returns the value of attribute discovered_classes
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_classes @discovered_classes end |
#discovered_def_nodes ⇒ Object (readonly)
Returns the value of attribute discovered_def_nodes
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_def_nodes @discovered_def_nodes end |
#discovered_def_sources ⇒ Object (readonly)
Returns the value of attribute discovered_def_sources
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_def_sources @discovered_def_sources end |
#discovered_includes ⇒ Object (readonly)
Returns the value of attribute discovered_includes
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_includes @discovered_includes end |
#discovered_method_visibilities ⇒ Object (readonly)
Returns the value of attribute discovered_method_visibilities
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_method_visibilities @discovered_method_visibilities end |
#discovered_methods ⇒ Object (readonly)
Returns the value of attribute discovered_methods
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_methods @discovered_methods end |
#discovered_singleton_def_nodes ⇒ Object (readonly)
Returns the value of attribute discovered_singleton_def_nodes
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_singleton_def_nodes @discovered_singleton_def_nodes end |
#discovered_superclasses ⇒ Object (readonly)
Returns the value of attribute discovered_superclasses
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def discovered_superclasses @discovered_superclasses end |
#in_source_constants ⇒ Object (readonly)
Returns the value of attribute in_source_constants
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def in_source_constants @in_source_constants end |
#param_inferred_types ⇒ Object (readonly)
Returns the value of attribute param_inferred_types
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def param_inferred_types @param_inferred_types end |
#program_globals ⇒ Object (readonly)
Returns the value of attribute program_globals
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def program_globals @program_globals end |
#struct_member_layouts ⇒ Object (readonly)
Returns the value of attribute struct_member_layouts
16 17 18 |
# File 'lib/rigor/scope/discovery_index.rb', line 16 def struct_member_layouts @struct_member_layouts end |