- named class functions are working. Yay!!
- converted A_BspiAttack and A_BabyMetal to script functions to test the implementation.
This commit is contained in:
parent
46c7f1151f
commit
5b952b116a
6 changed files with 33 additions and 33 deletions
|
|
@ -693,7 +693,7 @@ void FFunctionBuildList::Build()
|
|||
FCompileContext ctx(item.Func, item.Func->SymbolName == NAME_None ? nullptr : item.Func->Variants[0].Proto, item.FromDecorate);
|
||||
|
||||
// Allocate registers for the function's arguments and create local variable nodes before starting to resolve it.
|
||||
VMFunctionBuilder buildit(true);
|
||||
VMFunctionBuilder buildit(!!(item.Func->Variants[0].Flags & VARF_Action));
|
||||
for(unsigned i=0;i<item.Func->Variants[0].Proto->ArgumentTypes.Size();i++)
|
||||
{
|
||||
auto type = item.Func->Variants[0].Proto->ArgumentTypes[i];
|
||||
|
|
|
|||
|
|
@ -2042,6 +2042,15 @@ void ZCCCompiler::InitFunctions()
|
|||
sym->AddVariant(NewPrototype(rets, args), argflags, argnames, afd == nullptr? nullptr : *(afd->VMPointer), varflags);
|
||||
c->Type()->Symbols.ReplaceSymbol(sym);
|
||||
|
||||
if (!(f->Flags & ZCC_Native))
|
||||
{
|
||||
auto code = ConvertAST(f->Body);
|
||||
if (code != nullptr)
|
||||
{
|
||||
sym->Variants[0].Implementation = FunctionBuildList.AddFunction(sym, code, FStringf("%s.%s", c->Type()->TypeName.GetChars(), FName(f->Name).GetChars()), false);
|
||||
}
|
||||
}
|
||||
|
||||
// todo: Check inheritance.
|
||||
// todo: Process function bodies.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue