public void UndelayCalls(AbcCode code, IList <AbcInstance> list, int arr) { int n = list.Count; for (int i = 0; i < n; ++i) { var instance = list[i]; code.GetLocal(arr); code.PushInt(i); code.GetNativeArrayItem(); var br = code.IfFalse(); SetCalledFlag(code, instance, false); br.BranchTarget = code.Label(); } }
private IEnumerable <IInstruction> EndFinally(ISehHandlerBlock block, bool fault) { var handlerInfo = block.GetHandlerInfo(); var ci = handlerInfo.CatchInfo; var fi = handlerInfo.FinallyInfo; if (fi.IsFault != fault) { throw new InvalidOperationException("Finally block type mistmatch!"); } var code = new AbcCode(_abc); if (fault) { code.GetLocal(ci.ExceptionVar); KillExceptionVariable(code, ci); code.Throw(); } else { // check if we should rethrow exception code.GetLocal(fi.RethrowFlagVariable); // trying to fix IVDiffGramTest // KillTempVar(code, fi.RethrowFlagVariable); var br = code.IfFalse(); code.GetLocal(ci.ExceptionVar); KillExceptionVariable(code, ci); var end = code.Throw(); br.GotoNext(end); } return(code); }