1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed out variable lifetimes, further unified out var for case+method

This commit is contained in:
Brian Fiete 2025-02-23 10:26:05 -08:00
parent 2bf2173e86
commit 35739e7293
4 changed files with 76 additions and 59 deletions

View file

@ -1928,6 +1928,8 @@ public:
String GenericParamSourceToString(const BfGenericParamSource& genericParamSource);
bool CheckGenericConstraints(const BfGenericParamSource& genericParamSource, BfType* checkArgType, BfAstNode* checkArgTypeRef, BfGenericParamInstance* genericParamInst, BfTypeVector* methodGenericArgs = NULL, BfError** errorOut = NULL);
BfIRValue AllocLocalVariable(BfType* type, const StringImpl& name, bool doLifetimeEnd = true);
BfTypedValue CreateOutVariable(BfAstNode* refNode, BfVariableDeclaration* variableDeclaration, BfAstNode* paramNameNode, BfType* variableType, BfTypedValue initValue);
void MoveLocalToParentScope(BfLocalVariable* localVar);
void DoAddLocalVariable(BfLocalVariable* localVar);
void FixLocalVariable(BfLocalVariable* localVar);
void DoLocalVariableDebugInfo(BfLocalVariable* localVar, bool doAliasValue = false, BfIRValue declareBefore = BfIRValue(), BfIRInitType initType = BfIRInitType_NotSet);