~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-01 10:14:38 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090501101438-6qlr6rsdxgyzrg2z
Tags: 1:13.b-dfsg-2
* Cleaned up patches: removed unneeded patch which helped to support
  different SCTP library versions, made sure that changes for m68k
  architecture applied only when building on this architecture.
* Removed duplicated information from binary packages descriptions.
* Don't require libsctp-dev build-dependency on solaris-i386 architecture
  which allows to build Erlang on Nexenta (thanks to Tim Spriggs for
  the suggestion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%% -*- erlang-indent-level: 2 -*-
 
2
%%
 
3
%% %CopyrightBegin%
 
4
%% 
 
5
%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
 
6
%% 
 
7
%% The contents of this file are subject to the Erlang Public License,
 
8
%% Version 1.1, (the "License"); you may not use this file except in
 
9
%% compliance with the License. You should have received a copy of the
 
10
%% Erlang Public License along with this software. If not, it can be
 
11
%% retrieved online at http://www.erlang.org/.
 
12
%% 
 
13
%% Software distributed under the License is distributed on an "AS IS"
 
14
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
15
%% the License for the specific language governing rights and limitations
 
16
%% under the License.
 
17
%% 
 
18
%% %CopyrightEnd%
 
19
%%
2
20
%% ====================================================================
3
21
%%  Filename :  hipe_icode_exceptions.erl
4
22
%%  Module   :  hipe_icode_exceptions
364
382
%%---------------------------------------------------------------------
365
383
%% State abstraction
366
384
 
367
 
-record(state, {cfg                    :: #cfg{},
368
 
                changed = false        :: bool(),
369
 
                succ                   :: #cfg{},
370
 
                pred                   :: #cfg{},
371
 
                start_labels           :: [icode_lbl(),...],
372
 
                visited                :: gb_set(),
373
 
                out = gb_trees:empty() :: gb_tree(),
374
 
                in  = gb_trees:empty() :: gb_tree()
 
385
-record(state, {cfg                                     :: #cfg{},
 
386
                changed = false                         :: bool(),
 
387
                succ                                    :: #cfg{},
 
388
                pred                                    :: #cfg{},
 
389
                start_labels                            :: [icode_lbl(),...],
 
390
                visited = hipe_icode_cfg:none_visited() :: gb_set(),
 
391
                out     = gb_trees:empty()              :: gb_tree(),
 
392
                in      = gb_trees:empty()              :: gb_tree()
375
393
               }).
376
394
 
377
395
init_state(CFG) ->
378
 
  State = #state{cfg = CFG,
379
 
                 visited = hipe_icode_cfg:none_visited(),
380
 
                 out = gb_trees:empty(),
381
 
                 in = gb_trees:empty()
382
 
                },
 
396
  State = #state{cfg = CFG},
383
397
  refresh_state_cache(State).
384
398
 
385
399
refresh_state_cache(State) ->
386
400
  CFG = State#state.cfg,
387
 
  State#state{succ = CFG,
388
 
              pred = CFG,
389
 
              start_labels = [hipe_icode_cfg:start_label(CFG)]
390
 
             }.
 
401
  SLs = [hipe_icode_cfg:start_label(CFG)],
 
402
  State#state{succ = CFG, pred = CFG, start_labels = SLs}.
391
403
 
392
404
get_cfg(State) ->
393
405
  State#state.cfg.
458
470
  get_new_catches_in(Ps, Cs1, State);
459
471
get_new_catches_in([], Cs, _) ->
460
472
  Cs.
461
 
          
462
473
 
463
474
%%---------------------------------------------------------------------