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 SQUnsignedInteger _start_op;
46 SQUnsignedInteger _end_op;
47 SQUnsignedInteger _pos;
50 struct SQLineInfo { SQInteger _line;SQInteger _op; };
52 typedef sqvector<SQOuterVar> SQOuterVarVec;
53 typedef sqvector<SQLocalVarInfo> SQLocalVarInfoVec;
54 typedef sqvector<SQLineInfo> SQLineInfoVec;
56 struct SQFunctionProto : public SQRefCounted
63 static SQFunctionProto *Create()
66 sq_new(f,SQFunctionProto);
69 void Release(){ sq_delete(this,SQFunctionProto);}
70 const SQChar* GetLocal(SQVM *v,SQUnsignedInteger stackbase,SQUnsignedInteger nseq,SQUnsignedInteger nop);
71 SQInteger GetLine(SQInstruction *curr);
72 bool Save(SQVM *v,SQUserPointer up,SQWRITEFUNC write);
73 bool Load(SQVM *v,SQUserPointer up,SQREADFUNC read);
74 SQObjectPtrVec _literals;
75 SQObjectPtrVec _functions;
76 SQObjectPtrVec _parameters;
77 SQOuterVarVec _outervalues;
78 SQInstructionVec _instructions;
79 SQObjectPtr _sourcename;
81 SQLocalVarInfoVec _localvarinfos;
82 SQLineInfoVec _lineinfos;
88 #endif //_SQFUNCTION_H_