OpenClonk
C4AulScriptFunc Class Reference

#include <C4AulScriptFunc.h>

Inheritance diagram for C4AulScriptFunc:
[legend]
Collaboration diagram for C4AulScriptFunc:
[legend]

Public Member Functions

void SetOverloaded (C4AulFunc *)
 
C4AulScriptFuncSFunc () override
 
void AddPar (const char *Idtf, C4V_Type type=C4V_Any)
 
 C4AulScriptFunc (C4PropListStatic *Parent, C4ScriptHost *pOrgScript, const char *pName, const char *Script)
 
 C4AulScriptFunc (C4PropListStatic *Parent, const C4AulScriptFunc &FromFunc)
 
 ~C4AulScriptFunc () override
 
void ParseDirectExecFunc (C4AulScriptEngine *Engine, C4AulScriptContext *context=nullptr)
 
void ParseDirectExecStatement (C4AulScriptEngine *Engine, C4AulScriptContext *context=nullptr)
 
bool GetPublic () const override
 
int GetParCount () const override
 
const C4V_TypeGetParType () const override
 
C4V_Type GetRetType () const override
 
C4Value Exec (C4PropList *p, C4Value pPars[], bool fPassErrors=false) override
 
int GetLineOfCode (C4AulBCC *bcc)
 
C4AulBCCGetCode ()
 
const char * GetName () const
 
virtual StdStrBuf GetFullName () const
 
