diff options
Diffstat (limited to 'lib/hipe')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 198 | ||||
-rw-r--r-- | lib/hipe/cerl/erl_types.erl | 168 | ||||
-rw-r--r-- | lib/hipe/doc/src/make.dep | 13 | ||||
-rw-r--r-- | lib/hipe/doc/src/notes.xml | 98 | ||||
-rw-r--r-- | lib/hipe/icode/hipe_beam_to_icode.erl | 13 | ||||
-rw-r--r--[-rwxr-xr-x] | lib/hipe/icode/hipe_icode_pp.erl | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | lib/hipe/icode/hipe_icode_ssa.erl | 0 | ||||
-rw-r--r-- | lib/hipe/main/hipe.hrl.src | 9 | ||||
-rw-r--r-- | lib/hipe/regalloc/hipe_node_sets.erl | 4 | ||||
-rw-r--r-- | lib/hipe/rtl/Makefile | 26 | ||||
-rw-r--r-- | lib/hipe/rtl/hipe_rtl_lcm.erl | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | lib/hipe/util/hipe_dot.erl | 0 | ||||
-rw-r--r-- | lib/hipe/vsn.mk | 2 |
13 files changed, 353 insertions, 182 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 30b911c41b..1483b2aee1 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -45,6 +45,7 @@ t_atom_vals/1, t_binary/0, t_bitstr/0, + t_bitstrlist/0, t_boolean/0, t_byte/0, t_char/0, @@ -153,7 +154,7 @@ type(binary, bin_to_list, Arity, Xs) when 1 =< Arity, Arity =< 3 -> fun(_) -> t_list(t_integer()) end); type(binary, compile_pattern, 1, Xs) -> strict(arg_types(binary, compile_pattern, 1), Xs, - fun(_) -> t_tuple([t_atom(bm),t_binary()]) end); + fun(_) -> t_binary_compiled_pattern() end); type(binary, copy, Arity, Xs) when Arity =:= 1; Arity =:= 2 -> strict(arg_types(binary, copy, Arity), Xs, fun(_) -> t_binary() end); @@ -365,7 +366,7 @@ type(erlang, '>', 2, Xs = [Lhs, Rhs]) -> is_integer(LhsMax), is_integer(RhsMin), RhsMin >= LhsMax -> F; true -> t_boolean() end; - false -> t_boolean() + false -> compare('>', Lhs, Rhs) end, strict(Xs, Ans); type(erlang, '>=', 2, Xs = [Lhs, Rhs]) -> @@ -383,7 +384,7 @@ type(erlang, '>=', 2, Xs = [Lhs, Rhs]) -> is_integer(LhsMax), is_integer(RhsMin), RhsMin > LhsMax -> F; true -> t_boolean() end; - false -> t_boolean() + false -> compare('>=', Lhs, Rhs) end, strict(Xs, Ans); type(erlang, '<', 2, Xs = [Lhs, Rhs]) -> @@ -401,7 +402,7 @@ type(erlang, '<', 2, Xs = [Lhs, Rhs]) -> is_integer(LhsMin), is_integer(RhsMax), RhsMax =< LhsMin -> F; true -> t_boolean() end; - false -> t_boolean() + false -> compare('<', Lhs, Rhs) end, strict(Xs, Ans); type(erlang, '=<', 2, Xs = [Lhs, Rhs]) -> @@ -419,7 +420,7 @@ type(erlang, '=<', 2, Xs = [Lhs, Rhs]) -> is_integer(LhsMin), is_integer(RhsMax), RhsMax < LhsMin -> F; true -> t_boolean() end; - false -> t_boolean() + false -> compare('=<', Lhs, Rhs) end, strict(Xs, Ans); type(erlang, '+', 1, Xs) -> @@ -671,11 +672,12 @@ type(erlang, call_on_load_function, 1, Xs) -> type(erlang, cancel_timer, 1, Xs) -> strict(arg_types(erlang, cancel_timer, 1), Xs, fun (_) -> t_sup(t_integer(), t_atom('false')) end); +type(erlang, check_old_code, 1, Xs) -> + strict(arg_types(erlang, check_old_code, 1), Xs, + fun (_) -> t_boolean() end); type(erlang, check_process_code, 2, Xs) -> strict(arg_types(erlang, check_process_code, 2), Xs, fun (_) -> t_boolean() end); -type(erlang, concat_binary, 1, Xs) -> - strict(arg_types(erlang, concat_binary, 1), Xs, fun (_) -> t_binary() end); type(erlang, crc32, 1, Xs) -> strict(arg_types(erlang, crc32, 1), Xs, fun (_) -> t_crc32() end); type(erlang, crc32, 2, Xs) -> @@ -701,7 +703,7 @@ type(erlang, demonitor, 1, Xs) -> type(erlang, demonitor, 2, Xs) -> strict(arg_types(erlang, demonitor, 2), Xs, fun (_) -> t_boolean() end); type(erlang, disconnect_node, 1, Xs) -> - strict(arg_types(erlang, disconnect_node, 1), Xs, fun (_) -> t_boolean() end); + strict(arg_types(erlang, disconnect_node, 1), Xs, fun (_) -> t_sup([t_boolean(), t_atom('ignored')]) end); type(erlang, display, 1, _) -> t_atom('true'); type(erlang, display_string, 1, Xs) -> strict(arg_types(erlang, display_string, 1), Xs, fun(_) -> t_atom('true') end); @@ -735,6 +737,7 @@ type(erlang, element, 2, Xs) -> type(erlang, erase, 0, _) -> t_any(); type(erlang, erase, 1, _) -> t_any(); type(erlang, external_size, 1, _) -> t_integer(); +type(erlang, external_size, 2, _) -> t_integer(); type(erlang, finish_after_on_load, 2, Xs) -> %% Internal BIF used by on_load. strict(arg_types(erlang, finish_after_on_load, 2), Xs, @@ -796,7 +799,8 @@ type(erlang, get_module_info, 2, Xs) -> end end); type(erlang, get_stacktrace, 0, _) -> - t_list(t_tuple([t_atom(), t_atom(), t_sup([t_arity(), t_list()])])); + t_list(t_tuple([t_atom(), t_atom(), t_sup([t_arity(), t_list()]), + t_list()])); type(erlang, group_leader, 0, _) -> t_pid(); type(erlang, group_leader, 2, Xs) -> strict(arg_types(erlang, group_leader, 2), Xs, @@ -1123,7 +1127,7 @@ type(erlang, nodes, 0, _) -> t_list(t_node()); type(erlang, nodes, 1, Xs) -> strict(arg_types(erlang, nodes, 1), Xs, fun (_) -> t_list(t_node()) end); type(erlang, now, 0, _) -> - t_time(); + t_timestamp(); type(erlang, open_port, 2, Xs) -> strict(arg_types(erlang, open_port, 2), Xs, fun (_) -> t_port() end); type(erlang, phash, 2, Xs) -> @@ -1198,6 +1202,7 @@ type(erlang, process_flag, 2, Xs) -> case t_atom_vals(Flag) of ['error_handler'] -> t_atom(); ['min_heap_size'] -> t_non_neg_integer(); + ['scheduler'] -> t_non_neg_integer(); ['monitor_nodes'] -> t_boolean(); ['priority'] -> t_process_priority_level(); ['save_calls'] -> t_non_neg_integer(); @@ -1584,8 +1589,7 @@ type(erlang, system_info, 1, Xs) -> ['multi_scheduling_blockers'] -> t_list(t_pid()); ['os_type'] -> - t_tuple([t_sup([t_atom('ose'), % XXX: undocumented - t_atom('unix'), + t_tuple([t_sup([t_atom('unix'), t_atom('vxworks'), t_atom('win32')]), t_atom()]); @@ -1899,7 +1903,7 @@ type(prim_file, internal_native2name, 1, Xs) -> fun (_) -> t_prim_file_name() end); type(prim_file, internal_normalize_utf8, 1, Xs) -> strict(arg_types(prim_file, internal_normalize_utf8, 1), Xs, - fun (_) -> t_binary() end); + fun (_) -> t_unicode_string() end); %%-- gen_tcp ------------------------------------------------------------------ %% NOTE: All type information for this module added to avoid loss of precision type(gen_tcp, accept, 1, Xs) -> @@ -2324,10 +2328,7 @@ type(lists, keyfind, 3, Xs) -> case t_tuple_subtypes(Tuple) of unknown -> Ret; List -> - Keys = [type(erlang, element, 2, [Y, S]) - || S <- List], - Infs = [t_inf(Key, X) || Key <- Keys], - case all_is_none(Infs) of + case key_comparisons_fail(X, Y, List) of true -> t_atom('false'); false -> Ret end @@ -2357,9 +2358,7 @@ type(lists, keymember, 3, Xs) -> case t_tuple_subtypes(Tuple) of unknown -> t_boolean(); List -> - Keys = [type(erlang, element, 2, [Y,S]) || S <- List], - Infs = [t_inf(Key, X) || Key <- Keys], - case all_is_none(Infs) of + case key_comparisons_fail(X, Y, List) of true -> t_atom('false'); false -> t_boolean() end @@ -2389,10 +2388,7 @@ type(lists, keysearch, 3, Xs) -> case t_tuple_subtypes(Tuple) of unknown -> Ret; List -> - Keys = [type(erlang, element, 2, [Y, S]) - || S <- List], - Infs = [t_inf(Key, X) || Key <- Keys], - case all_is_none(Infs) of + case key_comparisons_fail(X, Y, List) of true -> t_atom('false'); false -> Ret end @@ -2692,7 +2688,7 @@ type(os, getpid, 0, _) -> t_string(); type(os, putenv, 2, Xs) -> strict(arg_types(os, putenv, 2), Xs, fun (_) -> t_atom('true') end); type(os, timestamp, 0, _) -> - t_time(); + t_timestamp(); %%-- re ----------------------------------------------------------------------- type(re, compile, 1, Xs) -> strict(arg_types(re, compile, 1), Xs, @@ -2820,9 +2816,6 @@ list_replace(1, E, [_X | Xs]) -> any_is_none_or_unit(Ts) -> lists:any(fun erl_types:t_is_none_or_unit/1, Ts). -all_is_none(Ts) -> - lists:all(fun erl_types:t_is_none/1, Ts). - check_guard([X], Test, Type) -> check_guard_single(X, Test, Type). @@ -3175,6 +3168,59 @@ arith(Op, X1, X2) -> end. %%============================================================================= +%% Comparison of terms +%%============================================================================= + +compare(Op, Lhs, Rhs) -> + case t_is_none(t_inf(Lhs, Rhs)) of + false -> t_boolean(); + true -> + case Op of + '<' -> always_smaller(Lhs, Rhs); + '>' -> always_smaller(Rhs, Lhs); + '=<' -> always_smaller(Lhs, Rhs); + '>=' -> always_smaller(Rhs, Lhs) + end + end. + +always_smaller(Type1, Type2) -> + {Min1, Max1} = type_ranks(Type1), + {Min2, Max2} = type_ranks(Type2), + if Max1 < Min2 -> t_atom('true'); + Min1 > Max2 -> t_atom('false'); + true -> t_boolean() + end. + +type_ranks(Type) -> + type_ranks(Type, 1, 0, 0, type_order()). + +type_ranks(_Type, _I, Min, Max, []) -> {Min, Max}; +type_ranks(Type, I, Min, Max, [TypeClass|Rest]) -> + {NewMin, NewMax} = + case t_is_none(t_inf(Type, TypeClass)) of + true -> {Min, Max}; + false -> case Min of + 0 -> {I, I}; + _ -> {Min, I} + end + end, + type_ranks(Type, I+1, NewMin, NewMax, Rest). + +type_order() -> + [t_number(), t_atom(), t_reference(), t_fun(), t_port(), t_pid(), t_tuple(), + t_list(), t_binary()]. + +key_comparisons_fail(X0, KeyPos, TupleList) -> + X = case t_is_number(t_inf(X0, t_number())) of + false -> X0; + true -> t_number() + end, + lists:all(fun(Tuple) -> + Key = type(erlang, element, 2, [KeyPos, Tuple]), + t_is_none(t_inf(Key, X)) + end, TupleList). + +%%============================================================================= -spec arg_types(atom(), atom(), arity()) -> [erl_types:erl_type()] | 'unknown'. @@ -3395,10 +3441,10 @@ arg_types(erlang, call_on_load_function, 1) -> [t_atom()]; arg_types(erlang, cancel_timer, 1) -> [t_reference()]; +arg_types(erlang, check_old_code, 1) -> + [t_atom()]; arg_types(erlang, check_process_code, 2) -> [t_pid(), t_atom()]; -arg_types(erlang, concat_binary, 1) -> - [t_list(t_binary())]; arg_types(erlang, crc32, 1) -> [t_iodata()]; arg_types(erlang, crc32, 2) -> @@ -3441,6 +3487,8 @@ arg_types(erlang, exit, 2) -> [t_sup(t_pid(), t_port()), t_any()]; arg_types(erlang, external_size, 1) -> [t_any()]; % takes any term as input +arg_types(erlang, external_size, 2) -> + [t_any(), t_list()]; % takes any term as input and a list of options arg_types(erlang, finish_after_on_load, 2) -> [t_atom(), t_boolean()]; arg_types(erlang, float, 1) -> @@ -3552,7 +3600,7 @@ arg_types(erlang, list_to_binary, 1) -> arg_types(erlang, list_to_bitstr, 1) -> % XXX: TAKE OUT arg_types(erlang, list_to_bitstring, 1); arg_types(erlang, list_to_bitstring, 1) -> - [t_iolist()]; + [t_bitstrlist()]; arg_types(erlang, list_to_existing_atom, 1) -> [t_string()]; arg_types(erlang, list_to_float, 1) -> @@ -3695,6 +3743,7 @@ arg_types(erlang, process_display, 2) -> arg_types(erlang, process_flag, 2) -> [t_sup([t_atom('trap_exit'), t_atom('error_handler'), t_atom('min_heap_size'), t_atom('priority'), t_atom('save_calls'), + t_atom('scheduler'), % undocumented t_atom('monitor_nodes'), % undocumented t_tuple([t_atom('monitor_nodes'), t_list()])]), % undocumented t_sup([t_boolean(), t_atom(), t_non_neg_integer()])]; @@ -3711,7 +3760,10 @@ arg_types(erlang, purge_module, 1) -> arg_types(erlang, put, 2) -> [t_any(), t_any()]; arg_types(erlang, raise, 3) -> - [t_raise_errorclass(), t_any(), type(erlang, get_stacktrace, 0, [])]; + OldStyleType = t_list(t_tuple([t_atom(), t_atom(), + t_sup([t_arity(), t_list()])])), + NewStyleType = type(erlang, get_stacktrace, 0, []), + [t_raise_errorclass(), t_any(), t_sup(OldStyleType, NewStyleType)]; arg_types(erlang, read_timer, 1) -> [t_reference()]; arg_types(erlang, ref_to_list, 1) -> @@ -3733,7 +3785,7 @@ arg_types(erlang, send, 3) -> arg_types(erlang, send_after, 3) -> [t_non_neg_integer(), t_sup(t_pid(), t_atom()), t_any()]; arg_types(erlang, seq_trace, 2) -> - [t_atom(), t_sup([t_boolean(), t_tuple([t_fixnum(), t_fixnum()]), t_nil()])]; + [t_atom(), t_sup([t_boolean(), t_tuple([t_fixnum(), t_fixnum()]), t_fixnum(), t_nil()])]; arg_types(erlang, seq_trace_info, 1) -> [t_seq_trace_info()]; arg_types(erlang, seq_trace_print, 1) -> @@ -3982,7 +4034,7 @@ arg_types(ets, match_object, 3) -> arg_types(ets, match_spec_compile, 1) -> [t_matchspecs()]; arg_types(ets, match_spec_run_r, 3) -> - [t_matchspecs(), t_any(), t_list()]; + [t_list(t_tuple()),t_matchspecs(), t_list()]; arg_types(ets, member, 2) -> [t_tab(), t_any()]; arg_types(ets, new, 2) -> @@ -4014,8 +4066,12 @@ arg_types(ets, select_reverse, 3) -> arg_types(ets, slot, 2) -> [t_tab(), t_non_neg_fixnum()]; % 2nd arg can be 0 arg_types(ets, setopts, 2) -> - Opt = t_sup(t_tuple([t_atom('heir'), t_pid(), t_any()]), - t_tuple([t_atom('heir'), t_atom('none')])), + Opt = t_sup([t_tuple([t_atom('heir'), t_pid(), t_any()]), + t_tuple([t_atom('heir'), t_atom('none')]), + t_tuple([t_atom('protection'), + t_sup([t_atom('protected'), + t_atom('private'), + t_atom('public')])])]), [t_tab(), t_sup(Opt, t_list(Opt))]; arg_types(ets, update_counter, 3) -> Int = t_integer(), @@ -4457,6 +4513,9 @@ t_date() -> t_time() -> t_tuple([t_non_neg_fixnum(), t_non_neg_fixnum(), t_non_neg_fixnum()]). +t_timestamp() -> + t_tuple([t_non_neg_fixnum(), t_non_neg_fixnum(), t_non_neg_fixnum()]). + t_packet() -> t_sup([t_binary(), t_iolist(), t_httppacket()]). @@ -4468,27 +4527,6 @@ t_endian() -> t_sup(t_atom('big'), t_atom('little')). %% ===================================================================== -%% Types for the binary module -%% ===================================================================== - -t_binary_part() -> - t_tuple([t_non_neg_integer(), t_integer()]). - -t_binary_canonical_part() -> - t_tuple([t_non_neg_integer(), t_non_neg_integer()]). - -t_binary_pattern() -> - t_sup([t_binary(), - t_list(t_binary()), - t_binary_compiled_pattern()]). - -t_binary_compiled_pattern() -> - t_tuple([t_atom('cp'), t_binary()]). - -t_binary_options() -> - t_list(t_tuple([t_atom('scope'), t_binary_part()])). - -%% ===================================================================== %% HTTP types documented in R12B-4 %% ===================================================================== @@ -4543,7 +4581,28 @@ t_HttpFieldAtom() -> 'Keep-Alive', 'Proxy-Connection']). t_HttpString() -> - t_sup(t_string(),t_binary()). + t_sup(t_string(), t_binary()). + +%% ===================================================================== +%% These are used for the built-in functions of 'binary' +%% ===================================================================== + +t_binary_part() -> + t_tuple([t_non_neg_integer(), t_integer()]). + +t_binary_canonical_part() -> + t_tuple([t_non_neg_integer(), t_non_neg_integer()]). + +t_binary_pattern() -> + t_sup([t_binary(), + t_list(t_binary()), + t_binary_compiled_pattern()]). + +t_binary_compiled_pattern() -> + t_tuple([t_sup(t_atom('bm'), t_atom('ac')), t_binary()]). + +t_binary_options() -> + t_list(t_tuple([t_atom('scope'), t_binary_part()])). %% ===================================================================== %% These are used for the built-in functions of 'code' @@ -4564,11 +4623,6 @@ t_code_load_error_rsn() -> % also used in erlang:load_module/2 t_atom('on_load'), t_atom('sticky_directory')]). % only for the 'code' functions -t_code_loaded_fname_or_status() -> - t_sup([t_string(), % filename - t_atom('preloaded'), - t_atom('cover_compiled')]). - %% ===================================================================== %% These are used for the built-in functions of 'erlang' %% ===================================================================== @@ -4733,7 +4787,6 @@ t_scheduler_bind_type_results() -> t_atom('thread_no_node_processor_spread'), t_atom('unbound')]). - t_system_monitor_settings() -> t_sup([t_atom('undefined'), t_tuple([t_pid(), t_system_monitor_options()])]). @@ -4810,16 +4863,12 @@ t_ets_info_items() -> t_atom('owner'), t_atom('protection'), t_atom('size'), + t_atom('compressed'), + t_atom('heir'), + t_atom('stats'), t_atom('type')]). %% ===================================================================== -%% These are used for the built-in functions of 'prim_file' -%% ===================================================================== - -t_prim_file_name() -> - t_sup(t_unicode_string(), t_binary()). - -%% ===================================================================== %% These are used for the built-in functions of 'gen_tcp' %% ===================================================================== @@ -5013,6 +5062,13 @@ t_re_CapturedData() -> t_sup([t_tuple([t_integer(), t_integer()]), t_string(), t_binary()]). %% ===================================================================== +%% These are used for the built-in functions of 'prim_file' +%% ===================================================================== + +t_prim_file_name() -> + t_sup(t_unicode_string(), t_binary()). + +%% ===================================================================== %% These are used for the built-in functions of 'unicode' %% ===================================================================== diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index 080d6936b2..0ff827ac37 100644 --- a/lib/hipe/cerl/erl_types.erl +++ b/lib/hipe/cerl/erl_types.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2010. All Rights Reserved. +%% Copyright Ericsson AB 2003-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -59,6 +59,7 @@ t_bitstr_concat/2, t_bitstr_match/2, t_bitstr_unit/1, + t_bitstrlist/0, t_boolean/0, t_byte/0, t_char/0, @@ -210,7 +211,8 @@ record_field_diffs_to_string/2, subst_all_vars_to_any/1, lift_list_to_pos_empty/1, - is_erl_type/1 + is_erl_type/1, + atom_to_string/1 ]). %%-define(DO_ERL_TYPES_TEST, true). @@ -241,12 +243,11 @@ -define(REC_TYPE_LIMIT, 2). -define(TUPLE_TAG_LIMIT, 5). --define(TUPLE_ARITY_LIMIT, 10). +-define(TUPLE_ARITY_LIMIT, 8). -define(SET_LIMIT, 13). -define(MAX_BYTE, 255). -define(MAX_CHAR, 16#10ffff). --define(WIDENING_LIMIT, 7). -define(UNIT_MULTIPLIER, 8). -define(TAG_IMMED1_SIZE, 4). @@ -1457,11 +1458,11 @@ t_is_tuple(_) -> false. %% Non-primitive types, including some handy syntactic sugar types %% --spec t_unicode_string() -> erl_type(). +-spec t_bitstrlist() -> erl_type(). + +t_bitstrlist() -> + t_iolist(1, t_bitstr()). -t_unicode_string() -> - t_list(t_unicode_char()). - -spec t_charlist() -> erl_type(). t_charlist() -> @@ -1551,15 +1552,16 @@ t_iodata() -> -spec t_iolist() -> erl_type(). t_iolist() -> - t_iolist(1). + t_iolist(1, t_binary()). --spec t_iolist(non_neg_integer()) -> erl_type(). +%% Added a second argument which currently is t_binary() | t_bitstr() +-spec t_iolist(non_neg_integer(), erl_type()) -> erl_type(). -t_iolist(N) when N > 0 -> - t_maybe_improper_list(t_sup([t_iolist(N-1), t_binary(), t_byte()]), - t_sup(t_binary(), t_nil())); -t_iolist(0) -> - t_maybe_improper_list(t_any(), t_sup(t_binary(), t_nil())). +t_iolist(N, T) when N > 0 -> + t_maybe_improper_list(t_sup([t_iolist(N-1, T), T, t_byte()]), + t_sup(T, t_nil())); +t_iolist(0, T) -> + t_maybe_improper_list(t_any(), t_sup(T, t_nil())). -spec t_parameterized_module() -> erl_type(). @@ -1581,6 +1583,11 @@ t_unicode_binary() -> t_unicode_char() -> t_integer(). % representing a valid unicode codepoint +-spec t_unicode_string() -> erl_type(). + +t_unicode_string() -> + t_list(t_unicode_char()). + %%----------------------------------------------------------------------------- %% Some built-in opaque types %% @@ -3220,16 +3227,16 @@ t_to_string(?atom(Set), _RecDict) -> _ -> set_to_string(Set) end; -t_to_string(?bitstr(8, 0), _RecDict) -> - "binary()"; t_to_string(?bitstr(0, 0), _RecDict) -> "<<>>"; +t_to_string(?bitstr(8, 0), _RecDict) -> + "binary()"; t_to_string(?bitstr(0, B), _RecDict) -> - io_lib:format("<<_:~w>>", [B]); + lists:flatten(io_lib:format("<<_:~w>>", [B])); t_to_string(?bitstr(U, 0), _RecDict) -> - io_lib:format("<<_:_*~w>>", [U]); + lists:flatten(io_lib:format("<<_:_*~w>>", [U])); t_to_string(?bitstr(U, B), _RecDict) -> - io_lib:format("<<_:~w,_:_*~w>>", [B, U]); + lists:flatten(io_lib:format("<<_:~w,_:_*~w>>", [B, U])); t_to_string(?function(?any, ?any), _RecDict) -> "fun()"; t_to_string(?function(?any, Range), RecDict) -> @@ -3238,16 +3245,18 @@ t_to_string(?function(?product(ArgList), Range), RecDict) -> "fun((" ++ comma_sequence(ArgList, RecDict) ++ ") -> " ++ t_to_string(Range, RecDict) ++ ")"; t_to_string(?identifier(Set), _RecDict) -> - if Set =:= ?any -> "identifier()"; - true -> sequence([io_lib:format("~w()", [T]) - || T <- set_to_list(Set)], [], " | ") + case Set of + ?any -> "identifier()"; + _ -> + string:join([io_lib:format("~w()", [T]) || T <- set_to_list(Set)], " | ") end; t_to_string(?opaque(Set), _RecDict) -> - sequence([case is_opaque_builtin(Mod, Name) of - true -> io_lib:format("~w()", [Name]); - false -> io_lib:format("~w:~w()", [Mod, Name]) - end - || #opaque{mod = Mod, name = Name} <- set_to_list(Set)], [], " | "); + string:join([case is_opaque_builtin(Mod, Name) of + true -> io_lib:format("~w()", [Name]); + false -> io_lib:format("~w:~w()", [Mod, Name]) + end + || #opaque{mod = Mod, name = Name} <- set_to_list(Set)], + " | "); t_to_string(?matchstate(Pres, Slots), RecDict) -> io_lib:format("ms(~s,~s)", [t_to_string(Pres, RecDict), t_to_string(Slots,RecDict)]); @@ -3321,14 +3330,15 @@ t_to_string(?number(?any, ?unknown_qual), _RecDict) -> "number()"; t_to_string(?product(List), RecDict) -> "<" ++ comma_sequence(List, RecDict) ++ ">"; t_to_string(?remote(Set), RecDict) -> - sequence([case Args =:= [] of - true -> io_lib:format("~w:~w()", [Mod, Name]); - false -> - ArgString = comma_sequence(Args, RecDict), - io_lib:format("~w:~w(~s)", [Mod, Name, ArgString]) - end - || #remote{mod = Mod, name = Name, args = Args} <- set_to_list(Set)], - [], " | "); + string:join([case Args =:= [] of + true -> io_lib:format("~w:~w()", [Mod, Name]); + false -> + ArgString = comma_sequence(Args, RecDict), + io_lib:format("~w:~w(~s)", [Mod, Name, ArgString]) + end + || #remote{mod = Mod, name = Name, args = Args} <- + set_to_list(Set)], + " | "); t_to_string(?tuple(?any, ?any, ?any), _RecDict) -> "tuple()"; t_to_string(?tuple(Elements, _Arity, ?any), RecDict) -> "{" ++ comma_sequence(Elements, RecDict) ++ "}"; @@ -3350,14 +3360,14 @@ t_to_string(?var(Id), _RecDict) when is_integer(Id) -> record_to_string(Tag, [_|Fields], FieldNames, RecDict) -> FieldStrings = record_fields_to_string(Fields, FieldNames, RecDict, []), - "#" ++ atom_to_list(Tag) ++ "{" ++ sequence(FieldStrings, [], ",") ++ "}". + "#" ++ atom_to_string(Tag) ++ "{" ++ string:join(FieldStrings, ",") ++ "}". record_fields_to_string([F|Fs], [{FName, _DefType}|FDefs], RecDict, Acc) -> NewAcc = case t_is_any(F) orelse t_is_atom('undefined', F) of true -> Acc; false -> - StrFV = atom_to_list(FName) ++ "::" ++ t_to_string(F, RecDict), + StrFV = atom_to_string(FName) ++ "::" ++ t_to_string(F, RecDict), %% ActualDefType = t_subtract(DefType, t_atom('undefined')), %% Str = case t_is_any(ActualDefType) of %% true -> StrFV; @@ -3376,14 +3386,14 @@ record_field_diffs_to_string(?tuple([_|Fs], Arity, Tag), RecDict) -> {ok, FieldNames} = lookup_record(TagAtom, Arity-1, RecDict), %% io:format("RecCElems = ~p\nRecTypes = ~p\n", [Fs, FieldNames]), FieldDiffs = field_diffs(Fs, FieldNames, RecDict, []), - sequence(FieldDiffs, [], " and "). + string:join(FieldDiffs, " and "). field_diffs([F|Fs], [{FName, DefType}|FDefs], RecDict, Acc) -> NewAcc = case t_is_subtype(F, DefType) of true -> Acc; false -> - Str = atom_to_list(FName) ++ "::" ++ t_to_string(DefType, RecDict), + Str = atom_to_string(FName) ++ "::" ++ t_to_string(DefType, RecDict), [Str|Acc] end, field_diffs(Fs, FDefs, RecDict, NewAcc); @@ -3395,21 +3405,11 @@ comma_sequence(Types, RecDict) -> true -> "_"; false -> t_to_string(T, RecDict) end || T <- Types], - sequence(List, ","). + string:join(List, ","). union_sequence(Types, RecDict) -> List = [t_to_string(T, RecDict) || T <- Types], - sequence(List, " | "). - -sequence(List, Delimiter) -> - sequence(List, [], Delimiter). - -sequence([], [], _Delimiter) -> - []; -sequence([T], Acc, _Delimiter) -> - lists:flatten(lists:reverse([T|Acc])); -sequence([T|Ts], Acc, Delimiter) -> - sequence(Ts, [T ++ Delimiter|Acc], Delimiter). + string:join(List, " | "). %%============================================================================= %% @@ -3490,10 +3490,8 @@ t_from_form({type, _L, binary, []}, _TypeNames, _InOpaque, _RecDict, t_from_form({type, _L, binary, [Base, Unit]} = Type, _TypeNames, _InOpaque, _RecDict, _VarDict) -> case {erl_eval:partial_eval(Base), erl_eval:partial_eval(Unit)} of - {{integer, _, BaseVal}, - {integer, _, UnitVal}} - when BaseVal >= 0, UnitVal >= 0 -> - {t_bitstr(UnitVal, BaseVal), []}; + {{integer, _, B}, {integer, _, U}} when B >= 0, U >= 0 -> + {t_bitstr(U, B), []}; _ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Type])}) end; t_from_form({type, _L, bitstring, []}, _TypeNames, _InOpaque, _RecDict, @@ -3839,26 +3837,40 @@ t_form_to_string({integer, _L, Int}) -> integer_to_list(Int); t_form_to_string({op, _L, _Op, _Arg} = Op) -> case erl_eval:partial_eval(Op) of {integer, _, _} = Int -> t_form_to_string(Int); - _ -> io_lib:format("Bad formed type ~w",[Op]) + _ -> io_lib:format("Badly formed type ~w", [Op]) end; t_form_to_string({op, _L, _Op, _Arg1, _Arg2} = Op) -> case erl_eval:partial_eval(Op) of {integer, _, _} = Int -> t_form_to_string(Int); - _ -> io_lib:format("Bad formed type ~w",[Op]) + _ -> io_lib:format("Badly formed type ~w", [Op]) end; t_form_to_string({ann_type, _L, [Var, Type]}) -> t_form_to_string(Var) ++ "::" ++ t_form_to_string(Type); t_form_to_string({paren_type, _L, [Type]}) -> io_lib:format("(~s)", [t_form_to_string(Type)]); t_form_to_string({remote_type, _L, [{atom, _, Mod}, {atom, _, Name}, Args]}) -> - ArgString = "(" ++ sequence(t_form_to_string_list(Args), ",") ++ ")", + ArgString = "(" ++ string:join(t_form_to_string_list(Args), ",") ++ ")", io_lib:format("~w:~w", [Mod, Name]) ++ ArgString; t_form_to_string({type, _L, arity, []}) -> "arity()"; +t_form_to_string({type, _L, binary, []}) -> "binary()"; +t_form_to_string({type, _L, binary, [Base, Unit]} = Type) -> + case {erl_eval:partial_eval(Base), erl_eval:partial_eval(Unit)} of + {{integer, _, B}, {integer, _, U}} -> + %% the following mirrors the clauses of t_to_string/2 + case {U, B} of + {0, 0} -> "<<>>"; + {8, 0} -> "binary()"; + {0, B} -> lists:flatten(io_lib:format("<<_:~w>>", [B])); + {U, 0} -> lists:flatten(io_lib:format("<<_:_*~w>>", [U])); + {U, B} -> lists:flatten(io_lib:format("<<_:~w,_:_*~w>>", [B, U])) + end; + _ -> io_lib:format("Badly formed bitstr type ~w", [Type]) + end; t_form_to_string({type, _L, 'fun', []}) -> "fun()"; t_form_to_string({type, _L, 'fun', [{type, _, any, []}, Range]}) -> "fun(...) -> " ++ t_form_to_string(Range); t_form_to_string({type, _L, 'fun', [{type, _, product, Domain}, Range]}) -> - "fun((" ++ sequence(t_form_to_string_list(Domain), ",") ++ ") -> " + "fun((" ++ string:join(t_form_to_string_list(Domain), ",") ++ ") -> " ++ t_form_to_string(Range) ++ ")"; t_form_to_string({type, _L, iodata, []}) -> "iodata()"; t_form_to_string({type, _L, iolist, []}) -> "iolist()"; @@ -3871,7 +3883,7 @@ t_form_to_string({type, _L, nonempty_list, [Type]}) -> "[" ++ t_form_to_string(Type) ++ ",...]"; t_form_to_string({type, _L, nonempty_string, []}) -> "nonempty_string()"; t_form_to_string({type, _L, product, Elements}) -> - "<" ++ sequence(t_form_to_string_list(Elements), ",") ++ ">"; + "<" ++ string:join(t_form_to_string_list(Elements), ",") ++ ">"; t_form_to_string({type, _L, range, [From, To]} = Type) -> case {erl_eval:partial_eval(From), erl_eval:partial_eval(To)} of {{integer, _, FromVal}, {integer, _, ToVal}} -> @@ -3881,7 +3893,7 @@ t_form_to_string({type, _L, range, [From, To]} = Type) -> t_form_to_string({type, _L, record, [{atom, _, Name}]}) -> io_lib:format("#~w{}", [Name]); t_form_to_string({type, _L, record, [{atom, _, Name}|Fields]}) -> - FieldString = sequence(t_form_to_string_list(Fields), ","), + FieldString = string:join(t_form_to_string_list(Fields), ","), io_lib:format("#~w{~s}", [Name, FieldString]); t_form_to_string({type, _L, field_type, [{atom, _, Name}, Type]}) -> io_lib:format("~w::~s", [Name, t_form_to_string(Type)]); @@ -3889,27 +3901,16 @@ t_form_to_string({type, _L, term, []}) -> "term()"; t_form_to_string({type, _L, timeout, []}) -> "timeout()"; t_form_to_string({type, _L, tuple, any}) -> "tuple()"; t_form_to_string({type, _L, tuple, Args}) -> - "{" ++ sequence(t_form_to_string_list(Args), ",") ++ "}"; + "{" ++ string:join(t_form_to_string_list(Args), ",") ++ "}"; t_form_to_string({type, _L, union, Args}) -> - sequence(t_form_to_string_list(Args), " | "); + string:join(t_form_to_string_list(Args), " | "); t_form_to_string({type, _L, Name, []} = T) -> try t_to_string(t_from_form(T)) - catch throw:{error, _} -> atom_to_list(Name) ++ "()" - end; -t_form_to_string({type, _L, binary, [X,Y]} = Type) -> - case {erl_eval:partial_eval(X), erl_eval:partial_eval(Y)} of - {{integer, _, XVal}, {integer, _, YVal}} -> - case YVal of - 0 -> - case XVal of - 0 -> "<<>>"; - _ -> io_lib:format("<<_:~w>>", [XVal]) - end - end; - _ -> io_lib:format("Bad formed type ~w",[Type]) + catch throw:{error, _} -> atom_to_string(Name) ++ "()" end; t_form_to_string({type, _L, Name, List}) -> - io_lib:format("~w(~s)", [Name, sequence(t_form_to_string_list(List), ",")]). + io_lib:format("~w(~s)", + [Name, string:join(t_form_to_string_list(List), ",")]). t_form_to_string_list(List) -> t_form_to_string_list(List, []). @@ -3917,8 +3918,13 @@ t_form_to_string_list(List) -> t_form_to_string_list([H|T], Acc) -> t_form_to_string_list(T, [t_form_to_string(H)|Acc]); t_form_to_string_list([], Acc) -> - lists:reverse(Acc). - + lists:reverse(Acc). + +-spec atom_to_string(atom()) -> string(). + +atom_to_string(Atom) -> + lists:flatten(io_lib:format("~w", [Atom])). + %%============================================================================= %% %% Utilities @@ -4057,7 +4063,7 @@ set_to_string(Set) -> true -> io_lib:write_string(atom_to_list(X), $'); % stupid emacs ' false -> io_lib:format("~w", [X]) end || X <- set_to_list(Set)], - sequence(L, [], " | "). + string:join(L, " | "). set_min([H|_]) -> H. diff --git a/lib/hipe/doc/src/make.dep b/lib/hipe/doc/src/make.dep deleted file mode 100644 index d5f5844c21..0000000000 --- a/lib/hipe/doc/src/make.dep +++ /dev/null @@ -1,13 +0,0 @@ -# ---------------------------------------------------- -# >>>> Do not edit this file <<<< -# This file was automaticly generated by -# /home/otp/bin/docdepend -# ---------------------------------------------------- - - -# ---------------------------------------------------- -# TeX files that the DVI file depend on -# ---------------------------------------------------- - -book.dvi: book.tex - diff --git a/lib/hipe/doc/src/notes.xml b/lib/hipe/doc/src/notes.xml index 434bfac64c..6b601e3039 100644 --- a/lib/hipe/doc/src/notes.xml +++ b/lib/hipe/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2006</year><year>2010</year> + <year>2006</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -30,6 +30,102 @@ </header> <p>This document describes the changes made to HiPE.</p> +<section><title>Hipe 3.8.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Clean up hipe.hrl.src (Thanks to Tuncer Ayaz)</p> + <p> + Own Id: OTP-9511</p> + </item> + <item> + <p> + Fix bug with binary pattern matching of floats of + variable size</p> + <p> + Pattern matching of floats with variable size + (<<F:S/float>>) did always fail. Judging from + similar code for ints, this bug is simply a typo.(Thanks + to Paul Guyot)</p> + <p> + Own Id: OTP-9556</p> + </item> + <item> + <p> + Quote atoms if necessary in types</p> + <p> + Atoms in some occurrences were not correctly quoted when + formatted to strings, for instance by the typer program + (Thanks to Tomas Abrahamsson)</p> + <p> + Update Dialyzer's reference results</p> + <p> + Own Id: OTP-9560</p> + </item> + <item> + <p> + Fix typer's crash for nonexisting files Remove unused + macro Fix bug in dataflow Decrease tuple arity limit This + fixes a memory related crash.</p> + <p> + Own Id: OTP-9597</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Types for several BIFs have been extended/corrected. Also + the types for types for <c>lists:keyfind/3</c>, + <c>lists:keysearch/3</c>, and <c>lists:keyemember/3</c> + have been corrected. The incorrect/incomplete types could + cause false dialyzer warnings.</p> + <p> + Own Id: OTP-9496</p> + </item> + </list> + </section> + +</section> + +<section><title>Hipe 3.8</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix hipe bug causing minor heap corruption related to + binary matching. The bug has not been confirmed as the + cause of any actual fault symptom.</p> + <p> + Own Id: OTP-9182</p> + </item> + <item> + <p> + Enable HiPE by default when compiling for PPC64</p> + <p> + Own Id: OTP-9198</p> + </item> + <item> + <p> + Fix handling of <<_:N,_:_*M>> type + expressions Fix the argument of + erlang:list_to_bitstring/1 Remove unneeded function + 'sequence/2' Same functionality provided by + string:join/2.</p> + <p> + Own Id: OTP-9277</p> + </item> + </list> + </section> + +</section> + <section><title>Hipe 3.7.9</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl index d7eb035551..45b390acbd 100644 --- a/lib/hipe/icode/hipe_beam_to_icode.erl +++ b/lib/hipe/icode/hipe_beam_to_icode.erl @@ -281,10 +281,14 @@ needs_redtest(Leafness) -> %%----------------------------------------------------------------------- %%--- label & func_info combo --- +trans_fun([{label,_}=F,{func_info,_,_,_}=FI|Instructions], Env) -> + %% Handle old code without a line instruction. + trans_fun([F,{line,[]},FI|Instructions], Env); trans_fun([{label,B},{label,_}, {func_info,M,F,A},{label,L}|Instructions], Env) -> trans_fun([{label,B},{func_info,M,F,A},{label,L}|Instructions], Env); trans_fun([{label,B}, + {line,_}, {func_info,{atom,_M},{atom,_F},_A}, {label,L}|Instructions], Env) -> %% Emit code to handle function_clause errors. The BEAM test instructions @@ -720,7 +724,7 @@ trans_fun([{test,bs_get_float2,{f,Lbl},[Ms,_Live,Size,Unit,{field_flags,Flags0}, ?EXIT({bad_bs_size_constant,Size}); BitReg -> Bits = mk_var(BitReg), - {{bs_get_float,Unit,Flags}, [Bits,MsVar]} + {{bs_get_float,Unit,Flags}, [MsVar,Bits]} end, trans_op_call({hipe_bs_primop,Name}, Lbl, Args, [Dst,MsVar], Env, Instructions); trans_fun([{test,bs_get_integer2,{f,Lbl},[Ms,_Live,Size,Unit,{field_flags,Flags0},X]}| @@ -1142,6 +1146,11 @@ trans_fun([{trim,N,NY}|Instructions], Env) -> Moves = trans_trim(N, NY), Moves ++ trans_fun(Instructions, Env); %%-------------------------------------------------------------------- +%% New line/1 instruction in R15. +%%-------------------------------------------------------------------- +trans_fun([{line,_}|Instructions], Env) -> + trans_fun(Instructions,Env); +%%-------------------------------------------------------------------- %%--- ERROR HANDLING --- %%-------------------------------------------------------------------- trans_fun([X|_], _) -> @@ -1869,6 +1878,8 @@ patch_make_funs([], FunIndex, Acc) -> find_mfa([{label,_}|Code]) -> find_mfa(Code); +find_mfa([{line,_}|Code]) -> + find_mfa(Code); find_mfa([{func_info,{atom,M},{atom,F},A}|_]) when is_atom(M), is_atom(F), is_integer(A), 0 =< A, A =< 255 -> {M, F, A}. diff --git a/lib/hipe/icode/hipe_icode_pp.erl b/lib/hipe/icode/hipe_icode_pp.erl index 575bbfe43d..575bbfe43d 100755..100644 --- a/lib/hipe/icode/hipe_icode_pp.erl +++ b/lib/hipe/icode/hipe_icode_pp.erl diff --git a/lib/hipe/icode/hipe_icode_ssa.erl b/lib/hipe/icode/hipe_icode_ssa.erl index 719d5d8f45..719d5d8f45 100755..100644 --- a/lib/hipe/icode/hipe_icode_ssa.erl +++ b/lib/hipe/icode/hipe_icode_ssa.erl diff --git a/lib/hipe/main/hipe.hrl.src b/lib/hipe/main/hipe.hrl.src index a1fbeda9cf..e74f31b19d 100644 --- a/lib/hipe/main/hipe.hrl.src +++ b/lib/hipe/main/hipe.hrl.src @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -50,9 +50,8 @@ %% Flags: %% DEBUG - Turns on debugging. (Can be defined to a integer %% value to determine the level of debugging) -%% VERBOSE - More info is printed... %% HIPE_LOGGING - Turn on logging of messages with erl_logger. -%% DO_ASSERT - Turn on Assertions. +%% DO_ASSERT - Turn on assertions. %% TIMING - Turn on timing. %% HIPE_INSTRUMENT_COMPILER - Turn on instrumentation of the compiler. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -107,13 +106,9 @@ %% %% Define the exit macro %% --ifdef(VERBOSE). --define(EXIT(Reason), erlang:error({?MODULE,?LINE,Reason})). --else. -define(EXIT(Reason), ?msg("EXITED with reason ~w @~w:~w\n", [Reason,?MODULE,?LINE]), erlang:error({?MODULE,?LINE,Reason})). --endif. %% %% Assertions. diff --git a/lib/hipe/regalloc/hipe_node_sets.erl b/lib/hipe/regalloc/hipe_node_sets.erl index b5e2971c4d..be43ff2bfd 100644 --- a/lib/hipe/regalloc/hipe_node_sets.erl +++ b/lib/hipe/regalloc/hipe_node_sets.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -29,7 +29,7 @@ -record(node_sets, {spilled, % Nodes marked for spilling - colored % Nodes succesfully colored + colored % Nodes successfully colored }). spilled(Node_sets) -> Node_sets#node_sets.spilled. diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile index 55d20af8af..690045b978 100644 --- a/lib/hipe/rtl/Makefile +++ b/lib/hipe/rtl/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2001-2010. All Rights Reserved. +# Copyright Ericsson AB 2001-2011. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -108,10 +108,30 @@ release_spec: opt release_docs_spec: -HIPE_MKLITERALS=$(ERL_TOP)/bin/$(TARGET)/hipe_mkliterals +ifeq ($(TYPE),debug) +TYPE_STR=.debug +else +TYPE_STR= +endif + +ifeq ($(FLAVOR),smp) +FLAVOR_STR=.smp +else +FLAVOR_STR= +endif + +ifeq ($(XCOMP),yes) +MKLIT_FLAGS= -x +else +MKLIT_FLAGS= +endif + + +HIPE_MKLITERALS=$(ERL_TOP)/bin/$(TARGET)/hipe_mkliterals$(TYPE_STR)$(FLAVOR_STR) + hipe_literals.hrl: $(HIPE_MKLITERALS) - $(HIPE_MKLITERALS) -e > hipe_literals.hrl + $(HIPE_MKLITERALS) $(MKLIT_FLAGS) -e > hipe_literals.hrl # Need to generate hipe.hrl from one and only one target in one and only # one makefile; otherwise, clearmake will force rebuilds of hipe over and diff --git a/lib/hipe/rtl/hipe_rtl_lcm.erl b/lib/hipe/rtl/hipe_rtl_lcm.erl index 5d65389d48..9224623c8b 100644 --- a/lib/hipe/rtl/hipe_rtl_lcm.erl +++ b/lib/hipe/rtl/hipe_rtl_lcm.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2009. All Rights Reserved. +%% Copyright Ericsson AB 2004-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -269,7 +269,7 @@ insert_expr_last(CFG0, Label, Instr) -> %% is a branch operation). insert_expr_last_work(_, Instr, []) -> %% This case should not happen since this means that block was completely - %% empty when the function was called. For compability we insert it last. + %% empty when the function was called. For compatibility we insert it last. [Instr]; insert_expr_last_work(_, Instr, [Code1]) -> %% We insert the code next to last. diff --git a/lib/hipe/util/hipe_dot.erl b/lib/hipe/util/hipe_dot.erl index d6ef801c88..d6ef801c88 100755..100644 --- a/lib/hipe/util/hipe_dot.erl +++ b/lib/hipe/util/hipe_dot.erl diff --git a/lib/hipe/vsn.mk b/lib/hipe/vsn.mk index 6ba9009a24..65e04ff7fa 100644 --- a/lib/hipe/vsn.mk +++ b/lib/hipe/vsn.mk @@ -1 +1 @@ -HIPE_VSN = 3.7.9 +HIPE_VSN = 3.8.1 |