2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 31 Mar 2009 18:31:56 +0000 (18:31 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 31 Mar 2009 18:31:56 +0000 (18:31 -0000)
* Code.cs (CILLabel): Add new constructor to signal that
a label is an absolute il offset. This is required by exception
handling declarations that use offsets and not labels.

svn path=/trunk/mcs/; revision=130691

mcs/class/PEAPI/ChangeLog
mcs/class/PEAPI/Code.cs

index a24b8836f6e8d05ed27a5c0eba1a035db6f7c32a..bcc5824da42f9e4543473b3cda43842118b409e2 100644 (file)
@@ -1,3 +1,9 @@
+2009-03-31  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * Code.cs (CILLabel): Add new constructor to signal that
+       a label is an absolute il offset. This is required by exception
+       handling declarations that use offsets and not labels.
+
 2008-06-02  Ankit Jain  <jankit@novell.com>
 
        Fix bug #367114.
index 9d68b9c681cd8a68c0122701a5112ce59a1260df..60f09b4e92d2d185568506f47987d2632a797b1b 100644 (file)
@@ -1296,10 +1296,17 @@ namespace PEAPI {
                int tide = 0;
                CILInstruction labInstr;
                uint offset = 0;
+               bool absolute;
 
-               public CILLabel (uint offset) 
+
+               public CILLabel (uint offset, bool absolute) 
                {
                        this.offset = offset;
+                       this.absolute = absolute;
+               }
+
+               public CILLabel (uint offset) : this (offset, false)
+               {
                }
 
 
@@ -1332,6 +1339,7 @@ namespace PEAPI {
 
                internal uint GetLabelOffset() 
                {
+                       if (absolute) return offset;
                        if (labInstr == null) return 0;
                        return labInstr.offset + offset;
                }