![]() |
Boron 2.1.0
|
Boron is an interpreted scripting language built with the Urlan datatype system.
This manual is a reference to help programmers develop their own domain languages or extend Boron with their own types and functions.
Study the Core Programmer Interface and the examples.
The primary structures are an environment and a thread, each of which contains a data store. Both structures are created with boron_makeEnv(). Each data store is an array of UBuffer structs.
The environment data store holds static data which can be accessed by any thread. It is created once with ur_freezeEnv() and buffer pointers are obtained with ur_bufferEnv().
The thread data store (UThread::dataStore) is garbage collected. Buffers are added by ur_genBuffers() and buffer pointers are obtained with ur_buffer() or ur_bufferEnv(). There are a number of type-specific functions, such as ur_makeContext() and ur_makeString(), that call ur_genBuffers() internally.
Garbage collection occurs when ur_genBuffers() cannot find free buffers in the dataStore or when ur_recycle() is called.
The Urlan block! & context! types are implemented with a UBuffer that points to an array of UCell structs. Each cell holds a single value of any type. Complex types that reference buffers do so via a UIndex member (such as UCellSeries::buf).
The following diagram shows an example data store: