~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to contrib/Mono.Cecil/Cecil.Decompiler/Cecil.Decompiler/ExpressionDecompiler.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
                public ExpressionDecompiler (MethodDefinition method, AnnotationStore annotations)
54
54
                {
55
55
                        this.method = method;
56
 
                        this.annotations = annotations;
57
 
                        this.array_length = new PropertyDefinition (
58
 
                                "Length",
59
 
                                new TypeReference ("Int32", "System", null, true),
60
 
                                PropertyAttributes.SpecialName | PropertyAttributes.RTSpecialName);
 
56
                        this.annotations = annotations;
 
57
                        this.array_length = new PropertyDefinition (
 
58
                                "Length",
 
59
                            PropertyAttributes.SpecialName | PropertyAttributes.RTSpecialName,
 
60
                                method.Module.TypeSystem.Int32);
61
61
                }
62
62
 
63
63
                public IEnumerable<VariableReference> GetRegisters ()
669
669
                        case CodeNodeType.MethodInvocationExpression:
670
670
                                var reference = ((MethodInvocationExpression) expression).Method as MethodReferenceExpression;
671
671
                                if (reference != null)
672
 
                                        return reference.Method.ReturnType.ReturnType.FullName == Constants.Boolean;
 
672
                                        return reference.Method.ReturnType.FullName == "System.Boolean";
673
673
 
674
674
                                break;
675
675
                        }
882
882
 
883
883
                public override void OnLdarg (Instruction instruction)
884
884
                {
885
 
                        PushArgumentReference (((ParameterDefinition) instruction.Operand).Sequence);
 
885
                        PushArgumentReference (((ParameterDefinition) instruction.Operand).Index + 1);
886
886
                }
887
887
 
888
888
                public override void OnLdarga (Instruction instruction)
889
889
                {
890
 
                        PushArgumentReference (((ParameterDefinition) instruction.Operand).Sequence);
 
890
                        PushArgumentReference (((ParameterDefinition) instruction.Operand).Index + 1);
891
891
                        PushAddressOf ();
892
892
                }
893
893