[m-dev.] for review: new method of handling failures, part 2 of 6
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Jul 14 11:09:52 AEST 1998
On 02-Jul-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
>
> <continuing the new code_info.m>
...
> % XXX We could use the sanity checking mechanism...
> code_info__clear_all_registers -->
> code_info__get_exprn_info(Exprn0),
> { code_exprn__clobber_regs([], Exprn0, Exprn) },
> code_info__set_exprn_info(Exprn).
I don't understand the comment.
> %---------------------------------------------------------------------------%
>
> % Submodule for managing stack slots.
>
> % The det stack frame is organized as follows.
> %
> % ... unused ...
> % sp ---> <first unused slot>
> % <space for local var 1>
> % ... local vars ...
> % <space for local var n>
> % <space for temporary reg save 1>
> % ... temporary reg saves ...
> % <space for temporary reg save n>
It is? Are you sure??
I thought it was
% ... unused ...
% sp ---> <first unused slot>
% <space for succip>
...
Did that change?
> % `code_info__num_stackslots' counts the number of slots reserved
> % for saving local variables. XXX
Please explain the XXX.
> % The variable part of the nondet stack is organized in the same way
> % as the det stack (but the nondet stack also contains several other
> % fixed fields.)
Is this true for the saved succip slot?
> %---------------------------------------------------------------------------%
>
> % Values of this type hold information about stack frames that is
> % generated when generating prologs and is used in generating epilogs
> % and when massaging the code generated for the procedure.
>
> :- type frame_info ---> frame(
> int, % Number of slots in frame.
>
> maybe(int), % Slot number of succip
> % if succip is present
> % in a general slot.
>
> bool % Is this the frame of a
> % model_non proc defined
> % via pragma C code?
> ).
Please use the layout recommended in our Mercury coding guidelines:
:- type foo
---> foo(
...
).
(This layout leaves more room for comments.)
[... to be continued ...]
--
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.
More information about the developers
mailing list