2
%%% A thin abstraction layer which permits plugging in alternative
3
%%% implementations in place of BEAM's built-in 'vector:' operations.
5
%%% This module implements any support functions needed by the
6
%%% macros defined in hipe_vector.hrl.
10
-include("hipe_vector.hrl").
12
-ifdef(VECTOR_USING_GBTREES).
14
-export([from_list_gb/1]).
17
from_list_gb(List, 1, []).
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)).