[m-dev.] tests in tests/debugger/declarative failed
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Feb 15 19:24:41 AEDT 2000
On 15-Feb-2000, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> Fergus Henderson writes:
>
> > Also the `aadebug' test case there is failing in grades
> > none.gc and reg.gc; the symptom seems to be a crash
> > at runtime.
> >
> > Mark, could you please investigate these test case failures?
>
> That problem is caused by some macros in trace/mercury_trace_declarative.h
> which access Mercury data, using fixed numbers for the tag
> and offset. The fixed numbers are not correct for those grades.
> What is the best way to calculate the correct tag and offset
> in any grade?
[summarizing a discussion we had on this:]
- Actually the tag numbers are currently the same in all grades;
they differ depending on the number of tag bits available,
which depends on the architecture (32- or 64-bit).
- The most portable / least implementation-dependent way of accessing
Mercury data is to write access predicates/functions in Mercury and
use `pragma export' to export them to C.
However, in the current implementation this will not be as efficient
as using the MR_field() etc. macros to access the data structures
directly.
- If the C code needs to do destructive update on the terms, you can
still use the technique mentioned above; the Mercury code can use the
"references" interface in library/store.m (specifically store__init,
store__new_ref, store__arg_ref, store__set_ref, and
store__extract_ref_value) to perform the destructive update.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list