C4Value Exec (C4PropList *p=nullptr, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
 
bool CheckParTypes (const C4Value pPars[], bool fPassErrors) const
 
void IncRef ()
 
void DecRef ()
 

Public Attributes

C4AulFuncOwnerOverloaded
 
const char * Script
 
C4ValueMapNames VarNamed
 
C4ValueMapNames ParNamed
 
C4ScriptHostpOrgScript
 
uint32_t tProfileTime
 
C4PropListStaticParent
 

Protected Member Functions

void AddBCC (C4AulBCCType eType, intptr_t=0, const char *SPos=nullptr)
 
void RemoveLastBCC ()
 
void ClearCode ()
 
int GetCodePos () const
 
C4AulBCCGetCodeByPos (int iPos)
 
C4AulBCCGetLastCode ()
 
void DumpByteCode ()
 

Protected Attributes

std::vector< C4AulBCCCode
 
std::vector< const char * > PosForCode
 
int ParCount
 
C4V_Type ParType [C4AUL_MAX_Par]
 
C4RefCntPointer< C4StringName
 
C4AulFuncMapNext
 
unsigned int RefCnt {0}
 

Friends

class C4AulCompiler
 
class C4AulParse
 
class C4ScriptHost
 

Detailed Description

Definition at line 173 of file C4AulScriptFunc.h.

Constructor & Destructor Documentation

◆ C4AulScriptFunc() [1/2]

C4AulScriptFunc::C4AulScriptFunc ( C4PropListStatic Parent,
C4ScriptHost pOrgScript,
const char *  pName,
const char *  Script 
)

Definition at line 22 of file C4AulScriptFunc.cpp.

22  :
23  C4AulFunc(Parent, pName),
24  OwnerOverloaded(nullptr),
25  ParCount(0),
26  Script(Script),
28  tProfileTime(0)
29 {
30  for (auto & i : ParType) i = C4V_Any;
31  AddBCC(AB_EOFN);
32 }
@ AB_EOFN
@ C4V_Any
Definition: C4Value.h:37
C4AulFunc(C4PropListStatic *Parent, const char *pName)
Definition: C4AulFunc.cpp:22
C4PropListStatic * Parent
Definition: C4AulFunc.h:55
const char * Script
C4AulFunc * OwnerOverloaded
void AddBCC(C4AulBCCType eType, intptr_t=0, const char *SPos=nullptr)
C4V_Type ParType[C4AUL_MAX_Par]
C4ScriptHost * pOrgScript

References AB_EOFN, AddBCC(), C4V_Any, and ParType.

Here is the call graph for this function:

◆ C4AulScriptFunc() [2/2]

C4AulScriptFunc::C4AulScriptFunc ( C4PropListStatic Parent,
const C4AulScriptFunc FromFunc 
)

Definition at line 34 of file C4AulScriptFunc.cpp.

34  :
35  C4AulFunc(Parent, FromFunc.GetName()),
36  OwnerOverloaded(nullptr),
37  ParCount(FromFunc.ParCount),
38  Script(FromFunc.Script),
39  VarNamed(FromFunc.VarNamed),
40  ParNamed(FromFunc.ParNamed),
41  pOrgScript(FromFunc.pOrgScript),
42  tProfileTime(0)
43 {
44  for (int i = 0; i < C4AUL_MAX_Par; i++)
45  ParType[i] = FromFunc.ParType[i];
46  AddBCC(AB_EOFN);
47 }
#define C4AUL_MAX_Par
Definition: C4AulFunc.h:26
const char * GetName() const
Definition: C4AulFunc.h:56
C4ValueMapNames VarNamed
C4ValueMapNames ParNamed

References AB_EOFN, AddBCC(), C4AUL_MAX_Par, and ParType.

Here is the call graph for this function:

◆ ~C4AulScriptFunc()

C4AulScriptFunc::~C4AulScriptFunc ( )
override

Definition at line 49 of file C4AulScriptFunc.cpp.

50 {
52  ClearCode();
53 }
void DecRef()
Definition: C4StringTable.h:28

References ClearCode(), C4RefCnt::DecRef(), and OwnerOverloaded.

Here is the call graph for this function:

Member Function Documentation

◆ AddBCC()

void C4AulScriptFunc::AddBCC ( C4AulBCCType  eType,
intptr_t  X = 0,
const char *  SPos = nullptr 
)
protected

Definition at line 62 of file C4AulScriptFunc.cpp.

63 {
64  // store chunk
65  Code.emplace_back(eType, X);
66  PosForCode.push_back(SPos);
67 }
#define X(sdl, oc)
std::vector< C4AulBCC > Code
std::vector< const char * > PosForCode

References Code, PosForCode, and X.

Referenced by C4AulScriptFunc().

Here is the caller graph for this function:

◆ AddPar()

void C4AulScriptFunc::AddPar ( const char *  Idtf,
C4V_Type  type = C4V_Any 
)
inline

Definition at line 196 of file C4AulScriptFunc.h.

197  {
198  assert(ParCount < C4AUL_MAX_Par);
199  assert(ParCount == ParNamed.iSize);
200  ParNamed.AddName(Idtf);
201  ParType[ParCount] = type;
202  ++ParCount;
203  }
int32_t AddName(const char *pnName)
Definition: C4ValueMap.cpp:429

References C4ValueMapNames::AddName(), C4AUL_MAX_Par, C4ValueMapNames::iSize, ParCount, ParNamed, and ParType.

Referenced by C4AulCompiler::ConstexprEvaluator::visit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckParTypes()

bool C4AulFunc::CheckParTypes ( const C4Value  pPars[],
bool  fPassErrors 
) const
inherited

Definition at line 58 of file C4AulFunc.cpp.

58  {
59  // Convert parameters (typecheck)
60  const C4V_Type *pTypes = GetParType();
61  int parcount = GetParCount();
62  for (int i = 0; i < parcount; i++) {
63  if (!pPars[i].CheckParConversion(pTypes[i]))
64  {
66  R"(call to "%s" parameter %d: passed %s, but expected %s)",
67  GetName(), i + 1, pPars[i].GetTypeName(), GetC4VName(pTypes[i])).getData());
68  if (fPassErrors)
69  throw e;
70  else
71  {
73  return false;
74  }
75  }
76  }
77  return true;
78 }
C4AulScriptEngine ScriptEngine
Definition: C4Globals.cpp:43
const char * GetC4VName(const C4V_Type Type)
Definition: C4Value.cpp:32
C4V_Type
Definition: C4Value.h:24
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:270
virtual void OnError(const char *msg)=0
virtual const C4V_Type * GetParType() const =0
virtual int GetParCount() const
Definition: C4AulFunc.h:69
C4AulErrorHandler * GetErrorHandler() const
Definition: C4Aul.h:173

