Serene Runtime 1.0.0
C runtime for the Serene programming language
Loading...
Searching...
No Matches
srn_namespace_t Struct Reference

#include <namespaces.h>

Collaboration diagram for srn_namespace_t:
[legend]

Data Fields

srn_string_tname
 
srn_object_id_t id
 
srn_context_troot_context
 
hmap_t sym_table
 A mapping symbol names to (srn_value_t with type symbol).
 
srn_spinlock_t sym_table_lock
 
srn_namespace_src_buffer_tsrc_buffer
 The buffer holding the source code for this namespace.
 
srn_spinlock_t src_buffer_lock
 Guards every access to source buffer.
 

Detailed Description

Definition at line 48 of file namespaces.h.

Field Documentation

◆ id

srn_object_id_t srn_namespace_t::id

Definition at line 50 of file namespaces.h.

◆ name

srn_string_t* srn_namespace_t::name

Definition at line 49 of file namespaces.h.

◆ root_context

srn_context_t* srn_namespace_t::root_context

Definition at line 52 of file namespaces.h.

◆ src_buffer

srn_namespace_src_buffer_t* srn_namespace_t::src_buffer

The buffer holding the source code for this namespace.

Can be a nullptr For new and empty namespaces. DO NOT hold any reference to this buffer since it will be purged in case of a namespace reload.

Definition at line 63 of file namespaces.h.

◆ src_buffer_lock

srn_spinlock_t srn_namespace_t::src_buffer_lock

Guards every access to source buffer.

Acquire before any operation. Even read.

Definition at line 66 of file namespaces.h.

◆ sym_table

hmap_t srn_namespace_t::sym_table

A mapping symbol names to (srn_value_t with type symbol).

Since hmap_t hashes out the name, it's really a mapping from unsigned 32bit integer to symbols

Definition at line 57 of file namespaces.h.

◆ sym_table_lock

srn_spinlock_t srn_namespace_t::sym_table_lock

Definition at line 58 of file namespaces.h.


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