1 /* see copyright notice in squirrel.h */
17 SQOuterVar(const SQObjectPtr &name,const SQObjectPtr &src,SQOuterType t)
23 SQOuterVar(const SQOuterVar &ov)
36 SQLocalVarInfo():_start_op(0),_end_op(0){}
37 SQLocalVarInfo(const SQLocalVarInfo &lvi)
40 _start_op=lvi._start_op;
45 unsigned int _start_op;
50 struct SQLineInfo { int _line;int _op; };
52 typedef sqvector<SQOuterVar> SQOuterVarVec;
53 typedef sqvector<SQLocalVarInfo> SQLocalVarInfoVec;
54 typedef sqvector<SQLineInfo> SQLineInfoVec;
56 struct SQFunctionProto : public SQRefCounted
64 static SQFunctionProto *Create()
67 sq_new(f,SQFunctionProto);
70 void Release(){ sq_delete(this,SQFunctionProto);}
71 const SQChar* GetLocal(SQVM *v,unsigned int stackbase,unsigned int nseq,unsigned int nop);
72 int GetLine(SQInstruction *curr);
73 bool Save(SQVM *v,SQUserPointer up,SQWRITEFUNC write);
74 bool Load(SQVM *v,SQUserPointer up,SQREADFUNC read);
75 SQObjectPtrVec _literals;
76 SQObjectPtrVec _functions;
77 SQObjectPtrVec _parameters;
78 SQOuterVarVec _outervalues;
79 SQInstructionVec _instructions;
80 SQObjectPtr _sourcename;
82 SQLocalVarInfoVec _localvarinfos;
83 SQLineInfoVec _lineinfos;
89 #endif //_SQFUNCTION_H_