Prism Ruby parser
Loading...
Searching...
No Matches
Data Fields
pm_locals Struct Reference

This is a set of local variables in a certain lexical context (method, class, module, etc.). More...

#include <parser.h>

Collaboration diagram for pm_locals:
Collaboration graph
[legend]

Data Fields

uint32_t size
 The number of local variables in the set.
 
uint32_t capacity
 The capacity of the local variables set.
 
uint32_t bloom
 A bloom filter over constant IDs stored in this set.
 
pm_local_tlocals
 The nullable allocated memory for the local variables in the set.
 

Detailed Description

This is a set of local variables in a certain lexical context (method, class, module, etc.).

We need to track how many times these variables are read in order to warn if they only get written.

Field Documentation

◆ bloom

uint32_t pm_locals::bloom

A bloom filter over constant IDs stored in this set.

Used to quickly reject lookups for names that are definitely not present, avoiding the cost of a linear scan or hash probe.


The documentation for this struct was generated from the following file: