bug fix #282
This commit is contained in:
parent
219e8e6413
commit
dc66fb107c
|
|
@ -2627,9 +2627,6 @@ namespace CodeFormatters
|
|||
if (i < _simple_attribute_list.attributes.Count - 1)
|
||||
sb.Append(",");
|
||||
}
|
||||
//sb.Append("]");
|
||||
//if (attr_on_new_line)
|
||||
// sb.AppendLine();
|
||||
}
|
||||
|
||||
public override void visit(attribute_list _attribute_list)
|
||||
|
|
@ -2813,7 +2810,6 @@ namespace CodeFormatters
|
|||
add_space_after = true;
|
||||
i++;
|
||||
}
|
||||
//sb.Append(")");
|
||||
}
|
||||
|
||||
public override void visit(yield_node yn)
|
||||
|
|
|
|||
|
|
@ -1663,17 +1663,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
foreach (ICommonEventNode evnt in value.events)
|
||||
evnt.visit(this);
|
||||
|
||||
//(ssyy) 21.05.2008
|
||||
/*foreach (ICommonMethodNode meth in value.methods)
|
||||
{
|
||||
if (meth.is_generic_function)
|
||||
{
|
||||
ConvertTypeInstancesMembersInFunction(meth);
|
||||
}
|
||||
}*/
|
||||
//добавляем ритерны в специальные методы
|
||||
//ti.init_meth.GetILGenerator().Emit(OpCodes.Ret);
|
||||
//if (hndl_mb != null) hndl_mb.GetILGenerator().Emit(OpCodes.Ret);
|
||||
if (clone_mb != null)
|
||||
{
|
||||
clone_mb.GetILGenerator().Emit(OpCodes.Ldloc_0);
|
||||
|
|
@ -1698,15 +1687,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
prop.visit(this);
|
||||
foreach (ICommonEventNode evnt in value.events)
|
||||
evnt.visit(this);
|
||||
//(ssyy) 21.05.2008
|
||||
/*foreach (ICommonMethodNode meth in value.methods)
|
||||
{
|
||||
if (meth.is_generic_function)
|
||||
{
|
||||
ConvertTypeInstancesMembersInFunction(meth);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
if (value.default_property != null)
|
||||
|
|
@ -2812,7 +2792,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
if (!fb.IsStatic)
|
||||
{
|
||||
il.Emit(OpCodes.Ldarg_0);
|
||||
//PushLdfld(fb);
|
||||
init_value.visit(this);
|
||||
EmitBox(init_value, fb.FieldType);
|
||||
il.Emit(OpCodes.Stfld, fb);
|
||||
|
|
@ -2833,7 +2812,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
il.Emit(OpCodes.Ldfld, fb);
|
||||
il.Emit(OpCodes.Call, TypeFactory.StringNullOrEmptyMethod);
|
||||
il.Emit(OpCodes.Brfalse, lbl);
|
||||
//PushLdfld(fb);
|
||||
il.Emit(OpCodes.Ldarg_0);
|
||||
init_value.visit(this);
|
||||
il.Emit(OpCodes.Stfld, fb);
|
||||
|
|
@ -2845,7 +2823,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
il.Emit(OpCodes.Ldsfld, fb);
|
||||
il.Emit(OpCodes.Call, TypeFactory.StringNullOrEmptyMethod);
|
||||
il.Emit(OpCodes.Brfalse, lbl);
|
||||
//PushLdfld(fb);
|
||||
init_value.visit(this);
|
||||
il.Emit(OpCodes.Stsfld, fb);
|
||||
il.MarkLabel(lbl);
|
||||
|
|
@ -3448,7 +3425,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
this.il = tmp_il;
|
||||
}
|
||||
|
||||
private void CreateInitCodeForUnsizedArray(ILGenerator il, ITypeNode itn, IExpressionNode arr, LocalBuilder len)
|
||||
private void CreateInitCodeForUnsizedArray(ILGenerator il, ITypeNode itn, IExpressionNode arr, LocalBuilder len, LocalBuilder start_index=null)
|
||||
{
|
||||
ILGenerator tmp_il = this.il;
|
||||
TypeInfo ti = helper.GetTypeReference(itn);
|
||||
|
|
@ -3472,9 +3449,16 @@ namespace PascalABCCompiler.NETGenerator
|
|||
if (ti.tp.IsValueType && ti.init_meth != null || ti.is_arr || ti.is_set || ti.is_typed_file || ti.is_text_file || ti.tp == TypeFactory.StringType ||
|
||||
(generic_param))
|
||||
{
|
||||
LocalBuilder clb = il.DeclareLocal(TypeFactory.Int32Type);
|
||||
il.Emit(OpCodes.Ldc_I4_0);
|
||||
il.Emit(OpCodes.Stloc, clb);
|
||||
LocalBuilder clb = null;
|
||||
if (start_index == null)
|
||||
{
|
||||
clb = il.DeclareLocal(TypeFactory.Int32Type);
|
||||
il.Emit(OpCodes.Ldc_I4_0);
|
||||
il.Emit(OpCodes.Stloc, clb);
|
||||
}
|
||||
else
|
||||
clb = start_index;
|
||||
|
||||
Label tlabel = il.DefineLabel();
|
||||
Label flabel = il.DefineLabel();
|
||||
il.MarkLabel(tlabel);
|
||||
|
|
@ -4752,14 +4736,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
//идет точка (например 'a'.ToString)
|
||||
public override void visit(SemanticTree.ICharConstantNode value)
|
||||
{
|
||||
|
||||
//DarkStar Changed 13.11.06. Crash on uplowcase.pas
|
||||
//il.Emit(OpCodes.Ldc_I4_S,Convert.ToChar(value.constant_value));
|
||||
NETGeneratorTools.LdcIntConst(il, value.constant_value);
|
||||
/*if ((int)value.constant_value > byte.MaxValue)
|
||||
il.Emit(OpCodes.Ldc_I4, value.constant_value);
|
||||
else
|
||||
il.Emit(OpCodes.Ldc_I4_S, Convert.ToChar(value.constant_value));*/
|
||||
|
||||
if (is_dot_expr == true)
|
||||
{
|
||||
|
|
@ -4799,10 +4776,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
if (is_dot_expr == true)
|
||||
{
|
||||
LocalBuilder lb = null;
|
||||
//if (e < sbyte.MinValue || e > sbyte.MaxValue)
|
||||
lb = il.DeclareLocal(TypeFactory.Int32Type);
|
||||
//else
|
||||
// lb = il.DeclareLocal(typeof(sbyte));
|
||||
il.Emit(OpCodes.Stloc, lb);
|
||||
il.Emit(OpCodes.Ldloca, lb);
|
||||
}
|
||||
|
|
@ -4821,10 +4795,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
private void PushCharConst(char value)
|
||||
{
|
||||
/*if ((int)value > byte.MaxValue)
|
||||
il.Emit(OpCodes.Ldc_I4, value);
|
||||
else
|
||||
il.Emit(OpCodes.Ldc_I4_S, Convert.ToChar(value));*/
|
||||
NETGeneratorTools.LdcIntConst(il, value);
|
||||
}
|
||||
|
||||
|
|
@ -4835,7 +4805,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
private void PushByteConst(byte value)
|
||||
{
|
||||
//il.Emit(OpCodes.Ldc_I4_S, (int)value);
|
||||
NETGeneratorTools.LdcIntConst(il, value);
|
||||
}
|
||||
|
||||
|
|
@ -4846,25 +4815,16 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
private void PushShortConst(short value)
|
||||
{
|
||||
//il.Emit(OpCodes.Ldc_I4, (int)value);
|
||||
NETGeneratorTools.LdcIntConst(il, value);
|
||||
}
|
||||
|
||||
private void PushUShortConst(ushort value)
|
||||
{
|
||||
//il.Emit(OpCodes.Ldc_I4, (int)value);
|
||||
NETGeneratorTools.LdcIntConst(il, value);
|
||||
}
|
||||
|
||||
private void PushUIntConst(uint value)
|
||||
{
|
||||
/*int i = (int)(value & 0x7FFFFFFF);
|
||||
if ((value & 0x80000000) != 0)
|
||||
{
|
||||
int i2 = 0x40000000 << 1;
|
||||
i |= i2;
|
||||
}*/
|
||||
//il.Emit(OpCodes.Ldc_I4, value);
|
||||
NETGeneratorTools.LdcIntConst(il, (int)value);
|
||||
}
|
||||
|
||||
|
|
@ -4881,7 +4841,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
private void PushSByteConst(sbyte value)
|
||||
{
|
||||
//il.Emit(OpCodes.Ldc_I4, (int)value);
|
||||
NETGeneratorTools.LdcIntConst(il, value);
|
||||
}
|
||||
|
||||
|
|
@ -4915,7 +4874,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
//команда ldc_i4_S
|
||||
public override void visit(SemanticTree.IByteConstantNode value)
|
||||
{
|
||||
//il.Emit(OpCodes.Ldc_I4,(int)value.constant_value);
|
||||
NETGeneratorTools.LdcIntConst(il, value.constant_value);
|
||||
if (is_dot_expr == true)
|
||||
{
|
||||
|
|
@ -4928,7 +4886,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
public override void visit(SemanticTree.IShortConstantNode value)
|
||||
{
|
||||
//il.Emit(OpCodes.Ldc_I4, (int)value.constant_value);
|
||||
NETGeneratorTools.LdcIntConst(il, value.constant_value);
|
||||
if (is_dot_expr == true)
|
||||
{
|
||||
|
|
@ -4941,7 +4898,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
public override void visit(SemanticTree.IUShortConstantNode value)
|
||||
{
|
||||
//il.Emit(OpCodes.Ldc_I4, (int)value.constant_value);
|
||||
NETGeneratorTools.LdcIntConst(il, value.constant_value);
|
||||
if (is_dot_expr == true)
|
||||
{
|
||||
|
|
@ -4966,7 +4922,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
public override void visit(SemanticTree.IULongConstantNode value)
|
||||
{
|
||||
//TODO: Проверить.
|
||||
long l = (long)(value.constant_value & 0x7FFFFFFFFFFFFFFF);
|
||||
if ((value.constant_value & 0x8000000000000000) != 0)
|
||||
{
|
||||
|
|
@ -5049,8 +5004,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
bool must_push_addr = false;//должен ли упаковываться, но это если после идет точка
|
||||
if (is_dot_expr == true)//если после идет точка
|
||||
{
|
||||
/*ICompiledTypeNode ctn = value.type as ICompiledTypeNode;
|
||||
if (ctn != null && ctn.compiled_type.IsValueType == true)*/
|
||||
if (value.type.is_value_type || value.type.is_generic_parameter)
|
||||
must_push_addr = true;
|
||||
}
|
||||
|
|
@ -5209,7 +5162,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
bool tmp_dot = is_dot_expr;
|
||||
if (tmp_dot == false)
|
||||
is_dot_expr = true;
|
||||
//TODO глючит когда поле класса передается по ссылке!!!
|
||||
bool temp_is_addr = is_addr;
|
||||
is_addr = false;
|
||||
//is_dot_expr = false;
|
||||
|
|
@ -5287,24 +5239,14 @@ namespace PascalABCCompiler.NETGenerator
|
|||
}
|
||||
else
|
||||
if (lb.LocalType.IsValueType == true)
|
||||
{
|
||||
il.Emit(OpCodes.Ldloca, lb);//если перем. размерного типа кладем ее адрес
|
||||
}
|
||||
else
|
||||
{
|
||||
/*//ssyy добавил
|
||||
if (is_constructor && lb.LocalIndex == 0)//eto nepravilno!!!!!
|
||||
{
|
||||
//В конструкторе self - это не локальная переменная 0,
|
||||
//а аргумент номер 0.
|
||||
il.Emit(OpCodes.Ldarg_0);
|
||||
}
|
||||
//\ssyy
|
||||
else*/
|
||||
{
|
||||
il.Emit(OpCodes.Ldloc, lb);
|
||||
}
|
||||
}
|
||||
{
|
||||
il.Emit(OpCodes.Ldloca, lb);//если перем. размерного типа кладем ее адрес
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
il.Emit(OpCodes.Ldloc, lb);
|
||||
}
|
||||
}
|
||||
else il.Emit(OpCodes.Ldloc, lb);
|
||||
}
|
||||
|
|
@ -5601,9 +5543,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
public override void visit(SemanticTree.IRepeatNode value)
|
||||
{
|
||||
//if (save_debug_info)
|
||||
// MarkSequencePoint(value.Location);
|
||||
|
||||
Label TrueLabel, FalseLabel;
|
||||
TrueLabel = il.DefineLabel();
|
||||
FalseLabel = il.DefineLabel();
|
||||
|
|
@ -5741,8 +5680,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
if_stack.Clear();
|
||||
il.MarkLabel(EndLabel);
|
||||
}
|
||||
//if (end_label_def)
|
||||
// if_stack.Pop();
|
||||
}
|
||||
|
||||
public override void visit(IWhileBreakNode value)
|
||||
|
|
@ -5774,9 +5711,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
public override void visit(IWhileContinueNode value)
|
||||
{
|
||||
//if (save_debug_info)
|
||||
// MarkSequencePoint(value.Location);
|
||||
|
||||
Label l = clabels.Peek();
|
||||
if (safe_block)
|
||||
il.Emit(OpCodes.Leave, l);
|
||||
|
|
@ -5828,7 +5762,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
//перевод тела конструктора
|
||||
private void ConvertConstructorBody(SemanticTree.ICommonMethodNode value)
|
||||
{
|
||||
//if (is_in_unit && helper.IsUsed(value)==false) return;
|
||||
num_scope++;
|
||||
//получаем билдер конструктора
|
||||
ConstructorBuilder cnstr = helper.GetConstructorBuilder(value);
|
||||
|
|
@ -5912,15 +5845,11 @@ namespace PascalABCCompiler.NETGenerator
|
|||
MethInfo copy_mi = null;
|
||||
cur_meth = methb;
|
||||
ILGenerator tmp_il = il;
|
||||
//il = methb.GetILGenerator();
|
||||
//Console.WriteLine(value.parameters.Length);
|
||||
//если метод содержит вложенные процедуры
|
||||
if (value.functions_nodes.Length > 0)
|
||||
{
|
||||
copy_mi = ConvertMethodWithNested(value, methb);
|
||||
}
|
||||
//ConvertLocalVariables(value.var_definition_nodes);
|
||||
//ConvertBody(value.function_code);
|
||||
//если нет вложенных процедур
|
||||
if (value.functions_nodes.Length == 0)
|
||||
{
|
||||
|
|
@ -6057,8 +5986,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
ConvertFunctionBody(f);
|
||||
if (frm != null)
|
||||
frm.mb.GetILGenerator().Emit(OpCodes.Ret);
|
||||
/* if (meth.return_value_type == null)
|
||||
il.Emit(OpCodes.Ret);*/
|
||||
cur_type = tmp_type;
|
||||
num_scope--;
|
||||
smi.Pop();
|
||||
|
|
@ -6158,8 +6085,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
ConvertFunctionBody(f);
|
||||
if (frm != null)
|
||||
frm.mb.GetILGenerator().Emit(OpCodes.Ret);
|
||||
/* if (meth.return_value_type == null)
|
||||
il.Emit(OpCodes.Ret);*/
|
||||
cur_type = tmp_type;
|
||||
num_scope--;
|
||||
smi.Pop();
|
||||
|
|
@ -6348,7 +6273,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
MethodAttributes attrs = ConvertFALToMethodAttributes(value.field_access_level);
|
||||
switch (value.polymorphic_state)
|
||||
{
|
||||
//case polymorphic_state.ps_static : attrs |= MethodAttributes.Static; break;
|
||||
case polymorphic_state.ps_virtual: attrs |= MethodAttributes.Virtual; break;
|
||||
}
|
||||
return attrs;
|
||||
|
|
@ -6358,7 +6282,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
private void ConvertConstructorHeader(SemanticTree.ICommonMethodNode value)
|
||||
{
|
||||
if (helper.GetConstructor(value) != null) return;
|
||||
//if (is_in_unit && helper.IsUsed(value)==false) return;
|
||||
|
||||
//определяем конструктор
|
||||
ConstructorBuilder cnstr;
|
||||
|
|
@ -6399,8 +6322,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
{
|
||||
if (value.function_code is IStatementsListNode)
|
||||
MarkSequencePoint(cnstr.GetILGenerator(), ((IStatementsListNode)value.function_code).LeftLogicalBracketLocation);
|
||||
//else
|
||||
// MarkSequencePoint(cnstr.GetILGenerator(),value.function_code.Location);
|
||||
}
|
||||
ConvertConstructorParameters(value, cnstr);
|
||||
}
|
||||
|
|
@ -6476,7 +6397,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
}
|
||||
//\ssyy
|
||||
|
||||
//methb = cur_type.DefineMethod(method_name, attrs, ret_type, param_types);
|
||||
methb = cur_type.DefineMethod(method_name, attrs);
|
||||
|
||||
if (value.is_generic_function)
|
||||
|
|
@ -6529,17 +6449,13 @@ namespace PascalABCCompiler.NETGenerator
|
|||
{
|
||||
if (value.function_code is IStatementsListNode)
|
||||
MarkSequencePoint(methb.GetILGenerator(), ((IStatementsListNode)value.function_code).LeftLogicalBracketLocation);
|
||||
//else
|
||||
// MarkSequencePoint(methb.GetILGenerator(),value.function_code.Location);
|
||||
}
|
||||
//TestForHandler(value, param_types, methb);
|
||||
MethInfo mi = null;
|
||||
mi = helper.AddMethod(value, methb);
|
||||
//binding CloneSet to set type
|
||||
if (value.comperehensive_type.type_special_kind == type_special_kind.base_set_type && value.name == "GetEnumerator")
|
||||
{
|
||||
helper.GetTypeReference(value.comperehensive_type).enumerator_meth = methb;
|
||||
//helper.GetTypeReference(value.comprehensive_type).assign_meth = methb;
|
||||
}
|
||||
mi.is_ptr_ret_type = is_ptr_ret_type;
|
||||
mi.num_scope = num_scope + 1;
|
||||
|
|
@ -6557,8 +6473,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
default_value = helper.GetConstantForExpression(parameters[i].default_value);
|
||||
|
||||
ParameterAttributes pa = ParameterAttributes.None;
|
||||
//if (value.parameters[i].parameter_type == parameter_type.var)
|
||||
// pa = ParameterAttributes.Retval;
|
||||
if (default_value != null)
|
||||
pa |= ParameterAttributes.Optional;
|
||||
pb = methb.DefineParameter(i + 1, pa, parameters[i].name);
|
||||
|
|
@ -6597,7 +6511,6 @@ namespace PascalABCCompiler.NETGenerator
|
|||
//вызов откомпилированного статического метода
|
||||
public override void visit(SemanticTree.ICompiledStaticMethodCallNode value)
|
||||
{
|
||||
//if (save_debug_info) MarkSequencePoint(value.Location);
|
||||
if (comp_opt.dbg_attrs == DebugAttributes.Release && has_debug_conditional_attr(value.static_method.method_info))
|
||||
return;
|
||||
bool tmp_dot = is_dot_expr;//идет ли после этого точка
|
||||
|
|
@ -6614,11 +6527,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
is_addr = false;
|
||||
Label l1 = il.DefineLabel();
|
||||
Label l2 = il.DefineLabel();
|
||||
//LocalBuilder lb = il.DeclareLocal(helper.GetTypeReference(value.real_parameters[0].type).tp.MakePointerType());
|
||||
//il.Emit(OpCodes.Stloc, lb);
|
||||
il.Emit(OpCodes.Dup);
|
||||
/*il.Emit(OpCodes.Ldloc, lb);
|
||||
il.Emit(OpCodes.Ldloc, lb);*/
|
||||
il.Emit(OpCodes.Ldind_Ref);
|
||||
il.Emit(OpCodes.Ldc_I4_0);
|
||||
il.Emit(OpCodes.Beq, l1);
|
||||
|
|
@ -6646,6 +6555,23 @@ namespace PascalABCCompiler.NETGenerator
|
|||
return;
|
||||
}
|
||||
LocalBuilder len_lb = null;
|
||||
LocalBuilder start_index_lb = null;
|
||||
if (mi.DeclaringType == TypeFactory.ArrayType && mi.Name == "Resize" && real_parameters.Length == 2)
|
||||
{
|
||||
start_index_lb = il.DeclareLocal(TypeFactory.Int32Type);
|
||||
il.Emit(OpCodes.Ldc_I4_0);
|
||||
il.Emit(OpCodes.Stloc, start_index_lb);
|
||||
Label lbl = il.DefineLabel();
|
||||
real_parameters[0].visit(this);
|
||||
il.Emit(OpCodes.Ldnull);
|
||||
il.Emit(OpCodes.Beq, lbl);
|
||||
real_parameters[0].visit(this);
|
||||
il.Emit(OpCodes.Ldlen);
|
||||
//real_parameters[1].visit(this);
|
||||
//il.Emit(OpCodes.Sub);
|
||||
il.Emit(OpCodes.Stloc, start_index_lb);
|
||||
il.MarkLabel(lbl);
|
||||
}
|
||||
for (int i = 0; i < real_parameters.Length; i++)
|
||||
{
|
||||
if (parameters[i].parameter_type == parameter_type.var)
|
||||
|
|
@ -6659,6 +6585,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
}
|
||||
}
|
||||
real_parameters[i].visit(this);
|
||||
|
||||
if (mi.DeclaringType == TypeFactory.ArrayType && mi.Name == "Resize" && i == 1)
|
||||
{
|
||||
if (real_parameters.Length == 2)
|
||||
|
|
@ -6687,7 +6614,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
mi = mi.MakeGenericMethod(type_arr);
|
||||
}
|
||||
il.EmitCall(OpCodes.Call, mi, null);
|
||||
if (tmp_dot == true)
|
||||
if (tmp_dot)
|
||||
{
|
||||
//MethodInfo mi = value.static_method.method_info;
|
||||
if ((mi.ReturnType.IsValueType || mi.ReturnType.IsGenericParameter) && !NETGeneratorTools.IsPointer(mi.ReturnType))
|
||||
|
|
@ -6702,10 +6629,8 @@ namespace PascalABCCompiler.NETGenerator
|
|||
{
|
||||
if (real_parameters.Length == 2)
|
||||
{
|
||||
//TypeInfo ti = helper.GetTypeReference(value.real_parameters[0].type.element_type);
|
||||
//this.CreateInitCodeForUnsizedArray(il,ti,value.real_parameters[0],len_lb/*value.real_parameters[1]*/);
|
||||
this.CreateInitCodeForUnsizedArray(il, real_parameters[0].type.element_type,
|
||||
real_parameters[0], len_lb/*value.real_parameters[1]*/);
|
||||
real_parameters[0], len_lb, start_index_lb);
|
||||
}
|
||||
}
|
||||
EmitFreePinnedVariables();
|
||||
|
|
|
|||
|
|
@ -7,5 +7,8 @@ var arr : array of TRec;
|
|||
begin
|
||||
SetLength(arr,Length(arr)+1);
|
||||
assert(Length(arr)=1);
|
||||
assert(arr[0].s='');
|
||||
assert(arr[0].s='');
|
||||
arr[0].s := 'abc';
|
||||
SetLength(arr,Length(arr)+1);
|
||||
assert(arr[0].s='abc');
|
||||
end.
|
||||
|
|
@ -22,9 +22,6 @@ namespace VisualPascalABC
|
|||
void RunnerManager_Started(string fileName)
|
||||
{
|
||||
Workbench.BeginInvoke(new SetTextDelegate(RunnerManager_Started_Sync), fileName);
|
||||
// execThread = new Thread(new ParameterizedThreadStart(RunnerManager_Started_Sync_Thread));
|
||||
// execThread.Priority = ThreadPriority.BelowNormal;
|
||||
// execThread.Start(fileName);
|
||||
}
|
||||
|
||||
void RunnerManager_Started_Sync(string fileName)
|
||||
|
|
@ -39,7 +36,6 @@ namespace VisualPascalABC
|
|||
Workbench.WidgetController.SetDebugButtonsEnabled(false);
|
||||
Workbench.WidgetController.SetOptionsEnabled(false);
|
||||
}
|
||||
//(Tabs[fileName]).Text = (Tabs[fileName]).Text + string.Format(" [{0}]", PascalABCCompiler.StringResources.Get("VP_MF_TS_RUN"));
|
||||
RunTabs[fileName].Run = true;
|
||||
WorkbenchServiceFactory.DocumentService.SetTabPageText(RunTabs[fileName]);
|
||||
}
|
||||
|
|
@ -95,7 +91,6 @@ namespace VisualPascalABC
|
|||
}
|
||||
RunTabs[fileName].Run = false;
|
||||
WorkbenchServiceFactory.DocumentService.SetTabPageText(RunTabs[fileName]);
|
||||
//Tabs.Remove(fileName);
|
||||
if (ReadRequests.ContainsKey(RunTabs[fileName]))
|
||||
ReadRequests.Remove(RunTabs[fileName]);
|
||||
UpdateReadRequest(false);
|
||||
|
|
@ -104,13 +99,10 @@ namespace VisualPascalABC
|
|||
WaitCallback_DeleteEXEAndPDB(fileName);
|
||||
else
|
||||
System.Threading.ThreadPool.QueueUserWorkItem(WaitCallback_DeleteEXEAndPDB, fileName);
|
||||
//RunTabs.Remove(fileName);
|
||||
}
|
||||
|
||||
void RunnerManager_RunnerManagerUnhanledRuntimeException(string id, string ExceptionType, string ExceptionMessage, string StackTraceData, List<RunManager.StackTraceItem> StackTrace)
|
||||
{
|
||||
//if (VisualPascalABCPlugins.PT4Provider_VisualPascalABCPlugin.PT4UnitUsed)
|
||||
//return;
|
||||
string localiseMsg = RuntimeExceptionsStringResources.Get(ExceptionMessage);
|
||||
WorkbenchServiceFactory.OperationsService.AddTextToOutputWindowSync(id, string.Format(Form1StringResources.Get("OW_RUNTIME_EXCEPTION{0}_MESSAGE{1}"), ExceptionType, localiseMsg) + Environment.NewLine);
|
||||
if (StackTraceData != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue