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

« back to all changes in this revision

Viewing changes to lib/hipe/util/hipe_vector.erl

  • Committer: Bazaar Package Importer
  • Author(s): Erlang Packagers, Sergei Golovan
  • Date: 2006-12-03 17:07:44 UTC
  • mfrom: (2.1.11 feisty)
  • Revision ID: james.westby@ubuntu.com-20061203170744-rghjwupacqlzs6kv
Tags: 1:11.b.2-4
[ Sergei Golovan ]
Fixed erlang-base and erlang-base-hipe prerm scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%%% $Id$
2
 
%%% A thin abstraction layer which permits plugging in alternative
3
 
%%% implementations in place of BEAM's built-in 'vector:' operations.
4
 
%%%
5
 
%%% This module implements any support functions needed by the
6
 
%%% macros defined in hipe_vector.hrl.
7
 
 
8
 
-module(hipe_vector).
9
 
 
10
 
-include("hipe_vector.hrl").
11
 
 
12
 
-ifdef(VECTOR_USING_GBTREES).
13
 
 
14
 
-export([from_list_gb/1]).
15
 
 
16
 
from_list_gb(List) ->
17
 
    from_list_gb(List, 1, []).
18
 
 
19
 
from_list_gb([Value|Values], Index, RevOrdDict) ->
20
 
    from_list_gb(Values, Index+1, [{Index,Value}|RevOrdDict]);
21
 
from_list_gb([], _, RevOrdDict) ->
22
 
    gb_trees:from_orddict(lists:reverse(RevOrdDict)).
23
 
 
24
 
-endif.