LMMS
Loading...
Searching...
No Matches
ns-eel-int.h File Reference
#include "../wdltypes.h"
#include "ns-eel.h"
#include "ns-eel-addfuncs.h"
#include "y.tab.h"

Go to the source code of this file.

Classes

struct  _codeHandleFunctionRec
struct  _llBlock
struct  codeHandleType
struct  varNameRec
struct  eel_growbuf
struct  _compileContext
struct  functionType
struct  nseel_globalVarItem

Macros

#define YYSTYPE   opcodeRec *
#define NSEEL_CLOSEFACTOR   0.00001
#define EEL_GROWBUF(type)
#define EEL_GROWBUF_RESIZE(gb, newsz)
#define EEL_GROWBUF_GET(gb)
#define EEL_GROWBUF_GET_SIZE(gb)
#define NSEEL_NPARAMS_FLAG_CONST   0x80000

Typedefs

typedef struct opcodeRec opcodeRec
typedef struct _codeHandleFunctionRec _codeHandleFunctionRec
typedef struct _llBlock llBlock
typedef struct _compileContext compileContext
typedef struct functionType functionType
typedef struct nseel_globalVarItem nseel_globalVarItem

Enumerations

enum  {
  FN_MULTIPLY =0 , FN_DIVIDE , FN_JOIN_STATEMENTS , FN_DENORMAL_LIKELY ,
  FN_DENORMAL_UNLIKELY , FN_ADD , FN_SUB , FN_AND ,
  FN_OR , FN_UMINUS , FN_NOT , FN_NOTNOT ,
  FN_XOR , FN_SHL , FN_SHR , FN_MOD ,
  FN_POW , FN_LT , FN_GT , FN_LTE ,
  FN_GTE , FN_EQ , FN_EQ_EXACT , FN_NE ,
  FN_NE_EXACT , FN_LOGICAL_AND , FN_LOGICAL_OR , FN_IF_ELSE ,
  FN_MEMORY , FN_GMEMORY , FN_NONCONST_BEGIN , FN_ASSIGN =FN_NONCONST_BEGIN ,
  FN_ADD_OP , FN_SUB_OP , FN_MOD_OP , FN_OR_OP ,
  FN_AND_OP , FN_XOR_OP , FN_DIV_OP , FN_MUL_OP ,
  FN_POW_OP , FN_WHILE , FN_LOOP , FUNCTYPE_SIMPLEMAX ,
  FUNCTYPE_FUNCTIONTYPEREC =1000 , FUNCTYPE_EELFUNC
}

Functions

functionTypenseel_getFunctionByName (compileContext *ctx, const char *name, int *mchk)
functionTypenseel_enumFunctions (compileContext *ctx, int idx)
opcodeRecnseel_createCompiledValue (compileContext *ctx, EEL_F value)
opcodeRecnseel_createCompiledValuePtr (compileContext *ctx, EEL_F *addrValue, const char *namestr)
opcodeRecnseel_createMoreParametersOpcode (compileContext *ctx, opcodeRec *code1, opcodeRec *code2)
opcodeRecnseel_createSimpleCompiledFunction (compileContext *ctx, int fn, int np, opcodeRec *code1, opcodeRec *code2)
opcodeRecnseel_createMemoryAccess (compileContext *ctx, opcodeRec *code1, opcodeRec *code2)
opcodeRecnseel_createIfElse (compileContext *ctx, opcodeRec *code1, opcodeRec *code2, opcodeRec *code3)
opcodeRecnseel_createFunctionByName (compileContext *ctx, const char *name, int np, opcodeRec *code1, opcodeRec *code2, opcodeRec *code3)
opcodeRecnseel_resolve_named_symbol (compileContext *ctx, opcodeRec *rec, int parmcnt, int *errOut)
opcodeRecnseel_setCompiledFunctionCallParameters (compileContext *ctx, opcodeRec *fn, opcodeRec *code1, opcodeRec *code2, opcodeRec *code3, opcodeRec *postCode, int *errOut)
struct eelStringSegmentRecnseel_createStringSegmentRec (compileContext *ctx, const char *str, int len)
opcodeRecnseel_eelMakeOpcodeFromStringSegments (compileContext *ctx, struct eelStringSegmentRec *rec)
EEL_F * nseel_int_register_var (compileContext *ctx, const char *name, int isReg, const char **namePtrOut)
_codeHandleFunctionReceel_createFunctionNamespacedInstance (compileContext *ctx, _codeHandleFunctionRec *fr, const char *nameptr)
const char * nseel_simple_tokenizer (const char **ptr, const char *endptr, int *lenOut, int *state)
int nseel_filter_escaped_string (char *outbuf, int outbuf_sz, const char *rdptr, size_t rdptr_size, char delim_char)
opcodeRecnseel_translate (compileContext *ctx, const char *tmp, size_t tmplen)
int nseel_lookup (compileContext *ctx, opcodeRec **opOut, const char *sname)
EEL_F *NSEEL_CGEN_CALL __NSEEL_RAMAlloc (EEL_F **blocks, unsigned int w)
EEL_F *NSEEL_CGEN_CALL __NSEEL_RAMAllocGMEM (EEL_F ***blocks, unsigned int w)
EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemSet (EEL_F **blocks, EEL_F *dest, EEL_F *v, EEL_F *lenptr)
EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemFree (void *blocks, EEL_F *which)
EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemTop (void *blocks, EEL_F *which)
EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemCpy (EEL_F **blocks, EEL_F *dest, EEL_F *src, EEL_F *lenptr)
EEL_F NSEEL_CGEN_CALL __NSEEL_RAM_Mem_SetValues (EEL_F **blocks, INT_PTR np, EEL_F **parms)
EEL_F NSEEL_CGEN_CALL __NSEEL_RAM_Mem_GetValues (EEL_F **blocks, INT_PTR np, EEL_F **parms)

