Cyclone Scheme  0.5
Modules | Data Structures | Macros | Typedefs | Enumerations | Variables
Objects

Definitions and code for memory-allocated objects. More...

Modules

 Safe pair access macros
 Macros for safe pair access.
 
 Unsafe pair access macros
 Macros for fast - but unsafe - pair access.
 

Data Structures

struct  bignum_type
 Exact integer of unlimited precision. More...
 
struct  boolean_type
 The boolean type: True or False. More...
 
struct  bytevector_type
 Bytevector type. More...
 
struct  c_opaque_type
 C Opaque type - a wrapper around a pointer of any type. More...
 
struct  closure0_type
 A closed-over function with no variables. More...
 
struct  closure1_type
 A closed-over function with one variable. More...
 
struct  closureN_type
 A closed-over function with zero or more closed-over variables. More...
 
union  common_type
 A union of all the constant-size objects. More...
 
struct  cond_var_type
 The condition variable thread synchronization type. More...
 
struct  cvar_type
 C-variable integration type - wrapper around a Cyclone object pointer. More...
 
struct  double_type
 Double-precision floating point type, also known as a flonum. More...
 
struct  integer_type
 Deprecated - boxed integers. More...
 
struct  macro_type
 Closure for a macro. More...
 
struct  mutex_type
 The mutex thread synchronization type. More...
 
struct  pair_type
 The pair (cons) type. More...
 
struct  port_type
 The port object type. More...
 
struct  primitive_type
 A function built into the runtime. More...
 
struct  string_type
 The string type. More...
 
struct  symbol_type
 Symbols are similar to strings, but only one instance of each unique symbol is created, so comparisons are O(1). More...
 
struct  vector_type
 Vector type. More...
 

Macros

#define alloc_bignum(data, p)   bignum_type *p = gc_alloc_bignum((gc_thread_data *)data);
 
#define assign_double(pobj, v)
 
#define bignum_value(x)   (((bignum_type *) x)->bn)
 
#define boolean_desc(x)   (((boolean_type *) x)->desc)
 
#define defprimitive(name, desc, fnc)
 
#define defsymbol(name)   static object quote_##name = NULL;
 
#define double_value(x)   (((double_type *) x)->value)
 
#define forward(obj)   (((pair_type *) obj)->pair_car)
 
#define integer_value(x)   (((integer_type *) x)->value)
 
#define make_c_opaque(var, p)
 
#define make_cell(n, a)   make_pair(n,a,NULL);
 
#define make_cvar(n, v)
 
#define make_double(n, v)
 
#define make_empty_bytevector(v)
 
#define make_empty_vector(v)
 
#define make_pair(n, a, d)
 
#define make_port(p, f, m)
 
#define make_string(cs, s)
 
#define make_string_noalloc(cs, s, length)
 
#define make_string_with_len(cs, s, length)
 
#define mclosure0(c, f)
 
#define mclosure1(c, f, a)
 
#define mmacro(c, f)
 
#define opaque_ptr(x)   (((c_opaque)x)->ptr)
 
#define prim(x)   (x && ((primitive)x)->tag == primitive_tag)
 
#define prim_name(x)   (((primitive_type *) x)->desc)
 
#define set_pair(n, a, d)
 
#define string_len(x)   (((string_type *) x)->len)
 
#define string_str(x)   (((string_type *) x)->str)
 
#define symbol_desc(x)   (((symbol_type *) x)->desc)
 
#define type_of(obj)   (((pair_type *) obj)->tag)
 

Typedefs

typedef boolean_typeboolean
 
typedef bytevector_typebytevector
 
typedef c_opaque_typec_opaque
 
typedef closure0_typeclosure
 
typedef closure0_typeclosure0
 
typedef closure1_typeclosure1
 
typedef closureN_typeclosureN
 
typedef cond_var_typecond_var
 
typedef cvar_typecvar
 
typedef void(* function_type) ()
 
typedef void(* function_type_va) (int, object, object, object,...)
 
typedef object(* inline_function_type) ()
 
typedef pair_typelist
 
typedef closure0_typemacro
 
typedef mutex_typemutex
 
typedef void * object
 
typedef pair_typepair
 
typedef primitive_typeprimitive
 
typedef symbol_typesymbol
 
typedef unsigned char tag_type
 
typedef vector_typevector
 

Enumerations

enum  bn_cmp_type {
  CYC_BN_LTE = -2, CYC_BN_LT = MP_LT, CYC_BN_EQ = MP_EQ, CYC_BN_GT = MP_GT,
  CYC_BN_GTE = 2
}
 
enum  object_tag {
  boolean_tag = 0, bytevector_tag, c_opaque_tag, closure0_tag,
  closure1_tag, closureN_tag, cond_var_tag, cvar_tag,
  double_tag, eof_tag, forward_tag, integer_tag,
  bignum_tag, macro_tag, mutex_tag, pair_tag,
  port_tag, primitive_tag, string_tag, symbol_tag,
  vector_tag
}
 

Variables

const object boolean_f
 
const object boolean_t
 
const object Cyc_EOF
 
const object quote_void
 

Detailed Description

Definitions and code for memory-allocated objects.

Most Scheme data types are defined as object types.

Each object type contains a header for garbage collection and a tag that identifies the type of object, as well as any object-specific fields.

Most object types are allocated on the nursery (the C stack) and relocated to the garbage-collected heap during minor GC. It is only safe for an object on the nursery to be used by the thread that created it, as that object could be relocated at any time.