The BLOCKS SDK
roli_LittleFootRunner.h File Reference

Classes

struct  littlefoot::NativeFunction
 Defines a native function that the program can call. More...
 
struct  littlefoot::Program
 A reference to a block of memory which contains a complete program. More...
 
struct  littlefoot::Runner< programAndHeapSpace, stackAndGlobalsSpace >
 Loads a program, and lets the user execute its functions. More...
 
struct  littlefoot::Runner< programAndHeapSpace, stackAndGlobalsSpace >::FunctionExecutionContext
 

Namespaces

 littlefoot
 

Macros

#define LITTLEFOOT_DEBUG_TRACE   0
 
#define LITTLEFOOT_DUMP_PROGRAM   0
 
#define LITTLEFOOT_OPCODES(OP, OP_INT8, OP_INT16, OP_INT32)
 
#define LITTLEFOOT_OP(name)   name,
 
#define LITTLEFOOT_OP(name)   case OpCode::name: return 0;
 
#define LITTLEFOOT_OP_INT8(name)   case OpCode::name: return 1;
 
#define LITTLEFOOT_OP_INT16(name)   case OpCode::name: return 2;
 
#define LITTLEFOOT_OP_INT32(name)   case OpCode::name: return 4;
 
#define LITTLEFOOT_PERFORM_OP(name)   case OpCode::name: name(); break;
 
#define LITTLEFOOT_PERFORM_OP_INT8(name)   case OpCode::name: name ((int8) *programCounter++); break;
 
#define LITTLEFOOT_PERFORM_OP_INT16(name)   case OpCode::name: name (readProgram16()); break;
 
#define LITTLEFOOT_PERFORM_OP_INT32(name)   case OpCode::name: name (readProgram32()); break;
 

Typedefs

using littlefoot::int8 = signed char
 
using littlefoot::uint8 = unsigned char
 
using littlefoot::int16 = signed short
 
using littlefoot::uint16 = unsigned short
 
using littlefoot::int32 = signed int
 
using littlefoot::uint32 = unsigned int
 
using littlefoot::FunctionID = int16
 

Enumerations

enum class  littlefoot::OpCode : uint8 { littlefoot::LITTLEFOOT_OP , littlefoot::endOfOpcodes }
 
enum class  littlefoot::Type : uint8 { littlefoot::void_ = 'v' , littlefoot::int_ = 'i' , littlefoot::bool_ = 'b' , littlefoot::float_ = 'f' }
 Available value types. More...
 

Variables

const int littlefoot::numBytesInType = 4
 

Macro Definition Documentation

◆ LITTLEFOOT_DEBUG_TRACE

#define LITTLEFOOT_DEBUG_TRACE   0

◆ LITTLEFOOT_DUMP_PROGRAM

#define LITTLEFOOT_DUMP_PROGRAM   0

◆ LITTLEFOOT_OPCODES

#define LITTLEFOOT_OPCODES (   OP,
  OP_INT8,
  OP_INT16,
  OP_INT32 
)

◆ LITTLEFOOT_OP [1/2]

#define LITTLEFOOT_OP (   name)    name,

◆ LITTLEFOOT_OP [2/2]

#define LITTLEFOOT_OP (   name)    case OpCode::name: return 0;

◆ LITTLEFOOT_OP_INT8

#define LITTLEFOOT_OP_INT8 (   name)    case OpCode::name: return 1;

◆ LITTLEFOOT_OP_INT16

#define LITTLEFOOT_OP_INT16 (   name)    case OpCode::name: return 2;

◆ LITTLEFOOT_OP_INT32

#define LITTLEFOOT_OP_INT32 (   name)    case OpCode::name: return 4;

◆ LITTLEFOOT_PERFORM_OP

#define LITTLEFOOT_PERFORM_OP (   name)    case OpCode::name: name(); break;

◆ LITTLEFOOT_PERFORM_OP_INT8

#define LITTLEFOOT_PERFORM_OP_INT8 (   name)    case OpCode::name: name ((int8) *programCounter++); break;

◆ LITTLEFOOT_PERFORM_OP_INT16

#define LITTLEFOOT_PERFORM_OP_INT16 (   name)    case OpCode::name: name (readProgram16()); break;

◆ LITTLEFOOT_PERFORM_OP_INT32

#define LITTLEFOOT_PERFORM_OP_INT32 (   name)    case OpCode::name: name (readProgram32()); break;