xine-lib: xine-lib-1.2.12/src/post/goom/goomsl_private.h File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
goomsl_private.h File Reference
`#include "goomsl.h"`
`#include "goomsl_heap.h"`

Go to the source code of this file.

## Data Structures
struct | _ConstIntNodeType
struct | _ConstFloatNodeType
struct | _ConstPtrNodeType
struct | _OprNodeType
struct | _NODE_TYPE
struct | _INSTRUCTION_DATA
struct | _INSTRUCTION
struct | _INSTRUCTION_FLOW
struct | _FAST_INSTRUCTION
struct | _FastInstructionFlow
struct | _ExternalFunctionStruct
struct | _Block
struct | _GSL_StructField
struct | _GSL_Struct
struct | _GoomSL

## Macros
#define | EMPTY_NODE 0
#define | CONST_INT_NODE 1
#define | CONST_FLOAT_NODE 2
#define | CONST_PTR_NODE 3
#define | VAR_NODE 4
#define | PARAM_NODE 5
#define | READ_PARAM_NODE 6
#define | OPR_NODE 7
#define | OPR_SET 1
#define | OPR_IF 2
#define | OPR_WHILE 3
#define | OPR_BLOCK 4
#define | OPR_ADD 5
#define | OPR_MUL 6
#define | OPR_EQU 7
#define | OPR_NOT 8
#define | OPR_LOW 9
#define | OPR_DIV 10
#define | OPR_SUB 11
#define | OPR_FUNC_INTRO 12
#define | OPR_FUNC_OUTRO 13
#define | OPR_CALL 14
#define | OPR_EXT_CALL 15
#define | OPR_PLUS_EQ 16
#define | OPR_SUB_EQ 17
#define | OPR_MUL_EQ 18
#define | OPR_DIV_EQ 19
#define | OPR_CALL_EXPR 20
#define | OPR_AFFECT_LIST 21
#define | OPR_FOREACH 22
#define | OPR_VAR_LIST 23
#define | FIRST_RESERVED 0x80000
#define | TYPE_INTEGER 0x90001
#define | TYPE_FLOAT 0x90002
#define | TYPE_VAR 0x90003
#define | TYPE_PTR 0x90004
#define | TYPE_LABEL 0x90005
#define | TYPE_OP_EQUAL 6
#define | TYPE_IVAR 0xa0001
#define | TYPE_FVAR 0xa0002
#define | TYPE_PVAR 0xa0003
#define | TYPE_SVAR 0xa0004
#define | INSTR_JUMP 6
#define | INSTR_JZERO 29
#define | INSTR_CALL 36
#define | INSTR_RET 37
#define | INSTR_EXT_CALL 38
#define | INSTR_JNZERO 40
#define | INSTR_SET 0x80001
#define | INSTR_INT 0x80002
#define | INSTR_FLOAT 0x80003
#define | INSTR_PTR 0x80004
#define | INSTR_LABEL 0x80005
#define | INSTR_ISLOWER 0x80006
#define | INSTR_ADD 0x80007
#define | INSTR_MUL 0x80008
#define | INSTR_DIV 0x80009
#define | INSTR_SUB 0x80010
#define | INSTR_ISEQUAL 0x80011
#define | INSTR_NOT 0x80012

## Typedefs
typedef struct _ConstIntNodeType | ConstIntNodeType
typedef struct _ConstFloatNodeType | ConstFloatNodeType
typedef struct _ConstPtrNodeType | ConstPtrNodeType
typedef struct _OprNodeType | OprNodeType
typedef struct _NODE_TYPE | NodeType
typedef struct _INSTRUCTION_DATA | InstructionData
typedef struct _INSTRUCTION | Instruction
typedef struct _INSTRUCTION_FLOW | InstructionFlow
typedef struct _FAST_INSTRUCTION | FastInstruction
typedef struct _FastInstructionFlow | FastInstructionFlow
typedef struct _ExternalFunctionStruct | ExternalFunctionStruct
typedef struct _Block | Block
typedef struct _GSL_StructField | GSL_StructField
typedef struct _GSL_Struct | GSL_Struct

## Functions
Instruction * | gsl_instr_init (GoomSL *parent, const char *name, int id, int nb_param, int line_number)
void | gsl_instr_add_param (Instruction *_this, const char *param, int type)
void | gsl_instr_set_namespace (Instruction *_this, GoomHash *ns)
void | gsl_declare_task (const char *name)
void | gsl_declare_external_task (const char *name)
int | gsl_type_of_var (GoomHash *namespace, const char *name)
void | gsl_enternamespace (const char *name)
void | gsl_reenternamespace (GoomHash *ns)
GoomHash * | gsl_leavenamespace (void)
GoomHash * | gsl_find_namespace (const char *name)
void | gsl_commit_compilation (void)

## Variables
GoomSL * | currentGoomSL

## Macro Definition Documentation

## ◆ CONST_FLOAT_NODE

#define CONST_FLOAT_NODE 2

## ◆ CONST_INT_NODE

#define CONST_INT_NODE 1

## ◆ CONST_PTR_NODE

#define CONST_PTR_NODE 3

