mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
var-return support for const eval methods
This commit is contained in:
parent
585e2575e8
commit
706fe9e04b
15 changed files with 292 additions and 60 deletions
|
@ -2349,6 +2349,7 @@ String BeModule::ToString(BeFunction* wantFunc)
|
|||
str += " void";
|
||||
}
|
||||
break;
|
||||
DISPLAY_INST2(BeSetRetInst, "setret", mRetValue, mReturnTypeId);
|
||||
case BeCallInst::TypeId:
|
||||
{
|
||||
auto castedInst = (BeCallInst*)inst;
|
||||
|
@ -3383,6 +3384,15 @@ BeRetInst* BeModule::CreateRet(BeValue* value)
|
|||
return inst;
|
||||
}
|
||||
|
||||
BeSetRetInst* BeModule::CreateSetRet(BeValue* value, int returnTypeId)
|
||||
{
|
||||
auto inst = mAlloc.Alloc<BeSetRetInst>();
|
||||
inst->mRetValue = value;
|
||||
inst->mReturnTypeId = returnTypeId;
|
||||
AddInst(inst);
|
||||
return inst;
|
||||
}
|
||||
|
||||
BeCallInst* BeModule::CreateCall(BeValue* func, const SizedArrayImpl<BeValue*>& args)
|
||||
{
|
||||
auto inst = mOwnedValues.Alloc<BeCallInst>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue