|
LispBM
|
#include <lbm_types.h>#include <stdio.h>#include "symrepr.h"#include "heap.h"#include "print.h"#include "env.h"#include "lbm_memory.h"
Functions | |
| bool | lbm_init_env (void) |
| lbm_uint | lbm_get_global_env_size (void) |
| lbm_value * | lbm_get_global_env (void) |
| lbm_value | lbm_env_copy_spine (lbm_value env) |
| bool | lbm_env_lookup_b (lbm_value *res, lbm_value sym, lbm_value env) |
| bool | lbm_global_env_lookup (lbm_value *res, lbm_value sym) |
| lbm_value | lbm_env_set (lbm_value env, lbm_value key, lbm_value val) |
| lbm_value | lbm_env_modify_binding (lbm_value env, lbm_value key, lbm_value val) |
| lbm_value | lbm_env_drop_binding (lbm_value env, lbm_value key) |
Variables | |
| static lbm_value | env_global [GLOBAL_ENV_ROOTS] |
Copy the spine of an environment. The list structure is recreated but the values themselves are not copied but rather just referenced.
| env | Environment to copy. |
Removes a binding (destructively) from the input environment.
| env | Environment to modify. |
| key | Key to remove from environment. |
Lookup a value in an environment.
| res | Result stored here |
| sym | The key to look for in the environment |
| env | The environment to search for the key. |
Create a new binding on the environment without destroying the old value. If the old value is unused (the key-value pair) it will be freed by GC at next convenience.
| env | Environment to modify. |
| key | A symbol to associate with a value. |
| val | The value. |
| env | The environment to modify. |
| key | The key. |
| val | The new value to associate with the key. |
Create a new binding on the environment or replace an old binding.
| env | Environment to modify. |
| key | A symbol to associate with a value. |
| val | The value. |
| lbm_value* lbm_get_global_env | ( | void | ) |
| lbm_uint lbm_get_global_env_size | ( | void | ) |
Lookup a value in the global environment.
| res | Result stored here |
| sym | The key to look for in the environment |
| env | The environment to search for the key. |
| bool lbm_init_env | ( | void | ) |
Initialize the global environment. This sets the global environment to NIL
|
static |