w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

graphite2::vm::Machine Class Reference

#include <Machine.h>

Collaboration diagram for graphite2::vm::Machine:
[legend]

Public Types

enum  status_t {
  finished = 0 , stack_underflow , stack_not_empty , stack_overflow ,
  slot_offset_out_bounds , died_early , finished = 0 , stack_underflow ,
  stack_not_empty , stack_overflow , slot_offset_out_bounds , died_early
}
 
enum  status_t {
  finished = 0 , stack_underflow , stack_not_empty , stack_overflow ,
  slot_offset_out_bounds , died_early , finished = 0 , stack_underflow ,
  stack_not_empty , stack_overflow , slot_offset_out_bounds , died_early
}
 
typedef int32 stack_t
 
typedef int32 stack_t
 

Public Member Functions

 Machine (SlotMap &) throw ()
 
SlotMapslotMap () const throw ()
 
status_t status () const throw ()
 
 Machine (SlotMap &) throw ()
 
SlotMapslotMap () const throw ()
 
status_t status () const throw ()
 

Static Public Member Functions

static const opcode_tgetOpcodeTable () throw ()
 
static const opcode_tgetOpcodeTable () throw ()
 

Public Attributes

 CLASS_NEW_DELETE
 

Static Public Attributes

static size_t const STACK_ORDER = 10
 
static size_t const STACK_MAX = 1 << STACK_ORDER
 
static size_t const STACK_GUARD = 2
 

Private Member Functions

void check_final_stack (const stack_t *const sp)
 
stack_t run (const instr *program, const byte *data, slotref *&map)
 
void check_final_stack (const stack_t *const sp)
 
stack_t run (const instr *program, const byte *data, slotref *&map)
 

Private Attributes

SlotMap_map
 
stack_t _stack [STACK_MAX+2 *STACK_GUARD]
 
status_t _status
 

Detailed Description

Definition at line 136 of file Machine.h.

Member Typedef Documentation

◆ stack_t [1/2]

Definition at line 139 of file Machine.h.

◆ stack_t [2/2]

Definition at line 139 of file Machine.h.

Member Enumeration Documentation

◆ status_t [1/2]

Enumerator
finished 
stack_underflow 
stack_not_empty 
stack_overflow 
slot_offset_out_bounds 
died_early 
finished 
stack_underflow 
stack_not_empty 
stack_overflow 
slot_offset_out_bounds 
died_early 

Definition at line 146 of file Machine.h.

◆ status_t [2/2]

Enumerator
finished 
stack_underflow 
stack_not_empty 
stack_overflow 
slot_offset_out_bounds 
died_early 
finished 
stack_underflow 
stack_not_empty 
stack_overflow 
slot_offset_out_bounds 
died_early 

Definition at line 146 of file Machine.h.

Constructor & Destructor Documentation

◆ Machine() [1/2]

graphite2::vm::Machine::Machine ( SlotMap map)
throw (
)
inline

Definition at line 174 of file Machine.h.

References _stack, n, and STACK_GUARD.

◆ Machine() [2/2]

graphite2::vm::Machine::Machine ( SlotMap )
throw (
)

Member Function Documentation

◆ check_final_stack() [1/2]

void graphite2::vm::Machine::check_final_stack ( const stack_t *const  sp)
inlineprivate

◆ check_final_stack() [2/2]

void graphite2::vm::Machine::check_final_stack ( const stack_t *const  sp)
private

◆ getOpcodeTable() [1/2]

static const opcode_t* graphite2::vm::Machine::getOpcodeTable ( )
throw (
)
static

◆ getOpcodeTable() [2/2]

static const opcode_t* graphite2::vm::Machine::getOpcodeTable ( )
throw (
)
static

◆ run() [1/2]

stack_t graphite2::vm::Machine::run ( const instr program,
const byte data,
slotref *&  map 
)
private

◆ run() [2/2]

stack_t graphite2::vm::Machine::run ( const instr program,
const byte data,
slotref *&  map 
)
private

References _stack, n, and STACK_GUARD.

◆ slotMap() [1/2]

SlotMap & graphite2::vm::Machine::slotMap ( ) const
throw (
)
inline

Definition at line 185 of file Machine.h.

References _map.

◆ slotMap() [2/2]

SlotMap& graphite2::vm::Machine::slotMap ( ) const
throw (
)

◆ status() [1/2]

Machine::status_t graphite2::vm::Machine::status ( ) const
throw (
)
inline

Definition at line 190 of file Machine.h.

References _status.

◆ status() [2/2]

status_t graphite2::vm::Machine::status ( ) const
throw (
)

Member Data Documentation

◆ _map

SlotMap & graphite2::vm::Machine::_map
private

Definition at line 169 of file Machine.h.

Referenced by slotMap().

◆ _stack

stack_t graphite2::vm::Machine::_stack
private

Definition at line 170 of file Machine.h.

Referenced by check_final_stack(), Machine(), and run().

◆ _status

status_t graphite2::vm::Machine::_status
private

Definition at line 171 of file Machine.h.

Referenced by check_final_stack(), vm::Machine::Code::operator=(), and status().

◆ CLASS_NEW_DELETE

graphite2::vm::Machine::CLASS_NEW_DELETE

Definition at line 158 of file Machine.h.

◆ STACK_GUARD

static size_t const graphite2::vm::Machine::STACK_GUARD = 2
static

Definition at line 142 of file Machine.h.

Referenced by check_final_stack(), Machine(), and run().

◆ STACK_MAX

static size_t const graphite2::vm::Machine::STACK_MAX = 1 << STACK_ORDER
static

Definition at line 141 of file Machine.h.

Referenced by check_final_stack().

◆ STACK_ORDER

static size_t const graphite2::vm::Machine::STACK_ORDER = 10
static

Definition at line 140 of file Machine.h.


The documentation for this class was generated from the following files: