Good morning,

The questions for today are about the compiler and external
code.

1. It seems that the compiler is aggressive about not touching
    dead code, with some basic syntax checking being done but
    uncalled functions otherwise ignored.  We've run test compiles
    on modules that come up clean, only to find simple errors
    when the module actually gets used; this has also happened
    with procedures within a file that aren't called.  Is there
    a way to run the compiler to check everything in a file?
    (As an example the file
       proc unused(i : int) : bool { return i; }
       writeln("ignoring used");
       /* unused(1); */
    does not generate a compiler error until the call is
    uncommented.)

2. Is it possible to provide feedback about optimizations that
    can't be done?  The idea of using (sub)domains to provably
    escape bounds checking for arrays is powerful, for example,
    and we would like to see the array accesses where this can't
    be shown.

3. It it possible to tie external enumerations in C into
    Chapel enums, rather than using 'extern const' for each
    member?
      ex. In C,
        enum clrplane { CLR_GREY = 0x10, CLR_R = 0x01,
          CLR_G = 0x02, CLR_B = 0x08 };
      requires
        extern const CLR_GREY : int(32);
        extern const CLR_R : int(32);
        extern const CLR_G : int(32);
        extern const CLR_B : int(32);
      and it would be better to not have to do this (if only
      because if the C enum changes you have to remember to
      add a constant).

4. Is a user-defined class destructor called by the garbage
    collector?  We tried putting some clean-up code for
    allocations C-side in one but it never triggered.

Thanks,

Greg

------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to