//перевод statement-а private void ConvertStatement(IStatementNode value) { make_next_spoint = true; if (save_debug_info /*&& !(value is IForNode)*/) MarkSequencePoint(value.Location); make_next_spoint = false; value.visit(this); make_next_spoint = true; //нужно для очистки стека после вызова функции в качестве процедуры //ssyy добавил //если вызов конструктора предка, то стек не очищаем if (!( (value is IFunctionCallNode) && ((IFunctionCallNode)value).last_result_function_call || (value is ICompiledConstructorCall) && !((ICompiledConstructorCall)value).new_obj_awaited() || (value is ICommonConstructorCall) && !((ICommonConstructorCall)value).new_obj_awaited() )) //\ssyy if ((value is IFunctionCallNode) && !(value is IBasicFunctionCallNode)) { IFunctionCallNode fc = value as IFunctionCallNode; if (fc.function.return_value_type != null) { ICompiledTypeNode ct = fc.function.return_value_type as ICompiledTypeNode; if ((ct == null) || (ct != null && (ct.compiled_type != TypeFactory.VoidType))) il.Emit(OpCodes.Pop); } } }
//перевод тела private void ConvertBody(IStatementNode body) { if (!(body is IStatementsListNode) && save_debug_info && body.Location != null) if (body.Location.begin_line_num == 0xFFFFFF) MarkSequencePoint(il, body.Location); body.visit(this); OptMakeExitLabel(); }