#include "muse.h"Include dependency graph for muse_opcodes.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | muse_cons_cell |
| A cons cell consists of references to two muse cells called the head and the tail. More... | |
| struct | muse_nativefn_cell |
| muSE provides the facility to invoke C functions during the evaluation process. More... | |
| struct | muse_text_cell |
| A string is represented in a single cell by storing a pair of pointers to the start of the string and the end of the string. More... | |
| union | muse_cell_data |
| A muse cell is a union of all the possible cell types. More... | |
| struct | muse_stack |
| A stack is used to keep track of temporary references to objects so that a cons-ing operation does not result in an object being inadvertently garbage collected. More... | |
| struct | muse_heap |
| The muse heap is an array of cells where the cells available for allocation are collected into a free list. More... | |
| struct | _muse_env |
| The muse environment contains all info relevant to evaluation of expressions in muSE. More... | |
Typedefs | |
| typedef double | muse_float_cell |
| A float in muSE is a 64-bit double. | |
Functions | |
| static muse_env * | _env () |
| static muse_cell | _t () |
| Returns the T symbol that is used to represent "TRUE" if no other object is available to represent it. | |
| static muse_cell | _celli (muse_cell cell) |
The cell index is stored in the upper 29 bits of the muse_cell. | |
| static muse_cell | _cellati (int i) |
Returns a reference to the cell at the given index i. | |
| static muse_cell_t | _cellt (muse_cell cell) |
| Returns the type of the cell referred to by the given cell reference. | |
| static const char * | _typename (muse_cell cell) |
| static muse_boolean | _isnumbert (int cell_t) |
| static muse_boolean | _isnumber (muse_cell cell) |
| static muse_boolean | _isfn (muse_cell cell) |
| static muse_boolean | _isquote (muse_cell cell) |
| static muse_cell | _setcellt (muse_cell cell, muse_cell_t t) |
| static muse_cell_data * | _ptr (muse_cell cell) |
| static muse_functional_object_t * | _fnobjdata (muse_cell c) |
| static muse_int | _intvalue (muse_cell c) |
| static muse_float | _floatvalue (muse_cell c) |
| static muse_heap * | _heap () |
| static muse_stack * | _stack () |
| static muse_cell | _spush (muse_cell cell) |
| static int | _spos () |
| static void | _unwind (int stack_pos) |
| static muse_stack * | _symstack () |
| static muse_cell | _head (muse_cell c) |
| static muse_cell | _tail (muse_cell c) |
| static muse_cell | _symname (muse_cell sym) |
| static muse_cell | _step (muse_cell *c) |
| static muse_cell | _next (muse_cell *c) |
| static void | _lpush (muse_cell h, muse_cell *l) |
| static void | _seth (muse_cell c, muse_cell h) |
| static void | _sett (muse_cell c, muse_cell t) |
| static void | _setht (muse_cell c, muse_cell h, muse_cell t) |
| static muse_cell | _def (muse_cell symbol, muse_cell value) |
| static muse_cell | _symval (muse_cell symbol) |
| static int | _bspos () |
| static void | _push_binding (muse_cell symbol) |
| static void | _unwind_bindings (int pos) |
| static void | _mark (muse_cell c) |
| static void | _unmark (muse_cell c) |
| static int | _ismarked (muse_cell c) |
| static int | _iscompound (muse_cell c) |
| static muse_cell | _takefreecell () |
| static void | _returncell (muse_cell c) |
| static muse_cell | _qq (muse_cell c) |
| static muse_cell | _quq (muse_cell c) |
Variables | |
| BEGIN_MUSE_C_FUNCTIONS typedef longlong_t | muse_int_cell |
| A single cell is used to represent an integer in muSE. | |
| muse_env * | g_muse_env |
| The muse environment contains the heap, the various stacks and symbols, and basically everything that happens in the interpreter is w.r.t. | |
| const char * | g_muse_typenames [] |
| String names for the various cell types, intended for debugging and reporting use. | |
All rights reserved. See LICENSE.txt distributed with this source code or http://muvee-symbolic-expressions.googlecode.com/svn/trunk/LICENSE.txt for terms and conditions under which this software is provided to you.
| typedef double muse_float_cell |
A float in muSE is a 64-bit double.
| static muse_env* _env | ( | ) | [inline, static] |
| static muse_cell _t | ( | ) | [inline, static] |
Returns the T symbol that is used to represent "TRUE" if no other object is available to represent it.
The cell index is stored in the upper 29 bits of the muse_cell.
This returns the index of a cell referred by a muse_cell.
| static muse_cell _cellati | ( | int | i | ) | [inline, static] |
Returns a reference to the cell at the given index i.
| static muse_cell_t _cellt | ( | muse_cell | cell | ) | [inline, static] |
Returns the type of the cell referred to by the given cell reference.
The type is encoded in the least 3 bits of the muse_cell.
| static const char* _typename | ( | muse_cell | cell | ) | [inline, static] |
| static muse_boolean _isnumbert | ( | int | cell_t | ) | [inline, static] |
| static muse_boolean _isnumber | ( | muse_cell | cell | ) | [inline, static] |
| static muse_boolean _isfn | ( | muse_cell | cell | ) | [inline, static] |
| static muse_boolean _isquote | ( | muse_cell | cell | ) | [inline, static] |
| static muse_cell _setcellt | ( | muse_cell | cell, | |
| muse_cell_t | t | |||
| ) | [inline, static] |
| static muse_cell_data* _ptr | ( | muse_cell | cell | ) | [inline, static] |
| static muse_functional_object_t* _fnobjdata | ( | muse_cell | c | ) | [inline, static] |
| static muse_float _floatvalue | ( | muse_cell | c | ) | [inline, static] |
| static muse_heap* _heap | ( | ) | [inline, static] |
| static muse_stack* _stack | ( | ) | [inline, static] |
| static int _spos | ( | ) | [inline, static] |
| static void _unwind | ( | int | stack_pos | ) | [inline, static] |
| static muse_stack* _symstack | ( | ) | [inline, static] |
| static int _bspos | ( | ) | [inline, static] |
| static void _push_binding | ( | muse_cell | symbol | ) | [inline, static] |
| static void _unwind_bindings | ( | int | pos | ) | [inline, static] |
| static void _mark | ( | muse_cell | c | ) | [inline, static] |
| static void _unmark | ( | muse_cell | c | ) | [inline, static] |
| static int _ismarked | ( | muse_cell | c | ) | [inline, static] |
| static int _iscompound | ( | muse_cell | c | ) | [inline, static] |
| static muse_cell _takefreecell | ( | ) | [inline, static] |
| static void _returncell | ( | muse_cell | c | ) | [inline, static] |
| BEGIN_MUSE_C_FUNCTIONS typedef longlong_t muse_int_cell |
A single cell is used to represent an integer in muSE.
Integers are all 64-bit to avoid any conversion and data loss issues.
The muse environment contains the heap, the various stacks and symbols, and basically everything that happens in the interpreter is w.r.t.
the environment. There is only one global muse environment that you can change using the muse_get_current_env() and muse_set_current_env() API calls. Having the muse environment global simplifies the API calls.
As of this implementation, the limitation is that only one muse environment can be the current environment in a single process. It is possible to improve this situation to allow multiple environments to be active in different threads by changing the global to a thread-local variable. Then the conbstraint would be that a single muse environment can be the current environment in only one thread at any given time.
| const char* g_muse_typenames[] |
String names for the various cell types, intended for debugging and reporting use.
1.4.7