~ubuntu-branches/ubuntu/karmic/erlang/karmic

« back to all changes in this revision

Viewing changes to lib/hipe/misc/hipe_sdi.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
2
%%%======================================================================
3
 
%%% $Id$
 
3
%%%
 
4
%%% %CopyrightBegin%
 
5
%%% 
 
6
%%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
 
7
%%% 
 
8
%%% The contents of this file are subject to the Erlang Public License,
 
9
%%% Version 1.1, (the "License"); you may not use this file except in
 
10
%%% compliance with the License. You should have received a copy of the
 
11
%%% Erlang Public License along with this software. If not, it can be
 
12
%%% retrieved online at http://www.erlang.org/.
 
13
%%% 
 
14
%%% Software distributed under the License is distributed on an "AS IS"
 
15
%%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
16
%%% the License for the specific language governing rights and limitations
 
17
%%% under the License.
 
18
%%% 
 
19
%%% %CopyrightEnd%
4
20
%%%
5
21
%%% An implementation of the algorithm described in:
6
22
%%% "Assembling Code for Machines with Span-Dependent Instructions",
18
34
 
19
35
%%------------------------------------------------------------------------
20
36
 
21
 
-type gb_tree()    :: tuple().   % temporarily until there is a proper datatype
22
37
-type hipe_array() :: integer(). % declare this in hipe.hrl or builtin?
23
38
 
24
39
-type label()      :: non_neg_integer().
33
48
                       label   :: label(),
34
49
                       si      :: #sdi_info{}}).
35
50
 
36
 
-record(pass1, {prevSdi   :: integer(),
37
 
                preS = [] :: [#pre_sdi_data{}],
38
 
                labelMap  :: gb_tree()}).
 
51
-record(pass1, {prevSdi                     :: integer(),
 
52
                preS     = []               :: [#pre_sdi_data{}],
 
53
                labelMap = gb_trees:empty() :: gb_tree()}).
39
54
 
40
55
-record(sdi_data, {address       :: address(),
41
56
                   label_address :: address(),
74
89
 
75
90
-spec pass1_init() -> #pass1{}.
76
91
pass1_init() ->
77
 
  #pass1{prevSdi=(-1), preS=[], labelMap=gb_trees:empty()}.
 
92
  #pass1{prevSdi = -1}.
78
93
 
79
94
-spec pass1_add_label(#pass1{}, non_neg_integer(), label()) -> #pass1{}.
80
95
pass1_add_label(Pass1, Address, Label) ->