## ◆ EMPTY_NODE

#define EMPTY_NODE 0

## ◆ FIRST_RESERVED

#define FIRST_RESERVED 0x80000

## ◆ INSTR_ADD

#define INSTR_ADD 0x80007

## ◆ INSTR_CALL

#define INSTR_CALL 36

## ◆ INSTR_DIV

#define INSTR_DIV 0x80009

## ◆ INSTR_EXT_CALL

#define INSTR_EXT_CALL 38

## ◆ INSTR_FLOAT

#define INSTR_FLOAT 0x80003

## ◆ INSTR_INT

#define INSTR_INT 0x80002

## ◆ INSTR_ISEQUAL

#define INSTR_ISEQUAL 0x80011

## ◆ INSTR_ISLOWER

#define INSTR_ISLOWER 0x80006

## ◆ INSTR_JNZERO

#define INSTR_JNZERO 40

## ◆ INSTR_JUMP

#define INSTR_JUMP 6

## ◆ INSTR_JZERO

#define INSTR_JZERO 29

## ◆ INSTR_LABEL

#define INSTR_LABEL 0x80005

## ◆ INSTR_MUL

#define INSTR_MUL 0x80008

## ◆ INSTR_NOT

#define INSTR_NOT 0x80012

## ◆ INSTR_PTR

#define INSTR_PTR 0x80004

## ◆ INSTR_RET

#define INSTR_RET 37

## ◆ INSTR_SET

#define INSTR_SET 0x80001

## ◆ INSTR_SUB

#define INSTR_SUB 0x80010

## ◆ OPR_ADD

#define OPR_ADD 5

## ◆ OPR_AFFECT_LIST

#define OPR_AFFECT_LIST 21

## ◆ OPR_BLOCK

#define OPR_BLOCK 4

## ◆ OPR_CALL

#define OPR_CALL 14

## ◆ OPR_CALL_EXPR

#define OPR_CALL_EXPR 20

## ◆ OPR_DIV

#define OPR_DIV 10

## ◆ OPR_DIV_EQ

#define OPR_DIV_EQ 19

## ◆ OPR_EQU

#define OPR_EQU 7

## ◆ OPR_EXT_CALL

#define OPR_EXT_CALL 15

## ◆ OPR_FOREACH

#define OPR_FOREACH 22

## ◆ OPR_FUNC_INTRO

#define OPR_FUNC_INTRO 12

## ◆ OPR_FUNC_OUTRO

#define OPR_FUNC_OUTRO 13

## ◆ OPR_IF

#define OPR_IF 2

## ◆ OPR_LOW

#define OPR_LOW 9

## ◆ OPR_MUL

#define OPR_MUL 6

## ◆ OPR_MUL_EQ

#define OPR_MUL_EQ 18

## ◆ OPR_NODE

#define OPR_NODE 7

## ◆ OPR_NOT

#define OPR_NOT 8

## ◆ OPR_PLUS_EQ

#define OPR_PLUS_EQ 16

## ◆ OPR_SET

#define OPR_SET 1

## ◆ OPR_SUB

#define OPR_SUB 11

## ◆ OPR_SUB_EQ

#define OPR_SUB_EQ 17

## ◆ OPR_VAR_LIST

#define OPR_VAR_LIST 23

## ◆ OPR_WHILE

#define OPR_WHILE 3

## ◆ PARAM_NODE

#define PARAM_NODE 5

## ◆ READ_PARAM_NODE

#define READ_PARAM_NODE 6

## ◆ TYPE_FLOAT

#define TYPE_FLOAT 0x90002

## ◆ TYPE_FVAR

#define TYPE_FVAR 0xa0002

## ◆ TYPE_INTEGER

#define TYPE_INTEGER 0x90001

## ◆ TYPE_IVAR

#define TYPE_IVAR 0xa0001

## ◆ TYPE_LABEL

#define TYPE_LABEL 0x90005

## ◆ TYPE_OP_EQUAL

#define TYPE_OP_EQUAL 6

## ◆ TYPE_PTR

#define TYPE_PTR 0x90004

## ◆ TYPE_PVAR

#define TYPE_PVAR 0xa0003

## ◆ TYPE_SVAR

#define TYPE_SVAR 0xa0004

## ◆ TYPE_VAR

#define TYPE_VAR 0x90003

## ◆ VAR_NODE

#define VAR_NODE 4

## Typedef Documentation

## ◆ Block

typedef struct _Block Block

## ◆ ConstFloatNodeType

typedef struct _ConstFloatNodeType ConstFloatNodeType

## ◆ ConstIntNodeType

typedef struct _ConstIntNodeType ConstIntNodeType

## ◆ ConstPtrNodeType

typedef struct _ConstPtrNodeType ConstPtrNodeType

## ◆ ExternalFunctionStruct

typedef struct _ExternalFunctionStruct ExternalFunctionStruct

## ◆ FastInstruction

typedef struct _FAST_INSTRUCTION FastInstruction

## ◆ FastInstructionFlow

typedef struct _FastInstructionFlow FastInstructionFlow

## ◆ GSL_Struct

typedef struct _GSL_Struct GSL_Struct