References FormatString(), GetC4VName(), C4AulScriptEngine::GetErrorHandler(), C4AulFunc::GetName(), C4AulFunc::GetParCount(), C4AulFunc::GetParType(), C4AulErrorHandler::OnError(), ScriptEngine, and C4AulError::what().

Referenced by C4AulFunc::Exec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearCode()

void C4AulScriptFunc::ClearCode ( )
protected

Definition at line 75 of file C4AulScriptFunc.cpp.

76 {
77  Code.clear();
78  PosForCode.clear();
79  // This function is now broken until an AddBCC call
80 }

References Code, and PosForCode.

Referenced by ParseDirectExecFunc(), ParseDirectExecStatement(), and ~C4AulScriptFunc().

Here is the caller graph for this function:

◆ DecRef()

void C4RefCnt::DecRef ( )
inlineinherited

Definition at line 28 of file C4StringTable.h.

28 { if (!--RefCnt) delete this; }
unsigned int RefCnt
Definition: C4StringTable.h:31

References C4RefCnt::RefCnt.

Referenced by C4Command::Clear(), C4Command::CompileFunc(), C4Property::CompileFunc(), C4Def::GetActionByName(), C4Property::operator=(), C4Object::SetActionByName(), SetOverloaded(), C4ScriptHost::UnlinkOwnedFunctions(), ~C4AulScriptFunc(), C4Property::~C4Property(), C4ScriptGuiWindow::~C4ScriptGuiWindow(), and C4ScriptGuiWindowAction::~C4ScriptGuiWindowAction().

Here is the caller graph for this function:

◆ DumpByteCode()

void C4AulScriptFunc::DumpByteCode ( )
protected

Definition at line 610 of file C4AulParse.cpp.