Variables

nseel_globalVarItemnseel_globalreg_list
EEL_F nseel_ramalloc_onfail
EEL_F *volatile nseel_gmembuf_default

Macro Definition Documentation

◆ EEL_GROWBUF

#define EEL_GROWBUF ( type)
Value:
union { eel_growbuf _growbuf; type *_tval; }
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
Definition ns-eel-int.h:172

◆ EEL_GROWBUF_GET

#define EEL_GROWBUF_GET ( gb)
Value:
((gb)->_tval)

◆ EEL_GROWBUF_GET_SIZE

#define EEL_GROWBUF_GET_SIZE ( gb)
Value:
((gb)->_growbuf.size/(int)sizeof((gb)->_tval[0]))
typedef int(UZ_EXP MsgFn)()

◆ EEL_GROWBUF_RESIZE

#define EEL_GROWBUF_RESIZE ( gb,
newsz )
Value:
__growbuf_resize(&(gb)->_growbuf, (newsz)*(int)sizeof((gb)->_tval[0]))
static int __growbuf_resize(eel_growbuf *buf, int newsize)
Definition nseel-compiler.c:308

◆ NSEEL_CLOSEFACTOR

#define NSEEL_CLOSEFACTOR   0.00001

◆ NSEEL_NPARAMS_FLAG_CONST

#define NSEEL_NPARAMS_FLAG_CONST   0x80000

◆ YYSTYPE

#define YYSTYPE   opcodeRec *

Typedef Documentation

◆ _codeHandleFunctionRec

typedef struct _codeHandleFunctionRec _codeHandleFunctionRec

◆ compileContext

◆ functionType

typedef struct functionType functionType

◆ llBlock

typedef struct _llBlock llBlock

◆ nseel_globalVarItem

typedef struct nseel_globalVarItem nseel_globalVarItem

◆ opcodeRec

typedef struct opcodeRec opcodeRec

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FN_MULTIPLY 
FN_DIVIDE 
FN_JOIN_STATEMENTS 
FN_DENORMAL_LIKELY 
FN_DENORMAL_UNLIKELY 
FN_ADD 
FN_SUB 
FN_AND 
FN_OR 
FN_UMINUS 
FN_NOT 
FN_NOTNOT 
FN_XOR 
FN_SHL 
FN_SHR 
FN_MOD 
FN_POW 
FN_LT 
FN_GT 
FN_LTE 
FN_GTE 
FN_EQ 
FN_EQ_EXACT 
FN_NE 
FN_NE_EXACT 
FN_LOGICAL_AND 
FN_LOGICAL_OR 
FN_IF_ELSE 
FN_MEMORY 
FN_GMEMORY 
FN_NONCONST_BEGIN 
FN_ASSIGN 
FN_ADD_OP 
FN_SUB_OP 
FN_MOD_OP 
FN_OR_OP 
FN_AND_OP 
FN_XOR_OP 
FN_DIV_OP 
FN_MUL_OP 
FN_POW_OP 
FN_WHILE 
FN_LOOP 
FUNCTYPE_SIMPLEMAX 
FUNCTYPE_FUNCTIONTYPEREC 
FUNCTYPE_EELFUNC 

Function Documentation

◆ __NSEEL_RAM_Mem_GetValues()

EEL_F NSEEL_CGEN_CALL __NSEEL_RAM_Mem_GetValues ( EEL_F ** blocks,
INT_PTR np,
EEL_F ** parms )

◆ __NSEEL_RAM_Mem_SetValues()

EEL_F NSEEL_CGEN_CALL __NSEEL_RAM_Mem_SetValues ( EEL_F ** blocks,
INT_PTR np,
EEL_F ** parms )

◆ __NSEEL_RAM_MemCpy()

EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemCpy ( EEL_F ** blocks,
EEL_F * dest,
EEL_F * src,
EEL_F * lenptr )

◆ __NSEEL_RAM_MemFree()

EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemFree ( void * blocks,
EEL_F * which )

◆ __NSEEL_RAM_MemSet()

EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemSet ( EEL_F ** blocks,
EEL_F * dest,
EEL_F * v,
EEL_F * lenptr )

◆ __NSEEL_RAM_MemTop()

EEL_F *NSEEL_CGEN_CALL __NSEEL_RAM_MemTop ( void * blocks,
EEL_F * which )

◆ __NSEEL_RAMAlloc()

EEL_F *NSEEL_CGEN_CALL __NSEEL_RAMAlloc ( EEL_F ** blocks,
unsigned int w )

◆ __NSEEL_RAMAllocGMEM()

EEL_F *NSEEL_CGEN_CALL __NSEEL_RAMAllocGMEM ( EEL_F *** blocks,
unsigned int w )

◆ eel_createFunctionNamespacedInstance()

_codeHandleFunctionRec * eel_createFunctionNamespacedInstance ( compileContext * ctx,
_codeHandleFunctionRec * fr,
const char * nameptr )

◆ nseel_createCompiledValue()

opcodeRec * nseel_createCompiledValue ( compileContext * ctx,
EEL_F value )

◆ nseel_createCompiledValuePtr()

opcodeRec * nseel_createCompiledValuePtr ( compileContext * ctx,
EEL_F * addrValue,
const char * namestr )

◆ nseel_createFunctionByName()

opcodeRec * nseel_createFunctionByName ( compileContext * ctx,
const char * name,
int np,
opcodeRec * code1,
opcodeRec * code2,
opcodeRec * code3 )

◆ nseel_createIfElse()

opcodeRec * nseel_createIfElse ( compileContext * ctx,
opcodeRec * code1,
opcodeRec * code2,
opcodeRec * code3 )

◆ nseel_createMemoryAccess()

opcodeRec * nseel_createMemoryAccess ( compileContext * ctx,
opcodeRec * code1,
opcodeRec * code2 )

◆ nseel_createMoreParametersOpcode()

opcodeRec * nseel_createMoreParametersOpcode ( compileContext * ctx,
opcodeRec * code1,
opcodeRec * code2 )

◆ nseel_createSimpleCompiledFunction()

opcodeRec * nseel_createSimpleCompiledFunction ( compileContext * ctx,
int fn,
int np,
opcodeRec * code1,
opcodeRec * code2 )

◆ nseel_createStringSegmentRec()

struct eelStringSegmentRec * nseel_createStringSegmentRec ( compileContext * ctx,
const char * str,
int len )

◆ nseel_eelMakeOpcodeFromStringSegments()

opcodeRec * nseel_eelMakeOpcodeFromStringSegments ( compileContext * ctx,
struct eelStringSegmentRec * rec )

◆ nseel_enumFunctions()

functionType * nseel_enumFunctions ( compileContext * ctx,
int idx )

◆ nseel_filter_escaped_string()

int nseel_filter_escaped_string ( char * outbuf,
int outbuf_sz,
const char * rdptr,
size_t rdptr_size,
char delim_char )

◆ nseel_getFunctionByName()

functionType * nseel_getFunctionByName ( compileContext * ctx,
const char * name,
int * mchk )

◆ nseel_int_register_var()

EEL_F * nseel_int_register_var ( compileContext * ctx,
const char * name,
int isReg,
const char ** namePtrOut )

◆ nseel_lookup()

int nseel_lookup ( compileContext * ctx,
opcodeRec ** opOut,
const char * sname )

◆ nseel_resolve_named_symbol()

opcodeRec * nseel_resolve_named_symbol ( compileContext * ctx,
opcodeRec * rec,
int parmcnt,
int * errOut )

◆ nseel_setCompiledFunctionCallParameters()

opcodeRec * nseel_setCompiledFunctionCallParameters ( compileContext * ctx,
opcodeRec * fn,
opcodeRec * code1,
opcodeRec * code2,
opcodeRec * code3,
opcodeRec * postCode,
int * errOut )

◆ nseel_simple_tokenizer()

const char * nseel_simple_tokenizer ( const char ** ptr,
const char * endptr,
int * lenOut,
int * state )

◆ nseel_translate()

opcodeRec * nseel_translate ( compileContext * ctx,
const char * tmp,
size_t tmplen )

Variable Documentation

◆ nseel_globalreg_list

nseel_globalVarItem* nseel_globalreg_list
extern

◆ nseel_gmembuf_default

EEL_F* volatile nseel_gmembuf_default
extern

◆ nseel_ramalloc_onfail

EEL_F nseel_ramalloc_onfail
extern