Code::Blocks  SVN r11506
Classes | Macros | Typedefs | Functions
sqcompiler.cpp File Reference
#include "sqpcheader.h"
#include <stdarg.h>
#include <setjmp.h>
#include "sqopcodes.h"
#include "sqstring.h"
#include "sqfuncproto.h"
#include "sqcompiler.h"
#include "sqfuncstate.h"
#include "sqlexer.h"
#include "sqvm.h"
#include "sqtable.h"
Include dependency graph for sqcompiler.cpp:

Go to the source code of this file.

Classes

struct  ExpState
 
class  SQCompiler
 

Macros

#define DEREF_NO_DEREF   -1
 
#define DEREF_FIELD   -2
 
#define _exst   (_expstates.top())
 
#define BEGIN_BREAKBLE_BLOCK()
 
#define END_BREAKBLE_BLOCK(continue_target)
 

Typedefs

typedef sqvector< ExpStateExpStateVec
 

Functions

bool Compile (SQVM *vm, SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out, bool raiseerror, bool lineinfo)
 

Macro Definition Documentation

◆ _exst

#define _exst   (_expstates.top())

◆ BEGIN_BREAKBLE_BLOCK

#define BEGIN_BREAKBLE_BLOCK ( )
Value:
SQInteger __nbreaks__=_fs->_unresolvedbreaks.size(); \
SQInteger __ncontinues__=_fs->_unresolvedcontinues.size(); \
_fs->_breaktargets.push_back(0);_fs->_continuetargets.push_back(0);

Definition at line 38 of file sqcompiler.cpp.

Referenced by SQCompiler::DoWhileStatement(), SQCompiler::ForEachStatement(), SQCompiler::ForStatement(), and SQCompiler::WhileStatement().

◆ DEREF_FIELD

#define DEREF_FIELD   -2

◆ DEREF_NO_DEREF

#define DEREF_NO_DEREF   -1

◆ END_BREAKBLE_BLOCK

#define END_BREAKBLE_BLOCK (   continue_target)
Value:
{__nbreaks__=_fs->_unresolvedbreaks.size()-__nbreaks__; \
__ncontinues__=_fs->_unresolvedcontinues.size()-__ncontinues__; \
if(__ncontinues__>0)ResolveContinues(_fs,__ncontinues__,continue_target); \
if(__nbreaks__>0)ResolveBreaks(_fs,__nbreaks__); \
_fs->_breaktargets.pop_back();_fs->_continuetargets.pop_back();}

Definition at line 42 of file sqcompiler.cpp.

Referenced by SQCompiler::DoWhileStatement(), SQCompiler::ForEachStatement(), SQCompiler::ForStatement(), and SQCompiler::WhileStatement().

Typedef Documentation

◆ ExpStateVec

typedef sqvector<ExpState> ExpStateVec

Definition at line 34 of file sqcompiler.cpp.

Function Documentation

◆ Compile()

bool Compile ( SQVM *  vm,
SQLEXREADFUNC  rg,
SQUserPointer  up,
const SQChar sourcename,
SQObjectPtr &  out,
bool  raiseerror,
bool  lineinfo 
)

Definition at line 1354 of file sqcompiler.cpp.

References SQCompiler::Compile().

Referenced by sq_compile().