private void AddHelper(VMMethodInfo info, MethodDef method, ILBlock block) { var helperScope = new ScopeBlock(); block.Id = 0; helperScope.Content.Add(block); if (info != null) { var helperInfo = new VMMethodInfo(); var keys = info.BlockKeys[block]; helperInfo.RootScope = helperScope; helperInfo.EntryKey = keys.EntryKey; helperInfo.ExitKey = keys.ExitKey; rt.Descriptor.Data.SetInfo(method, helperInfo); } rt.AddHelper(method, helperScope, block); }
public void Initialize(ILTransformer tr) { methodInfo = tr.VM.Data.LookupInfo(tr.Method); methodInfo.RootScope = tr.RootScope; tr.VM.Data.SetInfo(tr.Method, methodInfo); }
public void Initialize(ILPostTransformer tr) { runtime = tr.Runtime; methodInfo = tr.Runtime.Descriptor.Data.LookupInfo(tr.Method); ComputeBlockKeys(tr.RootScope); }