[m-rev.] diff: no insts for debugging

Paul Bone pbone at csse.unimelb.edu.au
Tue May 24 14:10:40 AEST 2011


On Tue, May 24, 2011 at 10:52:15AM +1000, Zoltan Somogyi wrote:
> Index: compiler/llds_out_instr.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out_instr.m,v
> retrieving revision 1.7
> diff -u -b -r1.7 llds_out_instr.m
> --- compiler/llds_out_instr.m	23 May 2011 05:08:04 -0000	1.7
> +++ compiler/llds_out_instr.m	23 May 2011 13:09:59 -0000
> @@ -1255,7 +1255,7 @@
>      io.write_string("type region ite", !IO).
>  output_live_value_type(live_value_unwanted, !IO) :-
>      io.write_string("unwanted", !IO).
> -output_live_value_type(live_value_var(Var, Name, Type, LldsInst), !IO) :-
> +output_live_value_type(live_value_var(Var, Name, Type, _LldsInst), !IO) :-
>      io.write_string("var(", !IO),
>      term.var_to_int(Var, VarInt),
>      io.write_int(VarInt, !IO),
> @@ -1265,16 +1265,16 @@
>      % XXX Fake type varset
>      varset.init(NewTVarset),
>      mercury_output_type(NewTVarset, no, Type, !IO),
> -    io.write_string(", ", !IO),
> -    (
> -        LldsInst = llds_inst_ground,
> -        io.write_string("ground", !IO)
> -    ;
> -        LldsInst = llds_inst_partial(Inst),
> -        % XXX Fake inst varset
> -        varset.init(NewIVarset),
> -        mercury_output_inst(Inst, NewIVarset, !IO)
> -    ),
> +%   io.write_string(", ", !IO),
> +%   (
> +%       LldsInst = llds_inst_ground,
> +%       io.write_string("ground", !IO)
> +%   ;
> +%       LldsInst = llds_inst_partial(Inst),
> +%       % XXX Fake inst varset
> +%       varset.init(NewIVarset),
> +%       mercury_output_inst(Inst, NewIVarset, !IO)
> +%   ),
>      io.write_string(")", !IO).
>  
>  %----------------------------------------------------------------------------%

I know you didn't request a review, but someone reading this module might not
know why this is commented out.  (I assume it's because variable insts arn't
necessarly available for printing).

> Index: compiler/trace_gen.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_gen.m,v
> retrieving revision 1.37
> diff -u -b -r1.37 trace_gen.m
> --- compiler/trace_gen.m	23 May 2011 05:08:14 -0000	1.37
> +++ compiler/trace_gen.m	23 May 2011 13:10:36 -0000
> @@ -1207,21 +1207,22 @@
>      set(tvar)::in, set(tvar)::out, layout_var_info::out, llds_code::out,
>      code_info::in, code_info::out) is det.
>  
> -trace_produce_var(Var, VarSet, InstMap, !Tvars, VarInfo, VarCode, !CI) :-
> +trace_produce_var(Var, VarSet, _InstMap, !Tvars, VarInfo, VarCode, !CI) :-
>      produce_variable_in_reg_or_stack(Var, VarCode, Lval, !CI),
>      Type = variable_type(!.CI, Var),
> -    get_module_info(!.CI, ModuleInfo),
>      ( varset.search_name(VarSet, Var, SearchName) ->
>          Name = SearchName
>      ;
>          Name = ""
>      ),
> -    instmap_lookup_var(InstMap, Var, Inst),
> -    ( inst_match.inst_is_ground(ModuleInfo, Inst) ->
> -        LldsInst = llds_inst_ground
> -    ;
> -        LldsInst = llds_inst_partial(Inst)
> -    ),
> +%   get_module_info(!.CI, ModuleInfo),
> +%   instmap_lookup_var(InstMap, Var, Inst),
> +%   ( inst_match.inst_is_ground(ModuleInfo, Inst) ->
> +%       LldsInst = llds_inst_ground
> +%   ;
> +%       LldsInst = llds_inst_partial(Inst)
> +%   ),
> +    LldsInst = llds_inst_better_be_ground,
>      LiveType = live_value_var(Var, Name, Type, LldsInst),
>      VarInfo = layout_var_info(locn_direct(Lval), LiveType, "trace"),
>      type_vars(Type, TypeVars),

And here.

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20110524/b24c52d7/attachment.sig>


More information about the reviews mailing list