private SFormsFastMapDirect CreateFirstMap(StructMethod mt, RootStatement root) { bool thisvar = !mt.HasModifier(ICodeConstants.Acc_Static); MethodDescriptor md = MethodDescriptor.ParseDescriptor(mt.GetDescriptor()); int paramcount = [email protected] + (thisvar ? 1 : 0); int varindex = 0; SFormsFastMapDirect map = new SFormsFastMapDirect(); for (int i = 0; i < paramcount; i++) { int version = GetNextFreeVersion(varindex, root); // == 1 FastSparseSetFactory <int> .FastSparseSet <int> set = factory.SpawnEmptySet(); set.Add(version); map.Put(varindex, set); ssuversions.CreateNode(new VarVersionPair(varindex, version)); if (thisvar) { if (i == 0) { varindex++; } else { varindex += md.@params[i - 1].stackSize; } } else { varindex += md.@params[i].stackSize; } } return(map); }
private void SetCurrentVar(SFormsFastMapDirect varmap, int?var, int vers) { FastSparseSetFactory <int> .FastSparseSet <int> set = factory.SpawnEmptySet(); set.Add(vers); if (var.HasValue) { varmap.Put(var.Value, set); } }