aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2015-11-28 22:18:42 +0100
committerKostis Sagonas <[email protected]>2015-12-16 22:08:33 +0100
commit1c759f0bab4b0598231bd6e1d78171722d5c29df (patch)
tree669e04d755e9d92fec7697aa62c711ae1c63fac2 /lib/hipe
parent1c6075b7c69709ce129e817b4652ccb5ff9d2e95 (diff)
downloadotp-1c759f0bab4b0598231bd6e1d78171722d5c29df.tar.gz
otp-1c759f0bab4b0598231bd6e1d78171722d5c29df.tar.bz2
otp-1c759f0bab4b0598231bd6e1d78171722d5c29df.zip
Cleanups & uncomment some code
Diffstat (limited to 'lib/hipe')
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_arith.erl2
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_bignums.erl2
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_floats.erl2
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_guards.erl6
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_issues_beam.erl38
-rw-r--r--lib/hipe/test/basic_SUITE_data/basic_random.erl4
6 files changed, 27 insertions, 27 deletions
diff --git a/lib/hipe/test/basic_SUITE_data/basic_arith.erl b/lib/hipe/test/basic_SUITE_data/basic_arith.erl
index 0277ad852b..28e99be053 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_arith.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_arith.erl
@@ -14,7 +14,7 @@ test() ->
ok = test_uplus(),
ok = test_bsl_errors(),
ok.
-
+
%%----------------------------------------------------------------------
%% Tests the remainder operator.
diff --git a/lib/hipe/test/basic_SUITE_data/basic_bignums.erl b/lib/hipe/test/basic_SUITE_data/basic_bignums.erl
index 79f62e3229..e3b523b3f5 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_bignums.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_bignums.erl
@@ -87,7 +87,7 @@ bsl_f(X, Y) -> X bsl Y.
%% applies a binary function N times
n(1, F, X, Y) -> F(X, Y);
-n(N, F, X, Y) when N > 1 -> n(N-1, F, F(X, Y), Y).
+n(N, F, X, Y) when N > 1 -> n(N-1, F, F(X, Y), Y).
%%--------------------------------------------------------------------
diff --git a/lib/hipe/test/basic_SUITE_data/basic_floats.erl b/lib/hipe/test/basic_SUITE_data/basic_floats.erl
index a3df73b928..c49ac3946e 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_floats.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_floats.erl
@@ -36,7 +36,7 @@ sub(X) ->
mult(X) ->
3.1415 * X.
-
+
%% tests the translation of the fnegate BEAM instruction.
negate(X) ->
- (X + 0.0).
diff --git a/lib/hipe/test/basic_SUITE_data/basic_guards.erl b/lib/hipe/test/basic_SUITE_data/basic_guards.erl
index a519944916..4bfe363ed3 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_guards.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_guards.erl
@@ -35,7 +35,7 @@ guard1(X) when hd(X) == foo ->
test_guard2() ->
ok1 = guard2(true),
not_boolean = guard2(42),
- ok2 = guard2(false),
+ ok2 = guard2(false),
ok.
guard2(X) when X -> % gets transformed to: is_boolean(X), X =:= true
@@ -48,7 +48,7 @@ guard2(_) ->
%%--------------------------------------------------------------------
-define(is_foo(X), (is_atom(X) or (is_tuple(X) and (element(1, X) =:= 'foo')))).
-
+
test_guard3() ->
no = f('foo'),
yes = f({'foo', 42}),
@@ -65,7 +65,7 @@ f(_) -> no.
test_guard4() ->
yes = is_ref(make_ref()),
no = is_ref(gazonk),
- yes = is_ref(an_external_ref(?EXT_REF)),
+ yes = is_ref(an_external_ref(?EXT_REF)),
ok.
is_ref(Ref) when is_reference(Ref) -> yes;
diff --git a/lib/hipe/test/basic_SUITE_data/basic_issues_beam.erl b/lib/hipe/test/basic_SUITE_data/basic_issues_beam.erl
index 47306b2502..7c4db28dd4 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_issues_beam.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_issues_beam.erl
@@ -33,11 +33,11 @@ test() ->
test_crash_R10_hinde() ->
rec_R10_hinde(#r{}).
-
+
rec_R10_hinde(As) ->
case As of
- A when A#r.b == ""; A#r.b == undefined -> ok;
- _ -> error
+ A when A#r.b == ""; A#r.b == undefined -> ok;
+ _ -> error
end.
%%--------------------------------------------------------------------
@@ -118,7 +118,7 @@ just_compile_me_R11_bjorklund() ->
%% From: Tim Rath
%% Date: Sep 13, 2006
%% Subject: Compiler bug not quite fixed
-%%
+%%
%% I saw a compiler bug posted to the list by Martin Bjorklund that
%% appeared to be exactly the problem I'm seeing, and then noticed
%% that this was fixed in R11B-1. Unfortunately, though R11B-1 appears
@@ -198,9 +198,9 @@ die(A) ->
test_crash_R12_morris() ->
foo(42).
-
+
foo(Bar) when (is_integer(Bar) andalso Bar =:= 0) ; Bar =:= 42 ->
- ok.
+ ok.
%%--------------------------------------------------------------------
%% From: Paulo Sergio Almeida
@@ -237,20 +237,20 @@ collect(_, _, _) -> ok.
test_error_R13B01_fisher() ->
perform_select({foo, "42"}).
-perform_select({Type, Keyval}) ->
+perform_select({Type, Keyval}) ->
try
- if is_atom(Type) andalso length(Keyval) > 0 -> ok;
- true -> ok
- end
- catch
- _:_ -> fail
- end.
+ if is_atom(Type) andalso length(Keyval) > 0 -> ok;
+ true -> ok
+ end
+ catch
+ _:_ -> fail
+ end.
%%--------------------------------------------------------------------
%% From: Mikage Sawatari
%% Date: Jun 12, 2009
%%
-%% I have the following compilation problem on Erlang R13B01.
+%% I have the following compilation problem on Erlang R13B01.
%% Compiler reports "Internal consistency check failed".
%%--------------------------------------------------------------------
@@ -263,7 +263,7 @@ test_sawatari([H|T], Bin) ->
null -> <<Bin/binary>>;
_ -> ok
end,
- test_sawatari(T, Bin).
+ test_sawatari(T, Bin).
%%--------------------------------------------------------------------
@@ -278,10 +278,10 @@ orgno_alphanum(Cs) ->
orelse ((C >= $A) andalso (C =< $Z))].
%%--------------------------------------------------------------------
-%% I'm getting an Internal Consistency Check error when attempting to
+%% I'm getting an Internal Consistency Check error when attempting to
%% build Wings3D on Mac OS X 10.4.2 (Erlang OTP R10B-6):
-%%
-%% erlc -pa /ebin +warn_unused_vars -I/include -I ../e3d -W +debug_info
+%%
+%% erlc -pa /ebin +warn_unused_vars -I/include -I ../e3d -W +debug_info
%% '-Dwings_version="0.98.31"' -pa ../ebin -o../ebin wings_color.erl
%% wings_color: function internal_rgb_to_hsv/3+97:
%% Internal consistency check failed - please report this bug.
@@ -322,4 +322,4 @@ test_error_R16B03_norell() ->
test_error_R16B03_norell(#r{}, gazonk).
test_error_R16B03_norell(Rec, Tag) ->
- ok. %% is_record(Rec, Tag, 3) orelse ok.
+ is_record(Rec, Tag, 3) orelse ok.
diff --git a/lib/hipe/test/basic_SUITE_data/basic_random.erl b/lib/hipe/test/basic_SUITE_data/basic_random.erl
index 8866218318..783947bd31 100644
--- a/lib/hipe/test/basic_SUITE_data/basic_random.erl
+++ b/lib/hipe/test/basic_SUITE_data/basic_random.erl
@@ -218,7 +218,7 @@ merge2_1(_nil, H2, T2, M) ->
merge2_2(T1, H1, [H2 | T2], M) when H1 < H2 ->
merge2_1(T1, H2, T2, [H1 | M]);
-merge2_2(T1, H1, [H2 | T2], M) ->
+merge2_2(T1, H1, [H2 | T2], M) ->
merge2_2(T1, H1, T2, [H2 | M]);
merge2_2(T1, H1, _nil, M) ->
lists:reverse(T1, [H1 | M]).
@@ -232,7 +232,7 @@ rmerge2_1(_nil, H2, T2, M) ->
rmerge2_2(T1, H1, [H2 | T2], M) when H1 >= H2 ->
rmerge2_1(T1, H2, T2, [H1 | M]);
-rmerge2_2(T1, H1, [H2 | T2], M) ->
+rmerge2_2(T1, H1, [H2 | T2], M) ->
rmerge2_2(T1, H1, T2, [H2 | M]);
rmerge2_2(T1, H1, _nil, M) ->
lists:reverse(T1, [H1 | M]).