## ◆ GSL_StructField

typedef struct _GSL_StructField GSL_StructField

## ◆ Instruction

typedef struct _INSTRUCTION Instruction

## ◆ InstructionData

typedef struct _INSTRUCTION_DATA InstructionData

## ◆ InstructionFlow

typedef struct _INSTRUCTION_FLOW InstructionFlow

## ◆ NodeType

typedef struct _NODE_TYPE NodeType

## ◆ OprNodeType

typedef struct _OprNodeType OprNodeType

## Function Documentation

## ◆ gsl_commit_compilation()

void gsl_commit_compilation | ( | void |  | ) |

References commit_node(), lastNode, and rootNode.

Referenced by gsl_compile().

## ◆ gsl_declare_external_task()

void gsl_declare_external_task | ( | const char * | name | ) |

References currentGoomSL, _ExternalFunctionStruct::function, _GoomSL::functions, goom_hash_get(), goom_hash_new(), goom_hash_put_ptr(), _ExternalFunctionStruct::is_extern, name, _GoomSL::num_lines, and _ExternalFunctionStruct::vars.

Referenced by yyparse().

## ◆ gsl_declare_task()

void gsl_declare_task | ( | const char * | name | ) |

References currentGoomSL, _ExternalFunctionStruct::function, _GoomSL::functions, goom_hash_get(), goom_hash_new(), goom_hash_put_ptr(), _ExternalFunctionStruct::is_extern, name, and _ExternalFunctionStruct::vars.

Referenced by new_call(), and yyparse().

## ◆ gsl_enternamespace()

void gsl_enternamespace | ( | const char * | name | ) |

References currentGoomSL, _GoomSL::currentNS, function, _GoomSL::functions, goom_hash_get(), name, _GoomSL::namespaces, _GoomSL::num_lines, and HashValue::ptr.

Referenced by yyparse().

## ◆ gsl_find_namespace()

GoomHash * gsl_find_namespace | ( | const char * | name | ) |

References currentGoomSL, _GoomSL::currentNS, goom_hash_get(), name, _GoomSL::namespaces, and NULL.

Referenced by new_call_expr(), and new_var().

## ◆ gsl_instr_add_param()

void gsl_instr_add_param | ( | Instruction * | _this,
|  | const char * | param,
|  | int | type
| ) |  |

References _GoomSL::compilationOK, _INSTRUCTION::cur_param, gsl_instr_display(), gsl_instr_free(), gsl_instr_validate(), _INSTRUCTION::id, _GoomSL::iflow, iflow_add_instr(), INSTR_NOP, NULL, _GoomSL::num_lines, _INSTRUCTION::params, _INSTRUCTION::parent, type, _INSTRUCTION::types, and VALIDATE_OK.

Referenced by commit_call(), commit_ext_call(), commit_foreach(), commit_function_intro(), commit_function_outro(), commit_node(), commit_not(), GSL_PUT_JUMP(), GSL_PUT_JXXX(), and GSL_PUT_LABEL().

## ◆ gsl_instr_init()

Instruction * gsl_instr_init | ( | GoomSL * | parent,
|  | const char * | name,
|  | int | id,
|  | int | nb_param,
|  | int | line_number
| ) |  |

References _INSTRUCTION::cur_param, _INSTRUCTION::id, _INSTRUCTION::jump_label, _INSTRUCTION::line_number, _INSTRUCTION::name, name, _INSTRUCTION::nb_param, NULL, _INSTRUCTION::params, _INSTRUCTION::parent, _INSTRUCTION::types, and _INSTRUCTION::vnamespace.

Referenced by commit_call(), commit_div_eq(), commit_ext_call(), commit_foreach(), commit_function_intro(), commit_function_outro(), commit_mul_eq(), commit_not(), commit_plus_eq(), commit_sub_eq(), commit_test2(), GSL_PUT_JUMP(), GSL_PUT_JXXX(), GSL_PUT_LABEL(), and precommit_expr().

## ◆ gsl_instr_set_namespace()

void gsl_instr_set_namespace | ( | Instruction * | _this,
|  | GoomHash * | ns
| ) |  |

References _INSTRUCTION::cur_param, _INSTRUCTION::line_number, and _INSTRUCTION::vnamespace.

Referenced by commit_node().

## ◆ gsl_leavenamespace()

GoomHash * gsl_leavenamespace | ( | void |  | ) |

References currentGoomSL, _GoomSL::currentNS, and _GoomSL::namespaces.

Referenced by yyparse().

## ◆ gsl_reenternamespace()

void gsl_reenternamespace | ( | GoomHash * | ns | ) |

References currentGoomSL, _GoomSL::currentNS, and _GoomSL::namespaces.

Referenced by yyparse().

## ◆ gsl_type_of_var()

int gsl_type_of_var | ( | GoomHash * | namespace,
|  | const char * | name
| ) |  |

References goom_hash_get(), HashValue::i, name, and NULL.

Referenced by gsl_instr_validate(), new_neg(), precommit_call_expr(), and precommit_expr().

## Variable Documentation

## ◆ currentGoomSL

GoomSL* currentGoomSL
| extern