public override void TraverseChildren(IMethodDefinition method) { if (!firstPassDone) { TotalMethodsCount++; } if (iterMethodsToInline.Contains(method) || (!firstPassDone && phoneHelper.mustInlineMethod(method))) { PhoneMethodInliningCodeTraverser codeTraverser = new PhoneMethodInliningCodeTraverser(); codeTraverser.TraverseChildren(method); foreach (IMethodDefinition newMethodDef in codeTraverser.getMethodsFound()) { bool isExtern = this.assemblyBeingTranslated != null && !TypeHelper.GetDefiningUnitReference(newMethodDef.ContainingType).UnitIdentity.Equals(this.assemblyBeingTranslated.UnitIdentity); if (!methodsToInline.Contains(newMethodDef) && !isExtern) { iterMethodsToInline.Add(newMethodDef); changedOnLastPass = true; } } methodsToInline.Add(method); iterMethodsToInline.Remove(method); } }
public override void TraverseChildren(IMethodDefinition method) { if (!firstPassDone) TotalMethodsCount++; if (iterMethodsToInline.Contains(method) || (!firstPassDone && phoneHelper.mustInlineMethod(method))) { PhoneMethodInliningCodeTraverser codeTraverser= new PhoneMethodInliningCodeTraverser(); codeTraverser.TraverseChildren(method); foreach (IMethodDefinition newMethodDef in codeTraverser.getMethodsFound()) { bool isExtern = this.assemblyBeingTranslated != null && !TypeHelper.GetDefiningUnitReference(newMethodDef.ContainingType).UnitIdentity.Equals(this.assemblyBeingTranslated.UnitIdentity); if (!methodsToInline.Contains(newMethodDef) && !isExtern) { iterMethodsToInline.Add(newMethodDef); changedOnLastPass = true; } } methodsToInline.Add(method); iterMethodsToInline.Remove(method); } }