public override void BeginBlock(Block b) { blocks.Add(b); var locs = new BlockLocals { StartIndex = allLocals.Count, Length = b.Variables.Count, }; blockLocals[b] = locs; allLocals.AddRange(b.Variables); }
public override void BeginBlock(Block b) { blocks.Add(b); var locs = new BlockLocals { StartIndex = allLocals.Count, Length = b.Variables.Count, }; blockLocals[b] = locs; allLocals.AddRange(b.Variables); var offset = 0; foreach (var v in allLocals) { v.StackOffset = offset; offset += v.VariableType.NumValues; } }