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

« 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-07 15:07:37 UTC
  • mfrom: (1.2.1 upstream) (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090507150737-i4yb5elwinm7r0hc
Tags: 1:13.b-dfsg1-1
* Removed another bunch of non-free RFCs from original tarball
  (closes: #527053).
* Fixed build-dependencies list by adding missing comma. This requires
  libsctp-dev again. Also, added libsctp1 dependency to erlang-base and
  erlang-base-hipe packages because the shared library is loaded via
  dlopen now and cannot be added using dh_slibdeps (closes: #526682).
* Weakened dependency of erlang-webtool on erlang-observer to recommends
  to avoid circular dependencies (closes: #526627).
* Added solaris-i386 to HiPE enabled architectures.
* Made script sources in /usr/lib/erlang/erts-*/bin directory executable,
  which is more convenient if a user wants to create a target Erlang system.
* Shortened extended description line for erlang-dev package to make it
  fit 80x25 terminals.

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) ->