611 {
613  {
614  fprintf(stderr, "%s:\n", GetName());
615  std::map<C4AulBCC *, int> labels;
616  int labeln = 0;
617  for (auto & bcc: Code)
618  {
619  switch (bcc.bccType)
620  {
621  case AB_JUMP: case AB_JUMPAND: case AB_JUMPOR: case AB_JUMPNNIL: case AB_CONDN: case AB_COND:
622  labels[&bcc + bcc.Par.i] = ++labeln; break;
623  default: break;
624  }
625  }
626  for (auto & bcc: Code)
627  {
628  C4AulBCCType eType = bcc.bccType;
629  if (labels.find(&bcc) != labels.end())
630  fprintf(stderr, "%d:\n", labels[&bcc]);
631  fprintf(stderr, "\t%d\t%-20s", GetLineOfCode(&bcc), GetTTName(eType));
632  switch (eType)
633  {
634  case AB_FUNC:
635  fprintf(stderr, "\t%s\n", bcc.Par.f->GetFullName().getData()); break;
636  case AB_ERR:
637  if (bcc.Par.s)
638  case AB_CALL: case AB_CALLFS: case AB_LOCALN: case AB_LOCALN_SET: case AB_PROP: case AB_PROP_SET:
639  fprintf(stderr, "\t%s\n", bcc.Par.s->GetCStr()); break;
640  case AB_STRING:
641  {
642  const StdStrBuf &s = bcc.Par.s->GetData();
643  std::string es;
644  std::for_each(s.getData(), s.getData() + s.getLength(), [&es](char c) {
645  if (std::isgraph((unsigned char)c))
646  {
647  es += c;
648  }
649  else
650  {
651  switch (c)
652  {
653  case '\'': es.append(R"(\')"); break;
654  case '\"': es.append(R"(\")"); break;
655  case '\\': es.append(R"(\\)"); break;
656  case '\a': es.append(R"(\a)"); break;
657  case '\b': es.append(R"(\b)"); break;
658  case '\f': es.append(R"(\f)"); break;
659  case '\n': es.append(R"(\n)"); break;
660  case '\r': es.append(R"(\r)"); break;
661  case '\t': es.append(R"(\t)"); break;
662  case '\v': es.append(R"(\v)"); break;
663  default:
664  {
665  std::stringstream hex;
666  hex << R"(\x)" << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>((unsigned char)c);
667  es.append(hex.str());
668  break;
669  }
670  }
671  }
672  });
673  fprintf(stderr, "\t\"%s\"\n", es.c_str()); break;
674  }
675  case AB_DEBUG: case AB_NIL: case AB_RETURN:
676  case AB_PAR: case AB_THIS:
678  case AB_EOFN:
679  assert(!bcc.Par.X); fprintf(stderr, "\n"); break;
680  case AB_CARRAY:
681  fprintf(stderr, "\t%s\n", C4VArray(bcc.Par.a).GetDataString().getData()); break;
682  case AB_CPROPLIST:
683  fprintf(stderr, "\t%s\n", C4VPropList(bcc.Par.p).GetDataString().getData()); break;
684  case AB_JUMP: case AB_JUMPAND: case AB_JUMPOR: case AB_JUMPNNIL: case AB_CONDN: case AB_COND:
685  fprintf(stderr, "\t% -d\n", labels[&bcc + bcc.Par.i]); break;
686  default:
687  fprintf(stderr, "\t% -d\n", bcc.Par.i); break;
688  }
689  }
690  }
691 }
#define DEBUG_BYTECODE_DUMP
Definition: C4AulParse.cpp:26
C4AulBCCType
@ AB_ARRAY_SLICE_SET
@ AB_THIS
@ AB_DEBUG
@ AB_ARRAYA
@ AB_PAR
@ AB_ARRAYA_SET
@ AB_PROP
@ AB_CPROPLIST
@ AB_CALLFS
@ AB_ERR
@ AB_CALL
@ AB_FUNC
@ AB_STRING
@ AB_NIL
@ AB_CARRAY
@ AB_ARRAY_SLICE
@ AB_LOCALN
@ AB_LOCALN_SET
@ AB_JUMPAND
@ AB_JUMPNNIL
@ AB_CONDN
@ AB_JUMPOR
@ AB_COND
@ AB_JUMP
@ AB_RETURN
@ AB_PROP_SET
#define s
C4Value C4VArray(C4ValueArray *pArray)
Definition: C4Value.h:246
C4Value C4VPropList(C4PropList *p)
Definition: C4Value.h:242
int GetLineOfCode(C4AulBCC *bcc)
StdStrBuf GetDataString(int depth=10, const class C4PropListStatic *ignore_reference_parent=nullptr) const
Definition: C4Value.cpp:131
const char * getData() const
Definition: StdBuf.h:442

References AB_COND, AB_CONDN, AB_JUMP, AB_JUMPAND, AB_JUMPNNIL, AB_JUMPOR, Code, DEBUG_BYTECODE_DUMP, GetLineOfCode(), and C4AulFunc::GetName().

Here is the call graph for this function:

◆ Exec() [1/2]

C4Value C4AulScriptFunc::Exec ( C4PropList p,
C4Value  pPars[],
bool  fPassErrors = false 
)
overridevirtual

Implements C4AulFunc.

Definition at line 93 of file C4AulScriptFunc.cpp.

94 {
95  return AulExec.Exec(this, p, pPars, fPassErrors);
96 }
C4AulExec AulExec
Definition: C4AulExec.cpp:29
C4Value Exec(C4AulScriptFunc *pSFunc, C4PropList *p, C4Value pPars[], bool fPassErrors)

