1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Moved scope of 'if (Call(var X))' arguments into the if parent's scope

This commit is contained in:
Brian Fiete 2020-09-21 17:53:22 -07:00
parent 5b8d2ffee2
commit 965e2e2930
4 changed files with 79 additions and 0 deletions

View file

@ -357,12 +357,20 @@ public:
void SetUnion(const BfDeferredLocalAssignData& otherLocalAssignData);
};
enum BfScopeKind
{
BfScopeKind_Normal,
BfScopeKind_StatementTarget,
BfScopeKind_StatementTarget_Conditional,
};
// "Looped" means this scope will execute zero to many times, "Conditional" means zero or one.
// Looped and Conditional are mutually exclusive. "Dyn" means Looped OR Conditional.
class BfScopeData
{
public:
BfScopeData* mPrevScope;
BfScopeKind mScopeKind;
BfIRMDNode mDIScope;
BfIRMDNode mDIInlinedAt;
String mLabel;
@ -399,6 +407,7 @@ public:
public:
BfScopeData()
{
mScopeKind = BfScopeKind_Normal;
mPrevScope = NULL;
mLocalVarStart = 0;
mLabelNode = NULL;