~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/hipe/icode/hipe_icode_pp.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
%%---------------------------------------------------------------------
33
33
 
34
 
-type(io_device() :: any()).    %% XXX: DOES NOT BELONG HERE
 
34
-type io_device() :: any().     %% XXX: DOES NOT BELONG HERE
35
35
 
36
36
%%---------------------------------------------------------------------
37
37
 
38
 
-spec(pp/1 :: (#icode{}) -> 'ok').
 
38
-spec pp(#icode{}) -> 'ok'.
39
39
%% @doc Prettyprints linear Icode on stdout.
40
40
%%  <p> Badly formed or unknown instructions are printed surrounded
41
41
%%      by three stars "***".</p>
42
42
pp(Icode) ->
43
43
  pp(standard_io, Icode).
44
44
 
45
 
-spec(pp/2 :: (io_device(), #icode{}) -> 'ok').
 
45
-spec pp(io_device(), #icode{}) -> 'ok'.
46
46
%% @doc Prettyprints linear Icode on IoDevice.
47
47
%%  <p> Badly formed or unknown instructions are printed surrounded by
48
48
%%      three stars "***".</p>
66
66
  io:format(Dev, "%% Data:\n", []),
67
67
  hipe_data_pp:pp(Dev, hipe_icode:icode_data(Icode), icode, "").
68
68
 
69
 
-spec(pp_block/1 :: (icode_instrs()) -> 'ok').
 
69
-spec pp_block(icode_instrs()) -> 'ok'.
70
70
pp_block(Code) ->
71
71
  pp_instrs(standard_io, Code).
72
72
 
73
 
-spec(pp_instrs/2 :: (io_device(), icode_instrs()) -> 'ok').
 
73
-spec pp_instrs(io_device(), icode_instrs()) -> 'ok'.
74
74
%% @doc Prettyprints a list of Icode instructions.
75
75
pp_instrs(Dev, Is) ->
76
76
  lists:foreach(fun (I) -> pp_instr(Dev, I) end, Is).