References AulExec, and C4AulExec::Exec().

Here is the call graph for this function:

◆ Exec() [2/2]

C4Value C4AulFunc::Exec ( C4PropList p = nullptr,
C4AulParSet pPars = nullptr,
bool  fPassErrors = false 
)
inlineinherited

Definition at line 72 of file C4AulFunc.h.

73  {
74  // Every parameter type allows conversion from nil, so no parameters are always allowed
75  if (!pPars)
76  return Exec(p, C4AulParSet().Par, fPassErrors);
77  if (!CheckParTypes(pPars->Par, fPassErrors)) return C4Value();
78  return Exec(p, pPars->Par, fPassErrors);
79  }
bool CheckParTypes(const C4Value pPars[], bool fPassErrors) const
Definition: C4AulFunc.cpp:58
C4Value Exec(C4PropList *p=nullptr, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
Definition: C4AulFunc.h:72
C4Value Par[C4AUL_MAX_Par]
Definition: C4AulFunc.h:30

References C4AulFunc::CheckParTypes().

Referenced by C4PropList::Call(), C4Effect::CallDamage(), C4Effect::CallEffect(), C4Effect::CallStart(), C4Effect::CallStop(), C4Effect::CallTimer(), C4Effect::DoCall(), C4MCCallbackArray::Execute(), C4MaterialMap::mrfScript(), C4Player::NotifyOwnedObjects(), and C4Object::PutAwayUnusedObject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCode()

C4AulBCC * C4AulScriptFunc::GetCode ( )

Definition at line 87 of file C4AulScriptFunc.cpp.

88 {
89  assert(!Code.empty());
90  return &Code[0];
91 }

References Code.

◆ GetCodeByPos()

C4AulBCC* C4AulScriptFunc::GetCodeByPos ( int  iPos)
inlineprotected

Definition at line 184 of file C4AulScriptFunc.h.

184 { return &Code[iPos]; }

References Code.

◆ GetCodePos()

int C4AulScriptFunc::GetCodePos ( ) const
inlineprotected

Definition at line 183 of file C4AulScriptFunc.h.

183 { return Code.size(); }

References Code.

◆ GetFullName()

StdStrBuf C4AulFunc::GetFullName ( ) const
virtualinherited

Definition at line 38 of file C4AulFunc.cpp.

39 {
40  StdStrBuf r;
41  // "lost" function?
42  if (!Parent)
43  {
44  r.Ref("(unowned) ");
45  }
46  else
47  {
49  r.AppendChar('.');
50  }
51  if (GetName())
52  r.Append(Name->GetData());
53  else
54  r.Append("(unnamed)");
55  return r;
56 }
C4RefCntPointer< C4String > Name
Definition: C4AulFunc.h:60
StdStrBuf GetDataString() const
Definition: C4PropList.cpp:229
StdStrBuf GetData() const
Definition: C4StringTable.h:50
void Ref(const char *pnData)
Definition: StdBuf.h:455
void AppendChar(char cChar)
Definition: StdBuf.h:588
void Append(const char *pnData, size_t iChars)
Definition: StdBuf.h:519
void Take(char *pnData)
Definition: StdBuf.h:457

References StdStrBuf::Append(), StdStrBuf::AppendChar(), C4String::GetData(), C4PropListStatic::GetDataString(), C4AulFunc::GetName(), C4AulFunc::Name, C4AulFunc::Parent, StdStrBuf::Ref(), and StdStrBuf::Take().

Here is the call graph for this function:

◆ GetLastCode()

C4AulBCC* C4AulScriptFunc::GetLastCode ( )
inlineprotected

Definition at line 185 of file C4AulScriptFunc.h.

185 { return Code.empty() ? nullptr : &Code.back(); }

References Code.

◆ GetLineOfCode()

int C4AulScriptFunc::GetLineOfCode ( C4AulBCC bcc)

Definition at line 82 of file C4AulScriptFunc.cpp.

83 {
84  return SGetLine(pOrgScript ? pOrgScript->GetScript() : Script, PosForCode[bcc - &Code[0]]);
85 }
int SGetLine(const char *szText, const char *cpPosition)
Definition: Standard.cpp:479
const char * GetScript() const
Definition: C4ScriptHost.h:53

References Code, C4ScriptHost::GetScript(), pOrgScript, PosForCode, Script, and SGetLine().

Referenced by DumpByteCode(), and C4AulScriptContext::ReturnDump().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetName()

const char* C4AulFunc::GetName ( ) const
inlineinherited

Definition at line 56 of file C4AulFunc.h.

56 { return Name ? Name->GetCStr() : nullptr; }
const char * GetCStr() const
Definition: C4StringTable.h:49

References C4String::GetCStr(), and C4AulFunc::Name.

Referenced by C4AulFuncMap::Add(), C4AulFunc::C4AulFunc(), C4AulParseError::C4AulParseError(), C4AulFunc::CheckParTypes(), C4Value::CompileFunc(), C4EditCursor::DoContextMenu(), DumpByteCode(), C4AulFuncMap::GetFirstFunc(), C4AulFunc::GetFullName(), C4AulFuncMap::GetNextSNFunc(), C4AulFuncMap::Remove(), C4AulScriptContext::ReturnDump(), and C4AulFunc::~C4AulFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetParCount()

int C4AulScriptFunc::GetParCount ( ) const
inlineoverridevirtual

Reimplemented from C4AulFunc.

Definition at line 214 of file C4AulScriptFunc.h.

214 { return ParCount; }

References ParCount.

Referenced by C4AulScriptContext::ReturnDump().

Here is the caller graph for this function:

◆ GetParType()

const C4V_Type* C4AulScriptFunc::GetParType ( ) const
inlineoverridevirtual

Implements C4AulFunc.

Definition at line 215 of file C4AulScriptFunc.h.

215 { return ParType; }

References ParType.

◆ GetPublic()

bool C4AulScriptFunc::GetPublic ( ) const
inlineoverridevirtual

Reimplemented from C4AulFunc.

Definition at line 213 of file C4AulScriptFunc.h.

213 { return true; }

◆ GetRetType()

C4V_Type C4AulScriptFunc::GetRetType ( ) const
inlineoverridevirtual

Implements C4AulFunc.

Definition at line 216 of file C4AulScriptFunc.h.

216 { return C4V_Any; }

References C4V_Any.

◆ IncRef()

void C4RefCnt::IncRef ( )
inlineinherited

Definition at line 27 of file C4StringTable.h.

27 { RefCnt++; }

References C4RefCnt::RefCnt.

Referenced by C4Property::C4Property(), C4Command::CompileFunc(), C4Property::CompileFunc(), C4ScriptGuiWindow::CreateFromPropList(), C4Def::GetActionByName(), C4ScriptGuiWindowAction::Init(), C4Property::operator=(), C4ScriptGuiWindowProperty::Set(), C4Command::Set(), C4Object::SetActionByName(), and SetOverloaded().

Here is the caller graph for this function:

◆ ParseDirectExecFunc()

void C4AulScriptFunc::ParseDirectExecFunc ( C4AulScriptEngine Engine,
C4AulScriptContext context = nullptr 
)

Definition at line 839 of file C4AulParse.cpp.

840 {
841  ClearCode();
842  // parse
843  C4AulParse state(this, context, Engine);
844  auto func = state.Parse_DirectExec(Script, true);
845  C4AulCompiler::Compile(this, func.get());
846 }
static void Compile(C4AulScriptFunc *out, const ::aul::ast::Function *f)

References ClearCode(), C4AulCompiler::Compile(), C4AulParse::Parse_DirectExec(), and Script.

Referenced by C4AulExec::DirectExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseDirectExecStatement()

void C4AulScriptFunc::ParseDirectExecStatement ( C4AulScriptEngine Engine,
C4AulScriptContext context = nullptr 
)

Definition at line 848 of file C4AulParse.cpp.

849 {
850  ClearCode();
851  // parse
852  C4AulParse state(this, context, Engine);
853  auto func = state.Parse_DirectExec(Script, false);
854  C4AulCompiler::Compile(this, func.get());
855 }

References ClearCode(), C4AulCompiler::Compile(), C4AulParse::Parse_DirectExec(), and Script.

Referenced by C4AulExec::DirectExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveLastBCC()

void C4AulScriptFunc::RemoveLastBCC ( )
protected

Definition at line 69 of file C4AulScriptFunc.cpp.

70 {
71  Code.pop_back();
72  PosForCode.pop_back();
73 }

References Code, and PosForCode.

◆ SetOverloaded()

void C4AulScriptFunc::SetOverloaded ( C4AulFunc f)

Definition at line 55 of file C4AulScriptFunc.cpp.

56 {
58  OwnerOverloaded = f;
59  if (f) f->IncRef();
60 }
void IncRef()
Definition: C4StringTable.h:27

References C4RefCnt::DecRef(), C4RefCnt::IncRef(), and OwnerOverloaded.

Referenced by C4ScriptHost::CopyPropList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SFunc()

C4AulScriptFunc* C4AulScriptFunc::SFunc ( )
inlineoverridevirtual

Reimplemented from C4AulFunc.

Definition at line 178 of file C4AulScriptFunc.h.

178 { return this; } // type check func...

Referenced by C4ScriptHost::UnlinkOwnedFunctions(), and C4AulCompiler::ConstexprEvaluator::visit().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ C4AulCompiler

friend class C4AulCompiler
friend

Definition at line 224 of file C4AulScriptFunc.h.

◆ C4AulParse

friend class C4AulParse
friend

Definition at line 225 of file C4AulScriptFunc.h.

◆ C4ScriptHost

friend class C4ScriptHost
friend

Definition at line 226 of file C4AulScriptFunc.h.

Member Data Documentation

◆ Code

std::vector<C4AulBCC> C4AulScriptFunc::Code
protected

◆ MapNext

C4AulFunc* C4AulFunc::MapNext
protectedinherited

◆ Name

◆ OwnerOverloaded

C4AulFunc* C4AulScriptFunc::OwnerOverloaded

◆ ParCount

int C4AulScriptFunc::ParCount
protected

◆ Parent

◆ ParNamed

C4ValueMapNames C4AulScriptFunc::ParNamed

Definition at line 195 of file C4AulScriptFunc.h.

Referenced by AddPar().

◆ ParType

C4V_Type C4AulScriptFunc::ParType[C4AUL_MAX_Par]
protected

Definition at line 190 of file C4AulScriptFunc.h.

Referenced by AddPar(), C4AulScriptFunc(), and GetParType().

◆ pOrgScript

◆ PosForCode

std::vector<const char *> C4AulScriptFunc::PosForCode
protected

Definition at line 188 of file C4AulScriptFunc.h.

Referenced by AddBCC(), ClearCode(), GetLineOfCode(), and RemoveLastBCC().

◆ RefCnt

unsigned int C4RefCnt::RefCnt {0}
protectedinherited

Definition at line 31 of file C4StringTable.h.

Referenced by C4RefCnt::DecRef(), and C4RefCnt::IncRef().

◆ Script

const char* C4AulScriptFunc::Script

◆ tProfileTime

uint32_t C4AulScriptFunc::tProfileTime

Definition at line 222 of file C4AulScriptFunc.h.

◆ VarNamed

C4ValueMapNames C4AulScriptFunc::VarNamed

Definition at line 194 of file C4AulScriptFunc.h.

Referenced by C4AulCompiler::PreparseAstVisitor::visit().


The documentation for this class was generated from the following files: