~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
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:
23
23
 
24
24
%%--------------------------------------------------------------------
25
25
 
26
 
-spec(cfg/1 :: (#cfg{}) -> #cfg{}).
 
26
-spec cfg(#cfg{}) -> #cfg{}.
27
27
 
28
28
cfg(Cfg) ->
29
29
  Linear =  hipe_icode_cfg:cfg_to_linear(Cfg),
30
30
  #icode{code = StraightCode} = Linear,
31
 
  FinalCode = lists:flatten(lists:map(fun inline_bif/1, StraightCode)),
 
31
  FinalCode = lists:flatten([inline_bif(I) || I <- StraightCode]),
32
32
  Cfg1 = hipe_icode_cfg:linear_to_cfg(Linear#icode{code = FinalCode}),
33
33
  hipe_icode_cfg:remove_unreachable_code(Cfg1).
34
34