Moved mkfr compilation to before the function body.
This commit is contained in:
parent
7c7ab8790e
commit
d804f7dd66
2 changed files with 1 additions and 2 deletions
|
@ -39,7 +39,6 @@
|
||||||
public override void Compile(sunContext context)
|
public override void Compile(sunContext context)
|
||||||
{
|
{
|
||||||
var variableInfo = context.DeclareVariable(Variable);
|
var variableInfo = context.DeclareVariable(Variable);
|
||||||
context.Text.DeclareLocal(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +53,6 @@
|
||||||
public override void Compile(sunContext context)
|
public override void Compile(sunContext context)
|
||||||
{
|
{
|
||||||
var variableInfo = context.DeclareVariable(Variable);
|
var variableInfo = context.DeclareVariable(Variable);
|
||||||
context.Text.DeclareLocal(1);
|
|
||||||
base.Compile(context);
|
base.Compile(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,7 @@ namespace arookas
|
||||||
context.DeclareParameter(parameter);
|
context.DeclareParameter(parameter);
|
||||||
}
|
}
|
||||||
context.Text.StoreDisplay(1);
|
context.Text.StoreDisplay(1);
|
||||||
|
context.Text.DeclareLocal(CalculateMaxLocalCount(Body));
|
||||||
Body.Compile(context);
|
Body.Compile(context);
|
||||||
context.Text.ReturnVoid();
|
context.Text.ReturnVoid();
|
||||||
context.Scopes.Pop();
|
context.Scopes.Pop();
|
||||||
|
|
Loading…
Reference in a new issue