 // The cls attribute is implicitly present in the C++ source code and
 // is inserted at the beginning of the attribute array by the code
 // that constructs GCField instances.
+//
+// Any condition on the field is considered part of the field's name,
+// to support typical cases like these:
+//
+// #ifdef BLAH
+//   Bletch* GC_POINTER_IFDEF(p, BLAH)
+// #else
+//   Blotch* GC_POINTER_IFNDEF(p, BLAH)
+// #endif
+
 class GCField 
 {
     function GCField(tag, attr) {

        if (!cppClassMap.hasOwnProperty(s.cls))
            fail("Bad field annotation - unknown class: " + s.cls + " in " + s);
        var c = cppClassMap[s.cls];
        if (isVariableLength(s)) {
            // FIXME: It would be good to loosen the following restriction up; it 
            // would be sufficient to decree that only one of the arrays can be 

            // were to have a trailing array as well then we'd run into this restriction.
            if (c.variable_length_field != null)
                fail("Arbitrary restriction: More than one variable length field on " + c);
            if (c.fieldMap.hasOwnProperty(fieldname))
                fail("Duplicate field name: " + s.name + "; canonically " + fieldname);
            c.variable_length_field = s;
        }
        else {
            if (c.fieldMap.hasOwnProperty(fieldname) || (c.variable_length_field != null && c.variable_length_field.name == fieldname))
                fail("Duplicate field name: " + s.name + "; canonically " + fieldname);
            c.fieldMap[fieldname] = s;
            c.fieldList.push(s);
        }
    }
