[m-rev.] for review: improvements to bitmap.m [1]

Simon Taylor staylr at gmail.com
Mon Feb 12 22:42:32 AEDT 2007


On 12-Feb-2007, Jonathan Morgan <jonmmorgan at gmail.com> wrote:
> I'm reviewing the IL parts of this change, but I'll test it once I've
> got the IL backend working again.  As the bits I'm reviewing are in
> comments, there is no pressing need to change them.

Thanks for that.
 
> On 2/11/07, Simon Taylor <staylr at gmail.com> wrote:
> ...
> 
> >+/* XXX UNTESTED
> >+:- pragma foreign_code("C#", "
> >+namespace mercury {
> >+  namespace bitmap__csharp_code {
> >+
> >+    public class MercuryBitmap {
> >+        int num_bits;
> >+        byte[] elements;
> >+
> >+        MercuryBitmap(int numBits) {

> This doesn't look right.  All foreign_code declarations will already
> be inside the class mercury.bitmap__csharp_code.mercury_code, so both
> namespace declarations should be removed (if you want to have code
> outside of this class, then use `pragma foreign_decl' instead, but
> this code shouldn't need it).

> If you want to access them later you might need public on your
> instance declarations (I can't remember how C# handles them by
> default).
 
You're right, I meant foreign_decl, and everything should be public.
This was (poorly) copied from io.m.  I'll leave it to someone who
knows something about C#, and has a compiler to test it with.

> On a side note, does `will_not_modify_trail' have any meaning for the
> IL backend?

I don't know if it works yet, but trailing operations for MLDS grades
are added as a HLDS->HLDS transformation, so there's no reason why
trailing couldn't work for IL.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list