Browse Source

callvirt

pull/1/head^2
David Srbecký 18 years ago
parent
commit
86ca89b055
  1. 82
      bin/Debug/output.cs
  2. 3
      src/AstMetodBodyBuilder.cs

82
bin/Debug/output.cs

@ -13,7 +13,7 @@ namespace Reversi @@ -13,7 +13,7 @@ namespace Reversi
{
if (!(!disposing)) {
if (!(!(@this.components))) {
IL__callvirt(Dispose(), (@this.components));
(@this.components).Dispose();
goto BasicBlock_4;
}
else {
@ -32,56 +32,56 @@ namespace Reversi @@ -32,56 +32,56 @@ namespace Reversi
IL__stfld(okButton, @this, (IL__newobj(.ctor())));
IL__stfld(copyrightLabel, @this, (IL__newobj(.ctor())));
@this.SuspendLayout();
IL__callvirt(set_Location(), (@this.iconPictureBox), (IL__newobj(.ctor(), 77, 56)));
IL__callvirt(set_Name(), (@this.iconPictureBox), "iconPictureBox");
IL__callvirt(set_Size(), (@this.iconPictureBox), (IL__newobj(.ctor(), 96, 96)));
IL__callvirt(set_TabIndex(), (@this.iconPictureBox), 0);
IL__callvirt(set_TabStop(), (@this.iconPictureBox), 0);
IL__callvirt(set_AutoSize(), (@this.titleLabel), 1);
IL__callvirt(set_Font(), (@this.titleLabel), (IL__newobj(.ctor(), "Microsoft Sans Serif", 8.25f, 1, 3, 0)));
IL__callvirt(set_Location(), (@this.titleLabel), (IL__newobj(.ctor(), 103, 16)));
IL__callvirt(set_Name(), (@this.titleLabel), "titleLabel");
IL__callvirt(set_Size(), (@this.titleLabel), (IL__newobj(.ctor(), 44, 16)));
IL__callvirt(set_TabIndex(), (@this.titleLabel), 0);
IL__callvirt(set_Text(), (@this.titleLabel), "Reversi");
IL__callvirt(set_TextAlign(), (@this.titleLabel), 32);
IL__callvirt(set_AutoSize(), (@this.versionLabel), 1);
IL__callvirt(set_Location(), (@this.versionLabel), (IL__newobj(.ctor(), 95, 32)));
IL__callvirt(set_Name(), (@this.versionLabel), "versionLabel");
IL__callvirt(set_Size(), (@this.versionLabel), (IL__newobj(.ctor(), 61, 16)));
IL__callvirt(set_TabIndex(), (@this.versionLabel), 1);
IL__callvirt(set_Text(), (@this.versionLabel), "Version 2.0");
IL__callvirt(set_TextAlign(), (@this.versionLabel), 32);
IL__callvirt(set_DialogResult(), (@this.okButton), 1);
IL__callvirt(set_Location(), (@this.okButton), (IL__newobj(.ctor(), 88, 192)));
IL__callvirt(set_Name(), (@this.okButton), "okButton");
IL__callvirt(set_TabIndex(), (@this.okButton), 3);
IL__callvirt(set_Text(), (@this.okButton), "OK");
IL__callvirt(set_AutoSize(), (@this.copyrightLabel), 1);
IL__callvirt(set_Location(), (@this.copyrightLabel), (IL__newobj(.ctor(), 36, 160)));
IL__callvirt(set_Name(), (@this.copyrightLabel), "copyrightLabel");
IL__callvirt(set_Size(), (@this.copyrightLabel), (IL__newobj(.ctor(), 178, 16)));
IL__callvirt(set_TabIndex(), (@this.copyrightLabel), 2);
IL__callvirt(set_Text(), (@this.copyrightLabel), "Copyright 2003-2005 by Mike Hall.");
IL__callvirt(set_TextAlign(), (@this.copyrightLabel), 32);
(@this.iconPictureBox).set_Location((IL__newobj(.ctor(), 77, 56)));
(@this.iconPictureBox).set_Name("iconPictureBox");
(@this.iconPictureBox).set_Size((IL__newobj(.ctor(), 96, 96)));
(@this.iconPictureBox).set_TabIndex(0);
(@this.iconPictureBox).set_TabStop(0);
(@this.titleLabel).set_AutoSize(1);
(@this.titleLabel).set_Font((IL__newobj(.ctor(), "Microsoft Sans Serif", 8.25f, 1, 3, 0)));
(@this.titleLabel).set_Location((IL__newobj(.ctor(), 103, 16)));
(@this.titleLabel).set_Name("titleLabel");
(@this.titleLabel).set_Size((IL__newobj(.ctor(), 44, 16)));
(@this.titleLabel).set_TabIndex(0);
(@this.titleLabel).set_Text("Reversi");
(@this.titleLabel).set_TextAlign(32);
(@this.versionLabel).set_AutoSize(1);
(@this.versionLabel).set_Location((IL__newobj(.ctor(), 95, 32)));
(@this.versionLabel).set_Name("versionLabel");
(@this.versionLabel).set_Size((IL__newobj(.ctor(), 61, 16)));
(@this.versionLabel).set_TabIndex(1);
(@this.versionLabel).set_Text("Version 2.0");
(@this.versionLabel).set_TextAlign(32);
(@this.okButton).set_DialogResult(1);
(@this.okButton).set_Location((IL__newobj(.ctor(), 88, 192)));
(@this.okButton).set_Name("okButton");
(@this.okButton).set_TabIndex(3);
(@this.okButton).set_Text("OK");
(@this.copyrightLabel).set_AutoSize(1);
(@this.copyrightLabel).set_Location((IL__newobj(.ctor(), 36, 160)));
(@this.copyrightLabel).set_Name("copyrightLabel");
(@this.copyrightLabel).set_Size((IL__newobj(.ctor(), 178, 16)));
(@this.copyrightLabel).set_TabIndex(2);
(@this.copyrightLabel).set_Text("Copyright 2003-2005 by Mike Hall.");
(@this.copyrightLabel).set_TextAlign(32);
@this.set_AcceptButton((@this.okButton));
IL__callvirt(set_AutoScaleBaseSize(), @this, (IL__newobj(.ctor(), 5, 13)));
@this.set_AutoScaleBaseSize((IL__newobj(.ctor(), 5, 13)));
@this.set_CancelButton((@this.okButton));
@this.set_ClientSize((IL__newobj(.ctor(), 250, 224)));
@this.set_ControlBox(0);
IL__callvirt(Add(), @this.get_Controls(), (@this.copyrightLabel));
IL__callvirt(Add(), @this.get_Controls(), (@this.versionLabel));
IL__callvirt(Add(), @this.get_Controls(), (@this.titleLabel));
IL__callvirt(Add(), @this.get_Controls(), (@this.okButton));
IL__callvirt(Add(), @this.get_Controls(), (@this.iconPictureBox));
@this.get_Controls().Add((@this.copyrightLabel));
@this.get_Controls().Add((@this.versionLabel));
@this.get_Controls().Add((@this.titleLabel));
@this.get_Controls().Add((@this.okButton));
@this.get_Controls().Add((@this.iconPictureBox));
@this.set_FormBorderStyle(3);
@this.set_Icon((IL__castclass(System.Drawing.Icon, (IL__callvirt(GetObject(), V_0, "$this.Icon")))));
@this.set_Icon((IL__castclass(System.Drawing.Icon, (V_0.GetObject("$this.Icon")))));
@this.set_MaximizeBox(0);
@this.set_MinimizeBox(0);
@this.set_Name("AboutDialog");
@this.set_ShowInTaskbar(0);
@this.set_StartPosition(4);
IL__callvirt(set_Text(), @this, "About Reversi");
@this.set_Text("About Reversi");
@this.ResumeLayout(0);
}
}

3
src/AstMetodBodyBuilder.cs

@ -379,6 +379,8 @@ namespace Decompiler @@ -379,6 +379,8 @@ namespace Decompiler
case Code.Box: throw new NotImplementedException();
case Code.Break: throw new NotImplementedException();
case Code.Call:
case Code.Callvirt:
// TODO: Diferentiate vitual and non-vitual dispach
Cecil.MethodReference cecilMethod = ((MethodReference)operand);
Ast.IdentifierExpression astType = new Ast.IdentifierExpression(cecilMethod.DeclaringType.FullName);
List<Ast.Expression> methodArgs = new List<Ast.Expression>(args);
@ -389,7 +391,6 @@ namespace Decompiler @@ -389,7 +391,6 @@ namespace Decompiler
return new Ast.InvocationExpression(new Ast.MemberReferenceExpression(astType, cecilMethod.Name), methodArgs);
}
case Code.Calli: throw new NotImplementedException();
case Code.Callvirt: throw new NotImplementedException();
case Code.Castclass: throw new NotImplementedException();
case Code.Ckfinite: throw new NotImplementedException();
case Code.Constrained: throw new NotImplementedException();

Loading…
Cancel
Save