- implemented code generation for stack variables.
- fixed code generation for using local variables as array index. This must use a different register for the array element offset because the original register may not be overwritten.
This commit is contained in:
parent
d86f03e2e0
commit
2cc48ec378
9 changed files with 306 additions and 92 deletions
|
|
@ -718,6 +718,13 @@ void FFunctionBuildList::Build()
|
|||
|
||||
FScriptPosition::StrictErrors = !item.FromDecorate;
|
||||
item.Code = item.Code->Resolve(ctx);
|
||||
// If we need extra space, load the frame pointer into a register so that we do not have to call the wasteful LFP instruction more than once.
|
||||
if (item.Function->ExtraSpace > 0)
|
||||
{
|
||||
buildit.FramePointer = ExpEmit(&buildit, REGT_POINTER);
|
||||
buildit.FramePointer.Fixed = true;
|
||||
buildit.Emit(OP_LFP, buildit.FramePointer.RegNum);
|
||||
}
|
||||
|
||||
// Make sure resolving it didn't obliterate it.
|
||||
if (item.Code != nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue